/* VittaMeal — design system
   Verde, branco e tons naturais; cards arredondados; mobile first. */

:root {
  color-scheme: light;
  --bg: #e6f2ea;
  --bg-2: #d9eadf;
  --surface: #ffffff;
  --surface-2: #f1f8f4;
  --surface-3: #deece4;
  --border: #cfe2d6;
  --border-strong: #b6d0bf;
  --text: #1b2a21;
  --text-2: #4a5a50;
  --muted: #76837b;
  --brand: #1f7a4d;
  --brand-hover: #196a42;
  --brand-strong: #0f4f30;
  --brand-soft: #e3f0e7;
  --brand-softer: #f0f7f2;
  --on-brand: #ffffff;
  --accent: #c2673a;
  --accent-soft: #f8e8dd;
  --sun: #b77d00;
  --sun-soft: #fbf0d4;
  --danger: #b93a2c;
  --danger-soft: #fbe6e2;
  --info: #2f64b3;
  --info-soft: #e5eefb;
  --series-protein: #1f8a58;
  --series-fat: #3f76c9;
  --series-carbs: #e3a21a;
  --heat-0: #dbe9e0;
  --heat-1: #cfe5d6;
  --heat-2: #9fcdb0;
  --heat-3: #5fae80;
  --heat-4: #2f8f5b;
  --heat-5: #1b6b42;
  --shadow-sm: 0 1px 2px rgba(27, 42, 33, 0.06);
  --shadow: 0 1px 2px rgba(27, 42, 33, 0.05), 0 8px 24px -12px rgba(27, 42, 33, 0.16);
  --shadow-lg: 0 2px 6px rgba(27, 42, 33, 0.06), 0 24px 60px -24px rgba(27, 42, 33, 0.28);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sidebar: 264px;
  --bottom-nav: 68px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1411;
    --bg-2: #121a16;
    --surface: #151d19;
    --surface-2: #1a241f;
    --surface-3: #212d27;
    --border: #28352e;
    --border-strong: #34443b;
    --text: #e8eee9;
    --text-2: #b7c3bb;
    --muted: #89968e;
    --brand: #3aa872;
    --brand-hover: #47b87f;
    --brand-strong: #7fd3a4;
    --brand-soft: #193326;
    --brand-softer: #152a20;
    --on-brand: #06140c;
    --accent: #e0885a;
    --accent-soft: #3a2519;
    --sun: #e0a832;
    --sun-soft: #33280f;
    --danger: #ef7a6b;
    --danger-soft: #3a1c18;
    --info: #7aa7ec;
    --info-soft: #182538;
    --series-protein: #23a06a;
    --series-fat: #5b8fe0;
    --series-carbs: #c98500;
    --heat-0: #212b26;
    --heat-1: #1d3a2b;
    --heat-2: #245a3d;
    --heat-3: #2e7d52;
    --heat-4: #3ea26b;
    --heat-5: #63c58d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 60px -24px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1411;
  --bg-2: #121a16;
  --surface: #151d19;
  --surface-2: #1a241f;
  --surface-3: #212d27;
  --border: #28352e;
  --border-strong: #34443b;
  --text: #e8eee9;
  --text-2: #b7c3bb;
  --muted: #89968e;
  --brand: #3aa872;
  --brand-hover: #47b87f;
  --brand-strong: #7fd3a4;
  --brand-soft: #193326;
  --brand-softer: #152a20;
  --on-brand: #06140c;
  --accent: #e0885a;
  --accent-soft: #3a2519;
  --sun: #e0a832;
  --sun-soft: #33280f;
  --danger: #ef7a6b;
  --danger-soft: #3a1c18;
  --info: #7aa7ec;
  --info-soft: #182538;
  --series-protein: #23a06a;
  --series-fat: #5b8fe0;
  --series-carbs: #c98500;
  --heat-0: #212b26;
  --heat-1: #1d3a2b;
  --heat-2: #245a3d;
  --heat-3: #2e7d52;
  --heat-4: #3ea26b;
  --heat-5: #63c58d;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, 0.3), 0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

/* ───────────── Base ───────────── */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 650; }
p { margin: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--brand-soft); }
.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; }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 650; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 12px); }
.row { display: flex; align-items: center; gap: var(--row-gap, 10px); }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; }
.icon { display: inline-block; vertical-align: -0.22em; width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.icon.xl { width: 32px; height: 32px; }

/* ───────────── Botões ───────────── */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-border: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1px solid var(--btn-border);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 14.5px; line-height: 1.2; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, box-shadow 0.15s;
  text-decoration: none;
}
.btn:hover { color: var(--btn-fg); border-color: var(--text-2); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: 0.6; cursor: not-allowed; }
.btn.primary { --btn-bg: var(--brand); --btn-fg: var(--on-brand); --btn-border: var(--brand); box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.primary:hover { --btn-bg: var(--brand-hover); border-color: var(--brand-hover); }
.btn.soft { --btn-bg: var(--brand-soft); --btn-fg: var(--brand-strong); --btn-border: transparent; }
.btn.soft:hover { --btn-bg: color-mix(in srgb, var(--brand-soft) 80%, var(--brand) 20%); }
.btn.ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--text-2); }
.btn.ghost:hover { --btn-bg: var(--surface-3); }
.btn.danger { --btn-bg: var(--danger-soft); --btn-fg: var(--danger); --btn-border: transparent; }
.btn.accent { --btn-bg: var(--accent); --btn-fg: #fff; --btn-border: var(--accent); }
.btn.sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.btn.lg { min-height: 52px; padding: 14px 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.icon-only { padding: 0; width: 44px; }
.btn.icon-only.sm { width: 36px; }
.btn .spinner { width: 16px; height: 16px; }

.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--brand-hover); text-decoration: underline; }

