/* Minha Agenda — tokens e peças do guia visual do Meu Financeiro */

/* ---------- paleta padrão (verde-água), valores exatos do guia ---------- */
:root {
  --bg: #EEF6F4; --surface: #FFFFFF; --surface2: #E2F0EC; --border: #D3E6E0;
  --text: #173330; --muted: #55706A;
  --accent: #6BB8A8; --on-accent: #0F3A34; --accent-soft: #D8EFE9; --accent-ink: #1F5F55;
  --hero: #CDE9E2; --hero-text: #123631; --hero-muted: #3F625B;
  --hero-chip: rgba(18,54,49,.08); --hero-line: rgba(18,54,49,.10);
  --pos: #15805A; --neg: #B23A32; --warn: #94600E;
  --pos-soft: #E2F3EA; --neg-soft: #FBE7E4; --warn-soft: #FAF0DB;
  --overlay: rgba(12,20,19,.48);
  --shadow: 0 -8px 30px rgba(15,25,24,.14);
  --fab-shadow: 0 8px 20px rgba(15,25,24,.22);
  --seg-shadow: 0 1px 3px rgba(15,25,24,.14);
  --mix: #FFFFFF; --mixp: 14%;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D1514; --surface: #141E1C; --surface2: #1A2725; --border: #273733;
  --text: #E6F0EE; --muted: #9AAEA9;
  --accent: #8FD1C4; --on-accent: #0E2D28; --accent-soft: #1B3430; --accent-ink: #A8DDD2;
  --hero: #1E3632; --hero-text: #F2FAF8; --hero-muted: #A9C7C0;
  --hero-chip: rgba(255,255,255,.10); --hero-line: rgba(255,255,255,.12);
  --pos: #5CC79B; --neg: #F28B7F; --warn: #E6B15B;
  --pos-soft: #143027; --neg-soft: #3A201D; --warn-soft: #352812;
  --overlay: rgba(0,0,0,.62);
  --shadow: 0 -8px 30px rgba(0,0,0,.5);
  --fab-shadow: 0 8px 20px rgba(0,0,0,.5);
  --seg-shadow: 0 1px 3px rgba(0,0,0,.5);
  --mix: #181818; --mixp: 22%;
  color-scheme: dark;
}

