/* MR NUTRICIÓN — identidad visual (verde energía + lima sobre negro, a juego con el logo de img/logo-mark.svg). */
:root {
  --brand: #3be37f;          /* color principal (verde energía) */
  --brand-strong: #1fbf62;
  --brand-ink: #04140b;      /* texto sobre el color principal */
  --brand-soft: rgba(59, 227, 127, .12);
  --gold: #f5b83d;           /* récords y logros */
  --gold-soft: rgba(245, 184, 61, .14);
  --danger: #ff5d5d;
  --danger-soft: rgba(255, 93, 93, .12);
  --warn: #ffb547;
  --warn-soft: rgba(255, 181, 71, .13);
  --info: #5aa9ff;
  --info-soft: rgba(90, 169, 255, .13);

  --bg: #0b0d10;
  --bg-2: #111419;
  --surface: #161a20;
  --surface-2: #1d222a;
  --surface-3: #252b35;
  --line: #2a313c;
  --text: #f2f4f7;
  --text-2: #aab2bf;
  --text-3: #6f7987;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Arial Black", "Segoe UI Black", system-ui, sans-serif;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
svg:not(.chart) { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: 0 0 auto; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.45; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--text-2); }
.faint { color: var(--text-3); }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Estructura ---------- */
#app { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; background: rgba(11, 13, 16, .86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.04);
}
.topbar .logo { height: 30px; width: auto; }
.topbar .title { font-weight: 750; font-size: 1.05rem; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { margin-left: -6px; }
.main { padding: 16px 16px calc(var(--nav-h) + 28px + var(--safe-b)); max-width: 980px; margin: 0 auto; animation: fade .22s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-around;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: rgba(17, 20, 25, .94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line);
}
.bottomnav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font-size: .7rem; font-weight: 600; position: relative; transition: color .15s;
}
.bottomnav a svg { width: 23px; height: 23px; }
.bottomnav a.active { color: var(--brand); }
.bottomnav a.active::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.bottomnav .dot { position: absolute; top: 8px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--danger); color: #fff; font-size: .62rem; display: grid; place-items: center; padding: 0 4px; }

/* Escritorio: panel lateral del entrenador */
@media (max-width: 999px) { .bottomnav a.d-only { display: none; } }
@media (min-width: 1000px) {
  .bottomnav a.m-only { display: none; }
  body.trainer .bottomnav {
    top: 0; right: auto; width: 230px; height: 100dvh; flex-direction: column; justify-content: flex-start;
    padding: 84px 12px 20px; border-top: 0; border-right: 1px solid var(--line); gap: 4px;
  }
  body.trainer .bottomnav a { flex: 0 0 auto; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: .92rem; }
  body.trainer .bottomnav a.active { background: var(--brand-soft); }
  body.trainer .bottomnav a.active::before { display: none; }
  body.trainer .bottomnav .dot { position: static; margin-left: auto; }
  body.trainer .topbar { padding-left: 250px; }
  body.trainer .main { margin-left: 230px; max-width: 1100px; padding-bottom: 40px; padding-left: 32px; padding-right: 32px; }
}

