/* ============================================================
   Plano Alimentar — Design System
   ============================================================ */
:root {
  --bg: #f4f7f1;
  --bg-grad-1: #e9f5ea;
  --bg-grad-2: #f4f7f1;
  --surface: #ffffff;
  --surface-2: #eef2ea;
  --surface-3: #e6ebe1;
  --text: #16241b;
  --text-muted: #62726a;
  --text-faint: #97a49b;

  --primary: #16a34a;
  --primary-strong: #15803d;
  --primary-soft: #dcfce7;
  --primary-ink: #05421f;

  --accent: #ff6a3d;
  --accent-soft: #ffe6dd;
  --accent-ink: #7a2c14;

  --protein: #4f46e5;
  --carbs: #f59e0b;
  --fat: #ef4444;

  --border: rgba(16, 40, 24, 0.09);
  --border-strong: rgba(16, 40, 24, 0.16);
  --shadow-sm: 0 1px 2px rgba(16, 40, 24, 0.06), 0 1px 3px rgba(16, 40, 24, 0.05);
  --shadow-md: 0 6px 18px rgba(16, 40, 24, 0.08), 0 2px 6px rgba(16, 40, 24, 0.05);
  --shadow-lg: 0 20px 40px rgba(16, 40, 24, 0.14);

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;

  --nav-h: 68px;
  --top-h: 60px;
  --maxw: 540px;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --bg-grad-1: #0f1a2b;
    --bg-grad-2: #0b1220;
    --surface: #131d2c;
    --surface-2: #1a2739;
    --surface-3: #223048;
    --text: #e9eef3;
    --text-muted: #93a3b4;
    --text-faint: #64748b;

    --primary: #34d399;
    --primary-strong: #10b981;
    --primary-soft: #113526;
    --primary-ink: #a7f3d0;

    --accent: #ff7d54;
    --accent-soft: #3a2016;
    --accent-ink: #ffcbb8;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 22px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 44px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme='dark'] {
  --bg: #0b1220; --bg-grad-1: #0f1a2b; --bg-grad-2: #0b1220;
  --surface: #131d2c; --surface-2: #1a2739; --surface-3: #223048;
  --text: #e9eef3; --text-muted: #93a3b4; --text-faint: #64748b;
  --primary: #34d399; --primary-strong: #10b981; --primary-soft: #113526; --primary-ink: #a7f3d0;
  --accent: #ff7d54; --accent-soft: #3a2016; --accent-ink: #ffcbb8;
  --border: rgba(255,255,255,0.08); --border-strong: rgba(255,255,255,0.16);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3); --shadow-md: 0 8px 22px rgba(0,0,0,.4); --shadow-lg: 0 20px 44px rgba(0,0,0,.55);
}
:root[data-theme='light'] {
  --bg: #f4f7f1; --bg-grad-1: #e9f5ea; --bg-grad-2: #f4f7f1;
  --surface: #fff; --surface-2: #eef2ea; --surface-3: #e6ebe1;
  --text: #16241b; --text-muted: #62726a; --text-faint: #97a49b;
  --primary: #16a34a; --primary-strong: #15803d; --primary-soft: #dcfce7; --primary-ink: #05421f;
  --accent: #ff6a3d; --accent-soft: #ffe6dd; --accent-ink: #7a2c14;
  --border: rgba(16,40,24,.09); --border-strong: rgba(16,40,24,.16);
  --shadow-sm: 0 1px 2px rgba(16,40,24,.06),0 1px 3px rgba(16,40,24,.05);
  --shadow-md: 0 6px 18px rgba(16,40,24,.08),0 2px 6px rgba(16,40,24,.05);
  --shadow-lg: 0 20px 40px rgba(16,40,24,.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: linear-gradient(170deg, var(--bg-grad-1), var(--bg-grad-2) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary-strong); text-decoration: none; }
ul { list-style: none; }
::selection { background: var(--primary-soft); }

/* ---------- App shell ---------- */
#app { min-height: 100dvh; }
.shell {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: transparent;
}
.view {
  padding: calc(var(--top-h) + 12px) 16px calc(var(--nav-h) + 28px);
  animation: fade .32s ease;
}
.view--flush { padding-top: 8px; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Boot ---------- */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 22px; }
.boot__logo { width: 76px; height: 76px; border-radius: 22px; display: grid; place-content: center;
  background: linear-gradient(140deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: var(--shadow-lg); }
.boot__spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--top-h);
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; padding-top: env(safe-area-inset-top);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.05rem; letter-spacing: -.02em; }
.topbar__brand .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-content: center;
  background: linear-gradient(140deg, var(--primary), var(--primary-strong)); color: #fff; }
