:root {
  --bg: #f5f6f2;
  --surface: #ffffff;
  --surface-2: #eef1ea;
  --ink: #0b1510;
  --ink-2: #2b3a32;
  --muted: #66746c;
  --line: #e3e7df;
  --brand: #0d3b27;
  --brand-2: #14583a;
  --emerald: #10a36a;
  --lime: #c6f36b;
  --lime-2: #b2e34f;
  --lime-soft: #f0fbd9;
  --danger: #e2483d;
  --danger-soft: #fdecea;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(11, 21, 16, .04), 0 8px 24px -12px rgba(11, 21, 16, .12);
  --shadow-lg: 0 24px 60px -20px rgba(11, 21, 16, .35);
  --display: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; min-width: 0; padding-top: 28px; padding-bottom: 72px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0 0 .4em; color: var(--ink); letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: clamp(34px, 5.4vw, 60px); }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; }
p { margin: 0 0 1em; }
a { color: var(--brand-2); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
::selection { background: var(--lime); color: var(--ink); }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(245, 246, 242, .78); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid rgba(11, 21, 16, .06); }
.topbar-in { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { border-radius: 11px; }
.brand span { display: flex; flex-direction: column; line-height: 1.1; }
.brand strong { font-family: var(--display); font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand small { color: var(--emerald); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--ink); color: #fff; }
.who { display: flex; align-items: center; gap: 6px; margin-left: 6px; font-size: 0; }
.who select { appearance: none; -webkit-appearance: none; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230b1510' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--ink); border: 0; border-radius: 999px; padding: 8px 32px 8px 14px; font: 700 13px var(--sans); max-width: 210px; cursor: pointer; }
.burger { display: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px 0; border-radius: 2px; }
body.coach .only-student, body.student .only-coach { display: none; }

@media (max-width: 960px) {
  .burger { display: block; }
  .nav { display: none; position: absolute; top: 74px; left: 16px; right: 16px; flex-direction: column; align-items: stretch; padding: 8px; border-radius: 20px; box-shadow: var(--shadow-lg); }
  .nav.open { display: flex; }
  .nav a { border-radius: 14px; padding: 12px 14px; }
  .who { margin: 6px 0 0; font-size: 11px; color: var(--muted); flex-direction: column; align-items: stretch; }
  .who span { padding: 0 6px; }
  .who select { max-width: none; width: 100%; padding: 12px 14px; }
}
@media (min-width: 961px) { .who span { display: none; } }

/* ---------- Buttons, inputs ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; padding: 10px 18px; font: 600 14px var(--sans); cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--brand); box-shadow: 0 8px 20px -8px rgba(13, 59, 39, .6); }
.btn-gold { background: var(--lime); color: var(--ink); }
.btn-gold:hover { background: var(--lime-2); box-shadow: 0 8px 20px -8px rgba(150, 200, 40, .7); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; border-color: #f4c9c5; color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linklike { background: none; border: 0; color: var(--lime); text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
input, select, textarea { font: 14px var(--sans); padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); width: 100%; transition: border-color .15s, box-shadow .15s, background .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--emerald); background: #fff; box-shadow: 0 0 0 4px rgba(16, 163, 106, .15); }
textarea { resize: vertical; min-height: 90px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--emerald); }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.grid { display: grid; gap: 16px; }
.grid > *, .week > *, .hero > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
@media (max-width: 380px) { .grid-2 { grid-template-columns: 1fr; } }
.section { margin-top: 56px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.section-head p { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--emerald); margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(16, 163, 106, .15); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #e3f6ec; color: #0b7a4e; white-space: nowrap; }
.pill.gold { background: var(--lime-soft); color: #4d6b0e; }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.grey { background: var(--surface-2); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }

/* ---------- Demo banner ---------- */
.demo-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: var(--ink); color: #cfd8d2; border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; font-size: 14px; }
.demo-banner strong, .demo-banner b { color: #fff; }
.demo-banner em { color: var(--lime); font-style: normal; }
.demo-banner .btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.demo-banner .btn-primary { background: var(--lime); color: var(--ink); }
.demo-banner .btn-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); color: #fff; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; align-items: center; background: #07170f; color: #b8c7bf; border-radius: 32px; padding: 56px; overflow: hidden; position: relative; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 400px at 85% 10%, rgba(198, 243, 107, .22), transparent 60%), radial-gradient(700px 500px at 10% 110%, rgba(16, 163, 106, .35), transparent 60%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 75%); }
.hero .eyebrow { color: var(--lime); }
.hero .eyebrow::before { box-shadow: 0 0 0 4px rgba(198, 243, 107, .2); }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--lime), #5fe0a6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 18px; color: #a9bab1; max-width: 540px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn { padding: 13px 22px; font-size: 15px; }
.hero .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.16); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); }
.hero-art { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,.35)); }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 34px; max-width: 560px; }
.hero-stats div { display: flex; flex-direction: column; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 14px 16px; }
.hero-stats b { font-family: var(--display); font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.hero-stats span { font-size: 12px; color: #93a69c; }
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding: 32px 22px; border-radius: 24px; }
  .hero-art { max-width: 280px; margin: 0 auto; order: -1; }
}

