/* ==========================================================================
   Gran Canaria GO — css/components.css
   1. Pulsanti          7. Form e controlli
   2. Chip e badge      8. Meteo
   3. Card luogo        9. Chat AI
   4. Mappa stilizzata 10. Modale
   5. Timeline         11. Toast
   6. Statistiche      12. Stati vuoti e loader
   ========================================================================== */

/* ------------------------------------------------------------ 1. Pulsanti */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.86rem 1.5rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--speed) var(--ease-spring), box-shadow var(--speed) var(--ease),
              background var(--speed) var(--ease), border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}

.btn__icon { font-size: 1.05em; line-height: 1; }

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.42) 50%, transparent 62%);
  transform: translateX(-130%);
  transition: transform 0.75s var(--ease);
}
.btn:hover::after { transform: translateX(130%); }

.btn:active { transform: translateY(0) scale(0.985); }

.btn--primary {
  background: var(--gradient-brand);
  background-size: 190% 190%;
  color: #04141f;
  box-shadow: var(--glow-cool);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 70px -30px rgba(46, 230, 197, 0.85);
  animation: shimmer 3.4s linear infinite;
}

.btn--ghost {
  background: var(--glass);
  border-color: var(--border-strong);
  color: var(--text);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.btn--ghost:hover {
  transform: translateY(-3px);
  background: var(--glass-strong);
  border-color: rgba(46, 230, 197, 0.45);
  box-shadow: var(--shadow-soft);
}

.btn--outline {
  background: transparent;
  border-color: rgba(46, 230, 197, 0.42);
  color: var(--turquoise);
}
.btn--outline:hover {
  background: rgba(46, 230, 197, 0.10);
  transform: translateY(-2px);
}

.btn--warm {
  background: var(--gradient-warm);
  color: #2a1400;
  box-shadow: var(--glow-warm);
}
.btn--warm:hover { transform: translateY(-3px); }

.btn--quiet {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.6rem 1rem;
  font-size: 0.86rem;
}
.btn--quiet:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); transform: translateY(-1px); }

.btn--sm { padding: 0.6rem 1.06rem; font-size: 0.86rem; }
.btn--lg { padding: 1.02rem 1.85rem; font-size: 1.04rem; }
.btn--block { width: 100%; }

.btn--primary:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn__spinner {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.25);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
}

/* Icon button (preferiti, chiusura) */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--glass-deep);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  color: var(--text);
  font-size: 1.05rem;
  transition: transform var(--speed) var(--ease-spring), background var(--speed) var(--ease),
              border-color var(--speed) var(--ease), color var(--speed) var(--ease);
}
.icon-btn:hover { transform: scale(1.09); background: var(--glass-strong); border-color: var(--border-strong); }
.icon-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 90, 120, 0.9), rgba(255, 138, 61, 0.9));
  border-color: transparent;
  box-shadow: 0 12px 30px -14px rgba(255, 90, 120, 0.9);
}
.icon-btn.is-bump { animation: bump 0.45s var(--ease-spring); }

@keyframes bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

/* --------------------------------------------------------- 2. Chip e badge */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: transform var(--speed) var(--ease-spring), background var(--speed) var(--ease),
              color var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.chip:hover { transform: translateY(-2px); color: var(--text); background: rgba(255, 255, 255, 0.08); }
.chip.is-active {
  color: #04141f;
  background: var(--gradient-cool);
  border-color: transparent;
  box-shadow: 0 14px 34px -18px rgba(46, 230, 197, 0.9);
}
.chip__emoji { font-size: 1.02em; line-height: 1; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.55rem; }

/* Chip di interesse: più grandi, con descrizione */
.interest-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
  text-align: left;
  transition: transform var(--speed) var(--ease-spring), background var(--speed) var(--ease),
              border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.interest-chip:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.07); }
.interest-chip input { position: absolute; opacity: 0; pointer-events: none; }
.interest-chip__emoji { font-size: 1.28rem; line-height: 1; }
.interest-chip__label { font-weight: 700; font-size: 0.9rem; color: var(--text); display: block; }
.interest-chip__hint { font-size: 0.74rem; color: var(--text-dim); display: block; line-height: 1.35; }
.interest-chip.is-active {
  border-color: rgba(46, 230, 197, 0.55);
  background: rgba(46, 230, 197, 0.10);
  box-shadow: 0 18px 40px -26px rgba(46, 230, 197, 0.95);
}
.interest-chip.is-active .interest-chip__label { color: var(--turquoise); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  padding: 0.28rem 0.62rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge--glass {
  background: rgba(4, 16, 29, 0.66);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
}
.badge--price { color: var(--amber); border-color: rgba(251, 191, 36, 0.3); background: rgba(251, 191, 36, 0.1); }
.badge--rating { color: var(--amber); border-color: rgba(251, 191, 36, 0.28); background: rgba(251, 191, 36, 0.08); }
.badge--success { color: var(--success); border-color: rgba(52, 211, 153, 0.32); background: rgba(52, 211, 153, 0.1); }
.badge--free { color: var(--turquoise); border-color: rgba(46, 230, 197, 0.32); background: rgba(46, 230, 197, 0.1); }
.badge--accent { color: #04141f; background: var(--gradient-cool); border-color: transparent; }

/* Stato di visita verificato (catalogo 2026): mai presentato come "aperto"
   quando non lo è. Il colore segue la gravità della situazione. */
.badge--unknown {
  color: var(--text-muted);
  border-color: var(--border-strong);
  background: rgba(157, 184, 206, 0.08);
}
.badge--status { font-weight: 600; }
.badge--status-appointment {
  color: var(--turquoise);
  border-color: rgba(46, 230, 197, 0.32);
  background: rgba(46, 230, 197, 0.1);
}
.badge--status-unverified {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.1);
}
.badge--status-closed {
  color: #ff9f9f;
  border-color: rgba(255, 120, 120, 0.4);
  background: rgba(255, 120, 120, 0.12);
}

.tag-row { display: flex; flex-wrap: wrap; gap: 0.38rem; }

/* Contatti e verifica nella finestra di dettaglio. */
.info-list {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--glass);
}
.info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: baseline;
  font-size: 0.92rem;
}
.info-row__label {
  min-width: 7.5rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}
