/* ============================================================
   928 HYBRID CLUB — APP PROTOTYPE
   Premium Dark Athletic — shares the website's design system
============================================================ */

/* ── VARIABLES ─────────────────────────────────────────── */
:root {
  --black:        #050505;
  --dark:         #111111;
  --dark-mid:     #1a1a1a;
  --card-bg:      #161616;
  --card-bg-2:    #1c1c1c;
  --border:       #2a2a2a;
  --border-light: #3a3a3a;
  --white:        #ffffff;
  --white-soft:   #f0f0f0;
  --grey:         #8a8a8a;
  --grey-light:   #d9d9d9;
  --accent-green: #25d366;
  --accent-red:   #d93a3a;

  --font-display: 'Bebas Neue', 'Anton', sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --space-2xs: 0.375rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --transition:      0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

  --tabbar-h: 76px;
  --topbar-h: 56px;
}

/* ── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
ul[role="list"], ul.unstyled { list-style: none; }
svg.icon { width: 22px; height: 22px; flex-shrink: 0; display: block; color: currentColor; }
::selection { background: var(--white); color: var(--black); }
:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

/* ── PAGE BACKDROP + PHONE FRAME ───────────────────────── */
.backdrop {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255,255,255,0.05), transparent 60%),
    var(--black);
}

.phone {
  position: relative;
  width: 393px;
  height: 852px;
  max-height: calc(100svh - 5rem);
  background: var(--black);
  border-radius: 52px;
  border: 10px solid #0a0a0a;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.06),
    0 40px 90px rgba(0,0,0,0.7),
    0 0 120px rgba(255,255,255,0.03);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* Reserve a dedicated status-bar zone so the notch never overlaps app content */
  padding-top: 44px;
}
.phone::before {
  /* Dynamic-island style notch — lives entirely inside the reserved zone above */
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 26px;
  background: #0a0a0a;
  border-radius: 20px;
  z-index: 5;
}
.phone__home-indicator {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.35);
  z-index: 5;
  pointer-events: none;
}

.viewport {
  position: relative;
  flex: 1;
  overflow: hidden;
}

/* Below phone width, the chrome disappears — real device = real app.
   Use the real device's own safe-area inset instead of the fake notch spacer. */
@media (max-width: 460px), (max-height: 760px) and (max-width: 700px) {
  .backdrop { padding: 0; }
  .phone {
    width: 100vw;
    height: 100svh;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding-top: env(safe-area-inset-top, 0px);
  }
  .phone::before, .phone__home-indicator { display: none; }
}

/* ── SCREEN SYSTEM ──────────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  background: var(--black);
  opacity: 0;
}
.screen.is-active {
  display: flex;
  opacity: 1;
}
.screen__content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-md) var(--space-md) var(--space-2xl);
}
.screen__content.no-pad { padding: 0; }
.screen__content::-webkit-scrollbar { width: 0; height: 0; }

/* Full-bleed screens (auth, splash) don't reserve tab-bar space */
.screen--auth .screen__content,
.screen--splash .screen__content {
  padding-bottom: var(--space-2xl);
}

/* ── TYPOGRAPHY ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.03em; line-height: 1; color: var(--white); }
.display-hero { font-size: 2.75rem; }
.display-title { font-size: 1.9rem; }
.display-subtitle { font-size: 1.35rem; }
.display-stat { font-size: 2.1rem; letter-spacing: 0.01em; }
.kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grey);
}
.body-lg { font-size: 1rem; color: var(--grey-light); line-height: 1.6; }
.body-base { font-size: 0.88rem; color: var(--grey-light); line-height: 1.55; }
.body-sm { font-size: 0.78rem; color: var(--grey); line-height: 1.5; }
.text-white { color: var(--white) !important; }
.text-grey { color: var(--grey) !important; }
.text-green { color: var(--accent-green) !important; }
.text-red { color: var(--accent-red) !important; }
.text-center { text-align: center; }

/* ── TOP APP BAR ────────────────────────────────────────── */
.topbar {
  flex-shrink: 0;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-inline: var(--space-md);
  border-bottom: 1px solid var(--border);
  background: var(--black);
}
.topbar__back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--white);
  flex-shrink: 0;
  background: transparent;
  border: none;
}
.topbar__back:active { background: rgba(255,255,255,0.08); }
.topbar__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__action {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--grey-light);
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.topbar__action:active { background: rgba(255,255,255,0.08); }

