/* Synergy App — prototipo · sistema visual heredado de synergy-web */
:root {
  --bg: #0A0A0A;
  --surface: #141414;
  --surface-2: #1D1D1B;
  --surface-3: #262624;
  --text: #F5F5F2;
  --muted: #A8A8A0;
  --dim: #6E6E68;
  --lime: #9AD53F;
  --lime-bright: #C0F06A;
  --lime-deep: #6F9A34;
  --amber: #C9A86A;
  --red: #E2574A;
  --line: rgba(245, 245, 242, 0.09);
  --line-2: rgba(245, 245, 242, 0.16);
  --display: 'Archivo', 'Arial Black', sans-serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'Chivo Mono', 'Courier New', monospace;
  --r: 18px;
  --r-sm: 12px;
  --tab-h: 62px;
  --gutter: 20px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: 1.1; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; border-radius: 6px; }

/* ---------- Device shell ---------- */
.device {
  position: relative;
  width: 100%; height: 100%;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.stage { position: relative; flex: 1; min-height: 0; }
@media (min-width: 640px) {
  body {
    display: grid; place-items: center;
    background:
      radial-gradient(60% 50% at 50% 40%, rgba(154, 213, 63, 0.07), transparent 70%),
      #050505;
  }
  .device {
    width: 400px;
    height: min(852px, calc(100vh - 40px));
    border-radius: 46px;
    border: 1px solid #2a2a28;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7), 0 0 0 8px #111, 0 0 0 9px #1c1c1c;
  }
}

/* ---------- Screens ---------- */
.screen {
  position: absolute; inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px);
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { display: none; }
.screen.no-tabs { padding-bottom: 28px; }
.screen.enter-fwd { animation: slideIn 0.36s var(--ease); }
.screen.enter-back { animation: slideBack 0.3s var(--ease); }
.screen.enter-tab { animation: fadeUp 0.28s var(--ease); }
.screen.enter-login { animation: fade 0.5s var(--ease); }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes slideBack { from { transform: translateX(-18px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeUp { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.pad { padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.section { padding: 22px var(--gutter) 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--display);
  font-variation-settings: 'wdth' 112;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-head a, .section-head button { font-family: var(--mono); font-size: 11px; color: var(--lime); letter-spacing: 0.06em; text-transform: uppercase; }

/* ---------- Top bars ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter) 6px;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; }
.brand .mark { width: 30px; color: var(--lime); }
.brand .word {
  font-family: var(--display);
  font-variation-settings: 'wdth' 122;
  font-weight: 800; font-size: 13px;
  letter-spacing: 0.16em; text-transform: uppercase;
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.iconbtn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform 0.2s var(--ease), color 0.2s;
}
.iconbtn:active { transform: scale(0.92); }
.iconbtn:hover { color: var(--text); }
.iconbtn svg { width: 18px; height: 18px; }
.iconbtn .dot {
  position: absolute; top: 9px; right: 10px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
}
.iconbtn { position: relative; }

.subbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.subbar h1 {
  flex: 1;
  font-family: var(--display);
  font-variation-settings: 'wdth' 112;
  font-weight: 700; font-size: 16px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.subbar .iconbtn { background: transparent; border-color: transparent; }

.greet { padding: 6px var(--gutter) 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.greet .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.greet h1 {
  font-family: var(--display);
  font-variation-settings: 'wdth' 115;
  font-weight: 800; font-size: 28px;
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.page-title {
  font-family: var(--display);
  font-variation-settings: 'wdth' 115;
  font-weight: 800; font-size: 26px;
  padding: 6px var(--gutter) 0;
}
.page-title small { display: block; font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }

/* ---------- Pills & chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: rgba(154, 213, 63, 0.14); color: var(--lime); }
.pill.warn { background: rgba(201, 168, 106, 0.16); color: var(--amber); }
.pill.bad { background: rgba(226, 87, 74, 0.16); color: var(--red); }
.pill.plain::before { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em;
  padding: 8px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2);
  color: var(--muted); white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip.on { background: var(--lime); color: var(--bg); border-color: var(--lime); font-weight: 500; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display);
  font-variation-settings: 'wdth' 108;
  font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  background: var(--lime); color: var(--bg);
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s, border-color 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn:hover { background: var(--lime-bright); box-shadow: 0 8px 26px rgba(154, 213, 63, 0.28); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: var(--surface); box-shadow: none; border-color: var(--text); }
.btn-soft { background: var(--surface-2); color: var(--text); }
.btn-soft:hover { background: var(--surface-3); box-shadow: none; }
.btn-danger { background: transparent; color: var(--red); border-color: rgba(226, 87, 74, 0.35); }
.btn-danger:hover { background: rgba(226, 87, 74, 0.1); box-shadow: none; }
.btn-sm { padding: 9px 14px; font-size: 11px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
}
.card.flat { background: transparent; }
.card h3 {
  font-family: var(--display);
  font-variation-settings: 'wdth' 112;
  font-weight: 700; font-size: 16px;
  letter-spacing: 0.01em;
}
.card .meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.tap { transition: transform 0.25s var(--ease), border-color 0.25s; cursor: pointer; }
.tap:active { transform: scale(0.985); }
.tap:hover { border-color: var(--line-2); }

/* Membership card — the hero object */
.mcard {
  position: relative;
  aspect-ratio: 1.586;
  border-radius: 22px;
  overflow: hidden;
  padding: 18px 20px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(154, 213, 63, 0.22), transparent 55%),
    linear-gradient(150deg, #1a1a19 0%, #0d0d0d 60%, #111 100%);
  border: 1px solid rgba(154, 213, 63, 0.28);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px rgba(154, 213, 63, 0.08);
  display: flex; flex-direction: column; justify-content: space-between;
  color: var(--text);
}
.mcard::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.05) 45%, transparent 60%);
  pointer-events: none;
}
.mcard .wm {
  position: absolute; right: -8%; bottom: -22%;
  width: 62%; color: var(--lime); opacity: 0.16;
  transform: rotate(-12deg);
  pointer-events: none;
}
.mcard-top { display: flex; align-items: center; justify-content: space-between; position: relative; }
.mcard-top .brand .mark { width: 26px; }
.mcard-top .brand .word { font-size: 11px; }
.mcard-plan { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.mcard-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; position: relative; }
.mcard-name { font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 700; font-size: 17px; letter-spacing: 0.02em; text-transform: uppercase; }
.mcard-id { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; color: var(--muted); margin-top: 4px; }
.mcard-since { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; margin-top: 8px; }
.qr {
  width: 78px; height: 78px; flex: none;
  background: #fff; border-radius: 10px; padding: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.qr svg { width: 100%; height: 100%; }
.qr-big { width: 220px; height: 220px; padding: 14px; border-radius: 18px; margin: 0 auto; }

/* Quick actions */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px var(--gutter) 0; }
.quick button {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 4px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted);
  transition: transform 0.25s var(--ease), border-color 0.2s, color 0.2s;
  text-align: center; line-height: 1.25;
}
.quick button:active { transform: scale(0.95); }
.quick button:hover { border-color: var(--line-2); color: var(--text); }
.quick .ic {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(154, 213, 63, 0.12); color: var(--lime);
}
.quick .ic svg { width: 19px; height: 19px; }

/* Next class */
.next {
  display: grid; grid-template-columns: 92px 1fr; gap: 0;
  overflow: hidden; padding: 0;
}
.next img { width: 92px; height: 100%; object-fit: cover; min-height: 108px; }
.next .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 5px; }
.next .when { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.next h3 { font-size: 17px; }
.next .row-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.next .row-meta svg { width: 14px; height: 14px; }

/* Promo carousel */
.promos { display: flex; gap: 12px; overflow-x: auto; padding: 0 var(--gutter) 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promos::-webkit-scrollbar { display: none; }
.promo {
  position: relative; flex: 0 0 82%;
  aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden;
  scroll-snap-align: start;
  background: var(--surface);
}
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, 0.05) 20%, rgba(10, 10, 10, 0.88) 100%); }
.promo .txt { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; }
.promo .kicker { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }
.promo h3 { font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 18px; margin-top: 4px; text-transform: uppercase; }
.promo p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.dots { display: flex; gap: 5px; justify-content: center; padding-top: 8px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--surface-3); }
.dots i.on { background: var(--lime); width: 16px; border-radius: 3px; }