.service { display: flex; flex-direction: column; gap: 8px; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: color-mix(in srgb, var(--c) 14%, white); margin-bottom: 4px; }
.service h3 { margin: 0; }
.service .price { font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -.03em; color: var(--ink); margin-top: auto; padding-top: 8px; }
.service .price small { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.service ul { list-style: none; margin: 0 0 6px; padding: 0; color: var(--ink-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.service li::before { content: "✓"; color: var(--emerald); font-weight: 800; margin-right: 8px; }

.about { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: center; padding: 32px; }
.avatar { width: 200px; height: 200px; border-radius: 32px; background: linear-gradient(145deg, var(--brand), #07170f); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 64px; color: var(--lime); letter-spacing: -.04em; box-shadow: var(--shadow-lg); transform: rotate(-3deg); }
@media (max-width: 700px) { .about { grid-template-columns: 1fr; text-align: center; padding: 24px; } .avatar { margin: 0 auto; width: 140px; height: 140px; font-size: 46px; } .about .eyebrow { justify-content: center; } }

.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 16px; text-align: left; }
.feature-list div { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; background: var(--bg); border-radius: 14px; padding: 14px; }
.feature-list i { font-style: normal; font-size: 20px; line-height: 1; }

/* ---------- Week calendar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.week-label { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -.02em; min-width: 200px; text-align: center; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 13px; font: 600 13px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); transition: background .15s; }
.chip:hover { background: var(--surface-2); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 170px; display: flex; flex-direction: column; gap: 8px; }
.day { scroll-margin-top: 84px; }
.day.today { border-color: var(--ink); box-shadow: 0 0 0 3px var(--lime); }
.day.past { opacity: .55; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; padding: 2px 4px; }
.day-head span { font-family: var(--display); font-weight: 800; font-size: 24px; letter-spacing: -.03em; color: var(--ink); }
.day.today .day-head span { background: var(--lime); border-radius: 10px; padding: 0 8px; }
.slots { display: flex; flex-direction: column; gap: 8px; }
.slot { background: color-mix(in srgb, var(--c) 7%, white); border: 1px solid color-mix(in srgb, var(--c) 18%, white); border-radius: 14px; padding: 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; transition: transform .15s, box-shadow .15s; }
.slot:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.slot .time { font-weight: 700; color: var(--c); font-variant-numeric: tabular-nums; }
.slot .title { font-weight: 700; line-height: 1.25; color: var(--ink); }
.slot .meta { color: var(--muted); font-size: 12px; }
.slot .seats { display: flex; gap: 3px; margin: 3px 0; }
.slot .seats i { flex: 1; max-width: 16px; height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--c) 18%, white); }
.slot .seats i.on { background: var(--c); }
.slot .btn { width: 100%; margin-top: 4px; }
.slot.mine { background: var(--lime-soft); border-color: var(--lime-2); }
.no-slots { color: var(--muted); font-size: 12px; text-align: center; margin: auto 0; }
@media (max-width: 1040px) {
  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .day-head { justify-content: flex-start; gap: 10px; }
  .day .slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
  .no-slots { text-align: left; }
}

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--bg); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.pos { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--surface-2); font-weight: 800; font-size: 13px; }
.pos.p1 { background: var(--lime); color: var(--ink); }
.pos.p2 { background: #dfe5e1; color: var(--ink); }
.pos.p3 { background: #f1dcc6; color: #7a4a1d; }
tr.me td { background: var(--lime-soft) !important; }

/* ---------- Liga ---------- */
.next-t { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: #07170f; color: #a9bab1; border-radius: 28px; padding: 32px; position: relative; overflow: hidden; isolation: isolate; }
.next-t::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 300px at 100% 0%, rgba(198, 243, 107, .2), transparent 60%), radial-gradient(500px 300px at 0% 100%, rgba(16, 163, 106, .3), transparent 60%); }
.next-t h2 { color: #fff; }
.next-t .eyebrow { color: var(--lime); }
.countdown { display: flex; gap: 8px; }
.countdown div { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 12px 14px; text-align: center; min-width: 72px; }
.countdown b { display: block; font-family: var(--display); font-weight: 800; font-size: 32px; color: var(--lime); line-height: 1; font-variant-numeric: tabular-nums; }
.countdown span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 720px) { .next-t { grid-template-columns: 1fr; padding: 24px; } .countdown div { min-width: 0; flex: 1; padding: 10px 6px; } .countdown b { font-size: 26px; } }
.t-card { display: flex; flex-direction: column; gap: 10px; }
.t-card .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.t-date { display: flex; gap: 14px; align-items: center; }
.t-date .cal { background: var(--ink); color: #fff; border-radius: 14px; text-align: center; padding: 8px 10px; min-width: 58px; }
.t-date .cal b { display: block; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1; }
.t-date .cal span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--lime); }
.bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--emerald), var(--lime)); border-radius: 4px; }
details.results { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
details.results summary { cursor: pointer; padding: 16px 20px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; list-style: none; }
details.results summary::-webkit-details-marker { display: none; }
details.results[open] summary { border-bottom: 1px solid var(--line); }
details.results .table-wrap { padding: 6px 20px 14px; }

/* ---------- Tablón ---------- */
.post { position: relative; padding-left: 26px; }
.post::before { content: ""; position: absolute; left: 0; top: 22px; bottom: 22px; width: 4px; border-radius: 0 4px 4px 0; background: var(--emerald); }
.post.pinned::before { background: var(--lime-2); }
.post h3 { margin-bottom: 6px; font-size: 20px; }
.post .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.post p { white-space: pre-line; margin: 0; color: var(--ink-2); }

/* ---------- Dashboard ---------- */
.profile { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; background: var(--ink); border-color: var(--ink); color: #b8c7bf; }
.profile h1 { color: #fff; font-size: clamp(28px, 4vw, 40px); }
.profile .eyebrow { color: var(--lime); }
.profile .kpi b { color: #fff; }
.profile .kpi span { color: #93a69c; }
.profile .kpi em { color: var(--lime); }
.profile .kpi { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; padding: 12px 16px; min-width: 120px; }
.initials { width: 68px; height: 68px; border-radius: 20px; background: var(--lime); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 24px; flex-shrink: 0; }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-family: var(--display); font-weight: 800; font-size: 32px; letter-spacing: -.03em; color: var(--ink); line-height: 1.1; order: 2; }
.kpi span { font-size: 12px; color: var(--muted); font-weight: 600; order: 1; }
.kpi em { font-style: normal; font-size: 12px; color: var(--emerald); font-weight: 600; order: 3; }
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 180px; }
.list-item .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.note { background: var(--bg); border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; font-size: 14px; color: var(--ink-2); }
.note small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.chart svg { width: 100%; height: auto; display: block; }
.notif { display: flex; gap: 10px; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread { font-weight: 600; }

.tabs { display: inline-flex; gap: 2px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 4px; margin-bottom: 22px; }
.tab { background: none; border: 0; padding: 9px 16px; font: 600 14px var(--sans); color: var(--muted); cursor: pointer; border-radius: 12px; display: inline-flex; gap: 6px; align-items: center; transition: background .15s, color .15s; }
.tab:hover { color: var(--ink); }
.tab.on { color: #fff; background: var(--ink); }
.badge { background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; padding: 1px 7px; }

/* ---------- Modal & toast ---------- */
dialog { border: 0; border-radius: 24px; padding: 0; width: min(580px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 40px); overflow: auto; overscroll-behavior: contain; }
dialog[open] { animation: pop .2s ease; }
dialog::backdrop { background: rgba(7, 23, 15, .5); backdrop-filter: blur(4px); }
#modal-body { padding: 26px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 10px; margin-bottom: 14px; }
.x { background: var(--surface-2); border: 0; width: 36px; height: 36px; border-radius: 12px; cursor: pointer; font-size: 20px; flex-shrink: 0; color: var(--ink); }
.x:hover { background: var(--line); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; width: min(440px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 13px 18px; border-radius: 16px; box-shadow: var(--shadow-lg); font-size: 14px; animation: up .25s ease; border-left: 4px solid var(--lime); }
.toast.warn { border-left-color: var(--danger); }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.footer { background: #07170f; color: #cfd8d2; padding: 30px 0; }
.footer .muted { color: #8ea398; }
.footer-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Phones ---------- */
.post .tools { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 640px) {
  main { padding-top: 16px; padding-bottom: 48px; }
  .section { margin-top: 36px; }
  .card { padding: 16px; border-radius: 18px; }
  input, select, textarea { font-size: 16px; } /* stops iOS zooming into fields */
  .hide-sm { display: none !important; }
  .demo-banner { font-size: 13px; padding: 12px 14px; gap: 10px; border-radius: 16px; }
  .demo-banner .btns { margin-left: 0; width: 100%; }
  .demo-banner .btns .btn { flex: 1; }
  .demo-banner { position: relative; padding-right: 48px; }
  .demo-banner .btns { margin-right: -34px; }
  .demo-banner .btns .btn[data-action="hide-banner"] { position: absolute; top: 10px; right: 10px; flex: none; width: 30px; height: 30px; padding: 0; }
  .hero-art { max-width: 200px; }
  td:last-child .btn { display: flex; width: 100%; }
  .section-head { align-items: stretch; }
  .section-head > .btn, .section-head > a.btn { width: 100%; }
  .section-head > div.head-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .section-head > div.head-actions > :first-child { grid-column: 1 / -1; }
  .toolbar { gap: 8px; }
  .toolbar .week-label { flex: 1; min-width: 0; font-size: 18px; }
  .toolbar > span[style*="margin-left:auto"] { display: none; }
  .toolbar > .btn-sm:not([data-d]) { flex: 1; }
  .chips { margin-left: 0 !important; flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; }
  .tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex-shrink: 0; padding: 9px 13px; }
  th, td { padding: 10px 6px; }
  td .pill { white-space: normal; text-align: center; }
  td .btn { padding: 6px 10px; margin: 2px 0; }
  .list-item .actions { width: 100%; }
  .list-item .actions .btn { flex: 1; }
  .hero h1 { font-size: 36px; }
  .hero p.lead { font-size: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .hero .cta .btn { flex: 1; }
  .profile { gap: 14px; }
  .profile > div:nth-child(2) { flex-basis: calc(100% - 90px); }
  .profile .kpi { flex: 1 1 calc(50% - 7px); min-width: 0; }
  .t-card .row > span[style] { display: none; }
  .t-card .row .btn { width: 100%; }
  .post { padding-left: 20px; }
  .post .tools { margin-left: 0; width: 100%; }
  .post .tools .btn { flex: 1; }
  .modal-head h2 { font-size: 22px; }
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 92dvh; }
  #modal-body { padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); }
  .form-actions .btn { flex: 1; }
  .form-actions > span { width: 100%; }
  #toasts { bottom: calc(14px + env(safe-area-inset-bottom)); }
  .footer-in { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
