/* ETH CLUB APP · sistema visual ETH Nutrition
   Modo noche (azul oscuro, por defecto de la marca) y modo día (blanco).
   Verde neón solo para acciones, logros y avance. Texto sobre verde siempre en azul oscuro. */
:root {
  --bg: #0C172B; --surface: #14213A; --surface-2: #1A2A47; --line: #22304A;
  --ink: #FDFDFD; --text: #FDFDFD; --muted: #C9D3E6;
  --accent: #8CDA3F; --accent-ink: #0C172B; --accent-soft: rgba(140,218,63,.14); --accent-line: rgba(140,218,63,.38);
  --pauta: #FDFDFD; --pauta-soft: rgba(253,253,253,.10);
  --warn: #F5B547; --warn-soft: rgba(245,181,71,.16);
  --bad: #FF8A8A; --bad-soft: rgba(255,138,138,.14);
  --glow: rgba(140,218,63,.26);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 8px; --r-lg: 24px; --r-full: 999px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #FDFDFD; --surface: #FFFFFF; --surface-2: #F3F5F9; --line: #DCE1E9;
    --ink: #0C172B; --text: #212121; --muted: #4F5B76;
    --accent-soft: #E6F6D3; --accent-line: #8CDA3F;
    --pauta: #0C172B; --pauta-soft: #EEF1F5;
    --warn: #9A5B00; --warn-soft: #FFF1D6; --bad: #B42318; --bad-soft: #FDE7E5;
    --glow: rgba(140,218,63,.30);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #FDFDFD; --surface: #FFFFFF; --surface-2: #F3F5F9; --line: #DCE1E9;
  --ink: #0C172B; --text: #212121; --muted: #4F5B76;
  --accent-soft: #E6F6D3; --accent-line: #8CDA3F;
  --pauta: #0C172B; --pauta-soft: #EEF1F5;
  --warn: #9A5B00; --warn-soft: #FFF1D6; --bad: #B42318; --bad-soft: #FDE7E5;
  --glow: rgba(140,218,63,.30);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  padding-top: env(safe-area-inset-top, 0px);
}
h1, h2, h3 { color: var(--ink); margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.label { font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
[hidden] { display: none !important; }

/* Marca */
.logo { height: 28px; width: auto; display: block; }
.logo-claro { display: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logo-oscuro { display: none; } :root:not([data-theme="dark"]) .logo-claro { display: block; } }
:root[data-theme="light"] .logo-oscuro { display: none; }
:root[data-theme="light"] .logo-claro { display: block; }
.marca { display: flex; align-items: center; gap: 12px; }
.marca .app { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--ink); border-left: 1px solid var(--line); padding-left: 12px; white-space: nowrap; }
html, body { overflow-x: clip; }
.glow { position: absolute; top: -140px; left: 0; right: 0; height: 460px; pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, var(--glow), transparent 75%); }

/* Controles */
button, .btn { font: inherit; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 20px;
  border-radius: var(--r-full); border: 0; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn-primario { background: var(--accent); color: var(--accent-ink); }
.btn-primario:hover { filter: brightness(1.06); }
.btn-borde { background: transparent; color: var(--ink); border: 1.5px solid var(--accent); font-weight: 500; }
.btn-chico { min-height: 36px; padding: 6px 14px; font-size: 13px; }
.btn-icono { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.btn-icono svg { width: 20px; height: 20px; }
.btn:focus-visible, .btn-icono:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .6; cursor: wait; }
input, select { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; width: 100%; min-height: 48px; }
select { width: auto; min-height: 40px; padding: 8px 12px; }
label.campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Superficies */
.tarjeta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: var(--r-full); white-space: nowrap; border: 1px solid transparent; }
.chip-ok { color: var(--ink); background: var(--accent-soft); border-color: var(--accent-line); }
.chip-pauta { color: var(--ink); background: var(--pauta-soft); border-color: var(--line); }
.chip-warn { color: var(--warn); background: var(--warn-soft); }
.chip-bad { color: var(--bad); background: var(--bad-soft); }
.chip-neutro { color: var(--muted); background: var(--surface-2); }
.punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.punto-link { background: var(--accent); }
.punto-pauta { background: var(--pauta); }

.barra { height: 8px; background: var(--surface-2); border-radius: var(--r-full); overflow: hidden; }
.barra > span { display: block; height: 100%; background: var(--accent); border-radius: var(--r-full); }

.aviso { border-radius: var(--r-sm); padding: 12px 14px; font-size: 14px; background: var(--surface-2); }
.aviso-bad { background: var(--bad-soft); color: var(--bad); }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--r-full); font-size: 14px; font-weight: 500; z-index: 50; }

/* Tablas internas */
.tabla { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.vacio { padding: 20px; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .barra > span { transition: width .6s ease; }
  .fade { animation: fade .3s ease both; }
  @keyframes fade { from { opacity: .4; } to { opacity: 1; } }
}
