/* Team Gio Fitness · estilo minimalista. Colores de marca: negro, blanco y cian (#11bddf). */
:root {
  color-scheme: dark;
  --bg: #0a0a0b;
  --card: #131315;
  --card2: #1b1b1e;
  --line: #242428;
  --line2: #303035;
  --text: #f4f4f5;
  --muted: #8d8d95;
  --accent: #11bddf;
  --accent-ink: #021216;
  --accent-soft: rgba(17, 189, 223, 0.12);
  --ok: #34d399;
  --warn: #f5a524;
  --bad: #f05252;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 15px; line-height: 1.5; letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
#app { max-width: 540px; margin: 0 auto; padding: 20px 16px 104px; }

/* Sin flechitas en los campos numéricos */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Tipografía */
h1 { font-size: 28px; line-height: 1.15; margin: 10px 0 6px; font-weight: 700; letter-spacing: -0.03em; }
h1.display { font-size: 34px; line-height: 1.1; margin-top: 24px; }
h2 { font-size: 12px; margin: 32px 0 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
h3 { font-size: 15px; margin: 0 0 4px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
p { margin: 6px 0; }
.muted { color: var(--muted); font-size: 14px; }
.hl { color: var(--accent); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .card:hover, .nav a:hover { text-decoration: none; }

/* Marca */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.16em; font-size: 11px; color: var(--text); text-transform: uppercase; }
.brand img { height: 18px; width: auto; }
.brand b { color: var(--muted); font-weight: 500; }

/* Portada */
.hero { position: relative; margin: -20px -16px 0; height: 440px; overflow: hidden; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; display: block; filter: saturate(0.9); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(10,10,11,0.1) 30%, var(--bg) 100%); }
.hero-text { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; display: flex; justify-content: center; }
.hero-logo { width: 52%; max-width: 230px; filter: drop-shadow(0 2px 16px rgba(0,0,0,.5)); }

/* Tarjetas y estructura */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 10px 0; }
a.card { transition: border-color .15s ease; }
a.card:hover { border-color: var(--line2); }
.card.accent { border-color: rgba(17, 189, 223, 0.45); background: linear-gradient(180deg, rgba(17,189,223,0.06), transparent 60%), var(--card); }
.card.warn { border-color: rgba(245, 165, 36, 0.45); }
.card.bad { border-color: rgba(240, 82, 82, 0.5); }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat { background: var(--card2); border-radius: 10px; padding: 12px 6px; text-align: center; }
.stat b { display: block; font-size: 17px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }

/* Iconos de línea */
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ic-sm { width: 14px; height: 14px; }
.ic-muted { color: var(--muted); }
.ic-accent { color: var(--accent); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 12px; padding: 13px 18px; min-height: 48px;
  font: inherit; font-weight: 600; letter-spacing: -0.01em;
  background: var(--accent); color: var(--accent-ink); cursor: pointer; width: 100%;
  transition: filter .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn.ghost:hover { background: var(--card2); filter: none; }
.btn.small { padding: 7px 12px; min-height: 0; font-size: 13px; width: auto; border-radius: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Chips, opciones y etiquetas */
.chip { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; transition: all .15s ease; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--card2); color: var(--muted); letter-spacing: 0.01em; }
.badge.y { background: var(--accent-soft); color: var(--accent); }
.badge.g { background: rgba(52, 211, 153, 0.12); color: var(--ok); }

/* Formularios */
.fs { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs legend { padding: 0; }
label, .fs legend { display: block; font-weight: 500; margin: 18px 0 8px; font-size: 14px; color: var(--text); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 2px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line2);
  background: var(--card); color: var(--text); font: inherit; transition: border-color .15s ease;
}
input::placeholder, textarea::placeholder { color: #5d5d64; }
textarea { min-height: 76px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts input { position: absolute; opacity: 0; pointer-events: none; }
.opts label { margin: 0; font-weight: 400; }
.opts span { display: inline-block; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line2); background: transparent; cursor: pointer; font-size: 14px; transition: all .15s ease; }
.opts span:hover { border-color: var(--muted); }
.opts input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.opts input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--muted); }
.check input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

.progress { height: 3px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 14px 0 18px; }
.progress div { height: 100%; background: var(--accent); }

/* Entreno */
.ex { border-top: 1px solid var(--line); padding: 16px 0; }
.ex:first-child { border-top: 0; padding-top: 4px; }
.ex .meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ex .note { font-size: 13px; color: var(--muted); margin-top: 4px; }
.sets { display: grid; grid-template-columns: 62px 1fr 1fr; gap: 6px; margin-top: 10px; align-items: center; }
.sets input { padding: 9px; text-align: center; font-variant-numeric: tabular-nums; }
.sets .h { font-size: 11px; color: var(--muted); text-align: center; letter-spacing: 0.04em; line-height: 1.2; }
.sets .h small { display: block; font-size: 10px; color: var(--accent); white-space: nowrap; }
.howto { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.howto summary { font-size: 13px; color: var(--accent); font-weight: 500; list-style: none; display: flex; align-items: center; gap: 6px; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.howto[open] summary::after { transform: rotate(-135deg); }
.howto ol { margin: 10px 0 4px; padding-left: 18px; font-size: 13.5px; color: #d6d6da; }
.howto li { margin: 5px 0; padding-left: 2px; }
.howto .avoid { font-size: 13px; color: var(--warn); margin: 8px 0 2px; }
.tip { font-size: 13px; color: var(--accent); margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); }
.tip.nuevo { color: var(--muted); background: var(--card2); }
.tip.bajar { color: var(--warn); background: rgba(245, 165, 36, 0.1); }
.lastline { font-size: 13px; margin-top: 8px; font-variant-numeric: tabular-nums; }

/* Dieta */
table.foods { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 4px; }
table.foods td { padding: 9px 0; border-bottom: 1px solid var(--line); }
table.foods td.g { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
table.foods tr:last-child td { border-bottom: 0; }
.macro { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

ul.clean { padding-left: 18px; margin: 6px 0; }
ul.clean li { margin: 6px 0; }
details > summary { cursor: pointer; font-weight: 500; }

.change { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.change:first-child { border-top: 0; }
.change .badge { flex: none; align-self: flex-start; }

/* Fotos */
.photos3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-slot { position: relative; aspect-ratio: 3 / 4; border: 1px dashed var(--line2); border-radius: 12px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; font-size: 12px; color: var(--muted); cursor: pointer; margin: 0; font-weight: 500; }
.photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot input { position: absolute; opacity: 0; pointer-events: none; }
.photo-slot.done { border-style: solid; border-color: var(--line2); }
.photo-slot span { position: relative; z-index: 1; padding: 4px; display: inline-flex; align-items: center; gap: 4px; }
.photo-slot.done span { position: absolute; bottom: 6px; left: 6px; right: 6px; justify-content: center; background: rgba(10,10,11,.7); backdrop-filter: blur(6px); border-radius: 8px; color: #fff; }

/* Peso */
.weights { padding: 0; margin: 0; }
.weights li { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); list-style: none; font-size: 14px; font-variant-numeric: tabular-nums; }
.weights li:last-child { border-bottom: 0; }
.linkish { background: none; border: 0; color: var(--text); font: inherit; padding: 0; cursor: pointer; }
.linkish:hover { color: var(--accent); }
svg.chart { width: 100%; height: 160px; display: block; margin-top: 6px; }

/* Menú inferior */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: rgba(10,10,11,.88); border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.nav[hidden] { display: none; }
.nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--muted); padding: 6px 4px; border-radius: 10px; min-width: 60px; letter-spacing: 0.01em; }
.nav a svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav a.on { color: var(--accent); }

.footer { text-align: center; margin: 32px 0 8px; font-size: 12px; }