/* ---------- Day selector & classes ---------- */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--gutter) 10px; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 54px; padding: 10px 0 9px;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted);
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s;
}
.day small { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.day b { font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 19px; color: var(--text); }
.day.on { background: var(--lime); border-color: var(--lime); color: rgba(10, 10, 10, 0.7); }
.day.on b { color: var(--bg); }
.day:active { transform: scale(0.94); }
.day .today { width: 4px; height: 4px; border-radius: 50%; background: var(--lime); margin-top: 2px; }
.day.on .today { background: var(--bg); }

.clase { display: grid; grid-template-columns: 58px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.clase .time { font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.02em; }
.clase .dur { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: 0.08em; margin-top: 3px; }
.clase h3 { font-size: 15.5px; margin-bottom: 4px; }
.clase .coach { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.clase .coach .avatar { width: 20px; height: 20px; font-size: 8px; }
.clase .place { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--dim); margin-top: 5px; text-transform: uppercase; display: flex; gap: 10px; }
.clase .spots { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.clase .spots .n { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.clase .spots .n.full { color: var(--amber); }
.clase.booked { border-color: rgba(154, 213, 63, 0.4); }
.clase.past { opacity: 0.45; }
.bar { height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; width: 100%; }
.bar i { display: block; height: 100%; background: var(--lime); border-radius: 3px; transition: width 0.6s var(--ease); }
.bar i.hi { background: var(--amber); }
.bar i.max { background: var(--red); }
.spots .bar { width: 56px; }

.booking { display: flex; gap: 12px; align-items: center; padding: 12px 14px; }
.booking .date {
  flex: none; width: 50px; text-align: center;
  background: rgba(154, 213, 63, 0.12); border-radius: 12px; padding: 8px 0;
}
.booking .date small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--lime); }
.booking .date b { font-family: var(--display); font-variation-settings: 'wdth' 112; font-size: 18px; font-weight: 800; color: var(--lime); }
.booking .info { flex: 1; min-width: 0; }
.booking .info h3 { font-size: 14.5px; }
.booking .info p { font-family: var(--mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Hero image blocks on detail screens */
.hero-img { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, var(--bg) 100%); }
.detail-title { padding: 0 var(--gutter); margin-top: -40px; position: relative; }
.detail-title .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--lime); }
.detail-title h1 { font-family: var(--display); font-variation-settings: 'wdth' 115; font-weight: 800; font-size: 28px; margin-top: 4px; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 18px var(--gutter) 0; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.fact small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.fact b { display: block; font-family: var(--display); font-variation-settings: 'wdth' 110; font-weight: 700; font-size: 15px; margin-top: 4px; }
.prose { padding: 18px var(--gutter) 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.prose strong { color: var(--text); }

/* ---------- Rows & lists ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  width: 100%; text-align: left;
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r .btn-sm { padding: 7px 11px; font-size: 10px; letter-spacing: 0.08em; }
.row .s { font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r { text-align: right; flex: none; }
.chev { color: var(--dim); width: 18px; height: 18px; flex: none; }
.row .ic {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--surface-2); color: var(--lime);
}
.row .ic svg { width: 18px; height: 18px; }
.row .ic.mute { color: var(--muted); }
.row .ic.red { color: var(--red); background: rgba(226, 87, 74, 0.1); }
.card .list .row:first-child { padding-top: 4px; }
.card .list .row:last-child { padding-bottom: 4px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--surface-3); color: var(--text);
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.04em;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 76px; height: 76px; font-size: 22px; }
.amount { font-family: var(--mono); font-size: 14px; font-weight: 500; }
.amount.neg { color: var(--red); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-family: var(--mono); font-size: 13px; text-align: right; }
.kv .pill { font-size: 9.5px; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.field input, .search {
  width: 100%;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px;
  padding: 14px 16px; font-size: 15px; color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field input::placeholder, .search::placeholder { color: var(--dim); }
.field input:focus, .search:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px rgba(154, 213, 63, 0.15); }
.searchwrap { position: relative; padding: 4px var(--gutter) 10px; }
.searchwrap svg { position: absolute; left: calc(var(--gutter) + 14px); top: 50%; transform: translateY(-58%); width: 17px; height: 17px; color: var(--dim); pointer-events: none; }
.searchwrap .search { padding-left: 44px; }
.toggle {
  position: relative; width: 46px; height: 27px; border-radius: 999px; flex: none;
  background: var(--surface-3); transition: background 0.25s;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  transition: transform 0.25s var(--ease);
}
.toggle.on { background: var(--lime); }
.toggle.on::after { transform: translateX(19px); }
.seg { display: flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin: 0 var(--gutter); }
.seg button {
  flex: 1; padding: 9px 4px; border-radius: 999px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); transition: background 0.2s, color 0.2s;
}
.seg button.on { background: var(--surface-3); color: var(--text); }

/* Plan option cards */
.plan-opt { display: flex; align-items: center; gap: 14px; padding: 16px; }
.plan-opt .grow { flex: 1; }
.plan-opt h3 { font-size: 15px; }
.plan-opt .price { font-family: var(--display); font-variation-settings: 'wdth' 115; font-weight: 800; font-size: 20px; margin-top: 2px; }
.plan-opt .price small { font-family: var(--mono); font-weight: 400; font-size: 10px; color: var(--muted); letter-spacing: 0.06em; margin-left: 6px; }
.plan-opt .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); flex: none; display: grid; place-items: center; }
.plan-opt.on { border-color: var(--lime); background: rgba(154, 213, 63, 0.06); }
.plan-opt.on .radio { border-color: var(--lime); }
.plan-opt.on .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lime); }

