/* ==========================================================================
   Mango Drive Cafe Pickleball -- design system
   Mobile-first. No build step, no framework, no CDN.
   Palette: lime #A3E635 on dark navy #0F172A.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */
:root {
  --lime-50:  #f7fee7;
  --lime-100: #ecfccb;
  --lime-200: #d9f99d;
  --lime-300: #bef264;
  --lime-400: #a3e635;
  --lime-500: #84cc16;
  --lime-600: #65a30d;
  --lime-700: #4d7c0f;

  --navy-700: #1e293b;
  --navy-800: #172033;
  --navy-900: #0f172a;
  --navy-950: #080f1f;

  --slate-50:  #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;

  --ok:   #16a34a;
  --ok-bg:#dcfce7;
  --warn: #b45309;
  --warn-bg:#fef3c7;
  --bad:  #dc2626;
  --bad-bg:#fee2e2;
  --info: #0369a1;
  --info-bg:#e0f2fe;

  /* Semantic -- these are what components use */
  --bg:          var(--slate-50);
  --bg-elevated: #ffffff;
  --bg-sunken:   var(--slate-100);
  --border:      var(--slate-200);
  --border-strong: var(--slate-300);
  --text:        var(--navy-900);
  --text-muted:  var(--slate-500);
  --text-invert: #ffffff;
  --accent:      var(--lime-400);
  --accent-ink:  var(--navy-900);
  --accent-hover:var(--lime-300);
  --brand-surface: var(--navy-900);

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* Layered, soft-edged shadows read as more considered than a single flat
     blur -- a thin "contact" shadow plus a wider ambient one. */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .04);
  --shadow:    0 1px 2px rgba(15, 23, 42, .04), 0 8px 20px -4px rgba(15, 23, 42, .10);
  --shadow-lg: 0 2px 4px rgba(15, 23, 42, .05), 0 20px 40px -8px rgba(15, 23, 42, .16);

  --nav-h: 64px;
  --tab-h: 64px;

  /* Standard Material/Stripe-style deceleration curve -- motion settles
     rather than stopping on a dime, which reads as more polished. */
  --ease: cubic-bezier(.4, 0, .2, 1);

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] {
  --bg:          var(--navy-950);
  --bg-elevated: var(--navy-800);
  --bg-sunken:   var(--navy-900);
  --border:      #1f2b41;
  --border-strong: #2d3d59;
  --text:        #e8eef7;
  --text-muted:  #8fa3bf;
  --text-invert: var(--navy-900);
  --accent:      var(--lime-400);
  --accent-ink:  var(--navy-900);
  --accent-hover:var(--lime-300);
  --brand-surface: var(--navy-800);

  --ok-bg:  #06301b;
  --warn-bg:#3b2a06;
  --bad-bg: #3d1111;
  --info-bg:#04263b;
  --ok:   #4ade80;
  --warn: #fbbf24;
  --bad:  #f87171;
  --info: #38bdf8;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 20px -4px rgba(0, 0, 0, .45);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 40px -8px rgba(0, 0, 0, .6);
}

/* ---------- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 1.22rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p  { margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.25rem 0; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--lime-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: var(--accent-ink);
  padding: .75rem 1.25rem; border-radius: 0 0 var(--radius) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ------------------------------------------------------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 720px; }
.page { padding: 20px 0 32px; }

.stack > * + * { margin-top: var(--gap, 1rem); }
.row { display: flex; gap: 12px; align-items: center; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.row-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: .82rem; }
.tiny { font-size: .75rem; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  body { font-size: 15.5px; }
}

/* ---------- Top navigation ---------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--brand-surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 4px 16px rgba(15,23,42,.06);
  padding-top: env(safe-area-inset-top, 0);
}
@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: var(--brand-surface); }
}
.topbar-inner {
  height: var(--nav-h);
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--accent); color: var(--navy-900);
  display: grid; place-items: center; font-size: 18px; flex: none;
  box-shadow: 0 2px 6px -1px rgba(0,0,0,.25);
}
.brand-text { font-size: 1.02rem; line-height: 1.1; }
.brand-text span { display: block; font-size: .68rem; font-weight: 600; color: var(--lime-300); letter-spacing: .04em; text-transform: uppercase; }

.topnav { display: none; gap: 4px; margin-left: 12px; }
@media (min-width: 900px) { .topnav { display: flex; } }
.topnav a {
  padding: 8px 13px; border-radius: var(--radius-full);
  font-weight: 600; font-size: .9rem; color: rgba(255,255,255,.75);
  transition: background .15s, color .15s;
}
.topnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.topnav a.active { background: var(--accent); color: var(--navy-900); }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.1); border: 0; color: #fff;
  position: relative; transition: background .15s;
}
.icon-btn:hover { background: rgba(255,255,255,.2); }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--bad); color: #fff; font-size: 10px; font-weight: 700;
  border-radius: var(--radius-full); display: grid; place-items: center;
}

.avatar {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--lime-400); color: var(--navy-900);
  display: grid; place-items: center; font-weight: 800; font-size: .82rem;
  flex: none; object-fit: cover; overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.avatar-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }

/* Dropdown menu */
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--bg-elevated); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 60;
}
.menu-panel a, .menu-panel button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: none; border: 0; text-align: left; cursor: pointer;
  font-size: .9rem; font-weight: 500;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--bg-sunken); }
