/* OLimpo — mármore escuro, ouro e azulejo. */

@font-face { font-family: 'Fraunces'; src: url('../fonts/fraunces.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('../fonts/dm-sans.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }

:root {
  --bg: #0c0d10;
  --panel: rgba(21, 23, 29, .82);
  --panel-2: rgba(30, 33, 41, .9);
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(255, 255, 255, .22);
  --ouro-line: rgba(217, 169, 50, .28);
  --text: #efebe2;
  --muted: #a8a294;
  --faint: #77725f;
  --ouro: #d9a932;
  --ouro-claro: #f1cf6b;
  --ouro-escuro: #8f6a13;
  --verde: #2bb673;
  --verde-escuro: #0d5a35;
  --azul: #6b95ff;
  --azul-escuro: #1a3fa0;
  --amarelo: #ffd21f;
  --perigo: #ff7a6b;
  --display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.5 var(--sans); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; min-height: 100vh; min-height: 100dvh;
}
body.sheet-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; opacity: .45; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
p { margin: 0; }
b { font-weight: 650; }
code { font-size: .9em; background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--ouro-claro); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- fundo de mármore ---------- */
.marble {
  position: fixed; inset: 0; z-index: -1; background: var(--bg) url('../icons/marble.jpg') center top / cover no-repeat;
}
.marble::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,9,12,.50) 0%, rgba(8,9,12,.80) 60%, rgba(8,9,12,.90) 100%); }

.splash { min-height: 100dvh; display: grid; place-items: center; font: 600 2.4rem var(--display); color: var(--ouro-claro); letter-spacing: .01em; }