.info-row .link { color: var(--turquoise); }
.info-row .link:hover { color: var(--text); }

/* ------------------------------------------------------------ 3. Card luogo */

.place-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--border);
  overflow: hidden;
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: transform var(--speed) var(--ease), box-shadow var(--speed) var(--ease),
              border-color var(--speed) var(--ease);
}
.place-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lift);
}

/* "Foto": scena illustrata generata via SVG + gradiente della categoria */
.place-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--card-gradient, var(--gradient-deep));
}
.place-card__scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.place-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 8, 15, 0.05) 0%, rgba(2, 8, 15, 0.25) 55%, rgba(2, 8, 15, 0.82) 100%);
}
.place-card:hover .place-card__scene { transform: scale(1.06); }
.place-card__scene { transition: transform 0.7s var(--ease); transform-origin: center; }

.place-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.9rem 1.05rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.6rem;
  z-index: 2;
}

.place-card__cat {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  padding: 0.32rem 0.66rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(4, 16, 29, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.place-card__fav {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 3;
}

.place-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.05rem 1.15rem 1.2rem;
  flex: 1;
}

.place-card__title {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  letter-spacing: -0.015em;
}
.place-card__zone {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.place-card__summary {
  font-size: 0.885rem;
  color: var(--text-muted);
  line-height: 1.52;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.place-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.34rem 0.5rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

.place-card__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.place-card__actions .btn { flex: 1; }

/* Variante compatta per la chat e i preferiti */
.place-card--mini { border-radius: var(--radius); }
.place-card--mini .place-card__media { aspect-ratio: 16 / 7; }
.place-card--mini .place-card__body { padding: 0.85rem 0.95rem 1rem; gap: 0.5rem; }
.place-card--mini .place-card__summary { -webkit-line-clamp: 2; font-size: 0.84rem; }

.place-row {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  padding: 0.7rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  transition: transform var(--speed) var(--ease), background var(--speed) var(--ease);
}
.place-row:hover { transform: translateX(3px); background: rgba(255, 255, 255, 0.07); }
.place-row__thumb {
  width: 62px; height: 62px;
  flex: 0 0 62px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background: var(--card-gradient, var(--gradient-deep));
}
.place-row__info { min-width: 0; flex: 1; }
/* Titolo e sottotitolo stanno su righe separate: senza display:block
   resterebbero inline e si accavallerebbero sulla stessa riga. */
.place-row__title {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.place-row__sub {
  display: block;
  font-size: 0.77rem;
  color: var(--text-dim);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Griglia di miniature (usata nei suggerimenti) */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.6rem;
}
.preview-tile {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-gradient, var(--gradient-deep));
  position: relative;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform var(--speed) var(--ease-spring), border-color var(--speed) var(--ease);
}
.preview-tile:hover { transform: translateY(-4px) scale(1.015); border-color: var(--border-strong); }
.preview-tile__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.5rem 0.6rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, transparent, rgba(2, 8, 15, 0.9));
}

/* --------------------------------------------------- 4. Mappa stilizzata */

.island-map {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}
.island-map svg { width: 100%; height: auto; overflow: visible; }

.hero__visual .island-map { max-width: 520px; }

.island-map--full {
  max-width: 760px;
  margin-inline: auto;
}

/* Suggerimento: la mappa completa cresce fino a 760px per avere marker
   leggibili senza diventare una parete verticale su schermi grandi. */

/* Schede in vetro che fluttuano sopra la mappa della hero */
.floating-card {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.62rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: rgba(4, 16, 29, 0.72);
  backdrop-filter: blur(var(--blur-strong)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(160%);
  box-shadow: var(--shadow-soft);
  font-size: 0.84rem;
  animation: float-soft 7s var(--ease) infinite;
  white-space: nowrap;
  pointer-events: none;
}
.floating-card__icon { font-size: 1.25rem; line-height: 1; }

.floating-card--a { top: 4%; right: 2%; animation-delay: 0s; }
.floating-card--b { bottom: 16%; left: -2%; animation-delay: 1.6s; }
.floating-card--c { bottom: 2%; right: 6%; animation-delay: 3.1s; }

@media (max-width: 1080px) {
  .floating-card--b { left: 0; }
  .floating-card--a { right: 0; }
}

@media (max-width: 520px) {
  .floating-card { font-size: 0.76rem; padding: 0.5rem 0.7rem; }
  .floating-card--b { display: none; }
}

.island-map__land {
  fill: url(#islandFill);
  stroke: rgba(46, 230, 197, 0.55);
  stroke-width: 1.6;
  filter: drop-shadow(0 40px 70px rgba(2, 8, 15, 0.9));
}
.island-map__contour {
  fill: none;
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}
.island-map__terrain { opacity: 0.55; }

.hero-dot { cursor: default; }
.hero-dot__pulse {
  animation: pulse-ring 3.4s var(--ease) infinite;
  transform-origin: center;
  transform-box: fill-box;
}

.map-marker { cursor: pointer; }
.map-marker__dot {
  transition: transform var(--speed) var(--ease-spring), filter var(--speed) var(--ease);
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.65));
}
.map-marker:hover .map-marker__dot,
.map-marker.is-active .map-marker__dot { transform: scale(1.55); }
.map-marker.is-dim { opacity: 0.16; }

.map-user {
  transform-box: fill-box;
  transform-origin: center;
}
.map-user__ring {
  fill: rgba(46, 230, 197, 0.18);
  animation: pulse-ring 2.6s var(--ease) infinite;
}
.map-user__core { fill: #2ee6c5; stroke: #04141f; stroke-width: 2; }

/* Layout pagina mappa */
.map-shell {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background:
    radial-gradient(700px 500px at 30% 15%, rgba(14, 165, 233, 0.14), transparent 65%),
    linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2rem);
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.1rem;
}

.map-info {
  position: absolute;
  right: clamp(0.8rem, 2.4vw, 1.8rem);
  bottom: clamp(0.8rem, 2.4vw, 1.8rem);
  width: min(320px, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: rgba(4, 16, 29, 0.9);
  backdrop-filter: blur(var(--blur-strong)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(160%);
  box-shadow: var(--shadow-lift);
  animation: fade-up 0.32s var(--ease) both;
  z-index: 4;
}
.map-info__close {
  position: absolute;
  top: 0.5rem; right: 0.5rem;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.map-info__close:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.map-info__title { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; padding-right: 1.6rem; }
.map-info__zone { font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.5rem; }
.map-info__text { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}
.map-legend__item { display: inline-flex; align-items: center; gap: 0.4rem; }
.map-legend__swatch {
  width: 10px; height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------------------------ 5. Timeline */

.timeline { position: relative; padding-left: 0; }

.timeline__item {
  position: relative;
  display: grid;
  /* La colonna dell'orario resta larga quanto basta al testo "09:30",
     mentre la linea e il pallino vivono nello spazio fra le due colonne:
     cosi non si sovrappongono mai al numero. */
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 26px;
  padding-bottom: 1.5rem;
}

.timeline__item:last-child { padding-bottom: 0; }

/* Linea verticale */
.timeline__item::before {
  content: '';
  position: absolute;
  left: 85px;
  top: 42px;
  bottom: -6px;
  width: 2px;
  background: linear-gradient(180deg, rgba(46, 230, 197, 0.55), rgba(255, 138, 61, 0.32));
}
.timeline__item:last-child::before { display: none; }

.timeline__time {
  padding-top: 0.55rem;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.timeline__time small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.timeline__node {
  position: relative;
  z-index: 2;
}

.timeline__dot {
  position: absolute;
  left: -20.5px;
  top: 0.72rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent, var(--turquoise));
  border: 3px solid var(--bg-900);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #2ee6c5) 26%, transparent);
}
.timeline__dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid var(--accent, var(--turquoise));
  animation: pulse-ring 2.8s var(--ease) infinite;
}

.timeline-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}
.timeline-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.timeline-card__media { position: relative; background: var(--card-gradient, var(--gradient-deep)); min-height: 100%; }
.timeline-card__body { padding: 0.95rem 1.1rem 1.05rem; display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.timeline-card__title { font-family: var(--font-display); font-size: 1.06rem; font-weight: 700; line-height: 1.25; }
.timeline-card__text { font-size: 0.87rem; color: var(--text-muted); line-height: 1.5; }
.timeline-card__facts { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.timeline-card__foot { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

.travel-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.7rem 0;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--border-strong);
  font-size: 0.76rem;
  color: var(--text-dim);
  width: fit-content;
}
.travel-note strong { color: var(--turquoise); font-weight: 700; }

/* ------------------------------------------------------- 6. Statistiche */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.9rem; }

.stat {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.stat:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.stat__icon { font-size: 1.1rem; }
.stat__value {
  font-family: var(--font-display);
  font-size: 1.42rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.15;
}
.stat__value small { font-size: 0.72em; font-weight: 600; color: var(--text-muted); }
.stat__label { font-size: 0.76rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; }

.panel {
  padding: clamp(1.1rem, 2.6vw, 1.7rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
}
.panel--flush { padding: 0; overflow: hidden; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.panel__title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }

.note-list { display: flex; flex-direction: column; gap: 0.6rem; }
.note {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: rgba(46, 230, 197, 0.06);
  border: 1px solid rgba(46, 230, 197, 0.16);
  font-size: 0.86rem;
  color: var(--text-muted);
}
.note__icon { flex: 0 0 auto; }

/* Barra del budget */
.meter { display: flex; flex-direction: column; gap: 0.45rem; }
.meter__head { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.meter__track {
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.meter__fill {
  height: 100%;
  border-radius: 999px;
  background: var(--gradient-cool);
  width: 0;
  transition: width 0.8s var(--ease);
}
.meter__fill.is-over { background: var(--gradient-warm); }

/* ------------------------------------------------------ 7. Form e controlli */

.field { display: flex; flex-direction: column; gap: 0.5rem; }

.field__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
}
.field__hint { font-size: 0.76rem; color: var(--text-dim); }

.control {
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(4, 16, 29, 0.55);
  color: var(--text);
  font-size: 0.93rem;
  transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}
.control:hover { border-color: var(--border-strong); }
.control:focus {
  outline: none;
  border-color: rgba(46, 230, 197, 0.7);
  box-shadow: 0 0 0 4px rgba(46, 230, 197, 0.14);
}
.control::placeholder { color: var(--text-dim); }

select.control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.6rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--turquoise) 50%),
                    linear-gradient(135deg, var(--turquoise) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 1px), calc(100% - 14px) calc(50% + 1px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}
select.control option { background: #06182a; color: var(--text); }

/* Area di testo (pagina di assistenza): stesso linguaggio visivo dei campi
   .control, con un'altezza minima comoda per scrivere una descrizione. */
textarea.control {
  min-height: 9.5rem;
  line-height: 1.55;
  resize: vertical;
  font-family: inherit;
}
.field__hint.is-warn { color: var(--amber); }

/* Slider */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  cursor: pointer;
  outline: none;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gradient-cool);
  border: 3px solid var(--bg-800);
  box-shadow: 0 6px 18px -6px rgba(46, 230, 197, 0.95);
  transition: transform var(--speed) var(--ease-spring);
}
.slider::-webkit-slider-thumb:hover { transform: scale(1.16); }
.slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2ee6c5;
  border: 3px solid var(--bg-800);
  box-shadow: 0 6px 18px -6px rgba(46, 230, 197, 0.95);
}
.slider::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.10); }