.topbar__spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-content: center; color: var(--text-muted);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: .15s; }
.icon-btn:active { transform: scale(.92); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, var(--accent), #ff8a5c); box-shadow: var(--shadow-sm); }

/* ---------- Bottom nav ---------- */
.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  max-width: var(--maxw); margin: 0 auto; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-top: 1px solid var(--border);
}
.navbtn { display: grid; justify-items: center; gap: 3px; color: var(--text-faint); font-size: .66rem; font-weight: 600; transition: color .15s; }
.navbtn svg { width: 24px; height: 24px; }
.navbtn.active { color: var(--primary-strong); }
.navbtn--fab { position: relative; }
.navbtn--fab .fab {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 18px; display: grid; place-content: center; color: #fff;
  background: linear-gradient(140deg, var(--primary), var(--primary-strong));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 45%, transparent); border: 3px solid var(--surface);
  transition: transform .15s;
}
.navbtn--fab .fab svg { width: 26px; height: 26px; }
.navbtn--fab:active .fab { transform: scale(.9) rotate(90deg); }

/* ---------- Typography helpers ---------- */
.h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
.h2 { font-size: 1.2rem; font-weight: 750; letter-spacing: -.02em; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 12px; }
.section-title h2 { font-size: 1.05rem; font-weight: 750; letter-spacing: -.02em; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary-strong); }
.link { color: var(--primary-strong); font-weight: 650; font-size: .85rem; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 14px; }
.card--pad-lg { padding: 22px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow-sm); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px;
  border-radius: 14px; font-weight: 700; font-size: .95rem; letter-spacing: -.01em; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.97); }
.btn--primary { background: linear-gradient(140deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--primary) 34%, transparent); }
.btn--accent { background: linear-gradient(140deg, var(--accent), #ff875c); color: #fff; box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 34%, transparent); }
.btn--ghost { background: var(--surface-2); color: var(--text); }
.btn--outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text); }
.btn--block { display: flex; width: 100%; }
.btn--sm { height: 38px; padding: 0 14px; font-size: .85rem; border-radius: 11px; }
.btn--danger { background: color-mix(in srgb, var(--fat) 14%, var(--surface)); color: var(--fat); }
.btn:disabled { opacity: .55; pointer-events: none; }