/* ---------- Componentes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card.flat { background: var(--bg-2); }
.card.hero {
  background: radial-gradient(120% 140% at 100% 0%, rgba(59,227,127,.22), transparent 55%), linear-gradient(160deg, #1a2029, #12161b);
  border-color: rgba(59, 227, 127, .25);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 2px 10px; }
.section-title h2, .section-title h3 { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--text-3); }

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 720px) { .grid.auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 719px) { .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.hide { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer;
  background: var(--surface-3); color: var(--text); transition: transform .08s, background .15s, opacity .15s; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: var(--brand-strong); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .85rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.icon { width: 40px; min-height: 40px; padding: 0; border-radius: 12px; background: transparent; }
.btn.icon:hover { background: var(--surface-2); }
.btn.icon.small { width: 32px; min-height: 32px; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.chip.brand { background: var(--brand-soft); color: var(--brand); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.info { background: var(--info-soft); color: var(--info); }
button.chip { border: 0; cursor: pointer; font-family: inherit; }
button.chip.on { background: var(--brand); color: var(--brand-ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* Formularios */
label { display: block; font-size: .82rem; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
input, select, textarea {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--bg-2); color: var(--text); font: inherit; font-size: 16px; transition: border-color .15s;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--brand); }
input[type="range"] { padding: 0; min-height: 30px; accent-color: var(--brand); background: transparent; border: 0; }
.inline-input { min-height: 38px; padding: 6px 10px; border-radius: 10px; text-align: center; }
.check { display: flex; align-items: center; gap: 10px; font-size: .95rem; color: var(--text); font-weight: 500; cursor: pointer; }
.hint { font-size: .8rem; color: var(--text-3); margin-top: 4px; }
.form-grid { display: grid; gap: 0 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .form-grid { grid-template-columns: 1fr; } }

/* Pestañas */
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 14px; padding: 0 16px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button {
  flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line);
  font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer;
}
.tabs .active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.daypicker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.daypicker button {
  border: 1px solid var(--line); background: var(--surface); color: var(--text-2); border-radius: 12px; padding: 8px 0;
  font: inherit; font-weight: 750; font-size: .82rem; cursor: pointer; position: relative;
}
.daypicker button.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.daypicker button.has::after { content: ""; position: absolute; bottom: 4px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--brand); }
.daypicker button.active.has::after { background: var(--brand-ink); }
.daypicker button.today { border-color: var(--brand); }
.daypicker button.done { color: var(--brand); }

/* Listas */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); color: var(--text); cursor: pointer; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--surface-2); }
.list-item .meta { font-size: .8rem; color: var(--text-2); }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--surface-3); color: var(--brand); flex: 0 0 auto; }
.badge { min-width: 22px; height: 22px; border-radius: 11px; display: inline-grid; place-items: center; padding: 0 6px; font-size: .74rem; font-weight: 800; background: var(--danger); color: #fff; }

/* Estadísticas */
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; cursor: default; }
a.stat, button.stat { cursor: pointer; color: inherit; text-align: left; font: inherit; width: 100%; }
a.stat:hover, button.stat:hover { border-color: var(--brand); }
.stat .value { font-size: 1.7rem; font-weight: 850; letter-spacing: -.02em; line-height: 1.1; }
.stat .label { font-size: .78rem; color: var(--text-2); font-weight: 600; margin-top: 2px; }
.stat.warn .value { color: var(--warn); }
.stat.danger .value { color: var(--danger); }
.stat.brand .value { color: var(--brand); }
.stat.gold .value { color: var(--gold); }
.big-number { font-size: 2.4rem; font-weight: 850; letter-spacing: -.03em; line-height: 1; }
.unit { font-size: .9rem; color: var(--text-2); font-weight: 600; margin-left: 3px; }

.progress { height: 10px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand-strong), var(--brand)); border-radius: 6px; transition: width .5s ease; }
.macro-bars { display: grid; gap: 8px; }
.macro-bars .bar-row { display: grid; grid-template-columns: 80px 1fr auto; align-items: center; gap: 10px; font-size: .82rem; }