.field__value {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--turquoise);
  font-size: 0.98rem;
}

/* Contatore persone */
.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(4, 16, 29, 0.55);
  width: fit-content;
}
.stepper__btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  transition: background var(--speed) var(--ease), transform var(--speed) var(--ease-spring);
}
.stepper__btn:hover { background: rgba(46, 230, 197, 0.14); transform: scale(1.06); }
.stepper__value {
  min-width: 58px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
}

/* Segmenti (pace, orario) */
.segments {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.25rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(4, 16, 29, 0.55);
  flex-wrap: wrap;
}
.segment {
  padding: 0.48rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--speed) var(--ease);
}
.segment:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.segment.is-active {
  color: #04141f;
  background: var(--gradient-cool);
  box-shadow: 0 10px 24px -14px rgba(46, 230, 197, 0.9);
}

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }

.planner-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 1.6rem; align-items: start; }

/* Ultimo passo del planner: chiude il percorso di scelta con il riepilogo
   delle tappe e il pulsante di generazione. */
.planner-final {
  border-color: rgba(46, 230, 197, 0.32);
  background: linear-gradient(160deg, rgba(46, 230, 197, 0.08), rgba(14, 165, 233, 0.04) 60%, transparent);
}
.planner-final__summary {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-muted);
}
.planner-final__summary.is-ready { color: var(--turquoise); }
.planner-final .chip-row { align-items: center; }
.planner-final .badge { white-space: normal; }
.planner-final__empty { color: var(--amber); }