/* ---------- casca ---------- */
.shell { max-width: 760px; margin: 0 auto; min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.top { position: sticky; top: 0; z-index: 20; background: rgba(12,13,16,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--ouro-line); padding-top: env(safe-area-inset-top, 0px); }
.azulejo { height: 18px; background: #0f2350 url('../icons/azulejo.svg') left top / 18px 18px repeat-x; border-bottom: 1px solid rgba(217,169,50,.55); }
.azulejo-grande { height: 36px; background-size: 36px 36px; }
.top-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 16px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ouro); margin-right: auto; }
.brand-name { font: 650 1.45rem var(--display); letter-spacing: .005em; background: linear-gradient(180deg, #f6d878, #d9a932 70%, #a9801d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sync { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.sync i { width: 8px; height: 8px; border-radius: 50%; background: var(--verde); }
.sync-saving i { background: var(--amarelo); }
.sync-offline i, .sync-local i { background: var(--azul); }
.sync-error i { background: var(--perigo); }

.icon-btn { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 12px; color: var(--muted); flex: none; }
.icon-btn:hover:not(:disabled) { background: rgba(255,255,255,.07); color: var(--text); }

.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  background: rgba(12,13,16,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--ouro-line); padding-bottom: var(--safe-b);
}
.tab { flex: 1; max-width: 140px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .72rem; color: var(--muted); position: relative; }
.tab.on { color: var(--ouro-claro); }
.tab.on::before { content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 2px; border-radius: 0 0 3px 3px; background: var(--ouro); }

main#view { padding: 16px 16px calc(96px + var(--safe-b)); outline: none; }
.view > * + * { margin-top: 14px; }

@media (min-width: 900px) {
  .shell { max-width: 1020px; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .top { grid-column: 1 / -1; }
  .tabs { position: sticky; top: 74px; align-self: start; grid-row: 2; grid-column: 1; flex-direction: column; justify-content: flex-start; background: none; border: 0; backdrop-filter: none; padding: 20px 8px 0 0; height: max-content; z-index: 10; }
  .tab { flex: none; max-width: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: 12px; font-size: .95rem; }
  .tab:hover { background: rgba(255,255,255,.05); }
  .tab.on { background: rgba(217,169,50,.12); }
  .tab.on::before { top: 12px; bottom: 12px; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  main#view { grid-column: 2; padding-bottom: 48px; max-width: 760px; width: 100%; }
}

/* ---------- peças comuns ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.panel > * + * { margin-top: 12px; }
.panel h2 { font-size: 1.1rem; }
.page-title { font-size: 1.6rem; margin-top: 8px; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; } .pad { padding: 0 4px; }
.hint { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.link { color: var(--ouro-claro); text-decoration: underline; text-underline-offset: 3px; display: inline; }
.num { display: inline-block; margin-right: 12px; font-size: .9rem; color: var(--text); white-space: nowrap; }
.num b { font-weight: 650; }
.num-soft { color: var(--muted); }
.big { display: block; font: 600 2.1rem/1.05 var(--display); color: var(--text); }
.unit { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: 12px; font-weight: 550; color: var(--text); background: rgba(255,255,255,.04); text-align: center;
}
.btn:hover:not(:disabled) { background: rgba(255,255,255,.09); }
.btn-small { min-height: 38px; padding: 0 12px; font-size: .88rem; border-radius: 10px; }
.btn-grande { width: 100%; min-height: 52px; font-size: 1rem; }
.btn-gold { background: linear-gradient(180deg, #f3d472, #d9a932); border-color: #f1cf6b; color: #1a1405; font-weight: 650; }
.btn-gold:hover:not(:disabled) { background: linear-gradient(180deg, #f8dd88, #e2b53f); }
.btn-azul { background: var(--azul-escuro); border-color: #3b64d0; color: #fff; }
.btn-azul:hover:not(:disabled) { background: #2149b8; }
.btn-verde { background: var(--verde-escuro); border-color: var(--verde); color: #d7ffe9; }
.btn-danger { border-color: rgba(255,122,107,.5); color: var(--perigo); }
.btn-row, .fab-row { display: flex; flex-wrap: wrap; gap: 10px; }
.fab-row { justify-content: flex-end; margin-top: 18px; }

.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 99px; font: 500 .72rem/1.5 var(--sans); background: rgba(255,255,255,.09); color: var(--muted); vertical-align: 2px; white-space: nowrap; }
.tag-ouro { background: rgba(217,169,50,.18); color: var(--ouro-claro); }
.tag-azul { background: rgba(107,149,255,.18); color: var(--azul); }
.tag-amarelo { background: rgba(255,210,31,.18); color: var(--amarelo); }

.callout { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.05); border-left: 3px solid var(--line-strong); font-size: .93rem; line-height: 1.5; }
.callout .btn { margin-top: 10px; display: flex; width: 100%; }
.callout-ouro { border-left-color: var(--ouro); background: rgba(217,169,50,.09); }
.callout-azul { border-left-color: var(--azul); background: rgba(107,149,255,.09); }
.callout-verde { border-left-color: var(--verde); background: rgba(43,182,115,.09); }

/* formulários */
.field { display: grid; gap: 6px; font-size: .85rem; color: var(--muted); }
.field-l { font-size: .85rem; color: var(--muted); }
.field input, .field select, .searchbar input, .qty input {
  width: 100%; min-height: 46px; padding: 0 12px; background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); border-radius: 10px; color: var(--text);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.field input:focus, .field select:focus, .searchbar input:focus, .qty input:focus { outline: 2px solid var(--ouro); outline-offset: 0; border-color: transparent; }
.field input::placeholder, .searchbar input::placeholder { color: var(--faint); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 560px) { .grid4 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 480px) { .grid3 { grid-template-columns: 1fr 1fr; } }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.form-row .btn { grid-column: 1 / -1; }
.searchbar { display: flex; align-items: center; gap: 10px; padding-left: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line-strong); border-radius: 12px; color: var(--muted); }
.searchbar input { border: 0; background: none; min-height: 48px; padding-left: 0; }
.searchbar:focus-within { outline: 2px solid var(--ouro); }
.searchbar input:focus { outline: none; }

/* chips e segmentado */
.chips { display: flex; flex-wrap: nowrap; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.static { flex-wrap: wrap; overflow: visible; }
.chip { flex: none; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-strong); font-size: .88rem; color: var(--muted); display: inline-flex; align-items: center; }
.chip.sel { background: var(--ouro); border-color: var(--ouro); color: #1a1405; font-weight: 600; }
.chip-tag { border-style: dashed; }
.chip-tag.sel { border-style: solid; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: 14px; gap: 4px; }
.seg button { min-height: 42px; text-align: center; border-radius: 10px; color: var(--muted); font-weight: 550; }
.seg button.sel { background: var(--panel-2); color: var(--ouro-claro); box-shadow: inset 0 0 0 1px var(--ouro-line); }

/* tabelas de nutrientes e listas de ingredientes */
.macros { width: 100%; border-collapse: collapse; font-size: .92rem; }
.macros th, .macros td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--line); }
.macros thead th { color: var(--muted); font-weight: 500; font-size: .8rem; }
.macros th:first-child { text-align: left; font-weight: 500; }
.macros small { color: var(--muted); }
.ingr { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 2px; }
.ingr li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.ingr .q { color: var(--ouro-claro); font-weight: 550; }
.totals { padding: 12px 14px; background: rgba(217,169,50,.08); border: 1px solid var(--ouro-line); border-radius: 12px; line-height: 1.8; }
.dica { font-family: var(--display); font-size: 1.05rem; line-height: 1.5; color: var(--text); margin-bottom: 14px; }
.slot-hora { color: var(--muted); font-size: .88rem; }
.meal-title { font-size: 1.35rem; margin: 4px 0 6px; }
.dialog-msg { font-size: 1.02rem; line-height: 1.55; padding: 4px 0; }
.use-today { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 14px; font-size: .9rem; color: var(--muted); }
.stepper { display: flex; align-items: center; gap: 10px; margin-top: 14px; color: var(--muted); font-size: .92rem; }
.stepper span { margin-right: auto; }
.stepper b { min-width: 3ch; text-align: center; color: var(--text); font-size: 1.05rem; }

/* listas de linhas */
.group-title { font-size: 1.05rem; margin: 22px 0 8px; color: var(--ouro-claro); }
.rows { display: grid; gap: 6px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; min-height: 56px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.row:hover { border-color: var(--ouro-line); }
.row-main { display: grid; min-width: 0; }
.row-name { font-weight: 550; }
.row-sub { font-size: .8rem; color: var(--muted); }
.row-nums { text-align: right; flex: none; }
.row-nums .num { display: block; margin: 0; font-size: .85rem; }
.opt-list { display: grid; gap: 8px; margin-top: 12px; }
.opt { display: grid; gap: 4px; text-align: left; padding: 12px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 14px; }
.opt:hover:not(:disabled) { border-color: var(--ouro-line); background: rgba(255,255,255,.07); }
.opt.is-current { border-color: var(--ouro); background: rgba(217,169,50,.1); }
.opt-name { font-weight: 550; line-height: 1.35; }
.opt-nums .num { margin-right: 14px; font-size: .85rem; }

/* ---------- HOJE ---------- */
.day-nav, .week-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.day-title { flex: 1; text-align: center; min-width: 0; }
.day-title h1 { font-size: clamp(1.2rem, 5.6vw, 1.6rem); }
.day-title p { color: var(--ouro-claro); font-size: .85rem; min-height: 1.3em; }
.day-nav .btn { margin: 4px auto 0; }

.meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.meter-label { font: 600 1.05rem var(--display); }
.meter-num { color: var(--muted); font-size: .9rem; } .meter-num b { color: var(--text); font-size: 1.15rem; }
.meter-bar { position: relative; height: 12px; margin: 10px 0 6px; border-radius: 99px; background: rgba(255,255,255,.08); }
.meter-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; transition: width .35s ease; }
.meter-bar .planned { background: rgba(217,169,50,.32); }
.meter-bar .done { background: linear-gradient(90deg, #b8891f, #f1cf6b); }
.meter-verde .planned { background: rgba(43,182,115,.3); }
.meter-verde .done { background: linear-gradient(90deg, #178a52, #4fdc98); }
.meter-bar .goal { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); border-radius: 2px; opacity: .85; }
.meter-foot { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.panel-metas > .meter + .meter { margin-top: 18px; }
.macro-line { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .88rem; color: var(--muted); } .macro-line b { color: var(--text); }

.meals { display: grid; gap: 10px; }
.meal { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.meal-main { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.meal-main:hover { background: rgba(255,255,255,.03); }
.meal-ic { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(217,169,50,.12); color: var(--ouro-claro); }
.meal-txt { display: grid; gap: 3px; min-width: 0; }
.meal-slot { font-size: .82rem; color: var(--muted); }
.meal-slot .tag { margin-left: 6px; }
.meal-name { font: 600 1.05rem/1.3 var(--display); }
.meal-nums .num { font-size: .84rem; margin-right: 12px; }
.check { width: 68px; flex: none; display: grid; place-items: center; border-left: 1px solid var(--line); }
.check .ic { width: 34px; height: 34px; padding: 6px; border: 2px solid var(--line-strong); border-radius: 50%; color: transparent; transition: background .2s, border-color .2s, color .2s; }
.check:hover .ic { color: var(--faint); }
.meal.is-done { border-color: rgba(43,182,115,.45); }
.meal.is-done .check { background: rgba(43,182,115,.1); }
.meal.is-done .check .ic { background: var(--verde); border-color: var(--verde); color: #05210f; }
.meal.is-done .meal-name { color: #cfe9dc; }
.meal.is-skip { opacity: .55; }
.meal.is-skip .meal-name { text-decoration: line-through; }

.panel-extras { display: grid; gap: 18px; }
.extra { display: grid; gap: 10px; }
.extra-head { display: flex; align-items: center; gap: 10px; font: 600 1.05rem var(--display); }
.extra-num { margin-left: auto; font: 400 .88rem var(--sans); color: var(--muted); } .extra-num b { color: var(--text); }
.ic-azul { color: var(--azul); } .ic-amarelo { color: var(--amarelo); }
.glasses { display: flex; gap: 6px; flex-wrap: wrap; }
.glasses i { width: 16px; height: 22px; border: 1.5px solid rgba(107,149,255,.5); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; }
.glasses i.on { background: var(--azul); border-color: var(--azul); }
.extra-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- SEMANA ---------- */
.week-avg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 120px; padding-top: 4px; }
.wbar { display: grid; grid-template-rows: auto 1fr auto; gap: 4px; height: 100%; text-align: center; font-size: .72rem; color: var(--muted); }
.wbar-col { display: flex; align-items: flex-end; justify-content: center; background: rgba(255,255,255,.04); border-radius: 8px; overflow: hidden; }
.wbar-col i { width: 100%; background: linear-gradient(180deg, #f1cf6b, #a9801d); border-radius: 8px 8px 0 0; }
.wbar.is-hoje .wbar-d { color: var(--ouro-claro); font-weight: 650; }
.week-diff { font-size: .93rem; }
.slots { display: grid; gap: 12px; }
.slot-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: grid; gap: 12px; }
.slot-card.mudou { border-left: 4px solid var(--amarelo); }
.slot-head { display: flex; align-items: center; gap: 10px; }
.slot-head h2 { font-size: 1.1rem; }
.slot-head .lock { margin-left: auto; }
.slot-head .lock[aria-pressed="true"] { color: var(--ouro-claro); background: rgba(217,169,50,.14); }
.slot-ic { color: var(--ouro-claro); display: grid; }
.slot-pick { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); position: relative; }
.slot-pick:hover { border-color: var(--ouro-line); background: rgba(255,255,255,.07); }
.slot-meal { font: 600 1.1rem/1.3 var(--display); padding-right: 64px; }
.slot-ingr { font-size: .85rem; color: var(--muted); }
.slot-nums .num { font-size: .85rem; }
.slot-trocar { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 2px; font-size: .8rem; color: var(--ouro-claro); }
.day-chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day-chip { position: relative; min-width: 0; min-height: 42px; padding: 0 2px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-strong); font-size: .82rem; color: var(--muted); }
.day-chip.is-hoje { border-color: var(--ouro); color: var(--ouro-claro); }
.day-chip.diff::after { content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--amarelo); }
.day-chip.sel { background: var(--ouro); border-color: var(--ouro); color: #1a1405; font-weight: 650; }
.pk-days { display: grid; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: .88rem; }

/* ---------- BIBLIOTECA ---------- */
.cp-items { display: grid; gap: 10px; margin: 14px 0; }
.cp-item { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.04); display: grid; gap: 8px; }
.cp-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cp-item-name { font-weight: 550; }
.qty { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qty input { width: 92px; text-align: center; }
.qty-u { color: var(--muted); }
.qty-hh { color: var(--ouro-claro); font-size: .85rem; margin-left: 6px; }
.cp-item + .cp-item { margin-top: 0; }

/* ---------- COMPRAS ---------- */
.shop-group { display: grid; gap: 6px; }
.shop-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; min-height: 54px; padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.shop-item input { position: absolute; opacity: 0; pointer-events: none; }
.shop-box { width: 26px; height: 26px; display: grid; place-items: center; border: 2px solid var(--line-strong); border-radius: 8px; color: transparent; }
.shop-item input:checked + .shop-box { background: var(--verde); border-color: var(--verde); color: #05210f; }
.shop-item input:focus-visible + .shop-box { outline: 2px solid var(--ouro-claro); outline-offset: 2px; }
.shop-name { font-size: .97rem; }
.shop-qty { font-weight: 650; color: var(--ouro-claro); text-align: right; font-size: .95rem; }
.shop-item.is-checked .shop-name, .shop-item.is-checked .shop-qty { color: var(--faint); text-decoration: line-through; }

/* ---------- EVOLUÇÃO ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chart { width: 100%; height: auto; display: block; }
.g-grid { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.g-txt { fill: var(--muted); font: 10px var(--sans); }
.g-line { fill: none; stroke: var(--ouro); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.g-dot { fill: var(--ouro-claro); stroke: #0c0d10; stroke-width: 1.5; }
.hist { list-style: none; margin: 0; padding: 0; }
.hist li { display: flex; align-items: center; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.hist li b { margin-left: auto; color: var(--text); }
.medidas { display: grid; gap: 10px; margin-top: 16px; }
.medida { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.medida header { display: flex; justify-content: space-between; align-items: center; }
.medida dl { margin: 6px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px 14px; }
.medida dt { font-size: .78rem; color: var(--muted); }
.medida dd { margin: 0; font-weight: 600; }
.medida small { margin-left: 6px; font-weight: 500; }
.medida .up { color: var(--verde); } .medida .down { color: var(--azul); }

/* ---------- AJUSTES ---------- */
.view-ajustes .panel > .btn, .view-ajustes .panel > select { margin-top: 12px; }
.view-ajustes .panel .field + .field, .view-ajustes .panel .grid2 + .hint { margin-top: 12px; }
.panel-sobre p { color: var(--muted); font-size: .92rem; }

/* ---------- JANELAS (sheets) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(4,5,7,.66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .18s ease; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; max-height: 90dvh; display: flex; flex-direction: column;
  background: #14161c; border: 1px solid var(--ouro-line); border-bottom: 0; border-radius: 22px 22px 0 0; outline: none;
  animation: subir .24s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b);
}
.sheet--full { height: 92dvh; }
.sheet--dialog { border-radius: 22px; bottom: auto; top: 50%; transform: translateY(-50%); max-width: 420px; width: calc(100% - 32px); border-bottom: 1px solid var(--ouro-line); animation: surgir .18s ease; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 8px 8px 20px; }
.sheet-head h2 { font-size: 1.2rem; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; }
.sheet-body > * + * { margin-top: 14px; }
.sheet-body > .hint:first-child + .opt-list { margin-top: 10px; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px 16px; border-top: 1px solid var(--line); background: #14161c; }
.sheet-foot .btn { flex: 1; padding: 0 10px; }
.sheet-foot .btn-gold { flex: 1.8; }
.sheet-wrap.is-closing { animation: fade .16s ease reverse forwards; }
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
@keyframes surgir { from { opacity: 0; transform: translateY(-46%); } }
@keyframes fade { from { opacity: 0; } }

#toast { position: fixed; left: 0; right: 0; bottom: calc(80px + var(--safe-b)); z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { background: #1d2028; border: 1px solid var(--ouro-line); border-radius: 12px; padding: 12px 16px; font-size: .93rem; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: 460px; animation: subir .22s ease; }
.toast.out { opacity: 0; transition: opacity .35s; }
body.sheet-open #toast { bottom: auto; top: calc(14px + env(safe-area-inset-top, 0px)); }
@media (min-width: 900px) { #toast { bottom: 28px; } body.sheet-open #toast { bottom: auto; } }

/* ---------- LOGIN ---------- */
.login { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.login-card { align-self: center; justify-self: center; width: min(440px, calc(100% - 32px)); padding: 28px 8px 48px; display: grid; gap: 14px; text-align: center; }
.login-mark { color: var(--ouro); justify-self: center; }
.login-card h1 { font-size: 3rem; letter-spacing: .005em; background: linear-gradient(180deg, #f6d878, #d9a932 70%, #a9801d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font: 500 1.35rem/1.3 var(--display); }
.sub { color: var(--muted); }
.login-card .btn { margin-top: 4px; }
