/* Nossas Viagens 0.3 — azul celeste + verde, fundo claro, sidebar petróleo. Claro é o canônico; escuro troca só tokens. */
:root {
  --sky: #1a9be6;
  --sky-600: #0b7fc6;
  --sky-ink: #0b4f78;
  --sky-50: #e8f4fd;
  --green: #16a866;
  --green-600: #0f8c53;
  --green-ink: #0b6b40;
  --green-50: #e5f6ed;
  --amber: #e99a12;
  --amber-ink: #7a4c00;
  --amber-50: #fdf3df;
  --red: #cf3f3f;
  --red-ink: #8e2323;
  --red-50: #fcebeb;
  --violet: #6f5bd3;
  --violet-50: #efecfb;
  --petrol: #0c4a57;
  --petrol-2: #083741;
  --bg: #f2f7fa;
  --bg-glow-a: #e2f1fc;
  --bg-glow-b: #e3f5ec;
  --card: #ffffff;
  --field: #fbfdfe;
  --surface-2: #e9f0f5; /* trilhos, segmentados */
  --ink: #0f2533;
  --muted: #5a6f80;
  --faint: #a9b8c3;
  --line: #e1eaf0;
  --line-sky: #d5e9f6;
  --line-strong: #c7d6e0;
  --tabbar-bg: rgba(255, 255, 255, .94);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 37, 51, .04), 0 4px 14px rgba(26, 155, 230, .07);
  --shadow-lift: 0 10px 28px rgba(12, 74, 87, .16);
  --grad-brand: linear-gradient(145deg, #2fb2f5 0%, var(--sky-600) 55%, var(--green) 100%);
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
:root[data-theme=dark] {
  --sky: #3aaef0;
  --sky-600: #6cc3f5;
  --sky-ink: #b5defa;
  --sky-50: #10324a;
  --green: #22b874;
  --green-600: #4fd194;
  --green-ink: #a6ecc9;
  --green-50: #0f3527;
  --amber-ink: #f5d08a;
  --amber-50: #3a2b0d;
  --red: #ef6b6b;
  --red-ink: #ffc0c0;
  --red-50: #3d1b1d;
  --violet: #a597f0;
  --violet-50: #282447;
  --bg: #0a1a21;
  --bg-glow-a: #0d2836;
  --bg-glow-b: #0c2a22;
  --card: #10242d;
  --field: #0d1f27;
  --surface-2: #1a323d;
  --ink: #e3eef3;
  --muted: #93a9b6;
  --faint: #5d7584;
  --line: #1d3640;
  --line-sky: #1b3746;
  --line-strong: #2b4a58;
  --tabbar-bg: rgba(12, 28, 35, .94);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lift: 0 10px 28px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  font: 400 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(90% 260px at 0% 0%, var(--bg-glow-a) 0%, transparent 100%), radial-gradient(70% 220px at 100% 0%, var(--bg-glow-b) 0%, transparent 100%), var(--bg);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100dvh;
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--sky) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.rot45 { transform: rotate(45deg); }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.err-text { color: var(--red); display: flex; gap: 6px; align-items: center; }
.err-text .ic { width: 15px; height: 15px; }

.is-child [data-adult] { display: none !important; }

/* ---------- boot / login ---------- */
.boot { display: grid; place-items: center; min-height: 100dvh; color: var(--muted); }
.login {
  min-height: 100dvh; display: grid; place-items: center; position: relative; overflow: hidden;
  padding: calc(24px + var(--safe-t)) calc(16px + var(--safe-r)) calc(24px + var(--safe-b)) calc(16px + var(--safe-l));
  background: linear-gradient(180deg, #8fd0f6 0%, #3aa4e4 46%, var(--petrol) 100%);
}
.login-art { position: absolute; inset: auto 0 0 0; height: 46%; color: rgba(5, 40, 52, .55); pointer-events: none; }
.login-skyline { width: 100%; height: 100%; }
.login-card { position: relative; width: min(420px, 100%); background: var(--card); border-radius: 26px; box-shadow: 0 24px 60px rgba(5, 40, 52, .35); padding: 28px 22px; display: grid; gap: 18px; }
.login-card h1 { font-size: 26px; letter-spacing: -.02em; }
.setup-title { font-size: 20px; font-weight: 800; }
.demo summary { cursor: pointer; color: var(--sky-600); font-weight: 600; font-size: 14px; min-height: 44px; display: flex; align-items: center; }
.demo-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-brand); color: #fff; box-shadow: 0 4px 12px rgba(26, 155, 230, .35), inset 0 1px 0 rgba(255, 255, 255, .35); }
.brand-mark .ic { width: 22px; height: 22px; }
.brand-lg .brand-mark { width: 56px; height: 56px; border-radius: 16px; }
.brand-lg .brand-mark .ic { width: 30px; height: 30px; }
.brand-name { font-weight: 700; font-size: 18px; letter-spacing: -.01em; }

/* ---------- formulários ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field select, .field textarea, .form > textarea, .form textarea {
  width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--field); font-size: 16px; /* evita zoom no iOS */
}
.field select { -webkit-appearance: none; appearance: none; padding-right: 38px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237a8a94' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5-5 5 5M7 15l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; }
.field input[type=date], .field input[type=time] { -webkit-appearance: none; appearance: none; min-width: 0; display: block; }
.field input:focus, .field select:focus, .form textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.field input[type=file] { padding: 10px; font-size: 14px; }
.hint { font-size: 12px; color: var(--muted); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.form-error { color: var(--red-ink); background: var(--red-50); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.note { border-radius: 12px; padding: 10px 12px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.note > .ic { margin-top: 1px; width: 18px; height: 18px; }
.note-info { background: var(--sky-50); color: var(--sky-ink); }
.note-warn { background: var(--amber-50); color: var(--amber-ink); }
.map-fields { border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px 12px; display: grid; gap: 10px; margin: 0; min-width: 0; }
.map-fields legend { font-size: 13px; font-weight: 700; padding: 0 4px; }

.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 22px; height: 22px; margin: 0; cursor: pointer; }
.check-box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; background: var(--card); transition: background .15s, border-color .15s; }
.check-box .ic { width: 15px; height: 15px; stroke-width: 3; color: #fff; opacity: 0; }
.check input:checked + .check-box { background: var(--green); border-color: var(--green); }
.check input:checked + .check-box .ic { opacity: 1; }
.check input:focus-visible + .check-box { outline: 3px solid color-mix(in srgb, var(--sky) 55%, transparent); outline-offset: 2px; }
.check input:disabled + .check-box { opacity: .55; }
.check-label { font-size: 14px; }
.checklist .check input:checked ~ .check-label { color: var(--muted); text-decoration: line-through; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 13px; border: 0;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .08s, background .15s, box-shadow .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn .ic { width: 18px; height: 18px; }
.btn-sm { min-height: 40px; padding: 0 13px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--sky); color: #fff; box-shadow: 0 4px 12px rgba(26, 155, 230, .28); }
.btn-primary:hover { background: #0b8fd8; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 4px 12px rgba(22, 168, 102, .25); }
.btn-green:hover { background: #0f9a5c; }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--line-strong); }
.btn-quiet { background: transparent; color: var(--muted); border: 0; }
.btn-glass { background: rgba(255, 255, 255, .18); color: #fff; border: 1px solid rgba(255, 255, 255, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-danger-ghost { background: transparent; color: var(--red); border: 1.5px solid color-mix(in srgb, var(--red) 30%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--sky-50); color: var(--sky-600); flex: none; }
.icon-btn-solid { background: var(--sky); color: #fff; }
.icon-btn:disabled { opacity: .5; }
.link { display: inline-flex; align-items: center; gap: 2px; color: var(--sky-600); font-weight: 600; font-size: 14px; min-height: 32px; background: none; border: 0; padding: 0; }
.link .ic { width: 16px; height: 16px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); font-size: 14px; font-weight: 600; color: var(--muted); flex: none; }
.chip[aria-pressed=true] { background: var(--sky); border-color: var(--sky); color: #fff; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

.seg { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { flex: 1; min-height: 36px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted); padding: 0 10px; }
.seg button[aria-pressed=true] { background: var(--card); color: var(--sky-600); box-shadow: 0 1px 3px rgba(15, 37, 51, .14); }
.seg-sm button { min-height: 30px; font-size: 12.5px; padding: 0 8px; }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill .ic { width: 13px; height: 13px; }
.pill-green, .pill-done { background: var(--green-50); color: var(--green-600); }
.pill-light, .pill-planned { background: var(--sky-50); color: var(--sky-600); }
.pill-skipped { background: var(--surface-2); color: var(--muted); }
.pill-cancelled { background: var(--red-50); color: var(--red-ink); }
.pill-kind { background: var(--violet-50); color: var(--violet); }
.pill-rescheduled { background: var(--amber-50); color: var(--amber-ink); }
.pill-glass { background: rgba(255, 255, 255, .2); color: #fff; }
.prio-fixed { background: var(--petrol); color: #fff; }
.prio-main { background: var(--sky); color: #fff; }
.prio-flexible { background: var(--green-50); color: var(--green-600); }
.prio-optional { background: var(--surface-2); color: var(--muted); }
.prio-family { background: var(--violet-50); color: var(--violet); }
.resv-need { background: var(--amber-50); color: var(--amber-ink); }
.resv-free { background: var(--green-50); color: var(--green-600); }
.resv-unknown { background: var(--surface-2); color: var(--muted); }
.est { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--amber-ink); border: 1px dashed color-mix(in srgb, var(--amber) 70%, transparent); border-radius: 6px; padding: 0 5px; vertical-align: 1px; white-space: nowrap; }

/* ---------- casca ---------- */
.shell { min-height: 100dvh; }
.sidebar { display: none; }
.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-t)) calc(16px + var(--safe-r)) 10px calc(16px + var(--safe-l));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
}
.topbar-text { flex: 1; min-width: 0; }
.top-title { font-size: 24px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-sub:empty { display: none; }
.top-sub-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.top-sub-trip { display: none; }
.trip-chip { flex: none; display: inline-flex; align-items: center; gap: 5px; max-width: 62%; min-height: 32px; padding: 0 10px 0 9px; border-radius: 999px; border: 1.5px solid var(--line-sky); background: var(--card); color: var(--sky-ink); font-weight: 700; font-size: 13.5px; box-shadow: var(--shadow); }
.trip-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-chip .ic { width: 15px; height: 15px; color: var(--sky); }
.avatar { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: linear-gradient(145deg, #ffd9a8, #f6a96b); color: #5b2e0b; font-weight: 800; font-size: 14px; border: 2px solid var(--card); box-shadow: 0 2px 6px rgba(15, 37, 51, .12); }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }

.netbar { margin: 0 16px 8px; padding: 9px 12px; border-radius: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; align-items: center; }
.netbar[data-kind=offline] { background: var(--surface-2); color: var(--ink); }
.netbar[data-kind=pending] { background: var(--sky-50); color: var(--sky-ink); }
.netbar[data-kind=error] { background: var(--red-50); color: var(--red-ink); }
.netbar-part { display: inline-flex; align-items: center; gap: 6px; }
.netbar .ic { width: 16px; height: 16px; }
.netbar-err { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; }

.view {
  padding: 4px calc(16px + var(--safe-r)) calc(var(--tabbar-h) + 28px + var(--safe-b)) calc(16px + var(--safe-l));
  display: grid; gap: 14px; max-width: 760px; margin: 0 auto; outline: none; min-width: 0;
}
.view > * { min-width: 0; }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.view-head { justify-content: flex-end; }
.view-head:not(:has(> :nth-child(2))) { display: none; }
/* O título visível já está na barra do topo; o h2 fica para leitores de tela e foco. */
.view-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.section-h { font-size: 16px; font-weight: 800; margin-top: 6px; }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: flex; justify-content: space-around;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding: 6px calc(4px + var(--safe-r)) var(--safe-b) calc(4px + var(--safe-l));
  background: var(--tabbar-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 0; border-radius: 12px; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a[aria-current=page] { color: var(--sky-600); }
.tabbar a[aria-current=page] .ic { stroke-width: 2.3; }

.fab { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--sky); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(26, 155, 230, .45); }
.fab .ic { width: 28px; height: 28px; stroke-width: 2.4; }

/* ---------- cartões ---------- */
.card { background: var(--card); border: 1px solid var(--line-sky); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.card-h .ic { color: var(--sky); }
.card-h .pill { margin-left: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.empty { text-align: center; padding: 22px 16px; display: grid; gap: 8px; justify-items: center; }
.empty h2 { font-size: 18px; }

.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; width: var(--pct, 0%); background: linear-gradient(90deg, var(--sky), var(--green)); border-radius: inherit; transition: width .3s; }
.bar-green > span { background: var(--green); }
.bar-light { background: rgba(255, 255, 255, .25); }
.bar-light > span { background: #fff; }

/* ---------- fotos reais dos lugares ---------- */
.ph { position: relative; overflow: hidden; background: linear-gradient(160deg, #9bd6f7 0%, #3aa4e4 55%, var(--petrol) 100%); color: rgba(255, 255, 255, .8); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-fallback { position: absolute; inset: 0; display: grid; place-items: center; }
.ph-fallback .ic { width: 34px; height: 34px; stroke-width: 1.5; }
.credit { position: absolute; right: 6px; bottom: 6px; z-index: 2; max-width: calc(100% - 12px); font-size: 10.5px; line-height: 1.3; }
.credit a, .credit span { display: inline-block; max-width: 100%; padding: 2px 7px; border-radius: 999px; background: rgba(5, 30, 40, .6); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.credit a:hover { text-decoration: underline; }

/* ---------- dias ---------- */
.day-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: 0 -2px; }
.day-chips::-webkit-scrollbar { display: none; }
.day-chip { flex: none; display: grid; justify-items: center; gap: 0; min-width: 52px; min-height: 58px; padding: 6px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); }
.day-chip small { font-size: 11px; color: var(--muted); font-weight: 600; }
.day-chip strong { font-size: 18px; font-weight: 800; }
.day-chip em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--green-600); }
.day-chip[aria-pressed=true] { background: linear-gradient(160deg, var(--sky), #0b7fc6); border-color: var(--sky); color: #fff; }
.day-chip[aria-pressed=true] small, .day-chip[aria-pressed=true] em { color: #e6f5ff; }
.day-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.day-head h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.wx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--sky-50); color: var(--sky-ink); font-weight: 700; font-size: 13px; }
.wx-chip .ic { width: 18px; height: 18px; }
.wx-chip small { font-weight: 600; opacity: .8; }

/* ---------- próxima atividade (foto) ---------- */
.next-card { position: relative; overflow: hidden; border-radius: 22px; min-height: 250px; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(160deg, var(--petrol) 0%, #0f6177 100%); box-shadow: var(--shadow-lift); }
.next-card.next-empty { min-height: 0; color: var(--ink); background: var(--card); box-shadow: var(--shadow); }
.next-card .next-ph { position: absolute; inset: 0; }
.next-card:not(.next-plain) .next-body { margin-top: 130px; }
.next-card .credit { top: 8px; bottom: auto; right: 8px; }
.next-body { position: relative; width: 100%; padding: 16px; display: grid; gap: 6px; background: linear-gradient(0deg, rgba(4, 30, 40, .9) 0%, rgba(4, 30, 40, .62) 62%, rgba(4, 30, 40, 0) 100%); }
.next-plain .next-body { background: none; }
.next-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.next-k { font-size: 13px; font-weight: 700; opacity: .9; }
.next-title { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.12; text-wrap: balance; }
.next-sub { font-size: 13.5px; opacity: .9; }
.next-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.leave { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding: 8px 10px; border-radius: 12px; background: var(--sky-50); color: var(--sky-ink); }
.leave .ic { width: 18px; height: 18px; margin-top: 1px; }
.leave span { display: grid; }
.leave small { font-size: 11.5px; opacity: .85; }
.leave-glass { background: rgba(255, 255, 255, .14); color: #fff; }

/* voo de volta */
.flight-card { border: 1.5px solid color-mix(in srgb, var(--amber) 55%, transparent); background: linear-gradient(180deg, var(--amber-50), var(--card) 70%); }
.flight-card .card-h .ic { color: var(--amber); }
.flight-steps { display: grid; gap: 0; counter-reset: none; }
.flight-steps li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; border-top: 1px dashed var(--line-strong); }
.flight-steps li:first-child { border-top: 0; }
.flight-steps strong { font-size: 18px; font-weight: 800; }
.flight-steps li:first-child strong { color: var(--amber-ink); }
.flight-steps span { font-size: 13.5px; }

/* timeline */
.timeline { display: grid; }
.tl-item a { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); position: relative; min-height: 52px; border-radius: 10px; }
.tl-item a:hover .tl-more { color: var(--sky-600); }
.tl-item:first-child a { border-top: 0; }
.tl-time { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tl-time::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sky); flex: none; }
.tl-item[data-status=done] .tl-time::before { background: var(--green); }
.tl-item[data-status=skipped] .tl-time::before { background: var(--faint); }
.tl-item[data-status=skipped] strong { text-decoration: line-through; color: var(--muted); }
.tl-body { display: grid; min-width: 0; }
.tl-body strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-body small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-tags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.tl-more { display: inline-flex; align-items: center; gap: 2px; color: var(--sky-600); font-size: 12.5px; font-weight: 700; }
.tl-more .ic { width: 18px; height: 18px; }
.tl-more-t { display: none; }
.tl-item[data-status=cancelled] strong { text-decoration: line-through; color: var(--muted); }
.tl-item[data-status=cancelled] .tl-time::before { background: var(--red); }

/* listas */
.rows { display: grid; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); width: 100%; min-height: 52px; background: none; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; }
.rows > li:first-child > .row, .rows > .row:first-child { border-top: 0; }
.row-ic { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--sky-50); color: var(--sky-600); }
.row-ic.ic-violet { background: var(--violet-50); color: var(--violet); }
.row-ic.ic-red { background: var(--red-50); color: var(--red); }
.row-body { flex: 1; min-width: 0; display: grid; }
.row-body strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-body small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .chev { color: var(--faint); width: 18px; height: 18px; }
.as-link { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.group-h { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 8px; }
.bullets { display: grid; gap: 6px; padding-left: 18px; list-style: disc; font-size: 14px; }
.bullets li::marker { color: var(--sky); }
.card-safety .card-h .ic { color: var(--green); }
.sources { display: grid; gap: 8px; font-size: 14px; }
.sources li { display: grid; }
.sources a { color: var(--sky-600); font-weight: 600; overflow-wrap: anywhere; }
.sources small { color: var(--muted); font-size: 12px; }

.checklist { display: grid; }
.checklist li + li { border-top: 1px solid var(--line); }

/* acesso rápido */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick > * { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 0; background: var(--sky-50); color: var(--sky-600); font-size: 12px; font-weight: 600; min-height: 72px; align-content: center; text-align: center; }
.quick span { color: var(--ink); line-height: 1.2; }
.quick .ic { width: 24px; height: 24px; }
.quick-sheet { grid-template-columns: 1fr 1fr; }
.quick-sheet > * { min-height: 92px; font-size: 14px; }

/* donut */
.cat-wrap { display: flex; align-items: center; gap: 16px; }
.donut { width: 128px; height: 128px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.donut-hole { width: 84px; height: 84px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; }
.donut-hole strong { font-size: 13px; font-weight: 800; }
.donut-hole small { font-size: 11px; color: var(--muted); }
.legend { flex: 1; display: grid; gap: 6px; min-width: 0; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
.legend li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--swatch, #ccc); }

/* ---------- roteiro: cartões ricos ---------- */
.act-list { display: grid; gap: 14px; }
.act-card { background: var(--card); border: 1px solid var(--line-sky); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; display: grid; min-width: 0; }
.act-card[data-status=skipped] { opacity: .7; }
.act-media { position: relative; }
.act-ph { aspect-ratio: 16 / 9; width: 100%; }
.act-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.act-badges-flat { position: static; padding: 14px 14px 0; }
.pill-time { background: rgba(5, 30, 40, .72); color: #fff; font-size: 13px; padding: 4px 10px; }
.act-badges-flat .pill-time { background: var(--petrol); }
.act-body { padding: 12px 14px 14px; display: grid; gap: 8px; min-width: 0; }
.act-body h3 { font-size: 18px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.act-body h3 a:hover { color: var(--sky-600); }
.act-place { display: flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--muted); }
.act-place .ic { width: 16px; height: 16px; }
.act-facts { display: grid; gap: 6px; font-size: 13.5px; }
.act-facts li { display: flex; gap: 8px; align-items: flex-start; }
.act-facts .ic { width: 17px; height: 17px; color: var(--sky); margin-top: 1px; }
.act-facts b { font-weight: 700; }
.act-facts .resv-need { background: none; color: inherit; }
.act-facts .resv-need .ic { color: var(--amber); }
.act-note { font-weight: 600; }

.crono-day .timeline { margin-top: -2px; }

/* mapa */
.osm { display: block; width: 100%; aspect-ratio: 4 / 3; max-height: 420px; border: 0; border-radius: 14px; background: var(--surface-2); }
.dash-map .osm { aspect-ratio: 16 / 10; }
.stops { display: grid; counter-reset: none; }
.stop { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.stop:first-child { border-top: 0; }
.stop-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; font-weight: 800; font-size: 14px; }
.stop-body { flex: 1; min-width: 0; display: grid; }
.stop-body strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stop-body small { font-size: 12px; color: var(--muted); }

/* detalhe */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--sky-600); font-weight: 600; min-height: 44px; }
.detail { display: grid; gap: 14px; min-width: 0; }
.detail-ph { aspect-ratio: 16 / 10; max-height: 380px; width: 100%; border-radius: 22px; box-shadow: var(--shadow-lift); }
.detail-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; line-height: 1.15; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.facts { display: grid; gap: 8px; }
.facts li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.facts .ic { color: var(--muted); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; }
.info { background: var(--sky-50); border-radius: 12px; padding: 9px 11px; display: grid; gap: 2px; min-width: 0; }
.info dt { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--sky-ink); }
.info dt .ic { width: 15px; height: 15px; }
.info dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.act-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 10px; }
.act-grid .btn { width: 100%; justify-content: flex-start; padding: 0 14px; }
.detail-media { display: grid; gap: 6px; min-width: 0; }
.photo-note { display: flex; gap: 6px; align-items: flex-start; padding: 0 6px; }
.photo-note .ic { width: 14px; height: 14px; margin-top: 1px; }

/* ---------- carteira ---------- */
.wallet-grid { display: grid; gap: 14px; }
.booking { gap: 12px; padding: 16px; }
.booking-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.booking-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; }
.booking-ic .ic { width: 26px; height: 26px; }
.booking-pending .booking-ic { background: linear-gradient(145deg, #f6c35a, var(--amber)); }
.booking-cancelled .booking-ic { background: var(--surface-2); color: var(--muted); }
.booking-title small { font-size: 12px; font-weight: 700; color: var(--muted); }
.booking-title h3 { font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
.booking-title p { font-size: 13.5px; color: var(--muted); }
.bk-purchased { background: var(--green-50); color: var(--green-600); }
.bk-pending { background: var(--amber-50); color: var(--amber-ink); }
.bk-cancelled { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.booking-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.booking-meta dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.booking-meta dd { margin: 0; font-weight: 700; }
.booking-meta .code { font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.doc-card { gap: 10px; }
.doc-card-in { display: grid; padding-top: 12px; border-top: 1px dashed var(--line-strong); }
.doc-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-pv { border-radius: 14px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); min-height: 120px; display: grid; }
.doc-pv img { width: 100%; max-height: 520px; object-fit: contain; background: #fff; }
.doc-pv-wait { place-items: center; color: var(--muted); font-size: 13.5px; padding: 18px; text-align: center; min-height: 160px; }
.doc-pv-pdf iframe { width: 100%; height: min(70vh, 560px); border: 0; background: #fff; }
.doc-pv-text { margin: 0; padding: 12px; max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); background: var(--field); }

/* ---------- gastos ---------- */
.gastos-grid { display: grid; gap: 14px; }
.card-goal { background: linear-gradient(150deg, #13b373 0%, #0f8c53 100%); border-color: transparent; color: #fff; gap: 4px; }
.goal-k { font-size: 13px; font-weight: 700; opacity: .9; }
.goal-v { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.goal-foot { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-top: 6px; }
.totals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.totals .tiny { grid-column: 1 / -1; }
.total { border-radius: 12px; padding: 10px 8px; display: grid; gap: 2px; min-width: 0; }
.total small { font-size: 12px; font-weight: 700; }
.total strong { font-size: 13.5px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.total-planned { background: var(--sky-50); color: var(--sky-ink); }
.total-reserved { background: var(--amber-50); color: var(--amber-ink); }
.total-paid { background: var(--green-50); color: var(--green-ink); }
.exp-row { align-items: center; }
.exp-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.exp-side strong { font-size: 14px; }
.status-select { min-height: 32px; border-radius: 9px; border: 1.5px solid var(--line); background: var(--card); font-size: 12.5px; font-weight: 600; padding: 2px 6px; }
.contas { display: inline-flex; align-items: center; gap: 3px; width: max-content; margin-top: 3px; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 6px; }
.contas .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.contas-ok { background: var(--green-50); color: var(--green-600); }
.contas-wait { background: var(--sky-50); color: var(--sky-600); }
.contas-err { background: var(--red-50); color: var(--red); }
.finance { border: 1.5px dashed var(--line-strong); box-shadow: none; }

/* ---------- explorar ---------- */
.chat { gap: 12px; }
.chat-head { display: flex; gap: 12px; align-items: flex-start; }
.chat-head h3 { font-size: 18px; font-weight: 800; }
.chat-mark { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad-brand); color: #fff; }
.chat-mark .ic { width: 24px; height: 24px; }
.prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prompt { min-height: 48px; padding: 8px 12px; border-radius: 14px; border: 1.5px solid var(--line-sky); background: var(--sky-50); color: var(--sky-ink); font-size: 13.5px; font-weight: 600; text-align: left; line-height: 1.25; }
.prompt:hover { border-color: var(--sky); }
.prompt:disabled { opacity: .55; }
.chat-log { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px; overscroll-behavior: contain; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; display: grid; gap: 6px; overflow-wrap: anywhere; }
.msg ul { padding-left: 18px; list-style: disc; display: grid; gap: 4px; }
.msg-user { justify-self: end; background: var(--sky); color: #fff; border-bottom-right-radius: 5px; }
.msg-assistant { justify-self: start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg-error { background: var(--amber-50); color: var(--amber-ink); }
.msg-error p { display: flex; gap: 8px; align-items: flex-start; }
.msg-busy { color: var(--muted); }
.ask-form { display: flex; gap: 8px; }
.ask-form input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--field); font-size: 16px; }
.ask-form input:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.ask-form .icon-btn { width: 46px; height: 46px; border-radius: 50%; }
.city-grid { display: grid; gap: 14px; }
.place-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.place-card { display: grid; background: var(--card); border: 1px solid var(--line-sky); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); height: 100%; }
.place-ph { aspect-ratio: 4 / 3; }
.place-body { padding: 9px 11px 11px; display: grid; gap: 2px; }
.place-body strong { font-size: 14px; line-height: 1.25; }
.place-body small { font-size: 12px; color: var(--muted); }

/* ---------- mais: células agrupadas ---------- */
.profile { grid-template-columns: auto 1fr; align-items: center; gap: 14px; }
.profile strong { display: block; font-size: 17px; }
.settings { display: grid; gap: 18px; }
.group { display: grid; gap: 6px; min-width: 0; }
.group-title { font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.cells { background: var(--card); border: 1px solid var(--line-sky); border-radius: var(--radius); box-shadow: var(--shadow); padding: 0 14px; display: grid; }
.cells > li { border-top: 1px solid var(--line); }
.cells > li:first-child { border-top: 0; }
.cell { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 0; width: 100%; background: none; border: 0; text-align: left; }
.cell-col { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 0; }
.cell-ic { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--sky-50); color: var(--sky-600); }
.cell-ic .ic { width: 18px; height: 18px; }
.cell-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.cell-main strong { font-size: 15px; font-weight: 600; }
.cell-main small { font-size: 12.5px; color: var(--muted); }
.cell .chev { color: var(--faint); width: 18px; height: 18px; }
.cell-select { margin-top: 4px; min-height: 40px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--field); padding: 0 8px; max-width: 100%; }
.cell-danger { color: var(--red); }
.cell-danger .cell-ic { background: var(--red-50); color: var(--red); }
.cell-err .cell-ic { background: var(--red-50); color: var(--red); }
.cell-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 12px; }
.cell-note { font-size: 12px; color: var(--muted); padding: 10px 0; }

/* ---------- folha ---------- */
.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: 560px;
  max-height: calc(100dvh - 24px - var(--safe-t));
  border-radius: 22px 22px 0 0; background: var(--card); color: var(--ink);
  box-shadow: 0 -10px 40px rgba(15, 37, 51, .2);
}
.sheet::backdrop { background: rgba(8, 30, 40, .45); }
.sheet[open] { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-form { padding: 16px calc(16px + var(--safe-r)) calc(16px + var(--safe-b)) calc(16px + var(--safe-l)); gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet-head h2 { font-size: 19px; font-weight: 800; }
.sheet-body { display: grid; gap: 12px; min-width: 0; }
.sheet-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.sheet-foot-one { grid-template-columns: 1fr; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px + var(--safe-b)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 11px 16px; border-radius: 14px;
  background: var(--petrol-2); color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lift);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind=error] { background: #9e2b2b; }

/* ---------- Hoje: celular em coluna, foto da próxima atividade primeiro ---------- */
.dash { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
.dash > * { grid-column: 1 / -1; }
.dash > .dash-next { order: -2; }
.dash-main { display: grid; gap: 12px; align-content: start; min-width: 0; }
.dash-side { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; min-width: 0; }
.dash-side > .dash-weather, .is-child .dash-side > .dash-docs { grid-column: 1 / -1; }
.dash-days .day-chips { margin-top: 2px; }

/* ---------- toque (iPhone/tablet): alvos de 44px ---------- */
@media (max-width: 1023px) {
  .view { gap: 12px; }
  .link { min-height: 44px; }
  .chip, .icon-btn, .status-select { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .btn-sm { min-height: 44px; }
  .seg button, .seg-sm button { min-height: 44px; }
  .check { min-height: 44px; }
}

/* ---------- telas muito estreitas (320) ---------- */
@media (max-width: 359px) {
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .view { padding-left: 12px; padding-right: 12px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .top-title { font-size: 21px; }
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .cat-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
  .totals { grid-template-columns: minmax(0, 1fr); }
  .tl-item a { grid-template-columns: 54px minmax(0, 1fr) auto auto; gap: 8px; }
  .prompts { grid-template-columns: minmax(0, 1fr); }
  .place-grid { grid-template-columns: minmax(0, 1fr); }
  .next-title { font-size: 21px; }
}

/* ---------- tablet ---------- */
@media (min-width: 640px) {
  .dash > .dash-check, .dash > .dash-fixed, .dash > .dash-cat { grid-column: span 1; }
  .gastos-grid { grid-template-columns: 1fr 1fr; }
  .gastos-list, .finance { grid-column: 1 / -1; }
  .sheet { margin: auto; border-radius: 22px; }
  .act-card { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .act-card.act-plain { grid-template-columns: 1fr; }
  .act-ph { aspect-ratio: auto; height: 100%; min-height: 240px; }
  .city-grid { grid-template-columns: 1fr 1fr; }
  .place-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .prompts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- desktop: sidebar petróleo ---------- */
@media (min-width: 1024px) {
  :root { --tabbar-h: 0px; }
  .shell { display: grid; grid-template-columns: 248px 1fr; }
  .tabbar { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 16px;
    position: sticky; top: 0; height: 100dvh; padding: 18px 12px;
    background: linear-gradient(180deg, var(--petrol) 0%, var(--petrol-2) 100%); color: #e6f2f5;
  }
  .sidebar .brand { padding: 0 4px 4px; gap: 9px; }
  .sidebar .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .sidebar .brand-name { font-size: 16.5px; }
  .side-nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
  .side-label { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8fb6c0; padding: 4px 8px 2px; }
  .side-empty { font-size: 13px; color: #a9cbd3; padding: 4px 8px; }
  .side-trips { display: grid; gap: 4px; }
  .st { border-radius: 13px; }
  .st-open { background: rgba(255, 255, 255, .07); padding-bottom: 6px; }
  .st-head { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 6px 8px; border-radius: 12px; color: #e6f2f5; }
  .st-head:hover { background: rgba(255, 255, 255, .07); }
  .st-head[aria-current=page] { background: rgba(217, 243, 200, .14); }
  .st-thumb { width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center; background: linear-gradient(160deg, #7cc8f3, #1f86b5); color: #fff; }
  .st-thumb .ic { width: 17px; height: 17px; }
  .st-text { flex: 1; min-width: 0; display: grid; }
  .st-text strong { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-text small { font-size: 11.5px; color: #a9cbd3; }
  .st-chev { width: 16px; height: 16px; color: #8fb6c0; }
  .st-sub { display: grid; gap: 1px; padding: 0 6px 0 16px; }
  .st-sub a { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: #cfe3e8; }
  .st-sub a .ic { width: 18px; height: 18px; }
  .st-sub a:hover { background: rgba(255, 255, 255, .07); }
  .st-sub a[aria-current=page] { background: #d9f3c8; color: var(--petrol-2); }
  .side-closed summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: #a9cbd3; padding: 8px; border-radius: 10px; }
  .side-closed summary:hover { background: rgba(255, 255, 255, .07); }
  .side-new { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 11px; margin-top: 4px; border-radius: 11px; border: 1.5px dashed rgba(217, 243, 200, .45); color: #d9f3c8; font-weight: 700; font-size: 14px; }
  .side-new:hover, .side-new[aria-current=page] { background: rgba(217, 243, 200, .12); }
  .side-link { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 11px; border-radius: 11px; font-weight: 600; font-size: 14.5px; color: #cfe3e8; margin-top: 8px; }
  .side-link small { margin-left: auto; font-size: 11px; font-weight: 700; color: #8fb6c0; }
  .side-link:hover { background: rgba(255, 255, 255, .07); }
  .side-link[aria-current=page] { background: #d9f3c8; color: var(--petrol-2); }
  .side-link[aria-current=page] small { color: var(--petrol); }
  .side-foot { display: grid; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 8px; }
  .side-foot .side-link { margin-top: 0; }
  .side-out { display: flex; align-items: center; gap: 11px; min-height: 40px; padding: 0 11px; border-radius: 11px; border: 0; background: transparent; color: #cfe3e8; font-weight: 600; font-size: 14.5px; }
  .side-out:hover { background: rgba(255, 255, 255, .07); }
  .trip-chip { display: none !important; }
  .top-sub-text { display: inline !important; }
  .top-sub-trip { display: inline; }

  .topbar { padding: 18px 28px 10px; }
  .top-title { font-size: 26px; }
  .netbar { margin: 0 28px 10px; }
  .view { max-width: 1200px; padding: 2px 28px 40px; margin: 0; }
  .toast { bottom: 28px; }

  .login { grid-template-columns: 1fr; }

  /* Painel: 4 indicadores em linha, depois roteiro + mapa, depois apoio. */
  .dash { grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: row; gap: 14px; }
  .dash > .dash-days { order: -3; grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 7px 50px 7px 12px; }
  .dash-days .days-phase { flex: none; }
  .dash-days .day-chips { flex: 1; min-width: 0; gap: 6px; margin: 0; }
  .dash-days .day-chip { display: inline-flex; align-items: center; gap: 6px; min-width: 0; min-height: 38px; padding: 0 12px; border-radius: 11px; }
  .dash-days .day-chip strong { font-size: 15px; }
  /* Linha 1: próxima atividade | mapa do dia. Linha 2: roteiro do dia | orçamento, carteira e clima. */
  .dash > .dash-next { order: -2; grid-column: span 7; min-height: 300px; }
  .dash > .dash-next.dash-wide { grid-column: 1 / -1; }
  .dash > .dash-map { order: -2; grid-column: span 5; display: flex; flex-direction: column; }
  .dash-map .lmap { flex: 1; height: auto; min-height: 240px; }
  .dash > .dash-main { grid-column: span 7; }
  .dash > .dash-side { grid-column: span 5; }
  .dash .big { font-size: 22px; }
  .dash > .dash-check { grid-column: span 4; }
  .dash > .dash-fixed { grid-column: span 4; }
  .dash > .dash-cat { grid-column: span 4; }

  .act-list { grid-template-columns: 1fr; }
  .act-card { grid-template-columns: 360px minmax(0, 1fr); }
  .gastos-grid { grid-template-columns: 1fr 1.2fr 1.2fr; }
  .gastos-cat { grid-column: span 1; }
  .gastos-list { grid-column: 1 / 3; }
  .finance { grid-column: 3; align-self: start; }
  .wallet-grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .city-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .place-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .detail > .detail-media, .detail > .detail-head, .detail > .detail-actions { grid-column: 1 / -1; }
  .tl-more-t { display: inline; }
  .settings { grid-template-columns: 1fr 1fr; align-items: start; max-width: 1000px; }
  .profile { max-width: 1000px; }
}

/* ================= 0.3 ================= */
.btn-xs { min-height: 34px; padding: 0 10px; font-size: 13px; border-radius: 10px; gap: 6px; }
.btn-xs .ic { width: 16px; height: 16px; }
.icon-btn-sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn-sm .ic { width: 17px; height: 17px; }
.dash-days { position: relative; }
.dash-days .days-edit { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; }
.dash-days .days-phase { display: inline-flex; margin-bottom: 8px; }
.trip-list .row[aria-current=true] strong { color: var(--sky-600); }
.trip-list + .btn { margin-top: 4px; }
.cancelled-box { gap: 4px; padding: 8px 14px; box-shadow: none; border-style: dashed; }
.cancelled-box .link { justify-self: start; }

/* mapa Leaflet */
.lmap { position: relative; z-index: 0; width: 100%; height: 360px; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.lmap-sm { height: 240px; }
.lmap-wait { color: var(--muted); font-size: 13.5px; padding: 16px; text-align: center; }
.lmap.leaflet-container { display: block; font: inherit; }
.lmap-pin { display: grid; place-items: center; }
.lmap-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 14px; border: 2.5px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.lmap-line { stroke: var(--sky); stroke-dasharray: 8 6; }
.lmap-pop { display: grid; gap: 3px; font-size: 13.5px; min-width: 150px; }
.lmap-pop small { color: #5a6f80; }
.lmap-pop a { color: #0b7fc6; font-weight: 700; }
.leaflet-popup-content { margin: 10px 14px; }
:root[data-theme=dark] .lmap .leaflet-tile-pane { filter: brightness(.72) invert(1) contrast(.9) hue-rotate(200deg) saturate(.4) brightness(.9); }
:root[data-theme=dark] .lmap .leaflet-control-attribution { background: rgba(16, 36, 45, .8); color: var(--muted); }
:root[data-theme=dark] .lmap .leaflet-control-attribution a { color: var(--sky-600); }
.map-total { display: flex; gap: 8px; align-items: center; font-size: 14px; padding: 8px 10px; border-radius: 12px; background: var(--sky-50); color: var(--sky-ink); }
.map-total .ic { width: 18px; height: 18px; }
.leg { display: flex; align-items: center; gap: 8px; padding: 2px 0 2px 6px; font-size: 12px; color: var(--muted); border-left: 2px dashed var(--line-strong); margin-left: 14px; }
.leg .ic { width: 14px; height: 14px; }
.leg + .stop { border-top: 0; }

/* eventos */
.ev-day { display: grid; gap: 4px; }
.ev-day + .ev-day { margin-top: 6px; }
.ev-day h4 { font-size: 14px; font-weight: 800; color: var(--sky-ink); }
.ev-items { display: grid; }
.ev-items li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.ev-items li:first-child { border-top: 0; }
.ev-items span { display: grid; min-width: 0; }
.ev-items small { color: var(--muted); font-size: 12.5px; }
.ev-time { font-weight: 800; color: var(--ink); }

/* carteira: cartões padronizados */
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 158px), 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.wcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--line-sky); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.wcard-open { flex: 1; display: flex; flex-direction: column; align-items: stretch; text-align: left; border: 0; padding: 0; background: none; min-width: 0; }
.wcard-open:hover .wcard-title { color: var(--sky-600); }
.wthumb { position: relative; height: 104px; flex: none; display: grid; place-items: center; align-content: center; gap: 2px; background: linear-gradient(160deg, var(--sky-50), var(--surface-2)); color: var(--sky-600); overflow: hidden; }
.wthumb .ic { width: 34px; height: 34px; stroke-width: 1.6; }
.wthumb small { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.wthumb-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wcard-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 11px; min-width: 0; }
.wcard-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; color: var(--violet); text-transform: uppercase; letter-spacing: .03em; flex-wrap: wrap; }
.wcard-cat .ic { width: 14px; height: 14px; }
.wcard-title { font-size: 14.5px; font-weight: 800; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.wcard-sub, .wcard-who { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard-fields { display: grid; gap: 2px; margin-top: 4px; font-size: 12.5px; }
.wcard-fields span { display: flex; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wcard-fields em { font-style: normal; color: var(--muted); flex: none; }
.wcard-badges { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; justify-content: flex-end; pointer-events: none; }
.wcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; border-top: 1px solid var(--line); }
.exp-past { background: var(--red); color: #fff; }
.exp-soon { background: var(--amber-50); color: var(--amber-ink); border: 1px solid color-mix(in srgb, var(--amber) 40%, transparent); }
.chips-sep { flex: none; width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line-strong); }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px; margin: 0; }
.kv div { background: var(--surface-2); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.kv dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.kv dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.doc-pv iframe { width: 100%; height: min(60vh, 520px); border: 0; background: #fff; }
.extract { border: 1.5px solid color-mix(in srgb, var(--violet) 35%, transparent); gap: 12px; }
.extract .card-h .ic { color: var(--violet); }
.extract-sum { display: grid; gap: 6px; }
.extract-title { font-size: 18px; font-weight: 800; }
.extract-bk { display: grid; justify-items: start; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); }
.warn-list, .prop-notes { display: grid; gap: 6px; }
.warn-list li, .prop-notes li { display: flex; gap: 8px; align-items: flex-start; }
.warn-list .ic, .prop-notes .ic { width: 16px; height: 16px; flex: none; margin-top: 2px; }

/* IA: progresso e proposta */
.ai-wait { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--violet-50); color: var(--violet); font-weight: 600; font-size: 14px; }
.spin { animation: nv-spin 1.6s linear infinite; }
@keyframes nv-spin { to { transform: rotate(360deg); } }
.chat-mark-green { background: linear-gradient(145deg, #2fd08a, var(--green-600)); }
.plan-box { gap: 12px; }
.plan-box textarea { resize: vertical; min-height: 84px; line-height: 1.4; }
.proposal { display: grid; gap: 10px; min-width: 0; }
.proposal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ops { display: grid; gap: 10px; }
.op { display: grid; align-content: start; gap: 8px; padding: 12px; border-radius: 14px; border: 1.5px solid var(--line-sky); background: var(--field); min-width: 0; }
.op-top, .prop-trip { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }
.prop-trip { flex-wrap: wrap; padding: 12px; border-radius: 14px; background: var(--sky-50); }
.prop-trip .op-main { flex: 1 1 160px; }
.op-ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--sky-50); color: var(--sky-600); }
.prop-trip .op-ic { background: var(--card); }
.op-ic .ic { width: 19px; height: 19px; }
.op-cancel .op-ic { background: var(--red-50); color: var(--red); }
.op-update .op-ic { background: var(--amber-50); color: var(--amber-ink); }
.op-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.op-main strong { font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.op-main small { font-size: 12.5px; display: flex; gap: 4px; align-items: center; }
.op-main small .ic { width: 13px; height: 13px; }
.op-kind { color: var(--muted); font-weight: 700; }
.op-notes { color: var(--ink); }
.op-diff { display: grid; gap: 3px; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--amber-50); color: var(--amber-ink); }
.op-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.op-actions .btn { padding: 0 8px; }
.op-approved { border-color: color-mix(in srgb, var(--green) 45%, transparent); background: var(--green-50); }
.op-discarded { opacity: .6; }
.op-discarded .op-main strong { text-decoration: line-through; }
.op-error { border-color: color-mix(in srgb, var(--amber) 60%, transparent); }
.op .link { justify-self: start; }

/* gastos */
.gastos-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.gastos-meta { display: grid; font-size: 14px; line-height: 1.3; }
.gastos-meta strong { font-size: 15px; }
.metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.metric { display: grid; gap: 1px; padding: 9px 11px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.metric small { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.metric strong { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.metric .tiny { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daybars { display: grid; gap: 6px; }
.daybars li { display: grid; grid-template-columns: minmax(44px, auto) minmax(40px, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.daybars li > span:first-child { color: var(--muted); font-weight: 600; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daybars strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.report-grid { display: grid; gap: 14px; }
.report .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.report .metric strong { font-size: 18px; }

@media (max-width: 359px) {
  .report .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .op-actions { grid-template-columns: 1fr 1fr; }
  .op-actions .btn-quiet { grid-column: 1 / -1; }
  .trip-chip { max-width: 70%; }
}
@media (min-width: 640px) {
  .metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .wthumb { height: 120px; }
}
@media (min-width: 1024px) {
  .gastos-grid > .pace { grid-column: 1 / -1; }
  .report-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
  .wgrid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
  .lmap { height: 440px; }
  .lmap-sm { height: 260px; }
  .proposal .ops { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.act-facts li[class^="resv-"] { background: none; color: inherit; }
.act-facts .resv-free .ic { color: var(--green); }
[tabindex="-1"]:focus:not(:focus-visible), h2[tabindex="-1"]:focus { outline: none; }

/* ================= 0.5 ================= */
/* Topo: + Add, Totoro e perfil, alinhados à direita (padrão Nossa Saúde). */
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.add-btn { display: none; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px 0 10px; border: 0; border-radius: 999px; background: var(--sky); color: #fff; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(26, 155, 230, .35); }
.add-btn .ic { width: 20px; height: 20px; stroke-width: 2.4; }
.assist-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 44px; min-height: 44px; padding: 0 8px; border-radius: 999px; color: var(--sky-600); font-weight: 800; font-size: 13.5px; }
.assist-btn .ic { width: 22px; height: 22px; }
.assist-btn span { display: none; }
.assist-btn[aria-current=page] { box-shadow: inset 0 0 0 1.5px var(--sky); background: var(--sky-50); }
@media (min-width: 640px) {
  .assist-btn { background: var(--sky-50); padding: 0 14px 0 10px; min-height: 40px; }
  .assist-btn span { display: inline; }
}
@media (min-width: 1024px) {
  .add-btn { display: inline-flex; }
}
/* Barra do celular: Hoje, Roteiro, +, Carteira, Mais */
.tab-add { flex: 1; display: grid; place-items: center; border: 0; background: transparent; min-width: 0; }
.tab-add-dot { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--sky); color: #fff; box-shadow: 0 8px 20px rgba(26, 155, 230, .45); }
.tab-add-dot .ic { width: 26px; height: 26px; stroke-width: 2.4; }
.is-child .tabbar .tab-add { display: none !important; }

/* Menu lateral: cada viagem é um botão que abre/fecha; várias podem ficar abertas. */
.st-head { width: 100%; border: 0; background: transparent; font: inherit; text-align: left; cursor: pointer; }
@media (min-width: 1024px) {
  .st-here:not(.st-open) .st-head { background: rgba(217, 243, 200, .14); }
  .st + .st { margin-top: 2px; }
}

/* Checklist: itens com editar */
.check-row { display: flex; align-items: center; gap: 6px; }
.check-row .check { flex: 1; min-width: 0; }
.dash-check .link { justify-self: start; }
.dash-check { display: grid; gap: 6px; align-content: start; }

/* Gastos por dia */
.exp-days .day-chip { gap: 1px; }
.exp-chip-v { font-size: 11.5px; font-weight: 700; color: var(--sky-ink); white-space: nowrap; }
.day-chip[aria-pressed=true] .exp-chip-v { color: inherit; }
.exp-day { display: grid; gap: 10px; }
.exp-day-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.exp-day-sum > div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.exp-day-sum small { font-size: 12px; color: var(--muted); font-weight: 700; }
.exp-day-sum strong { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exp-day-sum > div:last-child { background: var(--sky-50); color: var(--sky-ink); }
.exp-day .chips { flex-wrap: wrap; }
.gastos-list .card-head { flex-wrap: wrap; gap: 8px; }
@media (max-width: 359px) { .exp-day-sum { grid-template-columns: minmax(0, 1fr); } }

/* Totoro e atalhos */
.link-card { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.link-card-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.link-card-t small { color: var(--muted); font-size: 13px; }
.sheet-secs { flex-wrap: wrap; margin-bottom: 6px; }
.sheet-secs .chip[aria-current=page] { background: var(--sky-50); border-color: var(--sky); color: var(--sky-ink); }
.head-left { display: flex; justify-content: flex-start; }

/* Mais: duas colunas independentes (sem buracos) */
.settings-col { display: grid; gap: 18px; align-content: start; min-width: 0; }
.check-row .icon-btn { background: transparent; color: var(--muted); border-color: transparent; box-shadow: none; }
.check-row .icon-btn:hover { color: var(--sky-600); background: var(--sky-50); }