/* ───────────── Cards e blocos ───────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  min-width: 0;
}
.card.flat { box-shadow: none; }
.card.pad-lg { padding: 28px; }
.card.soft { background: var(--surface-2); }
.card.brand { background: linear-gradient(145deg, var(--brand) 0%, var(--brand-strong) 100%); color: #fff; border: 0; }
.card.brand .muted, .card.brand .text-2 { color: rgba(255, 255, 255, 0.78); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { font-size: 16px; }
.card-title { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; }
.card-title .icon-tile { width: 34px; height: 34px; border-radius: 11px; }

.icon-tile { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-strong); flex: none; }
.icon-tile.accent { background: var(--accent-soft); color: var(--accent); }
.icon-tile.sun { background: var(--sun-soft); color: var(--sun); }
.icon-tile.info { background: var(--info-soft); color: var(--info); }
.icon-tile .icon { width: 20px; height: 20px; }

.emoji-tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; font-size: 26px; flex: none; background: var(--surface-3); line-height: 1; }
.emoji-tile.lg { width: 88px; height: 88px; border-radius: 26px; font-size: 46px; }
.emoji-tile.sm { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }
.tone-cafe { background: #fbefd9; } .tone-lanche_manha { background: #fde6e1; } .tone-almoco { background: #e3f0e7; }
.tone-lanche_tarde { background: #f3ead8; } .tone-jantar { background: #e6ecf6; } .tone-ceia { background: #efe6f3; }
:root[data-theme="dark"] .emoji-tile[class*="tone-"] { background: var(--surface-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .emoji-tile[class*="tone-"] { background: var(--surface-3); } }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.sun { background: var(--sun-soft); color: var(--sun); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.premium { background: linear-gradient(135deg, #f6e3b4, #e9c46a); color: #5a3d00; }
.badge .icon { width: 13px; height: 13px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 550; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--info-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 18%, transparent); }
.alert .icon { color: var(--info); margin-top: 1px; }
.alert.warn { background: var(--sun-soft); border-color: color-mix(in srgb, var(--sun) 22%, transparent); }
.alert.warn .icon { color: var(--sun); }
.alert.safe { background: var(--brand-softer); border-color: color-mix(in srgb, var(--brand) 18%, transparent); }
.alert.safe .icon { color: var(--brand); }
.alert.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.alert.danger .icon { color: var(--danger); }
.alert p + p { margin-top: 4px; }

.divider { height: 1px; background: var(--border); border: 0; margin: 18px 0; }

.stat { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 550; }
.stat .value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .value small { font-size: 13px; font-weight: 550; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat .hint { font-size: 12.5px; color: var(--text-2); }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat-box { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
@media (min-width: 720px) { .stat-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } .stat-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.hero-number { font-size: 44px; font-weight: 750; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-number small { font-size: 16px; font-weight: 600; letter-spacing: 0; margin-left: 4px; color: var(--muted); }

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width 0.4s ease; }
.progress.sun > span { background: var(--sun); }
.progress.accent > span { background: var(--accent); }
.progress.thin { height: 6px; }

/* Barra empilhada de macros */
.macro-bar { display: flex; gap: 2px; height: 14px; border-radius: 999px; overflow: hidden; background: var(--surface-3); }
.macro-bar > span { display: block; height: 100%; }
.macro-bar > span:first-child { border-radius: 999px 0 0 999px; }
.macro-bar > span:last-child { border-radius: 0 999px 999px 0; }
.seg-protein { background: var(--series-protein); }
.seg-fat { background: var(--series-fat); }
.seg-carbs { background: var(--series-carbs); }
.macro-legend { display: grid; gap: 10px; margin-top: 14px; }
.macro-legend .item { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.macro-legend .dot { width: 12px; height: 12px; border-radius: 4px; }
.macro-legend .name { font-weight: 600; font-size: 14px; }
.macro-legend .range { font-size: 12.5px; color: var(--muted); }
.macro-legend .val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* Mapa de hábitos */
.heatmap { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.heatmap .cell { aspect-ratio: 1; border-radius: 6px; background: var(--heat-0); position: relative; }
.heatmap .cell[data-l="1"] { background: var(--heat-1); } .heatmap .cell[data-l="2"] { background: var(--heat-2); }
.heatmap .cell[data-l="3"] { background: var(--heat-3); } .heatmap .cell[data-l="4"] { background: var(--heat-4); }
.heatmap .cell[data-l="5"], .heatmap .cell[data-l="6"] { background: var(--heat-5); }
.heatmap .cell.today { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brand); }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.heat-legend span.sw { width: 11px; height: 11px; border-radius: 3px; }

.tooltip { position: fixed; z-index: 80; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12.5px; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }

/* ───────────── Formulários ───────────── */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field .label { font-weight: 600; font-size: 14px; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.error { color: var(--danger); font-weight: 550; }
.field .error { font-size: 12.5px; }
.error:empty { display: none; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 11px 14px;
  border: 1px solid var(--border-strong); border-radius: 14px;
  background: var(--surface); color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
/* Campo de data com a mesma altura e o mesmo visual dos demais campos. */
.input[type="date"] { height: 46px; line-height: 1.2; font-family: inherit; }
.input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .65; }
.input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.input[type="date"]::-webkit-datetime-edit { padding: 0; }
.input[type="number"]::-webkit-inner-spin-button, .input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.field.has-error .input, .field.has-error .select { border-color: var(--danger); }
/* Destaque rápido no que falta preencher, depois que a tela é levada até lá. */
.needs-attention { animation: needs-attention 1.6s ease-out; border-radius: 14px; }
@keyframes needs-attention {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  15%, 55% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 30%, transparent); }
}
.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 52px; }
.input-group .suffix { position: absolute; right: 14px; color: var(--muted); font-size: 13.5px; font-weight: 600; pointer-events: none; }
.input-group .prefix { position: absolute; left: 14px; color: var(--muted); font-size: 13.5px; font-weight: 600; pointer-events: none; }
.input-group.has-prefix .input { padding-left: 42px; padding-right: 14px; }
.time-trigger { display: flex; align-items: center; cursor: pointer; font: inherit; color: var(--text); text-align: left; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.time-trigger:hover { border-color: var(--brand); background: var(--brand-softer); }
.time-trigger:active { background: var(--brand-soft); }
.time-trigger.open { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.time-trigger-value { font-weight: 600; letter-spacing: 0.02em; }

.csel-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; font: inherit; color: var(--text); text-align: left; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.csel-trigger:hover { border-color: var(--brand); background: var(--brand-softer); }
.csel-trigger.open { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.csel-trigger .icon { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.list-pop {
  position: fixed; z-index: 90; max-height: 264px; overflow-y: auto;
  background: #0d1310; border: 1px solid #1f2b24; border-radius: 16px;
  padding: 6px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px;
}
.list-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  text-align: left; padding: 10px 12px; border-radius: 10px; border: none; background: transparent;
  color: #cfd8d2; font: inherit; font-size: 14px; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.list-opt:hover { background: #1b2420; }
.list-opt.selected { background: #193326; color: #7fd3a4; font-weight: 600; }
.list-opt .icon { width: 16px; height: 16px; color: #3aa872; flex-shrink: 0; }
.time-pop {
  position: fixed; z-index: 90; display: flex; gap: 6px;
  background: #0d1310; border: 1px solid #1f2b24; border-radius: 22px;
  padding: 10px; box-shadow: var(--shadow-lg);
}
.time-pop-col {
  display: flex; flex-direction: column; gap: 4px; width: 56px; height: 224px;
  overflow-y: auto; scroll-snap-type: y proximity; overscroll-behavior: contain;
  -ms-overflow-style: none; scrollbar-width: none;
}
.time-pop-col::-webkit-scrollbar { display: none; }
.time-opt {
  flex-shrink: 0; width: 44px; height: 44px; margin: 0 auto; scroll-snap-align: center;
  border-radius: 50%; border: none; background: transparent; color: #cfd8d2;
  font-size: 15px; font-weight: 600; font-family: var(--font); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background 0.12s, color 0.12s;
}
.time-opt:hover { background: #1b2420; }
.time-opt.selected { background: #3aa872; color: #06140c; }
/* Seletor de data: mesmo visual escuro do seletor de horário, com o dia escolhido num círculo verde. */
.date-pop { flex-direction: column; gap: 6px; width: 296px; max-width: calc(100vw - 16px); }
.date-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 4px; color: #eef3ef; }
.date-nav { width: 36px; height: 36px; border-radius: 50%; border: none; background: transparent; color: #cfd8d2; cursor: pointer; display: grid; place-items: center; }
.date-nav:hover:not(:disabled) { background: #1b2420; }
.date-nav:disabled { opacity: .3; cursor: default; }
.date-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; justify-items: center; }
.date-week span { font-size: 12px; font-weight: 700; color: #7f8f86; padding: 4px 0; }
.date-day { width: 36px; height: 36px; margin: 0; font-size: 14px; scroll-snap-align: none; }
.date-day.today:not(.selected) { box-shadow: inset 0 0 0 1.5px #3aa872; }
.date-day:disabled { opacity: .28; cursor: default; background: transparent; }
.date-trigger { justify-content: space-between; gap: 10px; height: 46px; }
.date-trigger-icon { display: inline-flex; color: var(--muted); }
.form-grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; line-height: 1.45; }
.check input { appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; transition: background 0.15s, border-color 0.15s; }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--on-brand); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 7px 14px;
  border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface);
  font-size: 14px; font-weight: 550; color: var(--text-2); transition: all 0.15s; user-select: none;
}
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-strong); }
.chip[aria-pressed="true"]::before { content: "✓"; font-weight: 700; font-size: 12px; }
.chip.danger[aria-pressed="true"] { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.options { display: grid; gap: 10px; }
@media (min-width: 640px) { .options.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } .options.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.option {
  display: flex; gap: 14px; align-items: center; text-align: left; width: 100%;
  padding: 14px 16px; border-radius: var(--radius); border: 1.5px solid var(--border);
  background: var(--surface); transition: all 0.15s; color: var(--text);
}
.option:hover { border-color: var(--border-strong); background: var(--surface-2); }
.option[aria-checked="true"] { border-color: var(--brand); background: var(--brand-softer); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent); }
.option .o-emoji { font-size: 26px; line-height: 1; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-3); border-radius: 13px; flex: none; }
.option[aria-checked="true"] .o-emoji { background: var(--surface); }
.option .o-title { font-weight: 650; font-size: 15px; }
.option .o-desc { font-size: 13px; color: var(--text-2); }
.option .o-radio { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); flex: none; }
.option[aria-checked="true"] .o-radio { border: 6px solid var(--brand); }

.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface-3); flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--text-2); min-height: 38px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg.block { display: flex; }
.seg.block button { flex: 1; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.switch input { appearance: none; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background 0.2s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch .s-title { font-weight: 600; }
.switch .s-desc { font-size: 13px; color: var(--text-2); }

input[type="range"] { width: 100%; accent-color: var(--brand); height: 28px; }

/* ───────────── Toasts e modais ───────────── */

.toasts { position: fixed; z-index: 100; left: 50%; bottom: calc(var(--bottom-nav) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 32px)); pointer-events: none; }
@media (min-width: 1024px) { .toasts { bottom: 24px; left: auto; right: 24px; transform: none; } }

/* Aviso de cookies de marketing */
.cookie-banner { position: fixed; z-index: 85; left: 12px; right: 12px; bottom: calc(var(--bottom-nav) + 12px + env(safe-area-inset-bottom)); max-width: 560px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); animation: fade 0.25s; }
.cookie-banner .cookie-text { flex: 1 1 260px; }
.cookie-banner p { margin: 4px 0 0; }
.cookie-banner .cookie-actions { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 1024px) { .cookie-banner { bottom: 24px; left: 24px; right: auto; margin: 0; } }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-align: left; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 13px 16px; border-radius: 16px; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 550; pointer-events: auto; animation: toast-in 0.25s ease; }
.toast.error { background: var(--danger); color: #fff; }
.toast .icon { margin-top: 1px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(12, 20, 16, 0.5); display: flex; align-items: flex-end; justify-content: center; animation: fade 0.2s; backdrop-filter: blur(2px); }
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 24px; } }
.modal { background: var(--surface); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); animation: sheet 0.25s ease; }
@media (min-width: 640px) { .modal { border-radius: var(--radius-xl); padding: 28px; } }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { font-size: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes sheet { from { transform: translateY(24px); opacity: 0.4; } }

.overlay-loading { position: fixed; inset: 0; z-index: 95; background: color-mix(in srgb, var(--bg) 92%, transparent); display: grid; place-items: center; padding: 24px; animation: fade 0.2s; }
.loading-card { text-align: center; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.loading-card .pulse { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; font-size: 42px; background: var(--brand-soft); animation: pulse 1.6s ease-in-out infinite; }
.loading-steps { display: flex; flex-direction: column; gap: 8px; text-align: left; width: 100%; margin-top: 8px; }
.loading-steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 14px; list-style: none; transition: color 0.3s; }
.loading-steps li.done { color: var(--text); }
.loading-steps li .icon { color: var(--brand); }
.loading-steps { padding: 0; margin: 0; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty { text-align: center; padding: 40px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .emoji { font-size: 48px; }
.empty h3 { font-size: 19px; }
.empty p { color: var(--text-2); max-width: 420px; }

/* ───────────── Layout público ───────────── */

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 24px; } }

.pub-nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.pub-nav.scrolled { border-bottom-color: var(--border); }
.pub-nav .inner { display: flex; align-items: center; gap: 16px; height: 68px; }
.pub-nav nav { display: none; gap: 4px; margin-left: 20px; }
.pub-nav nav a { color: var(--text-2); font-weight: 550; padding: 8px 12px; border-radius: 999px; font-size: 14.5px; }
.pub-nav nav a:hover { color: var(--text); background: var(--surface-3); }
.pub-nav .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
@media (min-width: 900px) { .pub-nav nav { display: flex; } }
@media (max-width: 520px) { .pub-nav .hide-xs { display: none; } }

.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 19px; letter-spacing: -0.02em; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark { width: 36px; height: 36px; border-radius: 12px; background: linear-gradient(145deg, #2d9460, #125c38); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 14px -6px rgba(18, 92, 56, 0.6); flex: none; }
.logo-mark svg { width: 21px; height: 21px; }
.logo b { color: var(--brand); font-weight: 750; }

.hero { position: relative; padding: 40px 0 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto auto; width: 720px; height: 720px; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 16%, transparent), transparent); z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto auto -20% -20%; width: 600px; height: 600px; background: radial-gradient(closest-side, color-mix(in srgb, var(--sun) 14%, transparent), transparent); z-index: -1; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 980px) { .hero { padding: 72px 0 96px; } .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-2); box-shadow: var(--shadow-sm); }
.eyebrow .badge { padding: 2px 8px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(40px, 7vw, 68px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; margin: 20px 0 18px; }
.hero h1 em { font-style: italic; color: var(--brand); }
.hero .lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-2); max-width: 560px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero .micro { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px; font-size: 13.5px; color: var(--muted); }
.hero .micro span { display: inline-flex; gap: 6px; align-items: center; }
.hero .micro .icon { width: 16px; height: 16px; color: var(--brand); }