/* ---------- Forms ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: .8rem; font-weight: 650; color: var(--text-muted); margin: 0 0 6px 3px; }
.input, .select, textarea.input {
  width: 100%; height: 50px; padding: 0 15px; border-radius: 13px; background: var(--surface);
  border: 1.5px solid var(--border-strong); color: var(--text); transition: border-color .15s, box-shadow .15s; outline: none;
}
textarea.input { height: auto; padding: 12px 15px; resize: vertical; min-height: 84px; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 16%, transparent); }
.input::placeholder { color: var(--text-faint); }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2362726a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 40px; }
.input-search { position: relative; }
.input-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-faint); pointer-events: none; }
.input-search .input { padding-left: 44px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- Chips / segmented ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 36px; padding: 0 14px; border-radius: 999px; font-size: .82rem; font-weight: 650;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text-muted); transition: .15s; }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.segment { display: flex; background: var(--surface-2); border-radius: 13px; padding: 4px; gap: 4px; }
.segment button { flex: 1; height: 38px; border-radius: 10px; font-weight: 650; font-size: .86rem; color: var(--text-muted); transition: .15s; }
.segment button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ---------- Calorie ring ---------- */
.ring { --p: 0; --size: 128px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-content: center; position: relative;
  background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring::before { content: ''; position: absolute; inset: 11px; background: var(--surface); border-radius: 50%; }
.ring__inner { position: relative; text-align: center; }
.ring__num { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.ring__label { font-size: .68rem; font-weight: 650; color: var(--text-muted); margin-top: 3px; }

/* ---------- Macro bars ---------- */
.macros { display: grid; gap: 10px; }
.macro__top { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 650; margin-bottom: 5px; }
.macro__bar { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.macro__fill { height: 100%; border-radius: 6px; transition: width .5s cubic-bezier(.2,.8,.2,1); }
.macro--protein .macro__fill { background: var(--protein); }
.macro--carbs .macro__fill { background: var(--carbs); }
.macro--fat .macro__fill { background: var(--fat); }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- Nutrition grid ---------- */
.nutri-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.nutri { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.nutri__v { font-size: 1.02rem; font-weight: 750; letter-spacing: -.02em; }
.nutri__k { font-size: .68rem; font-weight: 600; color: var(--text-muted); }

/* ---------- Lists / rows ---------- */
.list { display: grid; gap: 10px; }
.rowcard { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.rowcard__badge { width: 42px; height: 42px; border-radius: 12px; display: grid; place-content: center; font-size: 1.1rem; flex: 0 0 auto; }
.rowcard__main { flex: 1; min-width: 0; }
.rowcard__title { font-weight: 700; font-size: .94rem; letter-spacing: -.01em; }
.rowcard__sub { font-size: .78rem; color: var(--text-muted); margin-top: 1px; }
.rowcard__val { text-align: right; font-weight: 750; font-size: .9rem; flex: 0 0 auto; }
.rowcard__val small { display: block; font-size: .66rem; color: var(--text-faint); font-weight: 600; }
.cat-pill { font-size: .64rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); }

/* ---------- Builder (meal creator) ---------- */
.builder-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.builder-item:last-child { border-bottom: none; }
.builder-item__name { flex: 1; min-width: 0; font-weight: 650; font-size: .9rem; }
.qty { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: 10px; padding: 4px; }
.qty input { width: 52px; height: 32px; text-align: center; border: none; background: transparent; font-weight: 700; }
.qty button { width: 30px; height: 30px; border-radius: 8px; background: var(--surface); color: var(--primary-strong); font-weight: 800; box-shadow: var(--shadow-sm); }
.totalbar { position: sticky; bottom: calc(var(--nav-h) + 8px); z-index: 20; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-nav { display: flex; gap: 8px; }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-dow { text-align: center; font-size: .66rem; font-weight: 700; color: var(--text-faint); padding: 4px 0; }
.cal-day { aspect-ratio: 1; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: grid; grid-template-rows: auto 1fr; padding: 5px; position: relative; transition: .12s; }
.cal-day:active { transform: scale(.95); }
.cal-day--out { opacity: .38; }
.cal-day--today { border-color: var(--primary); box-shadow: 0 0 0 1.5px var(--primary); }
.cal-day--sel { background: var(--primary); color: #fff; }
.cal-day__n { font-size: .78rem; font-weight: 700; text-align: right; padding-right: 2px; }
.cal-day__dots { display: flex; flex-wrap: wrap; gap: 2px; align-content: flex-end; padding: 2px; }
.cal-day__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--primary); }
.cal-day--sel .cal-day__dots i { background: #fff; }
.cal-day__dots i.ex { background: var(--accent); }
.cal-week { display: grid; gap: 8px; }
.week-day { display: flex; gap: 10px; }
.week-day__date { width: 46px; flex: 0 0 auto; text-align: center; }
.week-day__date b { display: block; font-size: 1.15rem; font-weight: 800; }
.week-day__date span { font-size: .64rem; text-transform: uppercase; color: var(--text-faint); font-weight: 700; }
.week-day__body { flex: 1; }

/* ---------- Schedule slots ---------- */
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.slot__ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-content: center; flex: 0 0 auto; }
.slot__main { flex: 1; min-width: 0; }
.slot__label { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-faint); }
.slot__title { font-weight: 700; font-size: .92rem; }
.slot--done { opacity: .55; }
.slot--done .slot__title { text-decoration: line-through; }
.check { width: 30px; height: 30px; border-radius: 9px; border: 1.5px solid var(--border-strong); display: grid; place-content: center; color: transparent; flex: 0 0 auto; }
.check.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Exercise ---------- */
.exercise-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.exercise-card__cat { position: absolute; top: 14px; right: 14px; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; }
.tag-aerobio { background: var(--primary-soft); color: var(--primary-ink); }
.tag-forca { background: var(--accent-soft); color: var(--accent-ink); }
.tag-flexibilidade { background: #e0e7ff; color: #3730a3; }
.tag-equilibrio { background: #fef3c7; color: #92400e; }
.exercise-card__title { font-weight: 750; font-size: 1rem; margin-bottom: 4px; padding-right: 70px; }
.exercise-card__desc { font-size: .82rem; color: var(--text-muted); margin-bottom: 12px; }
.exercise-card__meta { display: flex; gap: 14px; font-size: .74rem; color: var(--text-muted); font-weight: 600; }
.exercise-card__meta b { color: var(--text); }

/* ---------- Hero / auth ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; padding: 0 22px; max-width: var(--maxw); margin: 0 auto; }
.auth__hero { padding: 46px 0 26px; text-align: center; }
.auth__logo { width: 68px; height: 68px; border-radius: 20px; display: grid; place-content: center; margin: 0 auto 16px;
  background: linear-gradient(140deg, var(--primary), var(--primary-strong)); color: #fff; box-shadow: var(--shadow-lg); }
.auth__logo svg { width: 36px; height: 36px; }
.auth h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; }
.auth__sub { color: var(--text-muted); margin-top: 6px; font-size: .95rem; }
.auth__card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 22px; box-shadow: var(--shadow-md); }
.auth__switch { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--text-muted); }
.auth__err { background: color-mix(in srgb, var(--fat) 12%, var(--surface)); color: var(--fat); border-radius: 12px; padding: 11px 14px; font-size: .84rem; font-weight: 600; margin-bottom: 14px; }
.pill-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.pill { font-size: .74rem; font-weight: 650; color: var(--text-muted); background: var(--surface); border: 1px solid var(--border); padding: 7px 12px; border-radius: 999px; display: inline-flex; gap: 5px; align-items: center; }

/* ---------- Empty / misc ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty__ico { width: 64px; height: 64px; border-radius: 20px; display: grid; place-content: center; margin: 0 auto 14px; background: var(--surface-2); color: var(--text-faint); }
.empty__ico svg { width: 30px; height: 30px; }
.spinner-inline { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 30px auto; }

/* ---------- Bottom sheet / modal ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 15, 12, 0.5); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease; }
.sheet { width: 100%; max-width: var(--maxw); background: var(--surface); border-radius: 26px 26px 0 0; padding: 8px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); max-height: 88dvh; overflow-y: auto; animation: slideup .3s cubic-bezier(.2,.9,.2,1); }
@keyframes slideup { from { transform: translateY(100%); } to { transform: none; } }
.sheet__grab { width: 42px; height: 5px; border-radius: 3px; background: var(--border-strong); margin: 8px auto 14px; }
.sheet__title { font-size: 1.15rem; font-weight: 750; letter-spacing: -.02em; margin-bottom: 14px; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; bottom: calc(var(--nav-h) + 20px); left: 0; right: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 999px; font-size: .86rem; font-weight: 650; box-shadow: var(--shadow-lg); animation: toastIn .3s ease; }
.toast--ok { background: var(--primary-strong); color: #fff; }
.toast--err { background: var(--fat); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Utilities ---------- */
.stack { display: grid; gap: 14px; }
.flex { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 14px; } .mt-lg { margin-top: 22px; } .mb { margin-bottom: 14px; }
.grow { flex: 1; }
.right { text-align: right; }
.hidden { display: none !important; }
.hero-card { background: linear-gradient(145deg, var(--primary), var(--primary-strong)); color: #fff; border-radius: var(--r-xl); padding: 20px; box-shadow: var(--shadow-md); position: relative; overflow: hidden; }
.hero-card::after { content: ''; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,.12); }
.hero-card__row { display: flex; align-items: center; gap: 18px; position: relative; }
.hero-card .ring::before { background: var(--primary-strong); }
.text-accent { color: var(--accent); }

/* ============================================================
   Correções de ícones — garante tamanho a TODOS os SVG de UI
   (evita ícones gigantes que transbordam os contentores)
   ============================================================ */
/* Tamanho por omissão de QUALQUER ícone gerado por icon() — os
   tamanhos específicos abaixo (maior especificidade) sobrepõem-se. */
.ic { width: 20px; height: 20px; flex: none; }
.icon-btn svg,
.mark svg,
.avatar svg,
.check svg { width: 20px; height: 20px; }
.mark svg { width: 18px; height: 18px; }
.check svg { width: 17px; height: 17px; }
.boot__logo svg { width: 40px; height: 40px; }
.topbar__brand .mark svg { width: 18px; height: 18px; }

/* ---------- Vista "Dia" (agenda diária) — mais organizada ---------- */
.day-list { display: grid; gap: 10px; margin-top: 8px; }
.day-slot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.day-slot:has(.dentry) { border-color: var(--border-strong); }
.day-slot__head { display: flex; align-items: center; gap: 11px; }
.day-slot__badge { width: 36px; height: 36px; border-radius: 11px; display: grid; place-content: center; font-size: 1.05rem; flex: 0 0 auto; }
.day-slot__label { flex: 1; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.day-slot__add { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-size: .82rem; color: var(--primary-strong); padding: 7px 11px; border-radius: 10px; transition: background .15s; }
.day-slot__add:active { background: var(--primary-soft); transform: scale(.96); }
.day-slot__entries { display: grid; gap: 8px; }
.day-slot__entries:not(:empty) { margin-top: 10px; }
.dentry { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 12px; padding: 9px 11px; }
.dentry__main { flex: 1; min-width: 0; }
.dentry__title { font-weight: 650; font-size: .9rem; }
.dentry.is-done .dentry__title { text-decoration: line-through; opacity: .55; }
.dentry__note { font-size: .75rem; color: var(--text-muted); margin-top: 1px; }
.dentry__del { width: 32px; height: 32px; background: transparent; border: none; box-shadow: none; color: var(--text-faint); }

/* Cabeçalho do calendário — botões de navegação alinhados e limpos */
.cal-head { gap: 12px; }
.cal-nav .icon-btn { width: 38px; height: 38px; }
