/* =========================================================
   Travel Manager – stile (mobile first, look da app iOS)
   Palette: nero, blu elettrico, viola
   ========================================================= */
:root {
  --blue: #2F6BFF; --blue-2: #5B8CFF; --violet: #8B5CF6; --cyan: #22D3EE; --pink: #EC4899; --orange: #F59E0B; --green: #22C55E; --red: #FF453A;
  --grad: linear-gradient(135deg, #2F6BFF 0%, #6D5CFF 55%, #8B5CF6 100%);
  --radius: 20px; --radius-sm: 14px;
  --safe-t: env(safe-area-inset-top); --safe-b: env(safe-area-inset-bottom);
  --tabbar-h: calc(64px + var(--safe-b));
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
[data-theme="dark"] {
  --bg: #07070c; --bg-2: #0d0d15; --card: #13131d; --card-2: #1b1b28; --card-3: #24243399;
  --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .12);
  --text: #F5F6FB; --text-2: #9AA0B4; --text-3: #6B7086;
  --glass: rgba(14, 14, 22, .72); --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --map-land: #262636; --map-border: #0d0d15; --input: #1b1b28;
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #F3F4F9; --bg-2: #ECEEF5; --card: #FFFFFF; --card-2: #F1F2F8; --card-3: #E9EBF3;
  --line: rgba(15, 20, 40, .08); --line-2: rgba(15, 20, 40, .14);
  --text: #0E1020; --text-2: #5D6378; --text-3: #8C91A5;
  --glass: rgba(255, 255, 255, .78); --shadow: 0 10px 30px rgba(30, 40, 90, .10);
  --map-land: #D9DCE8; --map-border: #F3F4F9; --input: #F1F2F8;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; overscroll-behavior-y: none; min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.02em; }
p { margin: .3em 0; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--text-2); } .small { font-size: 14px; } .tiny { font-size: 12px; line-height: 1.45; } .center { text-align: center; }
.mt { margin-top: 18px; } .pad { padding: 8px 4px; } .spacer { height: 24px; } .right { text-align: right; }
.neg { color: var(--red) !important; } .pos { color: var(--green); } .ok { color: var(--green); }
.link { color: var(--blue-2); display: inline-flex; align-items: center; gap: 4px; }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.boot img { border-radius: 18px; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .7; } }
.loading { display: grid; place-items: center; gap: 10px; padding: 30vh 0; color: var(--text-2); }

/* ---------- Layout ---------- */
#app { min-height: 100vh; }
#view { padding: calc(var(--safe-t) + 8px) 16px calc(var(--tabbar-h) + 16px); max-width: 1100px; margin: 0 auto; }
.view { animation: fadeUp .35s var(--ease); }
.sidebar { display: none; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--tabbar-h); padding: 6px 8px var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--glass); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-3); transition: color .2s; }
.tabbar a.active { color: var(--blue-2); }
.tabbar a.active .ic { filter: drop-shadow(0 0 8px rgba(47, 107, 255, .55)); }
.net-banner { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); top: calc(var(--safe-t) + 6px); padding: 7px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.net-banner.off { background: #3a1d1d; color: #ffb4ae; border-color: #5a2a2a; }
[data-theme="light"] .net-banner.off { background: #ffe9e7; color: #b42318; }

@media (min-width: 900px) {
  .tabbar { display: none; }
  .sidebar { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: 248px; padding: 22px 14px; background: var(--bg-2); border-right: 1px solid var(--line); z-index: 40; }
  .sidebar .brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; padding: 4px 10px 22px; }
  .sidebar .brand img { width: 34px; height: 34px; border-radius: 9px; }
  .sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
  .sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: var(--text-2); font-weight: 600; font-size: 15px; transition: background .2s, color .2s; }
  .sidebar nav a:hover { background: var(--card); color: var(--text); }
  .sidebar nav a.active { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--blue); }
  .side-sep { height: 1px; background: var(--line); margin: 12px 8px; }
  .side-status { font-size: 12px; color: var(--text-3); display: flex; gap: 6px; align-items: center; padding: 8px 10px; }
  #view { margin-left: 248px; padding: 28px 36px 40px; }
  .net-banner { left: calc(50% + 124px); }
  .fab { bottom: 32px !important; }
}

