
:root{
  --bg:#f5f3ef;
  --panel:#ffffff;
  --ink:#191c22;
  --muted:#6f737a;
  --line:#dedbd5;
  --red:#b7575d;
  --dark:#151820;
  --soft:#ebe6dd;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--ink);
}

button,input{font:inherit}
button{cursor:pointer}

.hidden{display:none!important}

.login-view{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
  background:
    radial-gradient(circle at 80% 20%,rgba(183,87,93,.2),transparent 24%),
    linear-gradient(135deg,#14171d,#252a33);
}

.login-card{
  width:min(470px,100%);
  background:#fff;
  border-radius:28px;
  padding:36px;
  box-shadow:0 30px 70px rgba(0,0,0,.28);
}

.brand{
  font-size:.72rem;
  font-weight:900;
  letter-spacing:.13em;
}
.brand span{color:var(--red)}

.login-card h1{
  font-size:clamp(2.4rem,8vw,4rem);
  line-height:1;
  margin:14px 0;
}
.login-card p{color:var(--muted);line-height:1.65}

.login-card label{
  display:block;
  font-size:.78rem;
  font-weight:800;
  margin:22px 0 8px;
}

.login-card input{
  width:100%;
  min-height:48px;
  border:1px solid var(--line);
  border-radius:14px;
  padding:0 14px;
  font-size:16px;
}

.login-card button{
  width:100%;
  min-height:48px;
  margin-top:12px;
  border:0;
  border-radius:14px;
  background:var(--red);
  color:#fff;
  font-weight:800;
}

.message{font-size:.88rem}

.dashboard{
  width:min(1280px,calc(100% - 32px));
  margin:0 auto;
  padding-bottom:60px;
}

.topbar{
  min-height:78px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.trip-title{
  font-size:.9rem;
  margin-top:5px;
  color:var(--muted);
}

.topbar-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.user-email{
  font-size:.78rem;
  color:var(--muted);
}

.ghost-btn{
  background:transparent;
  border:1px solid var(--line);
  border-radius:999px;
  padding:9px 13px;
}

.hero{
  min-height:260px;
  padding:34px;
  border-radius:30px;
  color:#fff;
  background:
    radial-gradient(circle at 82% 18%,rgba(183,87,93,.35),transparent 24%),
    linear-gradient(135deg,#181b21,#2e343d);
  display:flex;
  justify-content:space-between;
  align-items:end;
  gap:25px;
}

.eyebrow,.section-kicker,.card-kicker{
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
  color:#d78e94;
}

.hero h1{
  margin:7px 0 6px;
  font-size:clamp(3rem,8vw,6rem);
  line-height:.9;
}
.hero p{margin:0;color:#c9ccd1}

.countdown-card{
  min-width:180px;
  padding:20px;
  border:1px solid rgba(255,255,255,.15);
  border-radius:20px;
  background:rgba(255,255,255,.06);
}
.countdown-card span{display:block;font-size:.72rem;color:#c8cbd0}
.countdown-card strong{display:block;margin-top:6px;font-size:1.7rem}

.tabs{
  display:flex;
  gap:8px;
  overflow:auto;
  padding:20px 0 6px;
}
.tab,.pill{
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink);
  border-radius:999px;
  white-space:nowrap;
  padding:10px 14px;
  font-weight:750;
}
.tab.active,.pill.active{
  background:var(--dark);
  color:#fff;
  border-color:var(--dark);
}

.tab-panel{display:none;padding-top:25px}
.tab-panel.active{display:block}

.section-head{
  display:flex;
  justify-content:space-between;
  gap:22px;
  align-items:end;
  margin-bottom:22px;
}
.section-head h2{
  margin:5px 0 0;
  font-size:clamp(2rem,5vw,3.2rem);
}

.date-nav{
  display:flex;
  gap:7px;
  align-items:center;
}
.date-nav button,
.date-nav input{
  min-height:42px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:12px;
  padding:0 11px;
}

.today-grid{
  display:grid;
  grid-template-columns:1.5fr .7fr;
  gap:18px;
}
.today-date{
  font-weight:850;
  margin-bottom:15px;
  text-transform:capitalize;
}

.timeline-list,.day-list{display:grid;gap:12px}

.activity{
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  padding:18px;
  display:grid;
  grid-template-columns:82px 1fr;
  gap:14px;
}
.activity-time{
  font-weight:900;
  color:var(--red);
}
.activity h3{margin:0 0 5px;font-size:1.05rem}
.activity p{margin:0;color:var(--muted);line-height:1.5;font-size:.9rem}

.side-stack{display:grid;gap:12px;align-content:start}
.side-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px;
}
.side-card h3{margin:8px 0 5px}
.side-card p{margin:0;color:var(--muted);font-size:.9rem;line-height:1.5}

.day-group{
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  overflow:hidden;
}
.day-heading{
  padding:18px 20px;
  background:#f9f7f3;
  border-bottom:1px solid var(--line);
  font-weight:900;
  text-transform:capitalize;
}
.day-activities{padding:12px}

.filter-pills{
  display:flex;
  gap:7px;
  flex-wrap:wrap;
}

.cards-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

.data-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:20px;
  padding:20px;
}
.data-card .type{
  display:inline-block;
  font-size:.65rem;
  font-weight:900;
  letter-spacing:.09em;
  color:var(--red);
  text-transform:uppercase;
}
.data-card h3{margin:10px 0 7px}
.data-card p{margin:6px 0;color:var(--muted);line-height:1.5;font-size:.9rem}
.data-card a{
  display:inline-flex;
  margin-top:12px;
  color:var(--ink);
  font-weight:800;
  text-decoration:none;
}

.empty{
  background:#fff;
  border:1px dashed var(--line);
  border-radius:18px;
  padding:24px;
  color:var(--muted);
}

@media(max-width:900px){
  .today-grid{grid-template-columns:1fr}
  .cards-grid{grid-template-columns:1fr 1fr}
}

@media(max-width:640px){
  .dashboard{width:min(100% - 20px,1280px)}
  .topbar{align-items:flex-start;padding:13px 0}
  .user-email{display:none}
  .hero{min-height:300px;display:block;padding:25px}
  .countdown-card{margin-top:28px;min-width:0}
  .section-head{display:block}
  .date-nav{margin-top:14px}
  .cards-grid{grid-template-columns:1fr}
  .activity{grid-template-columns:62px 1fr}
}

/* Urania Travel Hub - stato attività */
.activity-status{
  display:inline-block;
  margin:0 0 6px 0;
  padding:4px 8px;
  border:1px solid currentColor;
  border-radius:999px;
  font-size:.70rem;
  font-weight:800;
  letter-spacing:.04em;
  line-height:1;
  opacity:.82;
}

/* Guide pratiche */
.section-intro{margin:8px 0 0;color:var(--muted);line-height:1.55;max-width:720px}
.guides-list{display:grid;gap:22px}
.guide-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:24px;scroll-margin-top:20px}
.guide-card-head{display:flex;align-items:flex-start;gap:14px}
.guide-icon{width:48px;height:48px;border-radius:15px;background:var(--soft);display:grid;place-items:center;font-size:1.5rem;flex:0 0 auto}
.guide-card h3{margin:5px 0 4px;font-size:1.35rem}
.guide-subtitle,.guide-intro,.guide-step p{color:var(--muted);line-height:1.55}
.guide-subtitle{margin:0;font-size:.9rem}
.guide-intro{margin:18px 0}
.guide-steps{display:grid;gap:14px}
.guide-step{background:#f9f7f3;border:1px solid var(--line);border-radius:18px;padding:18px}
.guide-step h4{margin:0 0 6px;font-size:1.02rem}
.guide-step p{margin:0 0 14px;font-size:.92rem}
.guide-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.guide-image-btn{border:1px solid var(--line);background:#fff;border-radius:14px;padding:8px;text-align:left;overflow:hidden}
.guide-image-btn img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;object-position:center;border-radius:9px;background:#eee}
.guide-image-btn span{display:block;padding:8px 3px 2px;font-size:.76rem;font-weight:800;color:var(--ink)}
.guide-note{margin-top:16px;padding:14px 16px;background:#f4eee5;border-radius:14px;line-height:1.5;font-size:.9rem}
.guide-link-btn{display:inline-flex;margin:10px 8px 0 0;border:0;border-radius:12px;background:var(--dark);color:#fff;padding:10px 12px;font-weight:800}
.image-viewer{position:fixed;inset:0;z-index:9999;background:rgba(10,12,16,.94);display:flex;align-items:center;justify-content:center;padding:52px 16px 20px}
.image-viewer img{max-width:min(1200px,100%);max-height:calc(100vh - 72px);object-fit:contain;border-radius:10px;background:#fff}
.viewer-close{position:fixed;right:18px;top:14px;width:42px;height:42px;border:1px solid rgba(255,255,255,.28);border-radius:50%;background:rgba(255,255,255,.12);color:#fff;font-size:28px;line-height:1}
.no-scroll{overflow:hidden}
@media(max-width:640px){
  .guide-card{padding:17px}
  .guide-gallery{grid-template-columns:1fr}
  .guide-image-btn img{aspect-ratio:16/10;object-fit:cover}
}

/* Legenda e ritmo itinerario */
.itinerary-legend{display:flex;gap:8px;flex-wrap:wrap;margin:-4px 0 10px}
.itinerary-legend span{background:#fff;border:1px solid var(--line);border-radius:999px;padding:8px 11px;font-size:.78rem;font-weight:800}
.itinerary-note{margin:0 0 18px;color:var(--muted);font-size:.9rem;line-height:1.5}
.activity.priority{border-left:4px solid #b7575d}
.activity.evening{border-left:4px solid #4f5562}
.activity.alternative{border-left:4px dashed #8c7d66}
.activity.optional{border-left:4px solid #7f9276}
.activity.skippable{opacity:.86}

/* Itinerari Google Maps giorno per giorno */
.day-map-card{margin:14px 0 8px;padding:18px;border:1px solid rgba(82,109,101,.22);border-radius:20px;background:linear-gradient(135deg,rgba(82,109,101,.08),rgba(255,255,255,.72))}
.day-map-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:7px}
.day-map-head span{font-size:.72rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#526d65}
.day-map-head strong{font-size:1rem}.day-map-card p{margin:0 0 13px;color:#6d6a65;line-height:1.55}
.day-map-actions{display:flex;gap:9px;flex-wrap:wrap}
.map-route-btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 13px;border-radius:999px;background:#526d65;color:#fff!important;text-decoration:none!important;font-size:.78rem;font-weight:800}
.map-route-btn.food{background:#b65d63}
@media(max-width:620px){.day-map-actions{display:grid;grid-template-columns:1fr}.map-route-btn{width:100%}}

/* Rifiniture finali itinerario */
.route-summary{display:grid;gap:4px;margin:10px 0;padding:11px 13px;border-radius:14px;background:rgba(255,255,255,.66)}
.route-summary b{font-size:.76rem}.route-summary span{font-size:.78rem;line-height:1.45;color:#625f5a}
.map-route-btn.hotel{background:#6d665d}
.trip-legend,.food-map-strip{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:0 0 14px;padding:13px 15px;border-radius:17px;background:rgba(255,255,255,.72);border:1px solid rgba(82,109,101,.16)}
.trip-legend strong,.food-map-strip strong{margin-right:4px}
.trip-legend span{font-size:.76rem;padding:5px 8px;border-radius:999px;background:rgba(82,109,101,.08)}
.food-map-strip a{font-size:.78rem;font-weight:800;text-decoration:none;padding:7px 10px;border-radius:999px;background:#b65d63;color:#fff}
@media(max-width:620px){.route-summary span{font-size:.75rem}.trip-legend,.food-map-strip{align-items:flex-start}}


/* Hub mappe */
.map-city-filter{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 18px}
.all-day-maps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.map-day-block{background:#fff;border:1px solid var(--line);border-radius:22px;padding:16px}
.map-day-block .day-map-card{margin:0;background:linear-gradient(135deg,rgba(82,109,101,.07),rgba(255,255,255,.9))}
.map-day-date{text-transform:capitalize;font-size:.78rem;font-weight:900;letter-spacing:.04em;color:var(--red);margin:0 0 10px 3px}
@media(max-width:850px){.all-day-maps{grid-template-columns:1fr}}