/* ── BOTTOM TAB BAR ─────────────────────────────────────── */
.tabbar {
  flex-shrink: 0;
  height: var(--tabbar-h);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  padding-top: 8px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: rgba(5,5,5,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--grey);
  padding: 4px 8px;
  min-width: 56px;
}
.tabbar__item svg.icon { width: 22px; height: 22px; }
.tabbar__item span { font-size: 0.62rem; font-weight: 600; letter-spacing: 0.03em; }
.tabbar__item.is-active { color: var(--white); }
.tabbar__item:active { opacity: 0.7; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.95em 1.6em;
  border-radius: var(--radius-sm);
  border: none;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), opacity var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--white); color: var(--black); }
.btn--ghost { background: transparent; color: var(--white); border: 1px solid var(--border-light); }
.btn--danger { background: transparent; color: var(--accent-red); border: 1px solid rgba(217,58,58,0.4); }
.btn--full { width: 100%; }
.btn--sm { padding: 0.65em 1.2em; font-size: 0.72rem; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn svg.icon { width: 16px; height: 16px; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--white);
  flex-shrink: 0;
}
.icon-btn:active { background: var(--card-bg-2); }
.icon-btn--lg { width: 56px; height: 56px; }
.icon-btn--accent { background: var(--white); color: var(--black); border: none; }

/* ── FORMS ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--space-md); }
.field__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--grey);
}
.field__input-wrap { position: relative; display: flex; align-items: center; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.9em 1em;
  color: var(--white);
  font-size: 0.92rem;
  transition: border-color var(--transition);
}
.field input::placeholder, .field textarea::placeholder { color: var(--grey); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border-light);
}
.field textarea { resize: none; min-height: 90px; }
.field__icon-trailing {
  position: absolute;
  right: 14px;
  color: var(--grey);
  display: flex;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}
.field--select .field__input-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 16px; height: 16px;
  pointer-events: none;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--white);
}

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}
.card--flush { padding: 0; overflow: hidden; }
.section-gap { margin-bottom: var(--space-lg); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.stack { display: flex; flex-direction: column; gap: var(--space-sm); }
.stack-lg { display: flex; flex-direction: column; gap: var(--space-md); }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.8em;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-light);
}
.tag--filled { background: var(--white); color: var(--black); border-color: transparent; }
.tag--accent { background: rgba(37,211,102,0.12); color: var(--accent-green); border-color: rgba(37,211,102,0.3); }

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card-bg-2);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: var(--grey-light);
  flex-shrink: 0;
}
.avatar--sm { width: 34px; height: 34px; font-size: 0.85rem; }
.avatar--lg { width: 80px; height: 80px; font-size: 1.7rem; }
.avatar--photo { background-size: cover; background-position: center; }

/* Generic list row */
.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
  background: none;
  border-left: none; border-right: none; border-top: none;
  width: 100%;
  text-align: left;
  color: var(--white);
}
.list-row:last-child { border-bottom: none; }
.list-row__body { flex: 1; min-width: 0; }
.list-row__title { font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
.list-row__subtitle { font-size: 0.78rem; color: var(--grey); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row__chevron { color: var(--grey); flex-shrink: 0; }

/* ── HEADER GREETING (Home) ────────────────────────────── */
.greeting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-md) var(--space-md);
}
.greeting__hello { font-size: 0.85rem; color: var(--grey); margin-bottom: 2px; }
.greeting__name { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: 0.02em; text-transform: uppercase; }

/* ── STREAK / STAT STRIP ────────────────────────────────── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.stat-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-xs);
  text-align: center;
}
.stat-tile__icon { color: var(--white); margin-bottom: 4px; }
.stat-tile__value { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: 0.02em; }
.stat-tile__label { font-size: 0.62rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── NEXT CLASS BANNER ──────────────────────────────────── */
.next-class {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(135deg, var(--card-bg-2), var(--card-bg));
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-lg);
}
.next-class__time {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  border-right: 1px solid var(--border);
  padding-right: var(--space-md);
}
.next-class__time span { display: block; font-size: 0.6rem; color: var(--grey); font-family: var(--font-body); letter-spacing: 0.1em; }
.next-class__body { flex: 1; }
.next-class__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.next-class__meta { font-size: 0.76rem; color: var(--grey); }