.search-field { position: relative; }
.search-field .control { padding-left: 2.6rem; }
.search-field::before {
  content: '🔎';
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.75;
  pointer-events: none;
  z-index: 2;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

/* ------------------------------------------------------------- 8. Meteo */

.weather-card {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  background:
    radial-gradient(600px 340px at 78% 8%, rgba(255, 138, 61, 0.20), transparent 62%),
    radial-gradient(620px 380px at 12% 92%, rgba(46, 230, 197, 0.18), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: clamp(1.2rem, 3vw, 1.9rem);
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
}

.weather-now { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.weather-now__temp {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
}
.weather-now__temp sup { font-size: 0.4em; vertical-align: super; color: var(--text-muted); font-weight: 600; }
.weather-now__cond { font-size: 0.95rem; color: var(--text); font-weight: 600; }
.weather-now__icon { font-size: clamp(2.6rem, 7vw, 3.8rem); line-height: 1; animation: float-soft 5.5s var(--ease) infinite; }

.weather-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 0.6rem; }
.weather-fact {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(4, 16, 29, 0.45);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.weather-fact__label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); font-weight: 700; }
.weather-fact__value { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }

.weather-hours {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
}
.weather-hour {
  padding: 0.6rem 0.4rem;
  border-radius: var(--radius-sm);
  background: rgba(4, 16, 29, 0.42);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.78rem;
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease);
}
.weather-hour:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.weather-hour__time { color: var(--text-dim); font-weight: 600; }
.weather-hour__temp { font-family: var(--font-display); font-weight: 700; font-size: 0.95rem; }

.weather-days { display: flex; flex-direction: column; gap: 0.4rem; }
.weather-day {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background var(--speed) var(--ease);
  font-size: 0.86rem;
}
.weather-day:hover { background: rgba(255, 255, 255, 0.05); }
.weather-day__name { font-weight: 600; }
.weather-day__icon { font-size: 1.1rem; }
.weather-day__temp { font-family: var(--font-display); font-weight: 700; color: var(--text); }
.weather-day__temp span { color: var(--text-dim); font-weight: 600; margin-left: 0.4rem; }

/* ----------------------------------------------------------- 9. Chat AI */

.chat {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  overflow: hidden;
  height: min(660px, calc(100vh - 200px));
  min-height: 460px;
}

.chat__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 16, 29, 0.5);
}
.chat__avatar {
  width: 44px; height: 44px;
  border-radius: 15px;
  display: grid; place-items: center;
  font-size: 1.25rem;
  background: var(--gradient-brand);
  box-shadow: var(--glow-cool);
  flex: 0 0 auto;
}
.chat__title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2; }
.chat__status { font-size: 0.75rem; color: var(--success); display: flex; align-items: center; gap: 0.35rem; }
.chat__status::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}

.chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  scroll-behavior: smooth;
}

.msg { display: flex; gap: 0.6rem; max-width: 92%; animation: fade-up 0.34s var(--ease) both; }
.msg--user { align-self: flex-end; flex-direction: row-reverse; }

.msg__bubble {
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.58;
  white-space: pre-line;
  word-break: break-word;
}
.msg--ai .msg__bubble {
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid var(--border);
  border-top-left-radius: 6px;
  color: var(--text);
}
.msg--user .msg__bubble {
  background: var(--gradient-cool);
  color: #03202b;
  font-weight: 600;
  border-top-right-radius: 6px;
  box-shadow: 0 16px 36px -22px rgba(46, 230, 197, 0.95);
}
.msg__content { display: flex; flex-direction: column; gap: 0.7rem; min-width: 0; }

.msg__icon {
  width: 32px; height: 32px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 0.9rem;
  flex: 0 0 auto;
  background: var(--gradient-brand);
  margin-top: 4px;
}
.msg--user .msg__icon { background: rgba(255, 255, 255, 0.12); }

.msg__places { display: grid; gap: 0.5rem; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 0.3rem 0; }
.typing span {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--turquoise);
  opacity: 0.4;
  animation: typing-bounce 1.1s var(--ease) infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.chat__chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0 1.2rem 0.9rem; }

.chat__form {
  display: flex;
  gap: 0.6rem;
  padding: 0.9rem 1.2rem 1.1rem;
  border-top: 1px solid var(--border);
  background: rgba(4, 16, 29, 0.5);
}
.chat__form .control { flex: 1; border-radius: var(--radius-pill); }
.chat__send {
  width: 48px; height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gradient-brand);
  color: #03202b;
  font-size: 1.15rem;
  box-shadow: var(--glow-cool);
  transition: transform var(--speed) var(--ease-spring), box-shadow var(--speed) var(--ease);
}
.chat__send:hover { transform: scale(1.08) translateY(-2px); }
.chat__send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ------------------------------------------------------------ 10. Modale */

.modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(2, 8, 15, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity var(--speed) var(--ease);
  overflow-y: auto;
}
.modal.is-visible { opacity: 1; }

.modal__dialog {
  position: relative;
  width: min(660px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-strong);
  background: linear-gradient(170deg, #0b2439, #05121f 70%);
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 1);
  transform: translateY(18px) scale(0.97);
  transition: transform var(--speed) var(--ease-spring);
}
.modal.is-visible .modal__dialog { transform: none; }

.modal__close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 5;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(4, 16, 29, 0.78);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.9rem;
  transition: transform var(--speed) var(--ease-spring), background var(--speed) var(--ease);
}
.modal__close:hover { transform: rotate(90deg) scale(1.06); background: rgba(255, 255, 255, 0.12); }

.modal__hero { position: relative; aspect-ratio: 16 / 8; background: var(--gradient-deep); overflow: hidden; }
.modal__body { padding: 1.3rem clamp(1.1rem, 3vw, 1.7rem) 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1rem clamp(1.1rem, 3vw, 1.7rem) 1.4rem;
  border-top: 1px solid var(--border);
}
.modal__footer .btn { flex: 1 1 180px; }

.modal__title { font-family: var(--font-display); font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: -0.03em; }
.modal__sub { color: var(--text-muted); font-size: 0.9rem; }
.modal__text { font-size: 0.94rem; line-height: 1.68; color: var(--text-muted); }

.detail-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.6rem; }

/* -------------------------------------------------------------- 11. Toast */

.toast-root {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-end;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.78rem 1.05rem;
  border-radius: var(--radius-pill);
  background: rgba(4, 16, 29, 0.94);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  backdrop-filter: blur(var(--blur-strong));
  -webkit-backdrop-filter: blur(var(--blur-strong));
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease-spring);
  max-width: min(360px, calc(100vw - 2.2rem));
}
.toast.is-visible { opacity: 1; transform: none; }
.toast__icon { font-size: 1rem; }
.toast__action {
  flex: 0 0 auto;
  padding: 0.1rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--turquoise);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.toast__action:hover { color: var(--text); }
.toast__action:focus-visible { outline: 2px solid var(--turquoise); outline-offset: 2px; border-radius: 6px; }
.toast--success { border-color: rgba(52, 211, 153, 0.45); }
.toast--warn { border-color: rgba(251, 191, 36, 0.45); }
.toast--error { border-color: rgba(248, 113, 113, 0.45); }
.toast--info { border-color: rgba(96, 165, 250, 0.45); }

/* ----------------------------------------------- 12. Stati vuoti e loader */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  text-align: center;
  padding: clamp(2rem, 6vw, 3.6rem) 1.4rem;
  border-radius: var(--radius-xl);
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.022);
}
.empty__icon { font-size: 2.6rem; line-height: 1; }
.empty__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.empty__text { color: var(--text-muted); max-width: 46ch; font-size: 0.92rem; }

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(255,255,255,.05) 25%, rgba(255,255,255,.11) 37%, rgba(255,255,255,.05) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.5s linear infinite;
}

.loading-row { display: flex; align-items: center; gap: 0.7rem; color: var(--text-muted); font-size: 0.9rem; }

/* Utilità di composizione locale */
.inline-facts { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; font-size: 0.84rem; color: var(--text-muted); }
.inline-facts strong { color: var(--text); }

.divider { height: 1px; background: var(--border); border: 0; margin: 1.4rem 0; }