/* ---------- Chart ---------- */
.chart { width: 100%; height: auto; margin-top: 10px; }
.chart text { font-family: var(--mono); font-size: 9px; fill: var(--dim); }
.chart rect { fill: var(--surface-3); }
.chart rect.on { fill: var(--lime); }
.chart rect.now { fill: var(--lime-bright); }
.stat-row { display: flex; gap: 8px; margin-top: 12px; }
.stat { flex: 1; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.stat small { display: block; font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.stat b { display: block; font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 18px; margin-top: 3px; }

/* ---------- Admin ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px var(--gutter) 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; position: relative; overflow: hidden; }
.kpi small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-family: var(--display); font-variation-settings: 'wdth' 118; font-weight: 800; font-size: 30px; margin-top: 8px; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-family: var(--mono); font-size: 10.5px; margin-top: 8px; color: var(--lime); display: flex; align-items: center; gap: 5px; }
.kpi .delta svg { width: 13px; height: 13px; flex: none; }
.kpi .delta.down { color: var(--amber); }
.kpi.lime { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.kpi.lime small, .kpi.lime .delta { color: rgba(10, 10, 10, 0.65); }
.kpi.wide { grid-column: 1 / -1; }
.occ { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.occ:last-child { border-bottom: 0; }
.occ .time { font-family: var(--mono); font-size: 12px; width: 42px; flex: none; color: var(--muted); }
.occ .name { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.occ .bar { width: 64px; flex: none; }
.occ .n { font-family: var(--mono); font-size: 11px; width: 44px; text-align: right; flex: none; color: var(--muted); }
.due { font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; padding: 5px 9px; border-radius: 999px; background: rgba(201, 168, 106, 0.16); color: var(--amber); white-space: nowrap; }
.due.soon { background: rgba(226, 87, 74, 0.16); color: var(--red); }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px var(--gutter) 0; }
.totals .fact b { font-size: 14px; font-family: var(--mono); font-weight: 500; }
.totals .fact.ok b { color: var(--lime); }
.totals .fact.warn b { color: var(--amber); }
.totals .fact.bad b { color: var(--red); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  background: rgba(12, 12, 12, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px 4px; border-radius: 14px;
  color: var(--dim);
  font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
  transition: color 0.2s, transform 0.25s var(--ease);
}
.tab svg { width: 22px; height: 22px; transition: transform 0.3s var(--ease); }
.tab.on { color: var(--lime); }
.tab.on svg { transform: translateY(-2px); }
.tab:active { transform: scale(0.94); }

/* ---------- Sheets & toasts ---------- */
.backdrop {
  position: absolute; inset: 0; z-index: 40;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  animation: fade 0.25s var(--ease);
}
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 41;
  background: var(--surface);
  border-radius: 26px 26px 0 0;
  border-top: 1px solid var(--line-2);
  padding: 10px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px));
  max-height: 86%;
  overflow-y: auto;
  animation: sheetUp 0.4s var(--ease);
}
.sheet.closing { animation: sheetDown 0.25s ease-in forwards; }
.backdrop.closing { animation: fadeOut 0.25s ease-in forwards; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }
@keyframes fadeOut { to { opacity: 0; } }
.handle { width: 40px; height: 4px; border-radius: 2px; background: var(--surface-3); margin: 4px auto 18px; }
.sheet h2 { font-family: var(--display); font-variation-settings: 'wdth' 112; font-weight: 800; font-size: 20px; text-transform: uppercase; }
.sheet .sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.sheet .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.summary { margin-top: 16px; background: var(--surface-2); border-radius: 14px; padding: 4px 14px; }
.toast {
  position: absolute; left: 50%; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 18px);
  transform: translateX(-50%);
  z-index: 60;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--text); color: var(--bg);
  padding: 12px 16px; border-radius: 999px;
  font-weight: 600; font-size: 13.5px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.4s var(--ease);
  white-space: nowrap; max-width: 90%;
}
.toast svg { width: 18px; height: 18px; color: var(--lime-deep); }
.toast.out { animation: toastOut 0.3s ease-in forwards; }
@keyframes toastIn { from { transform: translate(-50%, 16px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes toastOut { to { transform: translate(-50%, 10px); opacity: 0; } }
.success {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 0 4px;
}
.success .ring {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(154, 213, 63, 0.14); color: var(--lime);
  display: grid; place-items: center;
  animation: pop 0.5s var(--ease);
}
.success .ring svg { width: 34px; height: 34px; }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Login ---------- */
.login {
  position: absolute; inset: 0; overflow-y: auto;
  display: flex; flex-direction: column;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom, 0px));
}
.login-bg { position: absolute; inset: 0; z-index: 0; }
.login-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.login-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.85) 42%, var(--bg) 62%); }
.login-brand { position: relative; z-index: 1; padding: calc(64px + env(safe-area-inset-top, 0px)) var(--gutter) 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.login-brand .mark { width: 86px; color: var(--lime); filter: drop-shadow(0 0 24px rgba(154, 213, 63, 0.35)); }
.login-brand .word { font-family: var(--display); font-variation-settings: 'wdth' 122; font-weight: 800; font-size: 22px; letter-spacing: 0.2em; text-transform: uppercase; }
.login-brand .tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--lime); }
.login-form { position: relative; z-index: 1; padding: 40px var(--gutter) 0; display: flex; flex-direction: column; gap: 14px; }
.login-form .forgot { text-align: right; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); margin-top: -2px; }
.login-form .forgot:hover { color: var(--lime); }
.divider { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); margin: 10px 0 2px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.demo-note { text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-top: 18px; }

/* Demo switcher pill */
.demo-opt { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
.demo-opt:last-child { border-bottom: 0; }
.demo-opt .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--lime); flex: none; }
.demo-opt .ic svg { width: 19px; height: 19px; }
.demo-opt b { display: block; font-size: 15px; }
.demo-opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.demo-opt.on .ic { background: var(--lime); color: var(--bg); }

.empty { text-align: center; color: var(--muted); padding: 30px 20px; font-size: 14px; }
.empty svg { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--dim); }

@media (prefers-reduced-motion: reduce) {
  .screen, .sheet, .backdrop, .toast, .success .ring { animation-duration: 0.01s !important; }
  .bar i { transition: none; }
}
