/* ═══════════════════════════════════════════════════════════
   TREINO · JDN — estilos
   ═══════════════════════════════════════════════════════════ */
:root {
  --bg: #0b0d10;
  --bg2: #101317;
  --card: #14181d;
  --card2: #1a1f25;
  --line: #242b33;
  --line2: #2f3740;
  --tx: #eef2f5;
  --tx2: #a4afba;
  --tx3: #6c7885;
  --acc: #c6f432;
  --acc-ink: #10140a;
  --acc-soft: rgba(198, 244, 50, .12);
  --orange: #ff7a45;
  --blue: #5cc8ff;
  --violet: #b18cff;
  --red: #ff5d6c;
  --water: #4fb3ff;
  --r: 18px;
  --r-sm: 12px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --num: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --side: 232px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font-family: var(--font); font-size: 15px; line-height: 1.45; }
body { min-height: 100vh; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
a { color: var(--acc); }
code { background: var(--card2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
::selection { background: var(--acc); color: var(--acc-ink); }
.muted { color: var(--tx2); }
.dim { color: var(--tx3); }
.center { text-align: center; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ─────────── Layout ─────────── */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--bg2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 22px 14px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; padding: 0 8px 22px; }
.brand img { width: 34px; height: 34px; object-fit: contain; border-radius: 9px; }
.brand.sm { padding: 0; font-size: 18px; }
.brand.sm img { width: 28px; height: 28px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a, .nav-btn {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--tx2); text-decoration: none; font-weight: 600; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s;
}
.nav a:hover, .nav-btn:hover { background: var(--card); color: var(--tx); }
.nav a.on { background: var(--acc-soft); color: var(--acc); }
.side-foot { margin-top: auto; }

.top {
  display: none; position: sticky; top: 0; z-index: 15;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
  background: rgba(11, 13, 16, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); align-items: center; justify-content: space-between;
}
.top-right { display: flex; align-items: center; gap: 8px; }
.main { margin-left: var(--side); padding: 28px 32px 60px; max-width: calc(1180px + var(--side)); }
.view { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .side { inset: auto 0 0 0; width: auto; height: calc(66px + var(--safe-b)); flex-direction: row; padding: 6px 8px var(--safe-b); border-right: 0; border-top: 1px solid var(--line); background: rgba(16, 19, 23, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  .side .brand, .side-foot { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 7px 4px; flex: 1; align-items: center; }
  .nav a.on { background: none; }
  .nav a.on svg { filter: drop-shadow(0 0 8px rgba(198, 244, 50, .5)); }
  .top { display: flex; }
  .main { margin-left: 0; padding: 16px 16px calc(96px + var(--safe-b)); }
}

/* ─────────── Elementos ─────────── */
.h1 { font-size: 28px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.h2 { font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.h3 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--tx3); margin: 0 0 12px; }
.sec { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-head .h3 { margin: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .g2, .g3 { grid-template-columns: 1fr; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.sp { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card2); font-weight: 650; font-size: 14px; transition: transform .1s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--tx3); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.lg { padding: 15px 22px; font-size: 16px; border-radius: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.icon-btn { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; color: var(--tx2); }
.icon-btn:hover { color: var(--tx); border-color: var(--line2); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.link { background: none; border: 0; color: var(--tx2); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link:hover { color: var(--tx); }

.inp, .sel, textarea.inp {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 11px;
  padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.inp:focus, .sel:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.inp.big { padding: 14px 16px; font-size: 17px; }
textarea.inp { resize: vertical; min-height: 64px; }
.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--tx2); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; color: var(--tx2); }
.pill svg { width: 14px; height: 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .02em; }

.progress { height: 8px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .6s cubic-bezier(.2, .8, .2, 1); }

.lvl-chip { font-family: var(--num); font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--acc-soft); color: var(--acc); }

/* ─────────── Hoje ─────────── */
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet .date { color: var(--tx3); font-weight: 600; font-size: 13px; }
.quote { margin-top: 6px; color: var(--tx2); font-size: 15px; max-width: 640px; }

.hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 26px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--wc, var(--acc)) 28%, transparent) 0%, transparent 55%), var(--card);
  border: 1px solid color-mix(in srgb, var(--wc, var(--acc)) 30%, var(--line));
}
.hero::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%;
  border: 38px solid color-mix(in srgb, var(--wc, var(--acc)) 10%, transparent); pointer-events: none;
}
.hero .kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wc, var(--acc)); }
.hero .title { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.hero .focus { color: var(--tx2); font-size: 15px; }
.hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 18px; }
.hero .ex-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-bottom: 20px; position: relative; z-index: 1; }
.hero .ex-mini { background: rgba(0, 0, 0, .25); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.hero .ex-mini b { display: block; font-size: 14px; }
.hero .ex-mini span { font-size: 12px; color: var(--tx3); }
.hero .actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .btn.primary { background: var(--wc, var(--acc)); border-color: var(--wc, var(--acc)); color: #0b0d10; }
.hero.resting { --wc: var(--violet); }
.hero.done-today { --wc: var(--acc); }

.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.wd { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; position: relative; cursor: default; }
.wd .d { font-size: 11px; color: var(--tx3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.wd .n { font-family: var(--num); font-size: 20px; font-weight: 700; margin: 2px 0 6px; }
.wd .dot { width: 30px; height: 30px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center; font-size: 10px; font-weight: 800; border: 2px dashed var(--line2); color: var(--tx3); }
.wd .dot svg { width: 16px; height: 16px; }
.wd.today { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.wd.planned .dot { border: 2px solid var(--wc); color: var(--wc); border-style: solid; }
.wd.done .dot { background: var(--acc); border: 0; color: var(--acc-ink); }
.wd.missed .dot { border-color: var(--red); color: var(--red); border-style: solid; opacity: .7; }
.wd .lbl2 { font-size: 10px; color: var(--tx3); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 520px) { .wd { padding: 8px 2px; } .wd .n { font-size: 16px; } .wd .dot { width: 24px; height: 24px; } .wd .lbl2 { display: none; } }

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .k { font-size: 12px; font-weight: 600; color: var(--tx3); display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 15px; height: 15px; }
.stat .v { font-family: var(--num); font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .v small { font-size: 15px; color: var(--tx3); font-weight: 500; }
.stat .s { font-size: 12px; color: var(--tx2); }
.stat.fire .k { color: var(--orange); }

.ring-wrap { position: relative; width: 132px; height: 132px; flex: none; }
.ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-wrap .c { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-wrap .c b { font-family: var(--num); font-size: 30px; display: block; line-height: 1; }
.ring-wrap .c span { font-size: 11px; color: var(--tx3); }

.water { display: flex; align-items: center; gap: 16px; }
.water-glass { width: 58px; height: 76px; border: 2px solid var(--line2); border-top: 0; border-radius: 0 0 14px 14px; position: relative; overflow: hidden; flex: none; }
.water-glass i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #7cc8ff, var(--water)); transition: height .6s cubic-bezier(.2, .8, .2, 1); }
.water-glass i::before { content: ''; position: absolute; left: -20%; right: -20%; top: -6px; height: 12px; background: #7cc8ff; border-radius: 50%; opacity: .7; }

.meal-mini { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.meal-mini:last-child { border-bottom: 0; }
.meal-mini .slot { font-size: 12px; font-weight: 700; color: var(--tx3); width: 118px; flex: none; padding-top: 2px; }
.meal-mini .txt { flex: 1; font-size: 14px; white-space: pre-line; }
.meal-mini .txt.none { color: var(--tx3); font-style: italic; }
.chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line2); background: none; display: grid; place-items: center; flex: none; color: transparent; transition: all .15s; padding: 0; }
.chk svg { width: 14px; height: 14px; }
.chk.on { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }

/* ─────────── Treinos ─────────── */
.sched { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.sched-day { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 10px; border-top: 3px solid var(--wc, var(--line2)); }
.sched-day .d { font-size: 12px; font-weight: 700; color: var(--tx2); margin-bottom: 8px; }
.sched-day select { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 9px; padding: 7px 6px; font-size: 13px; }
.sched-day.today { box-shadow: 0 0 0 2px var(--acc-soft); }
@media (max-width: 860px) { .sched { grid-template-columns: repeat(2, 1fr); } }

.wk { border-radius: var(--r); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.wk-head { padding: 16px 18px; display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, color-mix(in srgb, var(--wc) 14%, transparent), transparent 60%); }
.wk-badge { width: 44px; height: 44px; border-radius: 13px; background: var(--wc); color: #0b0d10; display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: 17px; flex: none; }
.wk-head .t { font-weight: 800; font-size: 17px; }
.wk-head .f { font-size: 13px; color: var(--tx2); }
.ex-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.ex-row:last-child { border-bottom: 0; }
.ex-row .n { font-weight: 650; }
.ex-row .m { font-size: 12px; color: var(--tx3); }
.ex-row .spec { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.ex-row .spec .pill { padding: 2px 8px; font-size: 11px; }
.ex-tools { display: flex; gap: 4px; opacity: .55; transition: opacity .15s; }
.ex-row:hover .ex-tools { opacity: 1; }
@media (hover: none) { .ex-tools { opacity: 1; } }
.wk-foot { padding: 12px 18px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ─────────── Modo treino ─────────── */
#overlay:empty { display: none; }
.modal-bg { position: fixed; inset: 0; background: rgba(4, 6, 8, .7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); animation: pop .25s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; }
.swatches button.on { border-color: var(--tx); }

.wm { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: auto; animation: fade .2s ease; }
.wm-top { position: sticky; top: 0; z-index: 3; padding: calc(env(safe-area-inset-top, 0px) + 14px) 18px 12px; background: rgba(11, 13, 16, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.wm-top .row { max-width: 760px; margin: 0 auto; }
.wm-title { font-weight: 800; font-size: 18px; }
.wm-sub { font-size: 12px; color: var(--tx3); font-family: var(--num); }
.wm-prog { max-width: 760px; margin: 10px auto 0; }
.wm-prog .progress > i { background: var(--wc); }
.wm-body { max-width: 760px; margin: 0 auto; padding: 18px 16px 160px; }
.wx { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 14px; overflow: hidden; transition: border-color .2s, opacity .2s; }
.wx.active { border-color: color-mix(in srgb, var(--wc) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--wc) 12%, transparent); }
.wx.done { opacity: .6; }
.wx-head { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.wx-idx { width: 32px; height: 32px; border-radius: 10px; background: var(--card2); display: grid; place-items: center; font-family: var(--num); font-weight: 700; font-size: 14px; color: var(--tx2); flex: none; }
.wx.done .wx-idx { background: var(--acc); color: var(--acc-ink); }
.wx-name { font-weight: 750; font-size: 16px; }
.wx-mach { font-size: 12px; color: var(--tx3); }
.wx-last { font-size: 12px; color: var(--tx2); padding: 0 16px 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wx-last .tip { color: var(--acc); font-weight: 600; }
.sets { padding: 0 12px 12px; }
.set { display: grid; grid-template-columns: 34px 1fr 1fr 48px; gap: 8px; align-items: center; padding: 5px 4px; border-radius: 12px; transition: background .2s; }
.set.head { font-size: 11px; font-weight: 700; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; padding-bottom: 0; }
.set .no { font-family: var(--num); font-weight: 700; color: var(--tx3); text-align: center; }
.set input { width: 100%; text-align: center; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 10px 4px; font-family: var(--num); font-size: 17px; font-weight: 600; outline: none; }
.set input:focus { border-color: var(--wc); }
.set .ok { width: 48px; height: 44px; border-radius: 12px; border: 2px solid var(--line2); background: none; display: grid; place-items: center; color: var(--tx3); transition: all .15s; }
.set .ok svg { width: 20px; height: 20px; }
.set.checked { background: color-mix(in srgb, var(--acc) 8%, transparent); }
.set.checked .ok { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); animation: tick .3s ease; }
.set.checked input { border-color: transparent; background: transparent; }
@keyframes tick { 50% { transform: scale(1.15); } }
.wx-extra { display: flex; gap: 6px; padding: 0 16px 14px; }

.rest {
  position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%) translateY(140%); z-index: 45;
  width: min(460px, calc(100% - 24px)); background: var(--card2); border: 1px solid var(--line2); border-radius: 22px;
  padding: 14px 16px; display: flex; align-items: center; gap: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .6);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.1);
}
.rest.show { transform: translateX(-50%) translateY(0); }
.rest .ring-wrap { width: 64px; height: 64px; }
.rest .ring-wrap .c b { font-size: 17px; }
.rest .t { font-weight: 700; }
.rest .s { font-size: 12px; color: var(--tx3); }
.rest.over { border-color: var(--acc); animation: pulse 1s ease infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--acc-soft), 0 20px 50px rgba(0, 0, 0, .6); } }

.finish-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; padding: 14px 16px calc(14px + var(--safe-b)); background: linear-gradient(180deg, transparent, var(--bg) 35%); }
.finish-bar .btn { max-width: 728px; margin: 0 auto; display: flex; }
.rest.show ~ .finish-bar { opacity: 0; pointer-events: none; }

.feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feel button { padding: 14px 8px; border-radius: 14px; border: 1px solid var(--line2); background: var(--bg2); font-weight: 700; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.feel button small { font-weight: 500; color: var(--tx3); font-size: 11px; }
.feel button.on { border-color: var(--acc); background: var(--acc-soft); color: var(--acc); }
.feel .bar { display: flex; gap: 3px; align-items: flex-end; height: 22px; }
.feel .bar i { width: 6px; border-radius: 2px; background: currentColor; opacity: .25; }
.feel .bar i.f { opacity: 1; }

.done-wrap { text-align: center; padding: 10px 0; }
.done-xp { font-family: var(--num); font-size: 54px; font-weight: 800; color: var(--acc); line-height: 1; letter-spacing: -.03em; }
.done-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0; }
.done-grid div { background: var(--bg2); border-radius: 12px; padding: 10px; }
.done-grid b { font-family: var(--num); font-size: 20px; display: block; }
.done-grid span { font-size: 11px; color: var(--tx3); }

/* ─────────── Alimentação ─────────── */
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.day-tabs::-webkit-scrollbar { display: none; }
.day-tab { flex: 1 0 auto; min-width: 62px; border: 1px solid var(--line); background: var(--card); border-radius: 13px; padding: 9px 12px; font-weight: 700; font-size: 13px; color: var(--tx2); position: relative; }
.day-tab.on { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.day-tab.today::after { content: ''; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.day-tab .k { display: block; font-size: 10px; font-weight: 600; opacity: .7; font-family: var(--num); }

.meal { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.meal-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.meal-h .t { font-weight: 750; }
.meal-h .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--card2); color: var(--tx2); font-family: var(--num); font-weight: 700; font-size: 12px; }
.meal textarea { background: transparent; border: 1px dashed var(--line2); min-height: 72px; }
.meal textarea:focus { border-style: solid; }
.macro { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.macro label { display: flex; align-items: center; gap: 6px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 0 10px; }
.macro label span { font-size: 11px; color: var(--tx3); font-weight: 700; }
.macro input { border: 0; background: none; outline: none; width: 100%; padding: 8px 0; font-family: var(--num); text-align: right; }
.saved-dot { font-size: 11px; color: var(--acc); opacity: 0; transition: opacity .3s; margin-left: auto; }
.saved-dot.show { opacity: 1; }

.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tot .row { justify-content: space-between; margin-bottom: 6px; font-size: 13px; }
.tot b { font-family: var(--num); font-size: 18px; }

/* ─────────── Progresso ─────────── */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 15px); grid-auto-columns: 15px; justify-content: start; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 15px; height: 15px; border-radius: 4px; background: var(--card2); display: block; }
.heat i.l1 { background: color-mix(in srgb, var(--acc) 45%, var(--card2)); }
.heat i.l2 { background: var(--acc); }
.heat i.fut { opacity: .25; }
.heat i.today { outline: 2px solid var(--tx2); outline-offset: 1px; }
.legend { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--tx3); margin-top: 8px; }
.legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--tx3); font-size: 11px; font-family: var(--num); }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .ln { fill: none; stroke: var(--acc); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.chart .ar { fill: url(#gArea); }
.chart circle { fill: var(--bg); stroke: var(--acc); stroke-width: 2; }
.chart .bar { fill: var(--acc); opacity: .85; }
.chart .bar.cur { opacity: 1; }
.empty { text-align: center; color: var(--tx3); padding: 30px 10px; font-size: 14px; }

.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.badge { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 12px; text-align: center; position: relative; }
.badge .ic { width: 46px; height: 46px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); color: var(--tx3); font-family: var(--num); font-weight: 800; font-size: 14px; }
.badge .ic svg { width: 22px; height: 22px; }
.badge b { font-size: 13px; display: block; }
.badge span { font-size: 11px; color: var(--tx3); }
.badge.got { border-color: color-mix(in srgb, var(--acc) 40%, var(--line)); }
.badge.got .ic { background: var(--acc); color: var(--acc-ink); box-shadow: 0 0 22px rgba(198, 244, 50, .35); }
.badge:not(.got) { opacity: .55; }

.hist { display: flex; flex-direction: column; }
.hist-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.hist-item:last-child { border-bottom: 0; }
.hist-item .b { width: 40px; height: 40px; border-radius: 12px; background: var(--wc, var(--card2)); color: #0b0d10; display: grid; place-items: center; font-family: var(--num); font-weight: 800; flex: none; }
.hist-item .t { font-weight: 650; }
.hist-item .s { font-size: 12px; color: var(--tx3); }
.hist-detail { font-size: 13px; color: var(--tx2); padding: 0 0 12px 52px; border-bottom: 1px solid var(--line); }
.hist-detail div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }

.lvl-card { display: flex; align-items: center; gap: 18px; }
.lvl-num { width: 72px; height: 72px; border-radius: 22px; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; font-family: var(--num); font-weight: 800; font-size: 30px; flex: none; transform: rotate(-4deg); box-shadow: 0 10px 30px rgba(198, 244, 50, .25); }

/* ─────────── Toast / loader / confetti ─────────── */
.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -140%); z-index: 90; background: var(--card2); border: 1px solid var(--line2); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: transform .3s cubic-bezier(.2, .9, .3, 1.1); max-width: calc(100% - 32px); }
.toast.show { transform: translate(-50%, 0); }
.toast.err { border-color: var(--red); color: var(--red); }
.loader { display: grid; place-items: center; height: 60vh; }
.loader div { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--acc); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; width: 100%; height: 100%; }

/* ─────────── Login ─────────── */
.login-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; position: relative; overflow: hidden; }
.login-bg span { position: fixed; border-radius: 50%; filter: blur(80px); opacity: .35; animation: float 14s ease-in-out infinite alternate; }
.login-bg span:nth-child(1) { width: 420px; height: 420px; background: var(--acc); top: -160px; left: -120px; opacity: .18; }
.login-bg span:nth-child(2) { width: 360px; height: 360px; background: var(--orange); bottom: -140px; right: -100px; animation-delay: -5s; opacity: .15; }
.login-bg span:nth-child(3) { width: 260px; height: 260px; background: var(--violet); top: 40%; left: 55%; animation-delay: -9s; opacity: .12; }
@keyframes float { to { transform: translate(40px, 30px) scale(1.1); } }
.login-card { position: relative; width: 100%; max-width: 400px; background: rgba(20, 24, 29, .86); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line2); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.login-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 12px; }
.login-title { font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.login-sub { font-size: 13px; color: var(--tx3); }
.login-form .btn { margin-top: 16px; }
.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--tx3); padding: 8px; }
.steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 12px; font-weight: 600; color: var(--tx3); }
.step { display: flex; align-items: center; gap: 7px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font-size: 11px; }
.step.on { color: var(--tx); }
.step.on i { background: var(--acc); color: var(--acc-ink); border-color: var(--acc); }
.step.done i { background: var(--acc-soft); color: var(--acc); border-color: transparent; }
.step-line { flex: 1; height: 1px; background: var(--line2); }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 8px; }
.otp input { width: 100%; aspect-ratio: 1 / 1.15; text-align: center; font-family: var(--num); font-size: 24px; font-weight: 700; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; outline: none; }
.otp input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.login-links { display: flex; justify-content: space-between; margin-top: 14px; }
.login-links form { margin: 0; }
.login-foot { position: fixed; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 12px; color: var(--tx3); margin: 0; }
.alert { padding: 11px 14px; border-radius: 12px; font-size: 13px; margin-bottom: 14px; border: 1px solid; }
.alert.err { background: rgba(255, 93, 108, .08); border-color: rgba(255, 93, 108, .35); color: #ff9aa4; }
.alert.ok { background: var(--acc-soft); border-color: rgba(198, 244, 50, .3); color: var(--acc); }
.alert.warn { background: rgba(255, 122, 69, .08); border-color: rgba(255, 122, 69, .35); color: #ffb08f; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.rest .sp { min-width: 0; }
.rest .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 420px) { .rest { gap: 10px; padding: 12px; } .rest .ring-wrap { width: 56px; height: 56px; } .rest .btn.sm { padding: 7px 8px; } }