.scroll-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* --------------------------------------- 12. Viaggio a zone e giornate */

/* Giornate del viaggio: una scheda per giorno, con le zone scelte. */
.trip-days {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
}
.trip-day {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease),
    color var(--speed) var(--ease);
}
.trip-day:hover { border-color: var(--border-strong); color: var(--text); }
.trip-day.is-active {
  border-color: rgba(46, 230, 197, 0.45);
  background: rgba(46, 230, 197, 0.08);
  color: var(--text);
}
.trip-day__index { font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; }
.trip-day__zones { font-size: 0.72rem; color: var(--text-dim); }
.trip-day.is-active .trip-day__zones { color: var(--text-muted); }
.trip-day__mode { font-size: 0.72rem; }
/* Giornata non inclusa nel piano: resta visibile ma non apribile. */
.trip-day.is-locked {
  opacity: 0.55;
  cursor: not-allowed;
  border-style: dashed;
}
.trip-day[disabled] { cursor: not-allowed; }
.trip-day[disabled]:hover { border-color: var(--border); color: var(--text-muted); }
.trip-day__actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-left: auto; }

/* Combinazioni di zone: sette scelte, con descrizione e dati reali. */
.zone-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}
.zone-option {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.zone-option:hover {
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}
.zone-option.is-active {
  border-style: solid;
  border-color: rgba(46, 230, 197, 0.5);
  background: rgba(46, 230, 197, 0.07);
  box-shadow: 0 24px 46px -34px rgba(46, 230, 197, 0.9);
}
.zone-option__zones { display: flex; flex-wrap: wrap; gap: 0.3rem; }
/* Combinazione a più zone non inclusa nel piano: visibile, ma bloccata. */
.zone-option.is-locked {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: var(--border-strong);
}
.zone-option.is-locked:hover { transform: none; border-color: var(--border-strong); }
.zone-option__title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text); }
.zone-option__desc { line-height: 1.4; }
.zone-option__meta { display: flex; flex-wrap: wrap; gap: 0.6rem; color: var(--text-dim); }
.zone-option.is-active .zone-option__meta { color: var(--text-muted); }

/* Etichetta di zona: il colore arriva dai dati dell'area. La barretta a
   sinistra è il riferimento visivo (funziona ovunque); i browser che
   supportano color-mix() colorano anche lo sfondo. */
.zone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-left: 3px solid var(--zone-color, var(--turquoise));
}
@supports (color: color-mix(in srgb, red 10%, blue)) {
  .zone-badge {
    color: var(--zone-color, var(--turquoise));
    background: color-mix(in srgb, var(--zone-color, #2ee6c5) 16%, transparent);
    border-color: color-mix(in srgb, var(--zone-color, #2ee6c5) 40%, transparent);
    border-left-color: var(--zone-color, var(--turquoise));
  }
}

.note--warn {
  background: rgba(251, 191, 36, 0.09);
  border-color: rgba(251, 191, 36, 0.3);
  color: var(--text-muted);
}

/* Riepilogo del viaggio */
.trip-summary .stat-grid { margin-top: 0.2rem; }
.trip-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.9rem;
}
.trip-day-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1rem 1.05rem 1.1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.trip-day-card.is-empty { border-style: dashed; background: rgba(255, 255, 255, 0.015); }
.trip-day-card__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: space-between;
}
.trip-day__stops { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; padding-left: 1.1rem; }
.trip-day__stops li { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: baseline; font-size: 0.86rem; }
.trip-day__stop-time { color: var(--turquoise); font-variant-numeric: tabular-nums; font-weight: 700; }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px dashed var(--border-strong);
}
.link-btn:hover { color: var(--turquoise); border-color: var(--turquoise); }
.trip-map-panel { padding: 1rem; }
.trip-map { border-radius: var(--radius-lg); overflow: hidden; }

/* ------------------------------------------- 13. Itinerario a fasce */

.badge--warn {
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.42);
  background: rgba(251, 191, 36, 0.14);
}

.slot-board__summary { color: var(--text-muted); }
.slot-board__summary.is-warn { color: var(--amber); }
.slot-board__slots { gap: 1.1rem; }

.slot {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.05rem 1.05rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.slot.is-filled {
  border-color: rgba(46, 230, 197, 0.32);
  background: rgba(46, 230, 197, 0.045);
}

.slot__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: flex-start;
  justify-content: space-between;
}
.slot__time {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.slot__title { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; }
.slot__hint { max-width: 62ch; }
.slot__controls { display: flex; flex-wrap: wrap; gap: 0.45rem; align-items: center; }

.slot__options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.85rem;
}
.slot__note { color: var(--text-dim); grid-column: 1 / -1; }

/* Titolo di un gruppo di alternative (per interesse): occupa tutta la
   griglia e separa visivamente i blocchi da confrontare. */