.menu-divider { height: 1px; background: var(--border); margin: 5px 0; }

/* ---------- Bottom tab bar (mobile) -------------------------------------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -2px 12px rgba(15,23,42,.06);
}
@media (min-width: 900px) { .tabbar { display: none; } }
.tabbar a {
  flex: 1; height: var(--tab-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: .68rem; font-weight: 600; color: var(--text-muted);
  transition: color .15s;
}
.tabbar a.active { color: var(--lime-600); }
[data-theme="dark"] .tabbar a.active { color: var(--lime-400); }
.tabbar a.active .tab-icon { background: var(--lime-100); }
[data-theme="dark"] .tabbar a.active .tab-icon { background: rgba(163,230,53,.16); }
.tab-icon {
  width: 30px; height: 26px; border-radius: var(--radius-full);
  display: grid; place-items: center; transition: background .15s;
}
.has-tabbar { padding-bottom: calc(var(--tab-h) + 16px); }
@media (min-width: 900px) { .has-tabbar { padding-bottom: 0; } }

/* ---------- Cards -------------------------------------------------------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.card-lg { border-radius: var(--radius-lg); padding: 20px; }
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.card-head h2, .card-head h3 { margin: 0; }
.card-body { padding: 16px; }
.card-link {
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  display: block;
}
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card-link:active { transform: translateY(-1px); }

.hero {
  background:
    radial-gradient(circle at 15% 15%, rgba(163,230,53,.14), transparent 45%),
    linear-gradient(135deg, var(--navy-950), var(--navy-900) 55%, var(--navy-700) 100%);
  color: #fff; border-radius: var(--radius-lg); padding: 28px 22px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  /* A faint diagonal line texture -- reads as deliberate, not empty. */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: repeating-linear-gradient(
    115deg, rgba(255,255,255,.035) 0 1px, transparent 1px 34px
  );
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(163,230,53,.4), transparent 68%);
}
.hero h1 { color: #fff; margin-bottom: .35rem; }
.hero p { color: rgba(255,255,255,.82); margin: 0; }
.hero > * { position: relative; }

/* Stat tiles */
.stat {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm);
}
.stat-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.stat-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; margin-top: 2px; }
.stat-sub { font-size: .78rem; color: var(--text-muted); }
.stat-accent { border-left: 4px solid var(--accent); }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius-full);
  font-weight: 700; font-size: .92rem; line-height: 1;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease),
              box-shadow .2s var(--ease), border-color .15s var(--ease);
  white-space: nowrap; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 4px 10px -2px rgba(101,163,13,.35);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 6px 16px -2px rgba(101,163,13,.4);
  transform: translateY(-1px);
}

.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy-700); }
[data-theme="dark"] .btn-dark { background: var(--navy-700); }

.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--bg-sunken); border-color: var(--text-muted); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-sunken); color: var(--text); }

.btn-danger { background: var(--bad); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(1.08); }

.btn-sm { padding: 7px 13px; font-size: .82rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Forms -------------------------------------------------------- */
.field { margin-bottom: 14px; }
.field label, .label {
  display: block; font-weight: 600; font-size: .85rem;
  margin-bottom: 5px; color: var(--text);
}
.label-hint { font-weight: 400; color: var(--text-muted); font-size: .8rem; }

.input, .select, .textarea {
  width: 100%; padding: 11px 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.input:hover:not(:focus):not(:disabled),
.select:hover:not(:focus):not(:disabled),
.textarea:hover:not(:focus):not(:disabled) { border-color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--lime-600);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--lime-500) 25%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--slate-400); }
.input:disabled, .select:disabled, .textarea:disabled { opacity: .6; cursor: not-allowed; }
.textarea { min-height: 96px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: .8rem; margin: 5px 0 0; font-weight: 600; }
.field-help { color: var(--text-muted); font-size: .8rem; margin: 5px 0 0; }

.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .9rem; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--lime-500); flex: none; }

.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }

/* Segmented radio group -- used for skill level, session type, etc. */
.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  padding: 9px 15px; border-radius: var(--radius-full);
  border: 1px solid var(--border-strong); cursor: pointer;
  font-size: .86rem; font-weight: 600; margin: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.segmented input:checked + label {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.segmented input:focus-visible + label { outline: 3px solid var(--lime-600); outline-offset: 2px; }

/* ---------- Badges & pills ---------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .71rem; font-weight: 700; letter-spacing: .02em;
  line-height: 1.6;
  text-transform: capitalize; white-space: nowrap;
}
.badge-ok    { background: var(--ok-bg);   color: var(--ok); }
.badge-warn  { background: var(--warn-bg); color: var(--warn); }
.badge-bad   { background: var(--bad-bg);  color: var(--bad); }
.badge-info  { background: var(--info-bg); color: var(--info); }
.badge-muted { background: var(--bg-sunken); color: var(--text-muted); }
.badge-accent{ background: var(--lime-200); color: var(--lime-700); }
[data-theme="dark"] .badge-accent { background: rgba(163,230,53,.18); color: var(--lime-300); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: var(--radius-full);
  background: var(--bg-sunken); font-size: .78rem; font-weight: 600;
}

/* ---------- Alerts ------------------------------------------------------- */
.alert {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--radius);
  border: 1px solid transparent; font-size: .9rem; font-weight: 500;
}
.alert-success { background: var(--ok-bg);   color: var(--ok);   border-color: currentColor; }
.alert-error   { background: var(--bad-bg);  color: var(--bad);  border-color: currentColor; }
.alert-warning { background: var(--warn-bg); color: var(--warn); border-color: currentColor; }
.alert-info    { background: var(--info-bg); color: var(--info); border-color: currentColor; }
.alert-stack { position: sticky; top: calc(var(--nav-h) + 8px); z-index: 40; }
.alert-stack > * + * { margin-top: 8px; }

/* ---------- Tables ------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .89rem; min-width: 560px; }
.table th {
  text-align: left; font-size: .71rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  padding: 11px 13px; background: var(--bg-sunken);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table th:first-child { border-top-left-radius: var(--radius-sm); }
.table th:last-child  { border-top-right-radius: var(--radius-sm); }
.table td { padding: 12px 13px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .1s var(--ease); }
.table tbody tr:hover { background: var(--bg-sunken); }
.table-compact td, .table-compact th { padding: 8px 11px; }

/* ---------- Booking calendar / slot grid --------------------------------- */
.daystrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: thin; }
.daystrip::-webkit-scrollbar { height: 5px; }
.daystrip::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.day {
  flex: none; width: 60px; padding: 9px 0; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-elevated); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.day:hover { border-color: var(--lime-500); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.day.active {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 10px -2px rgba(101,163,13,.35);
}
.day.disabled { opacity: .35; pointer-events: none; }
.day-dow { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .7; }
.day-num { font-size: 1.15rem; font-weight: 800; line-height: 1.2; }
.day-mon { font-size: .64rem; opacity: .7; text-transform: uppercase; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 9px; }
.slot {
  position: relative; padding: 11px 8px; text-align: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-elevated); cursor: pointer; font-size: .84rem;
  transition: border-color .15s var(--ease), background .15s var(--ease), transform .15s var(--ease), box-shadow .15s var(--ease);
}
.slot:hover:not(.is-taken):not(.is-blocked) { border-color: var(--lime-500); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot-time { font-weight: 700; display: block; }
.slot-price { font-size: .74rem; color: var(--text-muted); }
.slot.is-selected {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
  box-shadow: 0 4px 10px -2px rgba(101,163,13,.35);
}
.slot.is-selected .slot-price { color: var(--navy-700); }
.slot.is-taken, .slot.is-blocked {
  background: var(--bg-sunken); color: var(--text-muted);
  cursor: not-allowed; border-style: dashed; opacity: .75;
}
.slot.is-taken .slot-time { text-decoration: line-through; }

.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .78rem; color: var(--text-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 13px; height: 13px; border-radius: 4px; border: 1px solid var(--border-strong); display: inline-block; }
.legend .l-free { background: var(--bg-elevated); }
.legend .l-sel  { background: var(--accent); border-color: var(--accent); }
.legend .l-taken{ background: var(--bg-sunken); border-style: dashed; }

/* Price summary */
.summary { background: var(--bg-sunken); border-radius: var(--radius); padding: 14px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: .9rem; }
.summary-total {
  border-top: 1px dashed var(--border-strong); margin-top: 7px; padding-top: 11px;
  font-weight: 800; font-size: 1.08rem;
}

/* ---------- Steps -------------------------------------------------------- */
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.step { flex: 1; text-align: center; font-size: .74rem; font-weight: 600; color: var(--text-muted); }
.step-bar { height: 4px; border-radius: 2px; background: var(--border); margin-bottom: 6px; }
.step.done .step-bar, .step.current .step-bar { background: var(--accent); }
.step.current { color: var(--text); }

/* ---------- Empty state -------------------------------------------------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-icon {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: var(--radius-full);
  background: var(--bg-sunken); display: grid; place-items: center; color: var(--text-muted);
}
.empty h3 { color: var(--text); margin-bottom: .3rem; }

/* ---------- Section heading ---------------------------------------------- */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin: 22px 0 12px;
}
.section-head h2 { margin: 0; font-size: 1.12rem; }
.section-head a { font-size: .85rem; font-weight: 700; color: var(--lime-600); }
[data-theme="dark"] .section-head a { color: var(--lime-400); }