/* Ejercicios */
.exercise-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.exercise-card.done { border-color: rgba(59, 227, 127, .45); }
.exercise-card.skipped { border-color: rgba(255, 181, 71, .45); }
.exercise-card .head { display: flex; gap: 12px; padding: 14px; align-items: flex-start; }
.ex-thumb { width: 54px; height: 54px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; color: var(--brand); }
.ex-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ex-thumb svg { width: 28px; height: 28px; }
.group-tag { display: inline-grid; place-items: center; min-width: 28px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--info-soft); color: var(--info); font-weight: 800; font-size: .74rem; }
.set-table { width: 100%; border-collapse: collapse; }
.set-table th { font-size: .7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; padding: 6px 4px; text-align: center; }
.set-table td { padding: 5px 4px; text-align: center; border-top: 1px solid var(--line); }
.set-table td:first-child { color: var(--text-2); font-weight: 700; width: 36px; }
.set-table tr.ok td { background: rgba(59, 227, 127, .06); }
.set-table .prev { font-size: .8rem; color: var(--text-3); }
.set-check { width: 40px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-3); display: grid; place-items: center; cursor: pointer; margin: 0 auto; }
.set-check.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.set-check svg { width: 20px; height: 20px; }
.last-time { font-size: .82rem; background: var(--bg-2); border-radius: 10px; padding: 8px 10px; margin: 0 14px 10px; color: var(--text-2); }
.trend-up { color: var(--brand); font-weight: 800; }
.trend-down { color: var(--danger); font-weight: 800; }
.trend-eq { color: var(--text-2); font-weight: 800; }

.rest-timer {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 12px + var(--safe-b)); z-index: 45; display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px solid var(--brand); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); max-width: 560px; margin: 0 auto;
}
.rest-timer > svg { width: 30px; height: 30px; color: var(--brand); flex: 0 0 auto; }
.rest-timer .time { font-size: 1.6rem; font-weight: 850; font-variant-numeric: tabular-nums; color: var(--brand); }

/* Comidas */
.meal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.meal-card.done { border-color: rgba(59, 227, 127, .45); }
.meal-card .meal-head { display: flex; align-items: center; gap: 12px; padding: 14px; }
.meal-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.meal-icon svg { width: 22px; height: 22px; }
.food-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: .92rem; }
.food-row .qty { font-weight: 800; white-space: nowrap; }
.macro-line { display: flex; gap: 10px; flex-wrap: wrap; font-size: .76rem; color: var(--text-2); }
.macro-line b { color: var(--text); }
.opt-tabs { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; }

/* Mensajes */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
.bubble { max-width: 82%; padding: 10px 13px; border-radius: 16px; background: var(--surface-2); white-space: pre-wrap; word-wrap: break-word; font-size: .95rem; }
.bubble.me { align-self: flex-end; background: var(--brand); color: var(--brand-ink); border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble .time { display: block; font-size: .68rem; opacity: .65; margin-top: 4px; text-align: right; }
.bubble.kind-instruccion { background: var(--info-soft); color: var(--text); border: 1px solid rgba(90,169,255,.4); }
.bubble.kind-aviso_revision, .bubble.kind-revision { background: var(--gold-soft); color: var(--text); border: 1px solid rgba(245,184,61,.4); }
.bubble.kind-estado { background: var(--warn-soft); color: var(--text); border: 1px solid rgba(255,181,71,.35); }
.bubble .kind-label { display: block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 3px; opacity: .85; }
.bubble img { border-radius: 10px; margin-top: 4px; max-height: 260px; cursor: zoom-in; }
.composer {
  position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 35; display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px; background: rgba(11, 13, 16, .96); border-top: 1px solid var(--line);
}
.composer textarea { min-height: 44px; max-height: 140px; height: 44px; resize: none; padding: 10px 12px; }
@media (min-width: 1000px) { body.trainer .composer { left: 230px; bottom: 0; } }

/* Fotos */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid .ph { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; }
.photo-grid .ph span { position: absolute; left: 6px; bottom: 6px; font-size: .68rem; font-weight: 700; background: rgba(0,0,0,.6); padding: 2px 6px; border-radius: 6px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.compare figure { margin: 0; }
.compare img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 12px; background: var(--surface-2); }
.compare figcaption { text-align: center; font-size: .8rem; color: var(--text-2); margin-top: 4px; }
.slider-compare { position: relative; aspect-ratio: 3/4; border-radius: 14px; overflow: hidden; background: var(--surface-2); max-width: 420px; margin: 0 auto; touch-action: none; }
.slider-compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slider-compare .after { clip-path: inset(0 0 0 50%); }
.slider-compare .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: var(--brand); transform: translateX(-50%); }
.slider-compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 900; }
.photo-slot { aspect-ratio: 3/4; border: 2px dashed var(--line); border-radius: 14px; display: grid; place-items: center; text-align: center; color: var(--text-2); font-size: .82rem; cursor: pointer; overflow: hidden; position: relative; background: var(--bg-2); }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot svg { width: 28px; height: 28px; margin: 0 auto 4px; color: var(--brand); }