/* ---------- Header pagine ---------- */
.page-head { padding: 8px 2px 14px; }
.page-head .back { display: inline-flex; align-items: center; gap: 2px; color: var(--blue-2); font-weight: 500; margin: 0 0 6px -6px; }
.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head h1 { font-size: 34px; font-weight: 800; }
.page-head .sub { color: var(--text-2); margin: 2px 0 0; }
.ph-actions { display: flex; gap: 8px; }
.home-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 8px 2px 16px; }
.home-head h1 { font-size: 30px; font-weight: 800; line-height: 1.1; }
.date-line { text-transform: capitalize; font-weight: 600; font-size: 14px; margin: 0 0 2px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 2px 12px; gap: 10px; }
.sec-head h2 { font-size: 21px; font-weight: 750; }
.sec-head a { color: var(--blue-2); font-weight: 600; font-size: 15px; }
.sub-h { font-size: 15px; font-weight: 700; color: var(--text-2); margin: 22px 4px 10px; display: flex; align-items: center; gap: 8px; text-transform: none; }
.group-h { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; margin: 18px 6px 8px; }

/* ---------- Bottoni ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; font-weight: 650; font-size: 15px; transition: transform .15s var(--ease), opacity .2s, background .2s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.sm { padding: 8px 12px; font-size: 14px; border-radius: 11px; }
.btn.big { padding: 16px; font-size: 16px; border-radius: 16px; }
.btn.block { display: flex; width: 100%; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 20px rgba(47, 107, 255, .35); }
.btn-soft { background: var(--card-2); color: var(--text); }
.btn-danger-soft { background: rgba(255, 69, 58, .12); color: var(--red); }
.btn-text { color: var(--blue-2); font-size: 16px; padding: 6px 2px; }
.btn-text.strong { font-weight: 700; }
.btn-text:disabled { opacity: .4; }
.btn-row { display: flex; gap: 8px; align-items: center; }
.btn-row.wrap { flex-wrap: wrap; margin: 10px 0 4px; }
.btn-col { display: flex; flex-direction: column; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--card-2); color: var(--text); transition: transform .15s; flex-shrink: 0; }
.icon-btn:active { transform: scale(.92); }
.icon-btn.primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(47, 107, 255, .4); }
.icon-btn.sm { width: 32px; height: 32px; background: transparent; color: var(--text-2); }
.icon-btn.xs { width: 28px; height: 28px; background: transparent; color: var(--text-3); }
.fab { position: fixed; right: 18px; bottom: calc(var(--tabbar-h) + 16px); z-index: 45; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(47, 107, 255, .5); }
.glass-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .35); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: #fff; }

/* ---------- Card ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.card.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.grid-2 .card { margin: 0; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv small { color: var(--text-2); font-size: 12.5px; font-weight: 600; }
.kv b { font-size: 18px; }
.prose { white-space: normal; line-height: 1.55; }

.hero { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 300px; border-radius: 28px; padding: 18px; color: #fff; overflow: hidden;
  background-size: cover; background-position: center; box-shadow: 0 18px 40px rgba(20, 30, 90, .35); isolation: isolate; transition: transform .25s var(--ease); }
.hero:active { transform: scale(.985); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); border-radius: inherit; }
.hero-empty { min-height: 0; background: var(--card); color: var(--text); box-shadow: none; border: 1px dashed var(--line-2); }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px; background: rgba(0, 0, 0, .35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.countdown { text-align: center; padding: 10px 14px; border-radius: 18px; background: rgba(0, 0, 0, .38); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); display: flex; flex-direction: column; min-width: 86px; }
.countdown b { font-size: 34px; line-height: 1; font-weight: 800; }
.countdown span { font-size: 11px; opacity: .85; margin-top: 3px; max-width: 90px; }
.countdown.live b { font-size: 18px; }
.hero-body h2 { font-size: 30px; font-weight: 800; text-shadow: 0 2px 16px rgba(0, 0, 0, .35); }
.hero-body p { opacity: .92; font-weight: 500; }
.hero-dates { display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 10px 14px; border-radius: 16px; background: rgba(0, 0, 0, .32); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); width: fit-content; }
.hero-dates div { display: flex; flex-direction: column; }
.hero-dates small { font-size: 11px; opacity: .75; } .hero-dates b { font-size: 15px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat b { font-size: 20px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat small { color: var(--text-2); font-size: 11.5px; font-weight: 600; line-height: 1.2; }
.stat-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; }
.stat-ic.blue, .tile.blue { background: rgba(47, 107, 255, .16); color: var(--blue-2); }
.stat-ic.violet, .tile.violet { background: rgba(139, 92, 246, .16); color: #A78BFA; }
.stat-ic.cyan, .tile.cyan { background: rgba(34, 211, 238, .14); color: var(--cyan); }
.stat-ic.pink, .tile.pink { background: rgba(236, 72, 153, .15); color: #F472B6; }
.stat-ic.orange, .tile.orange { background: rgba(245, 158, 11, .15); color: var(--orange); }
.stat-ic.gray, .tile.gray { background: var(--card-2); color: var(--text-2); }
.tile.red { background: rgba(255, 69, 58, .14); color: var(--red); }
.tile-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tile b { font-size: 24px; font-weight: 800; }
.tile small { color: var(--text-2); font-weight: 600; font-size: 13px; }

/* Card viaggio */
.h-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.h-scroll::-webkit-scrollbar { display: none; }
.trip-card { position: relative; flex: 0 0 78%; max-width: 320px; height: 210px; border-radius: 22px; padding: 14px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background-size: cover; background-position: center; scroll-snap-align: start; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.trip-card:active { transform: scale(.97); }
.trip-card.wide { max-width: none; height: 190px; }
.trip-card h3 { font-size: 20px; font-weight: 800; text-shadow: 0 2px 12px rgba(0, 0, 0, .4); }
.trip-card p { margin: 2px 0 0; font-size: 14px; opacity: .92; }
.tc-dates { display: flex; align-items: center; gap: 5px; font-weight: 600; }
.card-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } .trip-card { flex-basis: 300px; } }
@media (min-width: 1200px) { .card-grid { grid-template-columns: repeat(3, 1fr); } }
.badge { align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(0, 0, 0, .4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: #fff; }
.badge.st-in_corso { background: rgba(34, 197, 94, .85); } .badge.st-pianificato { background: rgba(47, 107, 255, .85); } .badge.st-annullato { background: rgba(255, 69, 58, .8); }
.badge.pay-pagato { background: rgba(34, 197, 94, .85); } .badge.pay-da_pagare { background: rgba(255, 69, 58, .8); } .badge.pay-acconto, .badge.pay-in_struttura { background: rgba(245, 158, 11, .85); }
.badge-soft { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--card-2); color: var(--text-2); white-space: nowrap; }
.badge-soft.st-in_corso { color: var(--green); } .badge-soft.st-pianificato { color: var(--blue-2); } .badge-soft.st-annullato { color: var(--red); }

/* Liste */
.list-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; width: 100%; text-align: left; position: relative; min-height: 56px; transition: background .15s; }
.li + .li::before, .row-card + .row-card::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: 1px; background: var(--line); }
.li:active, .row-card:active { background: var(--card-2); }
.li-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--card-2); color: var(--blue-2); flex-shrink: 0; }
.li-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-main b { font-weight: 600; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-main small { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li.check { cursor: pointer; } .li.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.list-card.big .li { min-height: 62px; }
.row-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; position: relative; }
.row-card::before { left: 82px !important; }
.thumb { width: 58px; height: 58px; border-radius: 14px; background-size: cover; background-position: center; flex-shrink: 0; }
.rc-main { flex: 1; min-width: 0; }
.rc-main h4 { font-size: 16px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-main p { margin: 1px 0; font-size: 14px; }
.rc-side { display: flex; align-items: center; gap: 4px; }
.stars { color: #FBBF24; font-weight: 700; display: inline-flex; gap: 3px; align-items: center; font-size: 14px; }
.stars.big { font-size: 24px; letter-spacing: 2px; margin-bottom: 6px; }
.stars.big .muted { color: var(--card-3); }
.amt { text-align: right; display: flex; flex-direction: column; flex-shrink: 0; }
.amt b { font-size: 15px; } .amt small { color: var(--text-2); font-size: 12px; }

/* Ricerca, segmented, chip */
.search { display: flex; align-items: center; gap: 8px; background: var(--card-2); border-radius: 13px; padding: 0 12px; color: var(--text-2); margin-bottom: 12px; }
.search input { flex: 1; border: 0; background: none; padding: 11px 0; outline: none; color: var(--text); min-width: 0; }
.segmented { display: flex; background: var(--card-2); border-radius: 12px; padding: 3px; gap: 2px; margin-bottom: 14px; }
.segmented.scroll { overflow-x: auto; scrollbar-width: none; } .segmented.scroll::-webkit-scrollbar { display: none; }
.segmented button { flex: 1; padding: 8px 10px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap; transition: all .2s; }
.segmented button.on { background: var(--card); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
[data-theme="light"] .segmented button.on { background: #fff; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.seg3 button { padding: 11px 6px; border-radius: 12px; background: var(--card-2); font-weight: 600; font-size: 14px; }
.seg3 button.on { background: var(--grad); color: #fff; }
.chips, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row { margin: 8px 0 12px; }
.chip-row.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 8px -16px 4px; padding: 0 16px; } .chip-row.scroll::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 8px 13px; border-radius: 99px; background: var(--card-2); font-size: 14px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; transition: all .2s; }
.chip.sm { padding: 6px 11px; font-size: 13px; }
.chip.on { background: rgba(47, 107, 255, .16); color: var(--blue-2); border-color: rgba(47, 107, 255, .45); }
.chip.wish { color: #A78BFA; }

/* Notice, empty */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(47, 107, 255, .1); color: var(--text); font-size: 14px; margin: 10px 0; border: 1px solid rgba(47, 107, 255, .25); }
.notice .ic { margin-top: 1px; color: var(--blue-2); }
.notice.warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); } .notice.warn .ic { color: var(--orange); }
.empty { text-align: center; padding: 34px 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(47, 107, 255, .2), rgba(139, 92, 246, .2)); color: var(--blue-2); margin-bottom: 8px; }
.empty h4 { font-size: 18px; } .empty p { color: var(--text-2); max-width: 320px; margin-bottom: 12px; }

/* ---------- Pagina viaggio ---------- */
.trip-hero { position: relative; margin: calc(-8px - var(--safe-t)) -16px 0; min-height: calc(280px + var(--safe-t)); padding: calc(var(--safe-t) + 10px) 16px 18px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background-size: cover; background-position: center; }
.th-bar { display: flex; justify-content: space-between; }
.th-body h1 { font-size: 30px; font-weight: 800; margin-top: 8px; text-shadow: 0 2px 14px rgba(0, 0, 0, .4); }
.th-body p { opacity: .92; font-weight: 500; }
@media (min-width: 900px) { .trip-hero { margin: -28px -36px 0; border-radius: 0 0 28px 28px; padding: 22px 36px 22px; } }
.tabs { position: sticky; top: 0; z-index: 30; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 10px 16px; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 99px; font-size: 14px; font-weight: 650; color: var(--text-2); white-space: nowrap; transition: all .2s; }
.tabs a.on { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(47, 107, 255, .35); }
@supports (padding: env(safe-area-inset-top)) { .tabs { top: var(--safe-t); } }
/* fascia sotto la barra di stato iOS (app installata) */
body::before { content: ''; position: fixed; top: 0; left: 0; right: 0; height: var(--safe-t); z-index: 49; background: var(--glass); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); pointer-events: none; }
@media (min-width: 900px) { .tabs { margin: 0 -36px 18px; padding: 12px 36px; } }
.tab-body { animation: fadeUp .3s var(--ease); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 12px; }
.count-banner { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--grad); color: #fff; margin-bottom: 12px; font-weight: 600; }
.count-banner b { font-size: 20px; }
.budget-card { display: block; }
.bc-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.bc-top small { color: var(--text-2); font-size: 12.5px; font-weight: 600; display: block; } .bc-top b { font-size: 20px; }
.progress { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transition: width .6s var(--ease); }
.progress.warn span { background: linear-gradient(90deg, var(--orange), #F97316); } .progress.over span { background: var(--red); }
.progress.sm { height: 5px; margin: 6px 0 0; }
.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.mini-stat { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--blue-2); }
.mini-stat b { color: var(--text); font-size: 18px; } .mini-stat small { color: var(--text-2); font-size: 12px; font-weight: 600; }
.review { cursor: pointer; }
.tl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.tl-head h3 { font-size: 17px; margin: 0; }

/* Itinerario */
.day { margin-bottom: 18px; }
.day-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 2px 8px; }
.day-n { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.day-head h3 { font-size: 19px; font-weight: 750; text-transform: capitalize; }
.day-notes { color: var(--text-2); font-size: 14px; margin: 0 2px 8px; }
.timeline { position: relative; }
.tl-item { display: grid; grid-template-columns: 50px 14px 1fr; gap: 8px; align-items: start; position: relative; }
.tl-item::before { content: ''; position: absolute; left: 64px; top: 22px; bottom: -6px; width: 2px; background: var(--line-2); }
.tl-item:last-child::before { display: none; }
.tl-time { font-weight: 750; font-size: 15px; padding-top: 12px; text-align: right; display: flex; flex-direction: column; }
.tl-time small { color: var(--text-3); font-size: 12px; font-weight: 600; }
.tl-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); margin-top: 16px; box-shadow: 0 0 0 4px rgba(47, 107, 255, .2); z-index: 1; }
.tl-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; cursor: pointer; }
.tl-card b { font-size: 15.5px; }
.tl-card p { margin: 4px 0 0; }
.tl-place { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--blue-2); font-weight: 600; margin-top: 4px; }
.tl-item.done .tl-card { opacity: .55; } .tl-item.done b { text-decoration: line-through; } .tl-item.done .tl-dot { background: var(--green); box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.add-inline { display: flex; align-items: center; gap: 6px; color: var(--blue-2); font-weight: 600; font-size: 14px; padding: 8px 4px 0 72px; }

/* Voli */
.flight { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 16px; margin-bottom: 12px; position: relative; overflow: hidden; cursor: pointer; }
.flight::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad); }
.fl-top { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 14px; }
.fl-air { display: inline-flex; align-items: center; gap: 6px; } .fl-air b { color: var(--text); }
.fl-route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 12px 0 6px; }
.fl-route > div { display: flex; flex-direction: column; } .fl-route .right { align-items: flex-end; }
.iata { font-size: 34px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.fl-route small { color: var(--text-2); font-size: 12.5px; min-height: 16px; }
.fl-time { font-weight: 700; font-size: 17px; margin-top: 4px; }
.fl-mid { align-items: center; color: var(--blue-2); padding: 0 8px; position: relative; }
.fl-mid small { color: var(--text-2); }
.fl-date { font-size: 13.5px; color: var(--text-2); text-transform: capitalize; margin-bottom: 12px; }
.fl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.fl-grid div, .fl-foot div { display: flex; flex-direction: column; }
.fl-grid small, .fl-foot small { color: var(--text-2); font-size: 11.5px; font-weight: 600; }
.fl-grid b { font-size: 15px; }
.fl-foot { display: flex; gap: 16px; align-items: flex-end; padding-top: 10px; flex-wrap: wrap; }
.fl-foot .right { margin-left: auto; align-items: flex-end; }
.copy { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .04em; color: var(--text); }
.copy .ic { color: var(--text-3); }

/* Alloggi / prenotazioni */
.stay { background: var(--card); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-bottom: 14px; }
.stay-img { height: 150px; background-size: cover; background-position: center; position: relative; padding: 12px; display: flex; align-items: flex-start; justify-content: flex-end; }
.stay-img.ph { height: 70px; background: linear-gradient(135deg, rgba(47, 107, 255, .25), rgba(139, 92, 246, .25)); color: var(--blue-2); justify-content: space-between; align-items: center; }
.stay-body { padding: 14px 16px; }
.stay-body h3 { cursor: pointer; }
.stay-dates { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 12px 0 4px; padding: 10px 12px; background: var(--card-2); border-radius: 14px; }
.stay-dates > div { display: flex; flex-direction: column; } .stay-dates .right { align-items: flex-end; }
.stay-dates small { color: var(--text-2); font-size: 11.5px; font-weight: 600; } .stay-dates b { font-size: 15px; text-transform: capitalize; } .stay-dates span { font-size: 13px; color: var(--text-2); }
.nights { align-items: center; padding: 0 10px; } .nights b { font-size: 22px; color: var(--blue-2); }
.booking { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 14px; margin-bottom: 10px; }
.booking h3 { font-size: 16px; cursor: pointer; }
.bk-main { flex: 1; min-width: 0; }
.bk-main p { margin: 3px 0; display: flex; align-items: center; gap: 5px; }
.bk-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: rgba(47, 107, 255, .15); color: var(--blue-2); }
.bk-ic.k-ristorante { background: rgba(245, 158, 11, .15); color: var(--orange); } .bk-ic.k-museo, .bk-ic.k-evento { background: rgba(236, 72, 153, .15); color: #F472B6; }
.bk-ic.k-escursione { background: rgba(34, 197, 94, .15); color: var(--green); } .bk-ic.k-auto, .bk-ic.k-transfer { background: rgba(34, 211, 238, .14); color: var(--cyan); }

/* Allegati */
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0 4px; }
.attachments.compact { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.att { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 12px; background: var(--card-2); text-align: left; min-width: 0; }
.att-thumb { width: 38px; height: 38px; border-radius: 8px; background-size: cover; background-position: center; flex-shrink: 0; background-color: var(--card-3); }
.att-ic { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; background: rgba(255, 69, 58, .14); color: #FF7A70; flex-shrink: 0; }
.att-txt { display: flex; flex-direction: column; min-width: 0; }
.att-txt b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-txt small { font-size: 11px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: 18px; overflow: hidden; }
.photo { aspect-ratio: 1; background-size: cover; background-position: center; background-color: var(--card-2); }
@media (min-width: 700px) { .photo-grid { grid-template-columns: repeat(5, 1fr); } }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: calc(var(--safe-t) + 50px) 10px calc(var(--safe-b) + 30px); animation: fadeUp .25s; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb-close { position: absolute; top: calc(var(--safe-t) + 10px); right: 14px; color: #fff; }
.lb-cap { color: #ddd; font-size: 14px; margin-top: 10px; text-align: center; }

/* Spese */
.money-hero { display: flex; gap: 16px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 16px; margin-bottom: 10px; }
.mh-ring { --p: 0; width: 112px; height: 112px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--blue) 0, var(--violet) calc(var(--p) * 1%), var(--card-2) 0); }
.mh-ring > div { width: 88px; height: 88px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mh-ring b { font-size: 22px; font-weight: 800; } .mh-ring small { font-size: 11px; color: var(--text-2); }
.mh-nums { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.mh-nums div { display: flex; flex-direction: column; }
.mh-nums small { color: var(--text-2); font-size: 12px; font-weight: 600; } .mh-nums b { font-size: 18px; }
.money-total { text-align: center; padding: 18px; border-radius: 24px; background: var(--grad); color: #fff; margin-bottom: 12px; display: flex; flex-direction: column; box-shadow: 0 12px 30px rgba(47, 107, 255, .3); }
.money-total small { opacity: .85; font-weight: 600; } .money-total b { font-size: 36px; font-weight: 800; letter-spacing: -.02em; } .money-total .muted { color: rgba(255, 255, 255, .8); }
.chart-card h3 { margin-bottom: 8px; }
.chart-h { position: relative; height: 220px; } .chart-h.sm { height: 200px; }
.cat-list { display: grid; gap: 6px; margin-top: 12px; }
.cat-list div { display: grid; grid-template-columns: 12px 1fr auto 42px; gap: 8px; align-items: center; font-size: 14px; }
.cat-list small { color: var(--text-2); text-align: right; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.info-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14.5px; color: var(--text-2); }
.ir-l { flex: 1; color: var(--text); } .ir-v { font-weight: 700; color: var(--text); }

/* Checklist */
.checklist { padding: 0; overflow: hidden; }
.cl-head { display: flex; align-items: center; gap: 12px; padding: 14px; cursor: pointer; }
.cl-title { flex: 1; min-width: 0; } .cl-title h3 { margin: 0; font-size: 16px; }
.cl-ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--p) * 1%), var(--card-2) 0); flex-shrink: 0; }
.cl-ring span { width: 34px; height: 34px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 10.5px; font-weight: 800; }
.cl-body { padding: 0 14px 12px; }
.cl-cat { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 12px 0 4px; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cl-text { flex: 1; cursor: pointer; font-size: 15px; }
.cl-item.done .cl-text { color: var(--text-3); text-decoration: line-through; }
.check { width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; color: transparent; flex-shrink: 0; transition: all .2s; }
.check.on { background: var(--grad); border-color: transparent; color: #fff; }
.cl-add { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.cl-add input { flex: 1; min-width: 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); outline: none; }
.cl-add select { width: 110px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--input); font-size: 13px; }

/* Mappa */
.map-wrap { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 8px; }
.map { height: 52vh; min-height: 320px; background: var(--card-2); z-index: 1; }
.map-wrap.tall .map { height: calc(100vh - 260px); }
.map.world { height: 300px; min-height: 0; background: var(--bg-2); }
@media (min-width: 900px) { .map.world { height: 440px; } }
.map-search { position: absolute; z-index: 5; top: 10px; left: 10px; right: 10px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border-radius: 14px; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: var(--shadow); color: var(--text-2); }
.map-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; padding: 8px 0; color: var(--text); }
.map-fabs { position: absolute; z-index: 5; right: 10px; top: 66px; display: flex; flex-direction: column; gap: 8px; }
.map-fab { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: var(--blue-2); box-shadow: var(--shadow); }
.map-off { height: 100%; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--text-2); }
.legend { position: absolute; z-index: 5; left: 10px; bottom: 10px; display: flex; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--glass); font-size: 12px; font-weight: 600; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; }
.route-info { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin: 8px 0; }
.route-info > div { flex: 1; display: flex; flex-direction: column; } .route-info b { font-size: 18px; } .route-info small { color: var(--text-2); }
.pin-wrap { background: none; border: 0; }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--c); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); border: 2px solid #fff; color: #fff; position: relative; }
.pin .ic { transform: rotate(45deg); }
.pin-n { position: absolute; top: -8px; right: -8px; transform: rotate(45deg); background: #fff; color: #111; font-size: 10px; font-weight: 800; border-radius: 99px; padding: 1px 5px; }
.leaflet-container { font-family: var(--font); background: var(--card-2); }
[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--text); border-radius: 14px; box-shadow: var(--shadow); }
.leaflet-popup-content a { color: var(--blue-2); font-weight: 600; }
.leaflet-control-zoom a { background: var(--glass) !important; color: var(--text) !important; border-color: var(--line) !important; backdrop-filter: blur(14px); }
.leaflet-control-attribution { background: var(--glass) !important; color: var(--text-2) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.world-bar { height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; margin: 12px 0 2px; }
.world-bar span { display: block; height: 100%; background: var(--grad); }
.flag-big { font-size: 28px; width: 34px; text-align: center; }
.place-card p { display: flex; gap: 8px; align-items: flex-start; } .place-card p .ic { margin-top: 2px; color: var(--text-2); }
.place-card .chip { margin-bottom: 8px; }

/* Statistiche / recap */
.recap { border-radius: 26px; padding: 20px; margin: 14px 0; color: #fff; background: radial-gradient(120% 120% at 0% 0%, #2F6BFF 0%, #5B3FE0 45%, #8B5CF6 70%, #1b0f3a 100%); box-shadow: 0 16px 40px rgba(91, 63, 224, .35); }
.recap h3 { font-size: 44px; font-weight: 900; letter-spacing: -.03em; margin: 8px 0 12px; }
.recap.empty h3 { font-size: 22px; }
.recap p { opacity: .95; line-height: 1.5; }
.recap-mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 14px; }
.recap-mosaic a { aspect-ratio: 1; border-radius: 14px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 6px; font-size: 12px; font-weight: 700; }
.recap-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin-bottom: 10px; }
.recap-nums div { background: rgba(255, 255, 255, .12); border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; }
.recap-nums b { font-size: 24px; font-weight: 800; } .recap-nums small { font-size: 11px; opacity: .85; }
.recap-flags { font-size: 26px; letter-spacing: 4px; margin: 4px 0 8px; }