/* ---------- Admin shell -------------------------------------------------- */
.admin-shell { display: block; }
@media (min-width: 1000px) {
  .admin-shell { display: grid; grid-template-columns: 244px 1fr; gap: 22px; align-items: start; }
}
.sidebar {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px; margin-bottom: 16px;
  position: sticky; top: calc(var(--nav-h) + 16px);
}
@media (max-width: 999px) { .sidebar { display: none; } .sidebar.open { display: block; } }
.sidebar-group { margin-bottom: 10px; }
.sidebar-title {
  font-size: .67rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted); padding: 8px 11px 4px;
}
.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; color: var(--text-muted);
  transition: background .15s, color .15s;
}
.sidebar a:hover { background: var(--bg-sunken); color: var(--text); }
.sidebar a.active { background: var(--navy-900); color: #fff; }
[data-theme="dark"] .sidebar a.active { background: var(--lime-400); color: var(--navy-900); }
.sidebar a .count {
  margin-left: auto; font-size: .7rem; font-weight: 800;
  background: var(--bad); color: #fff; border-radius: var(--radius-full);
  min-width: 19px; padding: 1px 6px; text-align: center;
}

/* ---------- Tabs / filters ---------------------------------------------- */
.filters {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end;
  padding: 13px; background: var(--bg-elevated);
  border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px;
}
.filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; }

.tabs { display: flex; gap: 5px; overflow-x: auto; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.tabs a {
  padding: 9px 14px; font-size: .87rem; font-weight: 700; color: var(--text-muted);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a.active { color: var(--text); border-bottom-color: var(--accent); }

/* ---------- Chart (inline SVG bars) -------------------------------------- */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 10px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; min-width: 0; }
.chart-bar { width: 100%; max-width: 40px; background: var(--accent); border-radius: 5px 5px 0 0; min-height: 3px; transition: opacity .15s; }
.chart-col:hover .chart-bar { opacity: .75; }
.chart-label { font-size: .66rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chart-value { font-size: .7rem; font-weight: 700; }

/* ---------- Misc --------------------------------------------------------- */
.divider-text {
  display: flex; align-items: center; gap: 12px;
  color: var(--text-muted); font-size: .8rem; margin: 16px 0;
}
.divider-text::before, .divider-text::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.list-item {
  display: flex; gap: 12px; align-items: center;
  padding: 13px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: 0; }

.thumb {
  width: 56px; height: 56px; border-radius: var(--radius-sm);
  background: var(--bg-sunken); object-fit: cover; flex: none;
  display: grid; place-items: center; color: var(--text-muted);
}
.thumb-wide { width: 100%; height: 150px; border-radius: var(--radius) var(--radius) 0 0; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 600; background: var(--bg-elevated);
}
.pagination .current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pagination .disabled { opacity: .4; pointer-events: none; }

.receipt {
  max-width: 420px; margin: 0 auto; background: #fff; color: #0f172a;
  border: 1px solid var(--slate-300); border-radius: var(--radius); padding: 22px;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: .85rem;
}
.receipt h2 { font-family: var(--font); text-align: center; }

/* ---------- Motion ------------------------------------------------------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.animate { animation: fade-up .3s ease both; }
.animate-1 { animation-delay: .04s; }
.animate-2 { animation-delay: .08s; }
.animate-3 { animation-delay: .12s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Print (reports & receipts) ----------------------------------- */
@media print {
  .topbar, .tabbar, .sidebar, .filters, .btn, .no-print { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { border: 1px solid #999; box-shadow: none; break-inside: avoid; }
  .table { min-width: 0; font-size: 10pt; }
  .table th { color: #000; }
  a[href]::after { content: ""; }
  .page { padding: 0; }
}