/* ── SECTION HEADER (in-screen) ─────────────────────────── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}
.section-head__title { font-size: 1rem; font-weight: 700; }
.section-head__action { font-size: 0.76rem; color: var(--grey); font-weight: 600; }

/* ── ROUTINE CARD ───────────────────────────────────────── */
.routine-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  width: 100%;
  text-align: left;
  color: var(--white);
}
.routine-card__icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--card-bg-2);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.routine-card__body { flex: 1; min-width: 0; }
.routine-card__title { font-weight: 700; font-size: 0.95rem; margin-bottom: 3px; }
.routine-card__meta { font-size: 0.76rem; color: var(--grey); }
.routine-card__meta strong { color: var(--grey-light); }

/* ── EXERCISE ROW (workout player / library) ───────────── */
.exercise-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  text-align: left;
  color: var(--white);
}
.exercise-row.is-done { opacity: 0.5; }
.exercise-row.is-done .exercise-row__title { text-decoration: line-through; }
.exercise-row__check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: transparent;
  background: transparent;
}
.exercise-row.is-done .exercise-row__check {
  background: var(--white);
  border-color: var(--white);
  color: var(--black);
}
.exercise-row__body { flex: 1; min-width: 0; }
.exercise-row__title { font-size: 0.9rem; font-weight: 600; }
.exercise-row__meta { font-size: 0.76rem; color: var(--grey); }
.exercise-row__thumb {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--card-bg-2);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--grey);
}

/* Workout progress ring/bar */
.workout-progress {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}
.workout-progress__bar {
  flex: 1;
  height: 6px;
  border-radius: 4px;
  background: var(--card-bg-2);
  overflow: hidden;
}
.workout-progress__fill {
  height: 100%;
  background: var(--white);
  border-radius: 4px;
  transition: width var(--transition-slow);
}
.workout-progress__label { font-size: 0.76rem; color: var(--grey); white-space: nowrap; }

.timer-display {
  text-align: center;
  padding: var(--space-lg) 0;
}
.timer-display__value { font-family: var(--font-display); font-size: 3.6rem; letter-spacing: 0.02em; }
.timer-display__label { font-size: 0.7rem; color: var(--grey); text-transform: uppercase; letter-spacing: 0.12em; }

/* ── PROGRESS SCREEN: chart, PRs, photos ───────────────── */
.seg-control {
  display: flex;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  margin-bottom: var(--space-lg);
}
.seg-control__item {
  flex: 1;
  text-align: center;
  padding: 0.55em 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--grey);
  border-radius: calc(var(--radius-md) - 3px);
  background: none;
  border: none;
}
.seg-control__item.is-active { background: var(--white); color: var(--black); }

.chart-card { padding: var(--space-md); }
.chart-card__value { font-family: var(--font-display); font-size: 1.7rem; }
.chart-card__delta { font-size: 0.76rem; }
.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 110px;
  margin-top: var(--space-md);
}
.chart-bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars__bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--border-light); }
.chart-bars__bar.is-peak { background: var(--white); }
.chart-bars__tick { font-size: 0.6rem; color: var(--grey); }

.pr-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.pr-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}
.pr-row__icon { color: var(--white); }
.pr-row__body { flex: 1; }
.pr-row__title { font-weight: 700; font-size: 0.88rem; }
.pr-row__date { font-size: 0.72rem; color: var(--grey); }
.pr-row__value { font-family: var(--font-display); font-size: 1.5rem; text-align: right; }
.pr-row__unit { font-size: 0.68rem; color: var(--grey); font-family: var(--font-body); }

.photo-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}
.photo-compare__slot {
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-light);
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--grey);
  position: relative;
  overflow: hidden;
}
.photo-compare__slot.has-photo { border-style: solid; background: linear-gradient(160deg, #2a2a2a, #111); }
.photo-compare__slot span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; }
.photo-compare__label {
  position: absolute; top: 8px; left: 8px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em;
  background: rgba(0,0,0,0.5); padding: 3px 8px; border-radius: 100px;
  color: var(--white-soft);
}

/* ── BOOKING SCREEN ─────────────────────────────────────── */
.day-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: var(--space-lg);
}
.day-strip::-webkit-scrollbar { display: none; }
.day-pill {
  flex-shrink: 0;
  width: 52px;
  padding: 10px 0;
  border-radius: var(--radius-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--grey-light);
}
.day-pill__dow { font-size: 0.62rem; text-transform: uppercase; color: var(--grey); margin-bottom: 3px; }
.day-pill__num { font-family: var(--font-display); font-size: 1.2rem; }
.day-pill.is-active { background: var(--white); color: var(--black); border-color: var(--white); }
.day-pill.is-active .day-pill__dow { color: rgba(0,0,0,0.55); }