.mock { position: relative; max-width: 440px; margin: 0 auto; width: 100%; }
.mock .phone { background: var(--surface); border-radius: 36px; padding: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.mock .float { position: absolute; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); font-size: 13px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.mock { padding-bottom: 26px; }
.mock .float.a { bottom: 0; left: 4%; }
.mock .float.b { bottom: 0; right: 4%; }
.mock .float.c { top: -16px; right: 10%; }
@media (max-width: 420px) { .mock .float.b { display: none; } }

.section { padding: 64px 0; }
@media (min-width: 980px) { .section { padding: 96px 0; } }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head .kicker { font-size: 13px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: 0.08em; }
.section-head h2 { font-family: var(--font-display); font-size: clamp(30px, 4.5vw, 44px); letter-spacing: -0.03em; margin: 10px 0 12px; font-weight: 600; }
.section-head p { color: var(--text-2); font-size: 17px; }

.trust { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 820px) { .trust { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.trust .item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.trust .item b { display: block; font-size: 26px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.trust .item span { font-size: 13.5px; color: var(--text-2); }

.steps { display: grid; gap: 16px; counter-reset: step; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.step { position: relative; padding: 28px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 22px; right: 24px; font-family: var(--font-display); font-size: 44px; color: var(--surface-3); font-weight: 700; line-height: 1; }
.step h3 { font-size: 18px; margin: 16px 0 8px; }
.step p { color: var(--text-2); }

.features { display: grid; gap: 16px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .features { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.feature { padding: 24px; border-radius: var(--radius-lg); background: var(--surface-2); border: 1px solid var(--border); }
.feature h3 { font-size: 17px; margin: 16px 0 6px; }
.feature p { color: var(--text-2); font-size: 14.5px; }

.pricing { display: grid; gap: 20px; max-width: 1120px; margin: 0 auto; }
@media (min-width: 980px) { .pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.price-card { position: relative; padding: 28px; border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.price-card.featured { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); }
.price-card .ribbon { position: absolute; top: -13px; left: 28px; }
.save-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 14px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 15px; font-weight: 750; letter-spacing: -0.01em; border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.save-pill .icon { width: 18px; height: 18px; }
@media (max-width: 979px) { .price-card.featured { order: -1; } }
.price-card .price { font-size: 42px; font-weight: 750; letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.price-card .price small { font-size: 15px; color: var(--muted); font-weight: 550; letter-spacing: 0; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.price-card li { display: flex; gap: 10px; font-size: 14.5px; }
.price-card li .icon { color: var(--brand); width: 18px; height: 18px; margin-top: 2px; }
.price-card li.off { color: var(--muted); }
.price-card li.off .icon { color: var(--muted); }
.price-card .btn { margin-top: auto; }

.faq { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 650; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--brand); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 18px; color: var(--text-2); }

.cta-band { border-radius: var(--radius-xl); padding: 40px 28px; background: linear-gradient(135deg, #1f7a4d, #0f4f30); color: #fff; display: grid; gap: 20px; align-items: center; position: relative; overflow: hidden; }
.cta-band::after { content: "🥗"; position: absolute; right: -10px; bottom: -30px; font-size: 180px; opacity: 0.12; }
.cta-band h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; }
.cta-band p { color: rgba(255, 255, 255, 0.82); }
.cta-band .btn { --btn-bg: #fff; --btn-fg: #0f4f30; --btn-border: #fff; justify-self: start; }
@media (min-width: 820px) { .cta-band { grid-template-columns: 1fr auto; padding: 52px; } }

.pub-footer { padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
.pub-footer .cols { display: grid; gap: 28px; }
@media (min-width: 820px) { .pub-footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }
.pub-footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 12px; }
.pub-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.pub-footer a { color: var(--text-2); }
.pub-footer .legal { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

/* ───────────── Autenticação ───────────── */

.auth { min-height: 100vh; display: grid; }
@media (min-width: 980px) { .auth { grid-template-columns: 1fr 1fr; } }
.auth-side { display: none; position: relative; padding: 48px; background: linear-gradient(160deg, #1f7a4d 0%, #0f4f30 70%); color: #fff; overflow: hidden; }
@media (min-width: 980px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }
.auth-side .logo { color: #fff; }
.auth-side .logo b { color: #bfe6cf; }
.auth-side h2 { font-family: var(--font-display); font-size: 42px; font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; max-width: 460px; }
.auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; }
.auth-side li { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, 0.88); }
.auth-side li span.e { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); font-size: 19px; }
.auth-side .deco { position: absolute; right: -60px; bottom: -60px; font-size: 260px; opacity: 0.08; line-height: 1; }
.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 28px var(--gutter) 40px; }
.auth-card { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card h1 { font-size: 28px; letter-spacing: -0.025em; margin: 18px 0 6px; }
@media (min-width: 980px) { .auth-card > .row .logo { visibility: hidden; } }
.demo-box { margin-top: 22px; padding: 16px; border-radius: var(--radius); border: 1px dashed var(--border-strong); background: var(--surface-2); }

/* ───────────── App shell ───────────── */

.app { min-height: 100vh; }
.sidebar { display: none; }
@media (min-width: 1024px) {
  .sidebar { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 22px 16px; background: var(--surface); border-right: 1px solid var(--border); z-index: 30; }
  .app-main { margin-left: var(--sidebar); }
}
.sidebar .logo { padding: 4px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; color: var(--text-2); font-weight: 580; font-size: 14.5px; }
.side-nav a:hover { background: var(--surface-2); color: var(--text); }
.side-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-strong); }
.side-nav .sep { height: 1px; background: var(--border); margin: 12px 8px; }
.side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.upgrade-card { padding: 16px; border-radius: var(--radius); background: linear-gradient(150deg, var(--brand-soft), var(--surface-2)); border: 1px solid var(--border); }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(145deg, #c2673a, #e3a21a); flex: none; font-size: 15px; }

.topbar { position: sticky; top: 0; z-index: 25; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--border); }
.topbar .inner { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 var(--gutter); max-width: 1240px; margin: 0 auto; }
@media (min-width: 1024px) { .topbar .logo { display: none; } }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.page { max-width: 1240px; margin: 0 auto; padding: 22px var(--gutter) calc(var(--bottom-nav) + 40px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { .page { padding: 32px 32px 64px; } }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { font-size: clamp(24px, 3.2vw, 32px); letter-spacing: -0.03em; }
.page-head .sub { color: var(--text-2); margin-top: 6px; }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; font-size: 14px; margin-bottom: 14px; }

.bottom-nav { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(var(--bottom-nav) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--border); display: grid; grid-template-columns: repeat(5, 1fr); }
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav a.fab span.fab-circle { width: 48px; height: 48px; border-radius: 16px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; margin-top: -22px; box-shadow: 0 10px 20px -8px color-mix(in srgb, var(--brand) 80%, transparent); }

.grid { display: grid; gap: 18px; }
@media (min-width: 700px) {
  .grid.dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.dash > .span-6, .grid.dash > .span-7, .grid.dash > .span-8, .grid.dash > .span-12, .grid.dash > .md-full { grid-column: span 2; }
}
@media (min-width: 900px) {
  .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1099px) { .grid.side.aside-first > aside { order: -1; } }
@media (min-width: 1100px) {
  .grid.side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}
@media (min-width: 1280px) {
  .grid.dash { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .grid.dash > .span-4 { grid-column: span 4; } .grid.dash > .span-5 { grid-column: span 5; } .grid.dash > .span-6 { grid-column: span 6; }
  .grid.dash > .span-7 { grid-column: span 7; } .grid.dash > .span-8 { grid-column: span 8; } .grid.dash > .span-12 { grid-column: span 12; }
}

.welcome { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: center; }
.welcome h1 { font-size: clamp(24px, 3.4vw, 34px); letter-spacing: -0.03em; }

/* ───────────── Refeições ───────────── */

.meal-list { display: flex; flex-direction: column; gap: 10px; }
.meal-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); transition: border-color 0.15s, background 0.15s; color: var(--text); }
.meal-row:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-2); }
.meal-row .time { font-size: 12.5px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.meal-row .name { font-weight: 620; font-size: 15px; line-height: 1.3; }
.meal-row .meta { font-size: 12.5px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; }
.meal-row .meta span { display: inline-flex; align-items: center; gap: 4px; }
.meal-row .meta .icon { width: 14px; height: 14px; }
.meal-row.done .name { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text) 35%, transparent); color: var(--text-2); }
.done-btn { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; color: transparent; transition: all 0.15s; }
.done-btn:hover { border-color: var(--brand); color: var(--brand); }
.done-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.done-btn .icon { width: 18px; height: 18px; stroke-width: 2.4; }

.meal-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: box-shadow 0.2s, transform 0.2s; }
.meal-card:hover { box-shadow: var(--shadow); }
.meal-card .top { display: flex; gap: 14px; align-items: flex-start; }
.meal-card .slot { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; display: flex; gap: 8px; align-items: center; }
.meal-card h3 { font-size: 17px; margin-top: 3px; line-height: 1.3; }
.meal-card h3 a { color: var(--text); }
.meal-card h3 a:hover { color: var(--brand); }
.meal-card .nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.meal-card .nums div { background: var(--surface-2); border-radius: 12px; padding: 8px 10px; }
.meal-card .nums b { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.meal-card .nums span { font-size: 11.5px; color: var(--muted); font-weight: 550; }
.meal-card .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.meal-card .flag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 10px; }
.flag.leftover { background: var(--sun-soft); color: var(--sun); }
.flag.double { background: var(--info-soft); color: var(--info); }
.flag.out { background: var(--accent-soft); color: var(--accent); }
.meal-cards { display: grid; gap: 14px; }
@media (min-width: 760px) { .meal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.day-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); }
@media (min-width: 1024px) { .day-tabs { margin: 0; padding-left: 2px; padding-right: 2px; } }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 64px; padding: 10px 12px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-weight: 600; }
.day-tab .d { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.day-tab .n { font-size: 20px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.day-tab .dot { width: 6px; height: 6px; border-radius: 50%; background: transparent; margin-top: 2px; }
.day-tab.today .dot { background: var(--accent); }
.day-tab[aria-selected="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.day-tab[aria-selected="true"] .d, .day-tab[aria-selected="true"] .n { color: var(--on-brand); }
.day-tab[aria-selected="true"].today .dot { background: var(--on-brand); }

.week-table { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.week-table th { font-size: 12.5px; color: var(--muted); font-weight: 650; text-align: left; padding: 4px 6px; }
.week-table th.slot-h { width: 110px; }
.week-table td { vertical-align: top; }
.week-cell { display: block; height: 100%; min-height: 92px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 12.5px; line-height: 1.35; }
.week-cell:hover { border-color: var(--brand); color: var(--text); }
.week-cell .e { font-size: 20px; }
.week-cell .k { color: var(--muted); font-size: 11.5px; margin-top: 4px; }
.week-cell.out { background: var(--accent-soft); }
.week-cell.done { opacity: 0.6; }
.week-scroll { overflow-x: auto; margin: 0 -6px; }
.week-scroll table { min-width: 980px; }

.ingredients { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.ingredients li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients .q { margin-left: auto; text-align: right; font-weight: 650; font-size: 14px; white-space: nowrap; }
.ingredients .q small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.steps-list { list-style: none; padding: 0; margin: 0; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.steps-list li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.steps-list li::before { content: counter(s); width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); font-weight: 700; font-size: 14px; }

.alt-list { display: grid; gap: 10px; }
.fav-btn { display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); cursor: pointer; transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s; }
.fav-btn .icon { width: 18px; height: 18px; }
.fav-btn:hover { color: #e5566d; border-color: #e5566d; }
.fav-btn:active { transform: scale(0.92); }
.fav-btn[aria-pressed="true"] { color: #e5566d; border-color: #e5566d; background: color-mix(in srgb, #e5566d 14%, transparent); }
.fav-btn[aria-pressed="true"] .icon { fill: currentColor; }
.recipe-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.recipe-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface); text-align: left; width: 100%; color: var(--text); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.recipe-card:hover { border-color: var(--brand); background: var(--brand-softer); }
.recipe-card.unavailable { opacity: 0.6; }
.alt-item { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); text-align: left; width: 100%; color: var(--text); }
.alt-item:hover { border-color: var(--brand); background: var(--brand-softer); }

/* ───────────── Compras ───────────── */

.shop-cat { padding: 0; overflow: hidden; }
.shop-cat .head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.shop-cat .head .e { font-size: 22px; }
.shop-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); cursor: pointer; }
.shop-item:last-child { border-bottom: 0; }
.shop-item:hover { background: var(--surface-2); }
.shop-item .box { width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; color: transparent; transition: all 0.15s; background: var(--surface); }
.shop-item[aria-checked="true"] .box { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.shop-item .box .icon { width: 15px; height: 15px; stroke-width: 2.6; }
.shop-item .nm { font-weight: 600; }
.shop-item .pk { font-size: 12.5px; color: var(--muted); }
.shop-item .qt { margin-left: auto; text-align: right; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.shop-item .qt small { display: block; color: var(--muted); font-weight: 550; font-size: 12px; }
.shop-item[aria-checked="true"] .nm { text-decoration: line-through; color: var(--muted); }
.sub-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--border); }
.sub-item .save { font-weight: 700; color: var(--brand); white-space: nowrap; }
.locked { position: relative; }
.locked .blur { filter: blur(5px); pointer-events: none; user-select: none; opacity: 0.7; }
.locked .lock-cta { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; }

/* ───────────── Questionário ───────────── */

.wizard { min-height: 100vh; display: flex; flex-direction: column; }
.wizard-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.wizard-top .inner { max-width: 760px; margin: 0 auto; padding: 14px var(--gutter); display: flex; flex-direction: column; gap: 12px; }
.wizard-body { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 28px var(--gutter) 120px; }
.wizard-body h1 { font-size: clamp(26px, 4vw, 34px); letter-spacing: -0.03em; }
.wizard-body .lead { color: var(--text-2); margin: 8px 0 26px; font-size: 16px; }
.wizard-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); }
.wizard-foot .inner { max-width: 760px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; }
.q-section { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.q-section > h2 { font-size: 17px; }
.q-section > .hint { color: var(--text-2); font-size: 14px; margin-top: -6px; }
.step-dots { display: flex; gap: 6px; }
.step-dots span { flex: 1; height: 6px; border-radius: 999px; background: var(--surface-3); transition: background 0.3s; }
.step-dots span.on { background: var(--brand); }

/* ───────────── Resultado ───────────── */

.result-hero { padding: 28px; border-radius: var(--radius-xl); background: linear-gradient(150deg, var(--brand) 0%, var(--brand-strong) 100%); color: #fff; position: relative; overflow: hidden; }
.result-hero::after { content: "🌿"; position: absolute; right: -8px; top: -20px; font-size: 160px; opacity: 0.14; }
.result-hero .hero-number { color: #fff; font-size: clamp(48px, 9vw, 72px); }
.result-hero .hero-number small { color: rgba(255, 255, 255, 0.75); }
.result-hero .muted { color: rgba(255, 255, 255, 0.78); }
.formula { font-family: ui-monospace, "Cascadia Code", "Consolas", monospace; font-size: 13px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; overflow-x: auto; white-space: nowrap; }
.dist-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.dist-row:last-child { border-bottom: 0; }

/* ───────────── Ajustes ───────────── */

.adjust-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .adjust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .adjust-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.adjust-card { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 18px; border-radius: var(--radius-lg); border: 1.5px solid var(--border); background: var(--surface); color: var(--text); transition: all 0.15s; width: 100%; }
.adjust-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.adjust-card[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-softer); }
.adjust-card h3 { font-size: 16px; }
.adjust-card p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.ai-box { border-radius: var(--radius-xl); padding: 22px; background: linear-gradient(160deg, var(--brand-softer), var(--surface)); border: 1px solid var(--border); }
.ai-box .textarea { background: var(--surface); }
.change-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.change-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 10px 12px; background: var(--surface-2); border-radius: 12px; font-size: 14px; }
.change-list .from { color: var(--muted); text-decoration: line-through; }
.eatout-grid { display: grid; grid-template-columns: 90px repeat(7, minmax(0, 1fr)); gap: 6px; align-items: center; font-size: 12.5px; }
.eatout-grid .h { text-align: center; color: var(--muted); font-weight: 650; }
.eatout-grid button { height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); font-size: 16px; }
.eatout-grid button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

/* ───────────── Histórico ───────────── */

.hist-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.hist-row:last-child { border-bottom: 0; }
a.hist-row:hover { color: var(--text); }
a.hist-row:hover .t { color: var(--brand); }
.hist-row .t { font-weight: 620; }
.hist-row .emojis { font-size: 16px; letter-spacing: 2px; }

/* ───────────── Termos ───────────── */

.legal-doc { max-width: 820px; margin: 0 auto; }
.legal-doc h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -0.02em; }
.legal-doc h3 { font-size: 17px; margin: 22px 0 8px; }
.legal-doc p, .legal-doc li { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.legal-doc p + p { margin-top: 10px; }
.legal-doc ul { padding-left: 20px; }
.legal-doc .placeholder { background: var(--sun-soft); color: var(--sun); padding: 0 6px; border-radius: 6px; font-weight: 600; }

/* ───────────── Impressão / PDF ───────────── */

.print-toolbar { position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.print-doc { max-width: 900px; margin: 24px auto; padding: 36px; background: #fff; color: #1b2a21; border-radius: 12px; box-shadow: var(--shadow); }
.print-doc h1 { font-family: var(--font-display); font-size: 30px; }
.print-doc h2 { font-size: 17px; margin: 26px 0 10px; color: #0f4f30; }
.print-doc table { width: 100%; border-collapse: collapse; font-size: 12px; }
.print-doc th, .print-doc td { border: 1px solid #d9d3c3; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-doc th { background: #f0f7f2; font-weight: 700; }
.print-doc .cols { columns: 2; column-gap: 28px; font-size: 12.5px; }
.print-doc .cols .cat { break-inside: avoid; margin-bottom: 12px; }
.print-doc .cols ul { margin: 4px 0 0; padding: 0; list-style: none; }
.print-doc .cols li { padding: 2px 0; }
.print-doc .muted { color: #6b776f; }
.print-day { break-inside: avoid; margin-bottom: 14px; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; }
  .print-toolbar { display: none; }
  .print-doc { margin: 0; padding: 0; box-shadow: none; max-width: none; }
}

@media (max-width: 520px) { .hide-xs { display: none !important; } }

/* Impressão das páginas do app (ex.: lista de compras) */
@media print {
  .sidebar, .topbar, .bottom-nav, .toasts, .page-head .actions, .seg, .link-btn, .btn, .locked, .pub-nav, .pub-footer { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .page { padding: 0 !important; max-width: none; }
  .grid.side { grid-template-columns: 1fr !important; }
  .card { box-shadow: none !important; break-inside: avoid; }
  body { background: #fff !important; }
}

/* ───────────── Utilidades de movimento ───────────── */

.fade-in { animation: fade-up 0.35s ease both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