/* Gráficas */
.chart { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-label { fill: var(--text-2); font-size: 21px; }
.chart .line { fill: none; stroke: var(--brand); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.second { stroke: var(--info); }
.chart .area { fill: url(#chartFill); }
.chart .point { fill: var(--bg); stroke: var(--brand); stroke-width: 3.5; cursor: pointer; }
.chart .goal-line { stroke: var(--gold); stroke-dasharray: 5 5; stroke-width: 1.5; }
.chart .bar { fill: var(--brand); }
.chart .bar.low { fill: var(--surface-3); }
.chart-tip { font-size: .82rem; color: var(--text-2); min-height: 1.2em; margin-top: 6px; }
.empty { text-align: center; padding: 28px 16px; color: var(--text-2); }
.empty svg { width: 42px; height: 42px; color: var(--text-3); margin: 0 auto 8px; }

/* Ventanas */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .6); display: flex; align-items: flex-end; justify-content: center; animation: fadein .15s ease; }
@keyframes fadein { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 640px; max-height: 92dvh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px 22px 0 0; padding: 18px 16px calc(20px + var(--safe-b)); animation: up .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
@media (min-width: 720px) { .modal-backdrop { align-items: center; } .modal { border-radius: 22px; padding: 22px; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h2 { margin: 0; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.lightbox img { max-height: 80dvh; margin: 0 auto; border-radius: 12px; }

.toast-wrap { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 0; right: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 92%; background: var(--surface-3); border: 1px solid var(--line); color: var(--text); padding: 11px 16px; border-radius: 14px; box-shadow: var(--shadow); font-size: .92rem; font-weight: 600; animation: up .2s ease; }
.toast.ok { border-color: var(--brand); }
.toast.error { border-color: var(--danger); }

/* Acceso */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(90% 60% at 50% 0%, rgba(59,227,127,.18), transparent 70%), var(--bg); }
.auth .box { width: 100%; max-width: 400px; }
.auth .brand-logo { width: 320px; max-width: 100%; margin: 0 auto 26px; }
.auth .tagline { display: none; }
.privacy-text { white-space: pre-wrap; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; max-height: 45dvh; overflow-y: auto; font-size: .88rem; color: var(--text-2); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--text); font-size: .88rem; margin-bottom: 14px; }
.notice.info { background: var(--info-soft); }
.notice.brand { background: var(--brand-soft); }
.notice svg { width: 20px; height: 20px; flex: 0 0 auto; color: var(--warn); }
.notice.info svg { color: var(--info); }
.notice.brand svg { color: var(--brand); }

.skeleton { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--radius); height: 90px; margin-bottom: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 8px; border-bottom: 1px solid var(--line); }
table.data td { padding: 9px 8px; border-bottom: 1px solid var(--line); }
.delta-good { color: var(--brand); font-weight: 700; }
.delta-bad { color: var(--danger); font-weight: 700; }

.ring { --p: 0; width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-3) 0); }
.ring > div { width: 70px; height: 70px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 850; font-size: 1.05rem; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale button { min-height: 42px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); color: var(--text-2); font: inherit; font-weight: 800; cursor: pointer; }
.scale button.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.drag-row { display: flex; gap: 4px; flex-direction: column; }
.video-frame { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; margin-bottom: 12px; }
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