/* ---------- outras paletas: fundo e destaque do guia, o resto derivado ---------- */
:root[data-palette="azul"]   { --p-bg: #EFF3FB; --p-ac: #82A3E6; --p-bg-d: #0D121C; --p-ac-d: #A9C1F2; }
:root[data-palette="verde"]  { --p-bg: #F0F6EE; --p-ac: #7EBE90; --p-bg-d: #0E140F; --p-ac-d: #A6D8B3; }
:root[data-palette="rosa"]   { --p-bg: #FBF2F5; --p-ac: #DE93AF; --p-bg-d: #160F12; --p-ac-d: #F0B5CA; }
:root[data-palette="preto"]  { --p-bg: #F4F4F5; --p-ac: #18181B; --p-bg-d: #000000; --p-ac-d: #F4F4F5; }
:root[data-palette="branco"] { --p-bg: #FFFFFF; --p-ac: #4A4640; --p-bg-d: #1C1C1E; --p-ac-d: #ECEAE5; }

:root[data-palette]:not([data-palette="agua"]):not([data-theme="dark"]) {
  --bg: var(--p-bg);
  --surface: #FFFFFF;
  --surface2: color-mix(in srgb, var(--p-ac) 11%, var(--p-bg));
  --border: color-mix(in srgb, var(--p-ac) 20%, #DCDCDC);
  --text: color-mix(in srgb, var(--p-ac) 18%, #141414);
  --muted: color-mix(in srgb, var(--p-ac) 25%, #5A5A5A);
  --accent: var(--p-ac);
  --on-accent: color-mix(in srgb, var(--p-ac) 30%, #0A0A0A);
  --accent-soft: color-mix(in srgb, var(--p-ac) 24%, #FFFFFF);
  --accent-ink: color-mix(in srgb, var(--p-ac) 50%, #0A0A0A);
  --hero: color-mix(in srgb, var(--p-ac) 30%, var(--p-bg));
  --hero-text: color-mix(in srgb, var(--p-ac) 25%, #0B0B0B);
  --hero-muted: color-mix(in srgb, var(--p-ac) 35%, #4A4A4A);
  --hero-chip: rgba(0,0,0,.06); --hero-line: rgba(0,0,0,.09);
}
:root[data-palette="preto"]:not([data-theme="dark"]),
:root[data-palette="branco"]:not([data-theme="dark"]) {
  --on-accent: #FFFFFF;
  --accent-soft: color-mix(in srgb, var(--p-ac) 9%, #FFFFFF);
  --accent-ink: var(--p-ac);
  --hero: color-mix(in srgb, var(--p-ac) 8%, var(--p-bg));
}
:root[data-palette]:not([data-palette="agua"])[data-theme="dark"] {
  --bg: var(--p-bg-d);
  --surface: color-mix(in srgb, var(--p-ac-d) 5%, color-mix(in srgb, var(--p-bg-d) 93%, #FFFFFF));
  --surface2: color-mix(in srgb, var(--p-ac-d) 7%, color-mix(in srgb, var(--p-bg-d) 88%, #FFFFFF));
  --border: color-mix(in srgb, var(--p-ac-d) 10%, color-mix(in srgb, var(--p-bg-d) 80%, #FFFFFF));
  --text: color-mix(in srgb, var(--p-ac-d) 12%, #F2F2F2);
  --muted: color-mix(in srgb, var(--p-ac-d) 25%, #9A9A9A);
  --accent: var(--p-ac-d);
  --on-accent: color-mix(in srgb, var(--p-ac-d) 22%, #0A0A0A);
  --accent-soft: color-mix(in srgb, var(--p-ac-d) 18%, var(--p-bg-d));
  --accent-ink: var(--p-ac-d);
  --hero: color-mix(in srgb, var(--p-ac-d) 17%, var(--p-bg-d));
  --hero-text: #F5F5F5;
  --hero-muted: color-mix(in srgb, var(--p-ac-d) 40%, #A0A0A0);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.4; font-variant-numeric: tabular-nums;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }

/* ---------- estrutura ---------- */
.layout { min-height: 100vh; }
.side { display: none; }
.main {
  max-width: 640px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 100px max(16px, env(safe-area-inset-left));
  display: flex; flex-direction: column; gap: 14px;
}
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.top { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.top h1 { flex: 1; margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; flex: none; }
.logo svg { width: 22px; height: 22px; stroke-width: 2.4; }
.who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.who small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.who b { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ib {
  width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface);
  display: grid; place-items: center; color: var(--text); position: relative; padding: 0; flex: none;
}
.ib[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-soft); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--on-accent); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* cartão de destaque */
.hero { background: var(--hero); color: var(--hero-text); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.hero .lbl { font-size: 12.5px; font-weight: 700; color: var(--hero-muted); }
.hero .big { font-size: 36px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: -10px; }
.hero .next { display: flex; align-items: center; gap: 10px; }
.hero .next .txt { flex: 1; min-width: 0; }
.hero .next small { display: block; font-size: 12.5px; color: var(--hero-muted); font-weight: 500; }
.hero .next b { display: block; font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hchip { height: 36px; padding: 0 12px; border-radius: 12px; border: 0; background: var(--hero-chip); color: var(--hero-text); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.hchip svg { width: 18px; height: 18px; }
.hero hr { border: 0; border-top: 1px solid var(--hero-line); margin: 0; }
.hero .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero .cols small { display: block; font-size: 11.5px; color: var(--hero-muted); font-weight: 600; }
.hero .cols b { display: block; font-size: 18px; font-weight: 800; margin: 2px 0; }
.hero .cols em { font-style: normal; font-size: 11.5px; color: var(--hero-muted); }

/* seletor de mês */
.msel { min-height: 48px; border-radius: 14px; background: var(--surface2); display: flex; align-items: center; justify-content: space-between; }
.msel button { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: var(--muted); }
.msel .mid { text-align: center; display: flex; flex-direction: column; align-items: center; }
.msel b { font-size: 15px; font-weight: 800; }
.msel .back { border: 0; background: none; padding: 0 0 4px; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); }

/* cartões e linhas */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card .ch { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card h2 { margin: 0; font-size: 16px; font-weight: 800; }
.card .sub { font-size: 12.5px; color: var(--muted); margin-top: -10px; }
.card .ch small { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; text-align: left; border: 0; background: none; min-height: 44px; }
.row + .row { border-top: 1px solid var(--border); }
.row .mid { flex: 1; min-width: 0; }
.row .t { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .t.wrap { white-space: normal; }
.row .t.done { text-decoration: line-through; color: var(--muted); }
.row .s { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; overflow: hidden; white-space: nowrap; }
.row .s span { overflow: hidden; text-overflow: ellipsis; }
.row .s i { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.row .s .late { color: var(--neg); font-weight: 700; }
.row .v { font-size: 14.5px; font-weight: 800; text-align: right; white-space: nowrap; }
.row .v small { display: block; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.row .v.now { color: var(--accent-ink); }
.ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface2); }
.date-box { width: 44px; height: 44px; border-radius: 12px; background: var(--surface2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.date-box b { font-size: 15px; font-weight: 800; line-height: 1; }
.date-box small { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; margin-top: 3px; letter-spacing: .02em; }
.date-box.today { background: var(--accent-soft); }
.date-box.today b, .date-box.today small { color: var(--accent-ink); }
.check { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; flex: none; color: var(--muted); padding: 0; }
.check[aria-pressed="true"] { background: var(--pos-soft); color: var(--pos); border-color: var(--pos-soft); }
.check svg { width: 18px; height: 18px; }

.stack { display: flex; gap: 3px; height: 10px; }
.stack i { border-radius: 99px; min-width: 6px; }
.stack.empty i { background: var(--surface2); flex: 1; }
.minis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; }
.mini small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.mini b { font-size: 16px; font-weight: 800; }
.dayhead { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 4px 4px 0; }
.dayhead.is-today { color: var(--accent-ink); font-weight: 800; }
.listcard { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 0 14px; }
.empty { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 8px; }
.tip { border-radius: 16px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; background: var(--surface2); }
.tip.warn { background: var(--warn-soft); color: var(--text); }
.tip.warn svg { color: var(--warn); }
.tip.pos { background: var(--pos-soft); }
.tip.pos svg { color: var(--pos); }
.tip.neg { background: var(--neg-soft); }
.tip.neg svg { color: var(--neg); }
.tip b { display: block; font-size: 14px; }
.tip .grow { flex: 1; min-width: 0; }
.code { display: block; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; word-break: break-all; user-select: all; -webkit-user-select: all; }

/* cores das agendas: cor cheia no ícone, versão suave no quadrado */
.tint { color: var(--c); background: color-mix(in srgb, var(--c) var(--mixp), var(--mix)); }

/* botões */
.btn { height: 48px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.small { height: 44px; font-size: 14px; }
.btn.soft { background: var(--accent-soft); color: var(--accent-ink); }
.btn.neutral { background: var(--surface2); color: var(--text); }
.btn.outline { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn.danger { background: var(--neg-soft); color: var(--neg); }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; }
.btns { display: flex; gap: 10px; }
.btns > * { flex: 1; }

/* chips */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip { height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; flex: none; }
.chip i { width: 8px; height: 8px; border-radius: 50%; }
.chip svg { width: 18px; height: 18px; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* segmentado */
.seg { display: flex; background: var(--surface2); border-radius: 14px; padding: 4px; min-height: 44px; gap: 2px; }
.seg button { flex: 1; border: 0; background: none; font-size: 14px; font-weight: 700; color: var(--muted); border-radius: 10px; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--seg-shadow); }

/* campos */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lab { font-size: 13px; font-weight: 700; color: var(--muted); }
.input { height: 48px; width: 100%; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); padding: 0 14px; font-size: 16px; font-weight: 500; min-width: 0; }
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; line-height: 1.4; }
input[type="date"].input, input[type="time"].input { -webkit-appearance: none; appearance: none; display: flex; align-items: center; }
input[type="date"]::-webkit-date-and-time-value, input[type="time"]::-webkit-date-and-time-value { text-align: left; }
.bigfield { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.bigfield input { border: 0; background: none; padding: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; outline: none; width: 100%; height: 36px; }
.bigfield:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 14px; color: var(--muted); }
.search .input { padding-left: 42px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { color: var(--neg); font-size: 13px; font-weight: 700; }

/* grade de escolha */
.pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pick button { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 10px 4px 8px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; min-width: 0; }
.pick button span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick .ico { width: 36px; height: 36px; border-radius: 11px; }
.pick button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.swatches button { aspect-ratio: 1; max-width: 100%; border-radius: 12px; border: 0; background: var(--c); display: grid; place-items: center; color: #fff; padding: 0; min-height: 34px; }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
.icons { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icons button { height: 44px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: grid; place-items: center; color: var(--muted); padding: 0; }
.icons button[aria-pressed="true"] { background: color-mix(in srgb, var(--c) var(--mixp), var(--mix)); color: var(--c); border-color: var(--c); }
.palettes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.palettes button { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; min-height: 48px; }
.palettes button b { width: 22px; height: 22px; border-radius: 50%; flex: none; border: 1px solid rgba(0,0,0,.08); }
.palettes button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

/* interruptor */
.toggle { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 12px 14px; width: 100%; text-align: left; }
.toggle .grow { flex: 1; }
.toggle .t { font-size: 14px; font-weight: 700; display: block; }
.toggle .s { font-size: 12.5px; color: var(--muted); display: block; }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--surface2); position: relative; flex: none; transition: background .15s; border: 1px solid var(--border); }
.switch::after { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
[aria-checked="true"] .switch { background: var(--accent); border-color: var(--accent); }
[aria-checked="true"] .switch::after { transform: translateX(20px); }

/* grade do mês */
.month { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.month .wd { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-bottom: 4px; }
.month button { height: 46px; border-radius: 12px; border: 2px solid transparent; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 15px; font-weight: 700; padding: 0; min-width: 0; }
.month button.out { color: var(--muted); opacity: .5; }
.month button.today { border-color: var(--accent); }
.month button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); opacity: 1; }
.month .dots { display: flex; gap: 2px; height: 6px; align-items: center; font-size: 9px; font-weight: 800; color: var(--muted); }
.month .dots b { width: 6px; height: 6px; border-radius: 50%; }
.month button[aria-pressed="true"] .dots b { box-shadow: 0 0 0 1.5px var(--accent); }
.month button[aria-pressed="true"] .dots { color: var(--on-accent); }

/* barra de navegação */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 6px max(8px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.nav a, .nav button.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-decoration: none; border: 0; background: none; min-height: 44px; justify-content: center; }
.nav em { width: 48px; height: 28px; border-radius: 99px; display: grid; place-items: center; font-style: normal; }
.nav a[aria-current="page"] { color: var(--accent-ink); }
.nav a[aria-current="page"] em { background: var(--accent-soft); }
.fab { width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: var(--on-accent); box-shadow: var(--fab-shadow); display: grid; place-items: center; margin: -18px auto 0; padding: 0; }
.fab svg { width: 26px; height: 26px; stroke-width: 2.2; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top); background: var(--bg); z-index: 15; }

/* painel que sobe */
.layer { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; justify-content: flex-end; }
.veil { position: absolute; inset: 0; background: var(--overlay); animation: fade .22s ease-out; }
.sheet {
  position: relative; background: var(--bg); border-radius: 24px 24px 0 0; box-shadow: var(--shadow);
  max-height: calc(100% - 24px - env(safe-area-inset-top)); display: flex; flex-direction: column;
  animation: up .22s ease-out; width: 100%; max-width: 640px; margin: 0 auto;
}
.sheet .handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; flex: none; }
.sheet .sh-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 0; }
.sheet .sh-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.sheet .sh-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overscroll-behavior: contain; }
.sheet .sh-foot { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--border); }
@keyframes up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.detail { display: flex; flex-direction: column; }
.detail .row { cursor: default; }

/* mensagem rápida */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--text); color: var(--bg); font-size: 13.5px; font-weight: 700; padding: 11px 18px; border-radius: 99px;
  max-width: calc(100% - 32px); text-align: center; animation: up .2s ease-out;
}

/* entrar */
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left)); }
.login .box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; }
.login .brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 8px; }
.login .brand .logo { width: 56px; height: 56px; border-radius: 16px; }
.login .brand .logo svg { width: 30px; height: 30px; }
.login h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.login p { margin: 0; color: var(--muted); font-size: 14px; }

/* esconder detalhes (olho) */
.privado .priv { filter: blur(7px); }

/* pronto para toque */
@media (hover: hover) {
  .row[data-a]:hover .t { color: var(--accent-ink); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- computador ---------- */
@media (min-width: 960px) {
  .layout { display: grid; grid-template-columns: 248px 1fr; }
  .side {
    display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh;
    padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border);
  }
  .side .brandrow { display: flex; align-items: center; gap: 10px; padding: 0 6px 12px; font-weight: 800; font-size: 16px; }
  .side .btn { margin-bottom: 10px; }
  .side a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; }
  .side a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
  .side .spacer { flex: 1; }
  .nav { display: none; }
  .main { max-width: 1120px; padding: 24px 28px 48px; width: 100%; align-self: start; }
  .main.split { align-content: start; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .main.split > .top, .main.split > .tip { grid-column: 1 / -1; }
  .main.narrow { max-width: 720px; }
  .layer { justify-content: center; align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; max-width: 560px; max-height: calc(100vh - 48px); }
  .sheet .handle { display: none; }
  .sheet .sh-head { padding-top: 16px; }
  .toast { bottom: 28px; }
}