.class-slot {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
}
.class-slot__time { font-family: var(--font-display); font-size: 1.15rem; width: 58px; flex-shrink: 0; }
.class-slot__body { flex: 1; }
.class-slot__title { font-weight: 700; font-size: 0.88rem; }
.class-slot__meta { font-size: 0.74rem; color: var(--grey); }
.class-slot__spots { font-size: 0.68rem; color: var(--accent-green); margin-top: 2px; }
.class-slot__spots.is-full { color: var(--accent-red); }

/* ── EXERCISE LIBRARY ───────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.7em 1em;
  margin-bottom: var(--space-md);
  color: var(--grey);
}
.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--white);
  font-size: 0.88rem;
}
.search-bar input:focus { outline: none; }
.filter-chips { display: flex; gap: 8px; overflow-x: auto; margin-bottom: var(--space-md); padding-bottom: 2px; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 0.5em 1em;
  border-radius: 100px;
  border: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--grey-light);
  background: none;
  white-space: nowrap;
}
.filter-chip.is-active { background: var(--white); color: var(--black); border-color: var(--white); }

.ex-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  text-align: left;
  color: var(--white);
  margin-bottom: var(--space-sm);
}
.ex-card__thumb {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--card-bg-2);
  border: 1px solid var(--border-light);
  display: flex; align-items: center; justify-content: center;
  color: var(--grey-light);
  flex-shrink: 0;
}
.ex-card__body { flex: 1; min-width: 0; }
.ex-card__title { font-weight: 700; font-size: 0.9rem; margin-bottom: 3px; }
.ex-card__tags { display: flex; gap: 6px; flex-wrap: wrap; }
.ex-card__tags .tag { font-size: 0.58rem; padding: 0.2em 0.6em; }

/* ── SHEET / MODAL (bottom sheet pattern) ───────────────── */
.sheet-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.sheet-scrim.is-active { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-height: 88%;
  background: var(--dark-mid);
  border: 1px solid var(--border-light);
  border-bottom: none;
  border-radius: 24px 24px 0 0;
  z-index: 601;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform var(--transition-slow), visibility 0s linear var(--transition-slow);
  display: flex;
  flex-direction: column;
}
.sheet.is-active {
  transform: translateY(0);
  visibility: visible;
  transition: transform var(--transition-slow), visibility 0s linear;
}
.sheet__handle {
  width: 36px; height: 4px;
  border-radius: 4px;
  background: var(--border-light);
  margin: 10px auto 4px;
  flex-shrink: 0;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sheet__title { font-family: var(--font-display); font-size: 1.25rem; letter-spacing: 0.03em; text-transform: uppercase; }
.sheet__body {
  padding: var(--space-md);
  overflow-y: auto;
}
.sheet__footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── TOAST ──────────────────────────────────────────────── */
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 14px);
  transform: translate(-50%, 12px);
  background: var(--white);
  color: var(--black);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.8em 1.4em;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 0.5em;
  z-index: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}
.toast.is-active { opacity: 1; transform: translate(-50%, 0); }
.toast svg.icon { width: 16px; height: 16px; color: var(--accent-green); }

/* ── SPLASH ─────────────────────────────────────────────── */
.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  background:
    radial-gradient(ellipse 80% 50% at 50% 40%, #1a1a1a 0%, var(--black) 70%);
}
.splash img { width: 96px; height: auto; filter: drop-shadow(0 0 24px rgba(255,255,255,0.25)); }
.splash__word { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.05em; }
.splash__tagline { font-size: 0.78rem; color: var(--grey); letter-spacing: 0.04em; text-align: center; }
.splash__loader {
  width: 120px; height: 3px;
  border-radius: 4px;
  background: var(--card-bg);
  overflow: hidden;
  margin-top: var(--space-lg);
}
.splash__loader-fill {
  height: 100%; width: 0%;
  background: var(--white);
  border-radius: 4px;
  animation: splashLoad 1.6s ease forwards;
}
@keyframes splashLoad { to { width: 100%; } }