.option-group__label {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 0.5rem;
  margin: 0.25rem 0 -0.15rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.option-group__count {
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px dashed transparent;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}
.option:hover { border-color: var(--border); }
.option.is-selected {
  border-style: solid;
  border-color: rgba(46, 230, 197, 0.5);
  background: rgba(46, 230, 197, 0.06);
  box-shadow: 0 24px 46px -32px rgba(46, 230, 197, 0.9);
}
.option__flag {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  padding: 0.24rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 800;
  color: #04141f;
  background: var(--gradient-cool);
}
.option { min-width: 0; }
.option .place-card { min-width: 0; }
/* Gli orari nel database sono stringhe lunghe ("13:00–23:00 (mar–sab)…"):
   dentro la scheda devono poter andare a capo, altrimenti la board sfora
   la larghezza dello schermo sui telefoni. */
.option__facts { align-items: center; margin-top: 0.1rem; }
.option__facts .badge,
.slot__controls .badge {
  white-space: normal;
  text-align: left;
  line-height: 1.35;
  max-width: 100%;
}
.option__actions { display: flex; flex-direction: column; gap: 0.5rem; }
/* La scelta è l'azione principale: occupa tutta la riga e non viene
   compressa dal pulsante secondario "Dettagli". Senza questo, in una card
   stretta il testo di "Scegli questa opzione" veniva tagliato. */
.option__buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.option__buttons > .btn { flex: 1 1 100%; justify-content: center; }
.option__buttons > .btn + .btn { flex: 0 0 auto; }

/* ------------------------------------------- 14. Abbonamenti Premium */

/* Griglia dei tre piani. */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.022));
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  transition: transform var(--speed) var(--ease), border-color var(--speed) var(--ease),
    box-shadow var(--speed) var(--ease);
}
.plan:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.plan--popular {
  border-color: rgba(46, 230, 197, 0.42);
  box-shadow: 0 26px 50px -36px rgba(46, 230, 197, 0.95);
}
.plan.is-current {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(52, 211, 153, 0.05);
}

.plan__badge {
  position: absolute;
  top: -0.7rem;
  left: 1.1rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #04141f;
  background: var(--gradient-cool);
}
.plan__badge--current { left: auto; right: 1.1rem; }
.plan__badge + .plan__badge--current { left: 1.1rem; right: auto; top: 1.5rem; }

.plan__head { display: flex; flex-direction: column; gap: 0.25rem; }
.plan__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.plan__tagline { line-height: 1.45; }

.plan__price { display: flex; align-items: baseline; gap: 0.4rem; }
.plan__amount {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}
.plan__duration { color: var(--text-dim); }

.plan__facts { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.plan__facts li { display: flex; align-items: baseline; gap: 0.45rem; color: var(--text-muted); }

.plan__renew { line-height: 1.45; }

.plan__includes { display: flex; flex-direction: column; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.plan__includes li { display: flex; align-items: flex-start; gap: 0.5rem; font-size: 0.86rem; color: var(--text-muted); }
.plan__check {
  flex: 0 0 auto;
  width: 1.05rem;
  height: 1.05rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
  color: #04141f;
  background: var(--gradient-cool);
}

.plan .btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.plan__note, .plan__disabled { line-height: 1.45; }

/* Consenso al rinnovo automatico: deve restare leggibile, non un dettaglio
   nascosto, perché precede un pagamento ricorrente. */
.consent { display: flex; align-items: flex-start; gap: 0.55rem; cursor: pointer; }
.consent__input { margin: 0.2rem 0 0; flex: 0 0 auto; width: 1.05rem; height: 1.05rem; accent-color: var(--turquoise); }
.consent__text { color: var(--text-muted); line-height: 1.45; }

/* Tabella di confronto: la prima colonna nomina la funzionalità, le altre
   ripetono lo stesso segno perché tutti i piani includono tutto. */
.compare { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.compare__table { width: 100%; border-collapse: collapse; min-width: 540px; }
.compare__table th, .compare__table td { padding: 0.7rem 0.85rem; text-align: left; vertical-align: top; }
.compare__table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}
.compare__table tbody th { font-weight: 600; color: var(--text); }
.compare__table tbody tr + tr th, .compare__table tbody tr + tr td { border-top: 1px solid var(--border); }
.compare__plan { display: block; color: var(--text); }
.compare__price { display: block; margin-top: 0.15rem; text-transform: none; letter-spacing: 0; }
.compare__feature { display: block; font-size: 0.9rem; }
.compare__desc { display: block; margin-top: 0.15rem; }
.compare__yes { color: var(--success); font-weight: 800; }
.compare__no { color: var(--text-dim); }

/* Blocco mostrato al posto di una funzione Premium per chi non ha accesso. */
.locked {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  border-style: dashed;
  border-color: rgba(46, 230, 197, 0.3);
  background: rgba(46, 230, 197, 0.04);
}
.locked--compact { padding: 0.9rem 1rem; gap: 0.45rem; }
.locked__badge {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.locked__title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.locked__feature, .locked__reason, .locked__notice { line-height: 1.5; }

/* Domande frequenti */
.faq { border-top: 1px solid var(--border); padding: 0.15rem 0; }
.faq summary {
  padding: 0.6rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.faq summary:hover { color: var(--turquoise); }
.faq p { margin: 0 0 0.7rem; }

/* Richiamo Premium dentro le viste esistenti (itinerario, fasce, raccolta). */
.premium-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(46, 230, 197, 0.3);
  background: rgba(46, 230, 197, 0.05);
}
.premium-callout__text { font-size: 0.84rem; color: var(--text-muted); max-width: 58ch; }

@media (max-width: 720px) {
  .planner-layout { grid-template-columns: 1fr; }
  .timeline__item { grid-template-columns: 62px minmax(0, 1fr); gap: 18px; }
  .timeline__item::before { left: 71px; }
  .timeline-card { grid-template-columns: 1fr; }
  .timeline-card__media { aspect-ratio: 16 / 7; min-height: 0; }
  .timeline__dot { left: -15px; }
  .map-info { position: static; width: 100%; margin-top: 1rem; }
  .weather-now { justify-content: flex-start; }
  .toast-root { right: 0.7rem; left: 0.7rem; align-items: stretch; }
  .toast { max-width: none; }

  .slot { padding: 0.9rem 0.85rem 1rem; }
  .slot__head { flex-direction: column; }
  .slot__controls { width: 100%; }
  .slot__options { grid-template-columns: 1fr; }
  .option__actions .btn { width: 100%; }

  /* Viaggio a zone: su telefono le giornate e le azioni vanno a capo, i
     riquadri delle zone restano una colonna e il riepilogo resta leggibile. */
  .trip-day { flex: 1 1 calc(50% - 0.5rem); }
  .trip-day__actions { margin-left: 0; width: 100%; }
  .trip-day__actions .btn { flex: 1; justify-content: center; }
  .zone-picker { grid-template-columns: 1fr; }
  .trip-day-card__head { flex-direction: column; }
  .trip-day-card__head .btn { width: 100%; justify-content: center; }
  .trip-days-grid { grid-template-columns: 1fr; }
  .trip-day__stops li { font-size: 0.82rem; }

  /* Abbonamenti: su telefono i piani sono una colonna, la tabella di
     confronto scorre in orizzontale e il pulsante resta a piena larghezza. */
  .plans-grid { grid-template-columns: 1fr; }
  .plan { padding: 1.2rem 1.05rem; }
  .plan__amount { font-size: 1.85rem; }
  .plan .btn { width: 100%; justify-content: center; }
  .compare__table { min-width: 460px; }
  .compare__table th, .compare__table td { padding: 0.6rem 0.65rem; }
  .premium-callout .btn { width: 100%; justify-content: center; }
}

/* ------------------------------------------- 15. Luoghi nelle vicinanze */

/* Scheda dentro la fascia: compare solo dopo aver scelto una tappa. I
   risultati arrivano dal catalogo, con distanza in linea d'aria. */
.nearby {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 0.9rem 0.95rem 1rem;
  border: 1px solid rgba(46, 230, 197, 0.22);
  border-radius: var(--radius);
  background: rgba(46, 230, 197, 0.035);
}
.nearby__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
}
.nearby__title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
}
.nearby__chips { gap: 0.4rem; }
.nearby__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.65rem;
  font-size: 0.78rem;
}
.nearby__chip.is-empty { opacity: 0.62; }
.nearby__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.02rem 0.32rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.4;
}
.nearby__chip.is-active .nearby__count { background: rgba(4, 20, 31, 0.28); color: #04141f; }
.nearby__body { display: flex; flex-direction: column; gap: 0.75rem; }
.nearby__group { display: flex; flex-direction: column; gap: 0.4rem; }
.nearby__group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.nearby__group-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.nearby__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.028);
}
.nearby__item-main { min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.nearby__item-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.45rem; }
.nearby__item-title strong { font-size: 0.9rem; line-height: 1.3; }
.nearby__where { margin: 0; overflow-wrap: anywhere; }
.nearby__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
}
.nearby__actions .btn { white-space: nowrap; }
.nearby__empty {
  margin: 0;
  padding: 0.5rem 0.65rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xs);
  color: var(--text-dim);
}
.nearby__note { margin: 0; }
.badge--distance { white-space: nowrap; }