/* Altro / impostazioni */
.profile-card { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.profile-card > div { flex: 1; display: flex; flex-direction: column; }
.avatar { width: 50px; height: 50px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.li-ic.tile { color: inherit; }
.mini-select { border: 0; background: var(--card-2); border-radius: 10px; padding: 7px 8px; font-size: 14px; max-width: 150px; }
.inline-select select { width: 100%; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--card); margin-bottom: 12px; font-size: 15px; }
.steps { padding-left: 20px; line-height: 2; }
.doc-sec h2 a { color: var(--text); }

/* ---------- Fogli modali (bottom sheet) ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .25s; }
.sheet-overlay.open { background: rgba(0, 0, 0, .5); }
.sheet { width: 100%; max-width: 640px; max-height: calc(100vh - var(--safe-t) - 20px); background: var(--bg-2); border-radius: 22px 22px 0 0; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .32s var(--ease); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); }
[data-theme="light"] .sheet { background: var(--bg); }
.sheet-overlay.open .sheet { transform: none; }
.sheet-grabber { width: 38px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 8px auto 0; }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 6px 16px 10px; border-bottom: 1px solid var(--line); }
.sheet-head h3 { font-size: 17px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.sheet-head > button { justify-self: start; }
.sheet-actions { justify-self: end; }
.sheet-body { overflow-y: auto; padding: 14px 16px calc(var(--safe-b) + 24px); -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
@media (min-width: 700px) { .sheet-overlay { align-items: center; } .sheet { border-radius: 22px; max-height: 86vh; transform: translateY(30px) scale(.97); opacity: 0; transition: transform .25s var(--ease), opacity .25s; } .sheet-overlay.open .sheet { opacity: 1; } }

/* Form */
.form-group { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 4px 14px; display: flex; flex-wrap: wrap; column-gap: 12px; margin-bottom: 12px; }
.form-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); margin: 16px 4px 8px; }
.form-section-title:first-child { margin-top: 2px; }
.field { width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.field:last-child { border-bottom: 0; }
.field.half { width: calc(50% - 6px); }
.field label { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field small { color: var(--text-3); font-size: 11.5px; }
.field input, .field select, .field textarea { width: 100%; border: 0; background: none; outline: none; font-size: 16px; padding: 4px 0; color: var(--text); min-height: 30px; -webkit-appearance: none; appearance: none; }
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 18px; }
.field input[type="date"], .field input[type="time"] { min-height: 32px; text-align: left; }
.field input::-webkit-date-and-time-value { text-align: left; }
.field textarea { resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-3); }
.field-toggle { flex-direction: row; align-items: center; justify-content: space-between; }
.field-toggle label:first-child { font-size: 15px; color: var(--text); font-weight: 500; }
.switch { position: relative; width: 51px; height: 31px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--card-3); transition: .25s; }
.switch span::after { content: ''; position: absolute; left: 2px; top: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: .25s var(--ease); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.file-pick { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px dashed var(--line-2); color: var(--blue-2); font-weight: 600; font-size: 14.5px; cursor: pointer; margin-top: 2px; }
.file-pick input { display: none; }
.file-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rating-input { display: flex; gap: 4px; }
.rating-input button { color: var(--card-3); } .rating-input button.on { color: #FBBF24; } .rating-input button.on .ic { fill: #FBBF24; }

/* Alert / action sheet / toast */
.alert-overlay { position: fixed; inset: 0; z-index: 150; background: rgba(0, 0, 0, .45); display: grid; place-items: center; opacity: 0; transition: opacity .2s; padding: 20px; }
.alert-overlay.open { opacity: 1; }
.alert { width: 100%; max-width: 300px; background: var(--card); border-radius: 18px; overflow: hidden; text-align: center; }
.alert p { padding: 20px 18px; font-size: 15.5px; margin: 0; }
.alert-btns { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.alert-btns button { padding: 13px; font-size: 16px; color: var(--blue-2); }
.alert-btns button + button { border-left: 1px solid var(--line); font-weight: 700; }
.alert-btns .danger { color: var(--red); }
.as-overlay { place-items: end center; padding: 10px 10px calc(var(--safe-b) + 10px); }
.action-sheet { width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 8px; transform: translateY(40px); transition: transform .25s var(--ease); }
.as-overlay.open .action-sheet { transform: none; }
.as-group { background: var(--card); border-radius: 16px; overflow: hidden; }
.as-group button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 15px; font-size: 17px; color: var(--blue-2); }
.as-group button + button { border-top: 1px solid var(--line); }
.as-group .danger { color: var(--red); }
.as-cancel { font-weight: 700; }
#toasts { position: fixed; z-index: 300; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 14.5px; font-weight: 600; max-width: 480px;
  transform: translateY(-20px); opacity: 0; transition: all .3s var(--ease); }
.toast.show { transform: none; opacity: 1; }
.toast-ok .ic { color: var(--green); } .toast-error .ic { color: var(--red); } .toast-info .ic { color: var(--blue-2); }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: calc(var(--safe-t) + 20px) 18px calc(var(--safe-b) + 20px);
  background: radial-gradient(80% 50% at 50% 0%, rgba(47, 107, 255, .3), transparent), radial-gradient(60% 40% at 100% 100%, rgba(139, 92, 246, .25), transparent), var(--bg); }
.auth-card { width: 100%; max-width: 380px; text-align: center; }
.auth-logo { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 12px 36px rgba(47, 107, 255, .45); margin-bottom: 14px; }
.auth h1 { font-size: 30px; font-weight: 850; }
.auth-form { margin: 22px 0 14px; text-align: left; }
.auth-form .btn { margin-top: 6px; }
.auth .notice { text-align: left; }
.auth .tiny { display: flex; align-items: center; justify-content: center; gap: 5px; }
.net-banner[hidden] { display: none; }