/* ── AUTH SCREENS ───────────────────────────────────────── */
.auth {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}
.auth__logo { text-align: center; margin-bottom: var(--space-xl); }
.auth__logo img { width: 56px; margin-inline: auto; margin-bottom: var(--space-sm); }
.auth__title { font-size: 1.9rem; margin-bottom: var(--space-2xs); }
.auth__subtitle { color: var(--grey); font-size: 0.85rem; margin-bottom: var(--space-lg); }
.auth__form { flex: 1; }
.auth__footer { text-align: center; font-size: 0.82rem; color: var(--grey); margin-top: var(--space-md); }
.auth__footer a, .auth__link { color: var(--white); font-weight: 700; }
.auth__divider {
  display: flex; align-items: center; gap: var(--space-sm);
  color: var(--grey); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  margin: var(--space-md) 0;
}
.auth__divider::before, .auth__divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.role-switch {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.role-switch .btn { flex: 1; }

/* ── ADMIN-SPECIFIC ─────────────────────────────────────── */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--white);
  padding: 3px 8px;
  border-radius: 100px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}
.kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}
.kpi-card__icon { color: var(--grey); margin-bottom: var(--space-sm); }
.kpi-card__value { font-family: var(--font-display); font-size: 1.75rem; }
.kpi-card__label { font-size: 0.72rem; color: var(--grey); }

.client-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  width: 100%;
  text-align: left;
  color: var(--white);
  margin-bottom: var(--space-sm);
}
.client-row__body { flex: 1; min-width: 0; }
.client-row__name { font-weight: 700; font-size: 0.9rem; }
.client-row__meta { font-size: 0.75rem; color: var(--grey); }
.client-row__status { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); flex-shrink: 0; }
.client-row__status.is-inactive { background: var(--border-light); }

.client-profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) 0;
}
.client-profile-head .avatar { margin-bottom: var(--space-sm); }

.fab {
  position: absolute;
  right: var(--space-md);
  bottom: calc(var(--tabbar-h) + var(--space-md));
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
  border: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 50;
}
.fab:active { transform: scale(0.94); }

/* ── PROFILE SCREEN ─────────────────────────────────────── */
.profile-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-lg) 0 var(--space-xl);
}
.profile-head .avatar { margin-bottom: var(--space-sm); }
.profile-head__name { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: 0.02em; }
.profile-head__meta { font-size: 0.8rem; color: var(--grey); }

.settings-group { margin-bottom: var(--space-lg); }
.settings-group__label {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); margin-bottom: var(--space-xs); padding-inline: 2px;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.85em 0;
  border-bottom: 1px solid var(--border);
  width: 100%;
  text-align: left;
  color: var(--white);
  background: none;
  border-left: none; border-right: none; border-top: none;
}
.settings-row:last-child { border-bottom: none; }
.settings-row__icon { color: var(--grey-light); flex-shrink: 0; }
.settings-row__label { flex: 1; font-size: 0.88rem; }
.settings-row__chevron { color: var(--grey); }

/* ── DEV NAV (prototype helper, hidden from real "app" feel) ── */
.devnav-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  color: var(--grey-light);
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
.devnav {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  z-index: 950;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.devnav.is-active { display: flex; }
.devnav__panel {
  background: var(--dark-mid);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 80vh;
  overflow-y: auto;
  padding: var(--space-lg);
}
.devnav__title { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 4px; }
.devnav__sub { font-size: 0.78rem; color: var(--grey); margin-bottom: var(--space-md); }
.devnav__group-label {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); margin: var(--space-md) 0 var(--space-xs);
}
.devnav__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.devnav__btn {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7em 0.8em;
  font-size: 0.78rem;
  color: var(--grey-light);
  text-align: left;
}
.devnav__btn:active { background: var(--card-bg-2); }
.devnav__close { margin-top: var(--space-md); }

/* ── RESPONSIVE: real phones ────────────────────────────── */
@media (max-width: 460px), (max-height: 760px) and (max-width: 700px) {
  .devnav-toggle { right: 14px; bottom: 14px; }
}