@media (max-width: 700px) {
  .nearby__item { flex-direction: column; align-items: stretch; }
  .nearby__actions { justify-content: flex-start; }
  .nearby__actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------- 16. Strumenti di test */

.admin-head {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-width: 76ch;
}
.admin-head h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.admin-panel { gap: 1rem; }
.admin-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.7rem;
}
.admin-choice {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease),
    transform var(--speed) var(--ease);
}
.admin-choice:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.admin-choice.is-active {
  border-color: rgba(46, 230, 197, 0.5);
  background: rgba(46, 230, 197, 0.07);
}
.admin-choice__title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; }
.admin-usage {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
}
.admin-usage__line { gap: 0.4rem; }
.admin-tests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.6rem;
}
.admin-test {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.admin-test:hover { border-color: rgba(46, 230, 197, 0.45); transform: translateY(-2px); }
.admin-test__icon { font-size: 1.15rem; line-height: 1; }
.admin-test__arrow { margin-left: auto; color: var(--turquoise); font-weight: 800; }
.admin-card-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-card-picker .control { flex: 1 1 280px; min-width: 0; }
.admin-security__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.admin-security__list li { display: flex; align-items: flex-start; gap: 0.5rem; }
.admin-security__mark { line-height: 1.25; flex: 0 0 auto; }
.admin-security { border-color: rgba(251, 191, 36, 0.26); }

/* Barra fissa della modalità prova: fuori dalle viste, resta visibile su
   ogni pagina finché l'interruttore è attivo. */
.testbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem clamp(0.75rem, 3vw, 1.5rem);
  border-top: 1px solid rgba(251, 191, 36, 0.5);
  background: rgba(6, 24, 42, 0.97);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  box-shadow: 0 -18px 40px -30px #000;
}
.testbar__dot { color: var(--amber); font-size: 0.7rem; line-height: 1; }
.testbar__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.76rem;
}
.testbar__text strong {
  color: var(--amber);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}
.testbar__detail { color: var(--text-muted); }
.testbar > .btn:first-of-type { margin-left: auto; }
body.has-testbar { padding-bottom: 3.6rem; }

@media (max-width: 640px) {
  .testbar { gap: 0.35rem; }
  .testbar__text { flex: 1 1 100%; }
  .testbar > .btn:first-of-type { margin-left: 0; }
  .testbar .btn { flex: 1 1 auto; }
  body.has-testbar { padding-bottom: 6rem; }
}
