/* Dhue design system — linear-inspired
   time, reserved. */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Jomolhari&display=swap');

:root {
  --gold:        #f09908;
  --gold-dim:    #fad17d;
  --gold-muted:  rgba(240,153,8,0.15);
  --gold-glow:   rgba(240,153,8,0.08);

  --bg:    #08090a;
  --bg-1:  #0e0e10;
  --bg-2:  #141416;
  --bg-3:  #1a1a1d;
  --bg-4:  #222226;

  --border:       rgba(255,255,255,0.06);
  --border-md:    rgba(255,255,255,0.09);
  --border-hover: rgba(255,255,255,0.14);
  --border-gold:  rgba(240,153,8,0.35);

  --t1: #f0f0f2;
  --t2: #9898a6;
  --t3: #5a5a68;
  --t4: #34343e;

  --success:    #22c55e;
  --success-bg: rgba(34,197,94,0.1);
  --error:      #ef4444;
  --error-bg:   rgba(239,68,68,0.1);
  --pending:    #f59e0b;
  --pending-bg: rgba(245,158,11,0.1);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-dzo: 'Jomolhari', serif;

  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.6);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.6);
  --shadow-gold: 0 0 40px rgba(240,153,8,0.12);

  --nav-h: 64px;
  --nav-bg: rgba(8,9,10,0.85);
  --sidebar-w: 248px;
  --ease: cubic-bezier(0.16,1,0.3,1);
  color-scheme: dark;
}
html[data-theme="light"] {
  --gold-muted:  rgba(240,153,8,0.16);
  --gold-glow:   rgba(240,153,8,0.12);

  --bg:    #faf6ef;
  --bg-1:  #f3eee4;
  --bg-2:  #fffdf8;
  --bg-3:  #efe8dc;
  --bg-4:  #e4d9c8;

  --border:       rgba(25,25,30,0.10);
  --border-md:    rgba(25,25,30,0.16);
  --border-hover: rgba(25,25,30,0.28);
  --border-gold:  rgba(240,153,8,0.55);

  --t1: #19191e;
  --t2: #807566;
  --t3: #8c8174;
  --t4: #c7bdad;

  --success:    #157a32;
  --success-bg: rgba(21,122,50,0.10);
  --error:      #b42318;
  --error-bg:   rgba(180,35,24,0.08);
  --pending:    #9a5600;
  --pending-bg: rgba(240,153,8,0.16);

  --shadow-sm: 0 1px 3px rgba(25,25,30,0.06);
  --shadow-md: 0 8px 24px rgba(25,25,30,0.08);
  --shadow-lg: 0 16px 40px rgba(25,25,30,0.12);
  --nav-bg: rgba(250,246,239,0.92);
  color-scheme: light;
}

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
[hidden] { display: none !important; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; overflow-y: auto !important; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--t1);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden; overflow-y: visible !important;
  opacity: 0;
  animation: fadeIn 0.3s var(--ease) forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

a { color: inherit; text-decoration: none; }

button { font-family: var(--font); cursor: pointer; border: none; background: none; }

input, select, textarea {
  font-family: var(--font);
  font-size: 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  color: var(--t1);
  border-radius: var(--r-md);
  padding: 11px 14px;
  min-height: 44px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(240,153,8,0.08);
}
input::placeholder { color: var(--t3); }
select option { background: var(--bg-3); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--t4); }

/* Nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  padding: 0 28px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  gap: 32px;
}
.nav-logo {
  display: flex; align-items: center;
  flex-shrink: 0;
  height: 100%;
  max-height: var(--nav-h, 56px);
  overflow: visible;
}
.brand-wordmark {
  height: 44px;
  max-height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
}
.nav-logo-icon {
  width: 40px;
  height: 40px;
  display: block;
  border-radius: 10px;
}
.brand-for-light { display: none !important; }
html[data-theme="light"] .brand-for-dark { display: none !important; }
html[data-theme="light"] .brand-for-light { display: block !important; }
.nav-links {
  display: flex; gap: 4px; flex: 1;
}
.nav-link {
  font-size: 13.5px; font-weight: 500;
  color: var(--t2);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--t1); background: var(--bg-3); }
.nav-link.active { color: var(--t1); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.theme-toggle {
  width: 46px; height: 28px; padding: 3px;
  border-radius: 99px;
  border: 1px solid #383842;
  background: #19191e;
  flex-shrink: 0;
}
.theme-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theme-toggle-knob {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #f09908;
  transition: transform 0.2s var(--ease);
}
.theme-toggle-icon { font-size: 12px; line-height: 1; color: #19191e; }
html[data-theme="light"] .theme-toggle-icon { color: #faf6ef; }
html[data-theme="light"] .theme-toggle {
  background: #faf6ef;
  border-color: #c7bdad;
}
html[data-theme="light"] .theme-toggle-knob {
  transform: translateX(18px);
  background: #19191e;
}
.nav-admin-link {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; color: var(--t2);
  padding: 5px 8px; border-radius: var(--r-md);
}
.nav-admin-link:hover, .nav-admin-link.active { color: var(--gold); }
.nav-user {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--t2);
  padding: 5px 10px 5px 5px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.nav-user:hover { border-color: var(--border-hover); background: var(--bg-2); }
.nav-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--gold-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--gold);
}
.nav-user-role {
  font-size: 10px; color: var(--t3);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-md);
  transition: all 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}
.btn-primary {
  background: var(--gold);
  color: #0a0700;
  font-weight: 600;
}
.btn-primary:hover { background: #ffaa20; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(240,153,8,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-3);
  color: var(--t1);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-4); border-color: var(--border-hover); }

.btn-ghost {
  color: var(--t2);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--t1); background: var(--bg-2); }

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-sm { font-size: 12px; padding: 5px 10px; }
.btn-lg { font-size: 15px; padding: 11px 22px; }
.btn-full { width: 100%; justify-content: center; }

.btn-icon {
  width: 32px; height: 32px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--t2);
}
.btn-icon:hover { background: var(--bg-3); color: var(--t1); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 500;
  padding: 3px 8px;
  border-radius: 99px;
}
.badge-gold    { background: var(--gold-muted); color: var(--gold); border: 1px solid rgba(240,153,8,0.2); }
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,0.2); }
.badge-error   { background: var(--error-bg); color: var(--error); border: 1px solid rgba(239,68,68,0.2); }
.badge-pending { background: var(--pending-bg); color: var(--pending); border: 1px solid rgba(245,158,11,0.2); }
.badge-neutral { background: var(--bg-3); color: var(--t2); border: 1px solid var(--border); }
.badge-dot::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; flex-shrink: 0;
}

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--border-hover); }

/* Divider */
.divider {
  height: 1px; background: var(--border); margin: 16px 0;
}

/* Layout */
.page { padding-top: var(--nav-h); min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 80px 24px;
  position: relative;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8,9,10,0.72) 0%,
    rgba(8,9,10,0.55) 40%,
    rgba(8,9,10,0.80) 100%
  );
  z-index: 1;
}
.hero > *:not(.hero-video):not(.hero-overlay):not(.hero-glow) {
  position: relative;
  z-index: 2;
}
.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(240,153,8,0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 2;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500;
  color: #fad17d;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 99px;
  padding: 5px 14px;
  margin-bottom: 32px;
  background: rgba(25,25,30,0.62);
}
html[data-theme="light"] .hero-headline,
html[data-theme="light"] .hero-stat-n { color: #faf6ef; }
html[data-theme="light"] .hero-sub { color: #e6ddd0; }
html[data-theme="light"] .hero-stat { border-top-color: rgba(255,255,255,0.18); }
html[data-theme="light"] .hero-stat-l { color: #c7bdad; }
html[data-theme="light"] .hero-actions .btn-ghost { color: #faf6ef; }
html[data-theme="light"] .hero-actions .btn-ghost:hover { color: #fff; background: rgba(255,255,255,0.08); }
.hero-mark {
  width: 22px;
  height: 22px;
  display: block;
}
.hero-headline {
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--t1);
  margin-bottom: 20px;
  max-width: 800px;
}
.hero-headline .gold { color: var(--gold); }
.hero-sub {
  font-size: 17px;
  color: var(--t2);
  max-width: 520px;
  line-height: 1.65;
  margin-bottom: 40px;
}
.hero-actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; justify-content: center;
}
.hero-stat {
  display: flex; align-items: center; gap: 20px;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  width: 100%; max-width: 480px;
  justify-content: center;
}
.hero-stat-item { text-align: center; }
.hero-stat-n { font-size: 26px; font-weight: 700; color: var(--t1); letter-spacing: -0.02em; }
.hero-stat-l { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 2px; }

/* Section */
.section { padding: 96px 0; }
.section-eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: 0.1em;
  color: var(--gold); text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--t1);
  margin-bottom: 16px;
}
.section-sub {
  font-size: 16px; color: var(--t2);
  max-width: 560px; line-height: 1.65;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-top: 48px;
}
@media (max-width: 960px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}
.feature-tile {
  background: var(--bg-1);
  padding: 28px;
  transition: background 0.2s;
}
.feature-tile:hover { background: var(--bg-2); }
.feature-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: var(--gold-muted);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 18px;
  color: var(--gold);
}
.feature-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--t1); }
.feature-desc { font-size: 13px; color: var(--t2); line-height: 1.55; }

/* Steps */
.steps {
  display: flex; gap: 0;
  position: relative;
  margin-top: 48px;
}
.steps::before {
  content: '';
  position: absolute;
  top: 20px; left: 22px; right: 22px;
  height: 1px;
  background: var(--border);
}
.step {
  flex: 1; text-align: center; padding: 0 16px;
  position: relative;
}
.step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border-gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  color: var(--gold);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.step-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.step-desc { font-size: 13px; color: var(--t2); line-height: 1.5; }

/* Browse page */
.browse-layout {
  display: grid;
  grid-template-columns: 248px 1fr;
  gap: 36px;
  padding: 36px 32px 64px;
  max-width: 1280px;
  margin: 0 auto;
}
.browse-sidebar {
  position: sticky; top: calc(var(--nav-h) + 24px);
  align-self: start;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-label {
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--t3);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--t2);
  cursor: pointer;
  transition: all 0.12s;
}
.sidebar-item:hover { background: var(--bg-2); color: var(--t1); }
.sidebar-item.active { background: var(--gold-muted); color: var(--gold); }
.sidebar-count {
  margin-left: auto;
  font-size: 11px; color: var(--t3);
  background: var(--bg-3); border-radius: 99px; padding: 1px 7px;
}

.browse-main {}
.browse-header {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
}
.search-wrap {
  position: relative; flex: 1;
}
.search-wrap input { padding-left: 36px; }
.search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--t3); font-size: 15px; pointer-events: none;
}
.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.resource-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.resource-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.resource-thumb {
  height: 188px;
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.resource-thumb::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(8,9,10,0.15) 0%, rgba(8,9,10,0.65) 100%);
}
.resource-thumb .thumb-icon {
  position: absolute;
  bottom: 12px; left: 14px;
  z-index: 2;
  display: flex; align-items: center; gap: 8px;
}
.resource-thumb .thumb-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,0,0.4);
  padding: 3px 8px; border-radius: 4px;
}
.resource-body { padding: 18px 20px 20px; }
.resource-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.resource-meta {
  font-size: 12.5px; color: var(--t2);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.resource-price {
  font-size: 13px; font-weight: 600; color: var(--gold);
}
.resource-price.free { color: var(--success); }
.resource-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Slot picker */
.slot-dates {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; margin-bottom: 20px;
  scrollbar-width: none;
}
.slot-dates::-webkit-scrollbar { display: none; }
.slot-date {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-2);
  min-width: 58px;
}
.slot-date:hover { border-color: var(--border-hover); background: var(--bg-3); }
.slot-date.active { border-color: var(--border-gold); background: var(--gold-muted); }
.slot-date .day { font-size: 10.5px; color: var(--t2); text-transform: uppercase; letter-spacing: 0.05em; }
.slot-date .num { font-size: 18px; font-weight: 700; margin: 2px 0; }
.slot-date .mon { font-size: 10px; color: var(--t2); }
.slot-date.active .day, .slot-date.active .mon { color: var(--gold); }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px,1fr));
  gap: 10px;
}
.slot-item {
  padding: 12px 10px;
  text-align: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-2);
}
.slot-item.selected { border-color: var(--gold); background: var(--gold-muted); color: var(--gold); font-weight: 600; }
.slot-item.taken { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; }
.slot-item.booked {
  opacity: 1; text-decoration: none;
  color: var(--error); background: var(--error-bg); border-color: var(--error);
}
.slot-item.booked .slot-price { color: var(--error); }
.modal-actions {
  position: sticky; bottom: -32px; z-index: 1;
  display: flex; gap: 10px;
  margin-bottom: -32px; padding: 12px 0 32px; background: var(--bg-2);
}
.stay-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stay-box { padding: 10px 12px; background: var(--bg-3); border: 1px solid var(--border); border-radius: var(--r-md); }
.stay-box.is-current { border-color: var(--gold); }
.stay-box-label { font-size: 11px; color: var(--t2); margin-bottom: 2px; }
.stay-box-value { font-size: 14px; font-weight: 600; }
.stay-total { margin: 10px 0 16px; font-size: 13px; color: var(--gold); min-height: 18px; }
.stay-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px 28px; }
.stay-month-title { margin-bottom: 8px; font-size: 14px; font-weight: 600; text-align: center; }
.stay-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.stay-dow { padding-bottom: 6px; font-size: 11px; color: var(--t3); text-align: center; }
.stay-day {
  height: 40px; padding: 0;
  background: none; border: 1px solid transparent; border-radius: var(--r-sm);
  color: var(--t1); font: inherit; font-size: 14px; cursor: pointer;
}
.stay-day:hover:not(:disabled) { background: var(--bg-3); }
.stay-day:disabled { color: var(--t4); cursor: default; }
.stay-day.is-today { border-color: var(--border-md); }
.stay-day.in-range, .stay-day.in-range:hover { background: var(--gold-muted); border-radius: 0; }
.stay-day.is-start, .stay-day.is-end, .stay-day.is-start:hover, .stay-day.is-end:hover { background: var(--gold); color: #111; font-weight: 700; }
.stay-day.is-booked { background: var(--error-bg); color: var(--error); }
.stay-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--t2); }
.stay-legend span { display: inline-flex; align-items: center; gap: 6px; }
.stay-key { width: 12px; height: 12px; border-radius: 3px; border: 1px solid transparent; }
.stay-key.is-start { background: var(--gold); }
.stay-key.is-booked { background: var(--error-bg); border-color: var(--error); }
.stay-key.is-today { border-color: var(--border-md); }
@media (max-width: 768px) {
  .stay-day { height: 44px; }
}
.slot-price { font-size: 10px; color: var(--t3); margin-top: 1px; }
.slot-item.free .slot-price { color: var(--success); }

/* Booking flow */
.book-layout {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 1fr 400px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 32px 72px;
  gap: 40px;
  align-items: start;
}
.book-main {}
.book-sidebar {}

.stepper {
  display: flex; gap: 0; margin-bottom: 40px;
  position: relative;
}
.stepper::before {
  content: '';
  position: absolute;
  top: 14px; left: 15px; right: 15px;
  height: 1px;
  background: var(--border);
}
.stepper-step {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  position: relative; z-index: 1;
}
.stepper-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--t3);
  transition: all 0.25s;
}
.stepper-step.done .stepper-dot { background: var(--gold); border-color: var(--gold); color: #0a0700; }
.stepper-step.active .stepper-dot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 4px rgba(240,153,8,0.12); }
.stepper-label { font-size: 11px; color: var(--t3); white-space: nowrap; }
.stepper-step.active .stepper-label { color: var(--t1); }
.stepper-step.done .stepper-label { color: var(--t2); }

.book-step {
  display: none;
  animation: slideUp 0.25s var(--ease);
}
.book-step.active { display: block; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-title-sm { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.step-sub { font-size: 13.5px; color: var(--t2); margin-bottom: 24px; }
.user-type-grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; }
.user-type-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg-2);
}
.user-type-card:hover { border-color: var(--border-hover); background: var(--bg-3); }
.user-type-card.selected { border-color: var(--border-gold); background: var(--gold-muted); }
.user-type-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  background: var(--bg-4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.user-type-card.selected .user-type-icon { background: rgba(240,153,8,0.2); }
.user-type-name { font-size: 14px; font-weight: 600; }
.user-type-desc { font-size: 12px; color: var(--t2); margin-top: 2px; }
.user-type-card.selected .user-type-name { color: var(--gold); }
.user-type-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.user-type-card .badge { flex-shrink: 0; }
.user-type-card.muted { opacity: 0.7; }
.user-type-card.muted:hover { opacity: 1; }
.account-panel {
  display: flex; align-items: center; gap: 12px;
  padding: 14px; margin-bottom: 20px;
  border-radius: var(--r-md); border: 1px solid var(--border);
  background: var(--bg-3);
}
.account-panel-ok   { background: var(--success-bg); border-color: rgba(34,197,94,0.25); }
.account-panel-gold { background: var(--gold-muted); border-color: var(--border-gold); }
.account-panel-avatar { display: flex; align-items: center; justify-content: center; font-size: 18px; }
.account-panel .nav-avatar, .account-panel .avatar-img { width: 32px; height: 32px; border-radius: 50%; }
.form-group { margin-bottom: 20px; }
.form-label { font-size: 12.5px; font-weight: 500; color: var(--t2); margin-bottom: 6px; display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-hint { font-size: 11px; color: var(--t3); margin-top: 5px; }
.booking-summary {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 24px;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.summary-resource {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.summary-thumb {
  width: 44px; height: 44px;
  border-radius: var(--r-md);
  background: var(--bg-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.summary-name { font-size: 14px; font-weight: 600; }
.summary-type { font-size: 12px; color: var(--t2); margin-top: 1px; }
.summary-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; margin-bottom: 10px;
}
.summary-row .label { color: var(--t2); }
.summary-row .value { font-weight: 500; }
.summary-total {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 14px; margin-top: 6px;
  border-top: 1px solid var(--border);
  font-weight: 700;
}
.summary-total .amount { font-size: 18px; color: var(--gold); }
.summary-total .amount.free { color: var(--success); font-size: 14px; }
.lock-timer {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--t2);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-top: 16px;
}
.lock-timer .time { font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.confirm-screen {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 40px 0;
}
.confirm-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 1px solid rgba(34,197,94,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin-bottom: 24px;
  animation: popIn 0.4s var(--ease);
}
@keyframes popIn {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.confirm-ref {
  font-family: monospace;
  font-size: 15px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 16px;
  margin: 12px 0;
  letter-spacing: 0.1em;
  color: var(--gold);
}

/* Admin dashboard */
.admin-layout {
  min-height: 100vh;
  padding-top: var(--nav-h);
  padding-left: var(--sidebar-w);
}
.admin-sidebar {
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  padding: 24px 14px;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  overflow-y: auto;
}
@media (min-width: 769px) {
  body.has-admin-nav { padding-left: var(--sidebar-w); }
}
@media (min-width: 769px) and (max-width: 1200px) {
  body.has-admin-nav .browse-layout { grid-template-columns: 1fr; }
  body.has-admin-nav .browse-sidebar { position: static; }
}
.admin-content {
  padding: 40px 40px 64px;
  min-height: calc(100vh - var(--nav-h));
}
.admin-nav-section { margin-bottom: 24px; }
.admin-nav-label {
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.07em;
  color: var(--t4); text-transform: uppercase;
  padding: 0 8px; margin-bottom: 4px;
}
.admin-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-sm);
  font-size: 13px; color: var(--t2);
  cursor: pointer; transition: all 0.12s;
  margin-bottom: 1px;
}
.admin-nav-item:hover { background: var(--bg-2); color: var(--t1); }
.admin-nav-item.active { background: var(--gold-muted); color: var(--gold); }
.admin-nav-item .icon { width: 16px; text-align: center; flex-shrink: 0; }

.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.page-sub { font-size: 13px; color: var(--t2); margin-top: 2px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px,1fr));
  gap: 16px; margin-bottom: 32px;
}
.stats-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
}
.stat-label { font-size: 11.5px; color: var(--t2); margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.stat-change { font-size: 11.5px; color: var(--t3); margin-top: 4px; }
.stat-change.up { color: var(--success); }
.dco-hero {
  background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(139,92,246,0.10));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-xl);
  padding: 28px 28px 24px;
  margin-bottom: 24px;
}
.dco-hero-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.dco-hero-eyebrow {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 6px;
}
.dco-hero-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.dco-hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
}
.dco-hero-stat {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px 20px;
}
.dco-hero-stat-label {
  font-size: 11.5px; color: var(--t2); margin-bottom: 10px;
  text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}
.dco-hero-stat-value {
  font-size: 32px; font-weight: 700; letter-spacing: -0.03em; color: var(--gold);
}
.dco-hero-stat-sub { font-size: 11.5px; color: var(--t3); margin-top: 4px; }
@media (max-width: 760px) {
  .dco-hero { padding: 20px; }
  .dco-hero-title { font-size: 20px; }
  .dco-hero-stats { grid-template-columns: 1fr; }
  .dco-hero-stat-value { font-size: 26px; }
}
.table-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.table-title { font-size: 14px; font-weight: 600; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--t3); padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
}
.data-table td {
  padding: 16px 20px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
html[data-theme="light"] .data-table tr:hover td { background: rgba(25,25,30,0.04); }
html[data-theme="light"] .alert-error { color: #9f1239; }
html[data-theme="light"] .alert-success { color: #166534; }
html[data-theme="light"] .alert-info { color: #9a5600; }
.data-table tr.date-group td {
  background: var(--bg-3);
  color: var(--t2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
}
.data-table .sub { font-size: 11.5px; color: var(--t2); margin-top: 2px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.2s; }

/* Qr checkin */
.checkin-page {
  min-height: 100vh;
  display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center;
  padding: 24px;
}
.checkin-page > .alert-bar { width: 100%; max-width: 480px; }
.checkin-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 40px;
  width: 100%; max-width: 440px;
  text-align: center;
}
.checkin-icon {
  font-size: 40px; margin-bottom: 16px; color: var(--gold);
}
.checkin-info {
  background: var(--bg-3);
  border-radius: var(--r-md);
  padding: 14px;
  text-align: left;
  margin: 20px 0;
}
.checkin-info-row {
  display: flex; justify-content: space-between;
  font-size: 12.5px; padding: 4px 0;
}
.checkin-info-row .lbl { color: var(--t2); }
.checkin-info-row .val { font-weight: 500; }
.checkin-success {
  background: var(--success-bg);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--r-lg);
  padding: 20px;
  animation: slideUp 0.3s var(--ease);
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
}
.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 44px 40px;
  width: 100%; max-width: 440px;
}
.login-logo {
  display: block;
  margin-bottom: 32px;
}
.login-logo img {
  height: 56px;
  max-height: 56px;
  width: auto;
  display: block;
  object-fit: contain;
}
.login-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: var(--t2); margin-bottom: 28px; line-height: 1.55; }
.login-card.wide { max-width: 520px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; color: var(--t2); margin-top: 18px; flex-wrap: wrap; }
.auth-links a, .link-gold { color: var(--gold); }
.auth-links a:hover, .link-gold:hover { text-decoration: underline; }
.alert {
  display: none; align-items: flex-start; gap: 10px;
  padding: 10px 12px; margin-bottom: 16px;
  border-radius: var(--r-md); font-size: 12.5px; line-height: 1.5;
  border: 1px solid var(--border);
  background: var(--bg-3); color: var(--t2);
}
.alert.show { display: flex; }
.alert-bar { flex-wrap: wrap; align-items: center; margin: 0 0 16px; }
.alert-bar .alert-copy { flex: 1; min-width: 200px; }
.alert-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.alert-error   { border-color: rgba(239,68,68,0.3); background: var(--error-bg); color: #fca5a5; }
.alert-success { border-color: rgba(34,197,94,0.3); background: var(--success-bg); color: #86efac; }
.alert-info    { border-color: rgba(240,153,8,0.25); background: var(--gold-muted); color: var(--gold-dim); }
.field-error { font-size: 11.5px; color: var(--error); margin-top: 5px; min-height: 0; }
.field-error:empty { display: none; }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: rgba(239,68,68,0.5); }
.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; color: var(--t2); line-height: 1.5; cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0;
  accent-color: var(--gold); padding: 0; border-radius: 4px;
}
.input-suffix {
  display: flex; align-items: stretch;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-suffix:focus-within { border-color: var(--border-gold); box-shadow: 0 0 0 3px rgba(240,153,8,0.08); }
.input-suffix input {
  flex: 1; min-width: 0;
  background: transparent; border: 0; box-shadow: none; border-radius: var(--r-md) 0 0 var(--r-md);
}
.input-suffix input:focus { box-shadow: none; border: 0; }
.input-suffix-tail {
  display: flex; align-items: center;
  padding: 0 12px;
  font-size: 13px; color: var(--t2);
  background: var(--bg-4);
  border-left: 1px solid var(--border);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.input-suffix.is-invalid { border-color: rgba(239,68,68,0.5); }

.password-field { position: relative; }
.password-field input { padding-right: 42px; }
.password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: var(--r-sm);
  color: var(--t3); display: flex; align-items: center; justify-content: center;
}
.password-toggle:hover { color: var(--t1); background: var(--bg-4); }
.strength { margin-top: 8px; }
.strength-bar { display: flex; gap: 4px; height: 4px; }
.strength-bar span { flex: 1; border-radius: 2px; background: var(--bg-4); transition: background 0.2s; }
.strength[data-score="1"] .strength-bar span:nth-child(-n+1) { background: var(--error); }
.strength[data-score="2"] .strength-bar span:nth-child(-n+2) { background: var(--pending); }
.strength[data-score="3"] .strength-bar span:nth-child(-n+3) { background: var(--gold); }
.strength[data-score="4"] .strength-bar span { background: var(--success); }
.strength-label { font-size: 11px; color: var(--t2); margin-top: 5px; min-height: 14px; }
.strength[data-score="4"] .strength-label { color: var(--success); }
.rule-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; margin-top: 8px; }
.rule-list li { font-size: 11.5px; color: var(--t3); display: flex; align-items: center; gap: 6px; }
.rule-list li.ok { color: var(--success); }
.rule-list li:last-child { grid-column: 1 / -1; }
.otp-input {
  text-align: center; font-size: 24px; letter-spacing: 0.4em; font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 12px;
}
.captcha-box { margin: 12px 0; min-height: 0; display: flex; justify-content: center; }
.captcha-box[hidden] { display: none; }

/* Nav dropdown */
.nav-menu { position: relative; }
.nav-user-text { text-align: left; }
.nav-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 200px; padding: 6px;
  background: var(--bg-2); border: 1px solid var(--border-md);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  z-index: 200; animation: fadeIn 0.15s;
}
.nav-dropdown a, .nav-dropdown button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13px; color: var(--t2); text-align: left;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--bg-3); color: var(--t1); }
.nav-dropdown i { font-size: 15px; width: 16px; }
.nav-dropdown-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.avatar-img { border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
  margin: 0 auto; max-width: 720px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-2); border: 1px solid var(--border-md);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  font-size: 12.5px; color: var(--t2); line-height: 1.5;
  animation: slideUp 0.3s var(--ease);
}
.cookie-banner strong { color: var(--t1); }
.cookie-banner a { color: var(--gold); }
.cookie-text { flex: 1; min-width: 240px; }
.cookie-actions { display: flex; gap: 8px; }

.visitor-booking-banner {
  margin: calc(var(--nav-h) + 12px) auto 16px; max-width: 720px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px;
  background: var(--gold-muted); border: 1px solid var(--border-gold);
  border-radius: var(--r-lg); box-shadow: var(--shadow-md);
  font-size: 13px; color: var(--t1); line-height: 1.4;
  animation: fadeIn 0.3s var(--ease);
}
.visitor-booking-banner strong { color: var(--gold); }
.page .visitor-booking-banner,
.admin-content .visitor-booking-banner { margin-top: 0; }
.queue-card { gap: 10px; }
.queue-card-body {
  background: var(--bg-3); border-radius: var(--r-md); padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.queue-card-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  font-size: 12px; line-height: 1.3;
}
.queue-card-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--t3); font-weight: 600;
}
.queue-card-thumb {
  position: relative; display: block; width: 100%; padding: 0; margin-top: 2px;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden; cursor: zoom-in;
}
.queue-card-thumb img {
  display: block; width: 100%; max-height: 160px; object-fit: cover;
}
.queue-card-thumb-hint {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(8,9,10,0.78); color: var(--gold);
  font-size: 10.5px; padding: 3px 7px; border-radius: 99px;
  display: inline-flex; align-items: center; gap: 4px;
  opacity: 0; transition: opacity 0.15s ease;
}
.queue-card-thumb:hover .queue-card-thumb-hint,
.queue-card-thumb:focus-visible .queue-card-thumb-hint { opacity: 1; }
.queue-card-actions { display: flex; gap: 8px; }
.queue-card-actions .btn { flex: 1; }

.receipt-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.86);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px;
  animation: fadeIn 0.15s ease;
}
.receipt-lightbox-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; width: 100%; max-width: 900px;
  color: var(--t1); font-size: 13px;
}
.receipt-lightbox img {
  max-width: min(900px, 100%);
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: #fff;
}
.receipt-lightbox-hint { font-size: 11.5px; color: var(--t3); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Dashboard / settings */
.page-wrap { padding: calc(var(--nav-h) + 40px) 0 80px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--nav-h) + 24px); }
.settings-nav .sidebar-item {
  width: 100%; border: none;
  padding: 12px 14px; font-size: 14px; gap: 10px;
}
.settings-nav .sidebar-item i { font-size: 18px; }
.settings-section { margin-bottom: 24px; }
.settings-section .card { padding: 28px; }
.settings-section .card:hover { border-color: var(--border); }
.settings-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.settings-desc { font-size: 12.5px; color: var(--t2); margin-bottom: 18px; }
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-top: 1px solid var(--border);
}
.settings-row:first-of-type { border-top: none; padding-top: 0; }
.settings-row-text { min-width: 0; }
.settings-row-title { font-size: 13.5px; font-weight: 500; }
.settings-row-sub { font-size: 12px; color: var(--t2); margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.avatar-row { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.avatar-lg { width: 64px; height: 64px; border-radius: 50%; background: var(--gold-muted); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; overflow: hidden; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.session-item {
  display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border);
}
.session-item:first-child { border-top: none; padding-top: 0; }
.session-icon { width: 36px; height: 36px; border-radius: var(--r-md); background: var(--bg-3); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--t2); flex-shrink: 0; }
.session-meta { flex: 1; min-width: 0; }
.session-title { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.session-sub { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0 0; font-size: 12px; color: var(--t2); }
.meta-json { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--t3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }

/* Status + legal pages */
.status-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.status-code { font-size: 72px; font-weight: 800; letter-spacing: -0.05em; color: var(--gold); line-height: 1; }
.status-mark { width: 40px; height: 40px; display: block; margin: 10px auto 0; }
.status-title { font-size: 22px; font-weight: 700; margin-top: 16px; }
.status-sub { font-size: 14px; color: var(--t2); margin: 8px auto 24px; max-width: 420px; }
.legal { max-width: 760px; margin: 0 auto; padding: calc(var(--nav-h) + 48px) 24px 80px; }
.legal h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 6px; }
.legal .updated { font-size: 12px; color: var(--t3); margin-bottom: 32px; }
.legal h2 { font-size: 17px; font-weight: 600; margin: 32px 0 10px; }
.legal p, .legal li { font-size: 14px; color: var(--t2); line-height: 1.7; }
.legal ul { padding-left: 20px; margin: 8px 0; }
.legal a { color: var(--gold); }
.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: -999px; top: 8px; z-index: 1000; background: var(--gold); color: #000; padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 760px) {
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav {
    position: static;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--r-lg); padding: 10px;
  }
  .settings-nav .sidebar-section {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .settings-nav .sidebar-label { display: none; }
  .settings-nav .sidebar-item {
    padding: 14px 12px; font-size: 14px; font-weight: 500;
    justify-content: flex-start; min-height: 48px;
    border-radius: var(--r-md);
    background: var(--bg-3);
  }
  .settings-nav .sidebar-item.active { background: var(--gold-muted); }
  .form-grid { grid-template-columns: 1fr; }
  .rule-list { grid-template-columns: 1fr; }
  .nav-user-text { display: none; }
}
@media (max-width: 420px) {
  .settings-nav .sidebar-section { grid-template-columns: 1fr; }
}

/* Landing page */
.problem-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; margin-top: 48px;
}
.problem-card {
  padding: 28px;
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
}
.problem-card.before { background: var(--bg-1); }
.problem-card.after { background: var(--gold-muted); border-color: var(--border-gold); }
.problem-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--t3); margin-bottom: 16px;
}
.problem-card.after .problem-label { color: var(--gold); }
.problem-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--t2);
  margin-bottom: 10px;
}
.problem-card.after .problem-item { color: var(--t1); }
.colleges-strip {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 40px; justify-content: center;
}
.college-chip {
  font-size: 12px; font-weight: 500;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 99px;
  background: var(--bg-1);
  color: var(--t2);
  transition: all 0.15s;
}
.college-chip:hover { border-color: var(--border-hover); color: var(--t1); }
.college-chip.pilot { border-color: var(--border-gold); background: var(--gold-muted); color: var(--gold); }
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 80px;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand {
  display: flex; flex-direction: row; align-items: center; gap: 12px;
  font-size: 13px; color: var(--t2);
}
.footer-brand-lockup {
  height: 36px; width: auto;
  display: block;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: contain;
}
.footer-links { display: flex; gap: 20px; }
.footer-link { font-size: 12.5px; color: var(--t3); transition: color 0.15s; }
.footer-link:hover { color: var(--t1); }

/* Utils */
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s;
}
.modal {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 32px;
  width: 100%; max-width: 520px;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: slideUp 0.2s var(--ease);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.modal-title { font-size: 16px; font-weight: 700; }
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 300;
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 16px;
  font-size: 13.5px;
  box-shadow: var(--shadow-lg);
  animation: slideFromRight 0.25s var(--ease);
  max-width: 360px;
}
.toast.success { border-color: rgba(34,197,94,0.3); }
.toast.error   { border-color: rgba(239,68,68,0.3); }
@keyframes slideFromRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Responsive */
.mobile-filter-bar  { display: none; }
.admin-mobile-nav   { display: none; }
.mobile-tabbar      { display: none; }

/* Ux polish — site-wide affordances */
.table-wrap { position: relative; }
.table-wrap::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 28px;
  background: linear-gradient(to left, var(--bg-2), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.table-wrap[data-scroll="1"]::after { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 768px) {
  .btn, .nav-admin-link, .mobile-tabbar-item, [role="button"],
  .admin-mobile-nav-item, .sidebar-item {
    min-height: 44px;
  }
}
a[aria-disabled="true"], a.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}
@media (max-width: 768px) {
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 90;
    backdrop-filter: blur(8px);
  }
  .mobile-tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    font-size: 10.5px;
    color: var(--t2);
    text-decoration: none;
    border-radius: 10px;
  }
  .mobile-tabbar-item i { font-size: 20px; }
  .mobile-tabbar-item.active { color: var(--gold); }
  .mobile-tabbar-item:active { background: var(--bg-3); }
  .mobile-tabbar-item.primary {
    position: relative;
    color: #111;
  }
  .mobile-tabbar-item.primary i {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px; height: 52px;
    background: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #111;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  }
  .mobile-tabbar-item.primary span {
    color: var(--gold);
    margin-top: 34px;
    font-weight: 600;
  }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (max-width: 359px) {
  .nav-actions .nav-register { display: none; }
}
@media (max-width: 768px) {
  input, select, textarea { font-size: 16px !important; }
  button, .btn, a, .resource-card, .slot-date, .slot-item, .user-type-card, .sidebar-item, .admin-nav-item, .admin-mobile-nav-item {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .nav { padding: 0 16px; gap: 8px; }
  .nav-links { display: none; }
  .nav-user > div:last-of-type { display: none; }
  .hero { padding: 80px 20px 56px; min-height: 100svh; }
  .hero-eyebrow { font-size: 11px; padding: 4px 12px; text-align: center; }
  .hero-headline { font-size: clamp(30px, 10vw, 52px); }
  .hero-sub { font-size: 15px; margin-bottom: 32px; }
  .hero-actions { flex-direction: column; width: 100%; max-width: 320px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .hero-stat { margin-top: 40px; padding-top: 24px; gap: 16px; max-width: 360px; }
  .hero-stat-n { font-size: 22px; }
  .hero-stat-l { font-size: 10px; }
  #campus-photo-grid {
    grid-template-columns: 1fr !important;
    height: auto !important;
  }
  #campus-photo-grid > div {
    height: 180px;
    background-position: center !important;
  }
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
  .section-title { font-size: clamp(22px, 7vw, 34px); }
  .section-sub { font-size: 14px; }
  .problem-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 32px; }
  .problem-card { padding: 20px; }
  .feature-grid { grid-template-columns: 1fr; margin-top: 32px; }
  .feature-tile { padding: 20px; }
  .steps {
    flex-direction: column;
    gap: 20px;
    margin-top: 32px;
  }
  .steps::before { display: none; }
  .step {
    display: grid;
    grid-template-columns: 40px 1fr;
    text-align: left;
    padding: 0;
    gap: 0 12px;
  }
  .step-num { margin-bottom: 0; grid-row: 1 / 3; align-self: center; }
  .step-title { grid-column: 2; }
  .step-desc  { grid-column: 2; }
  .footer { padding: 28px 0; margin-top: 40px; }
  .footer-inner { flex-direction: column; text-align: center; gap: 16px; }
  .footer-brand { flex-direction: row; gap: 12px; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 16px; }
  .colleges-strip { gap: 8px; margin-top: 24px; }
  .college-chip { font-size: 11px; padding: 5px 10px; }
  .browse-layout {
    grid-template-columns: 1fr;
    padding: 12px 16px 80px;
    gap: 12px;
  }
  .browse-sidebar { display: none; }
  .browse-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
  .browse-header { flex-wrap: wrap; gap: 8px; }
  .mobile-filter-bar {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-filter-bar::-webkit-scrollbar { display: none; }
  .mobile-filter-chip {
    flex-shrink: 0;
    font-size: 12px; font-weight: 500;
    padding: 6px 14px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg-2);
    color: var(--t2);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-filter-chip.active {
    border-color: var(--border-gold);
    background: var(--gold-muted);
    color: var(--gold);
  }
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 92vh;
    max-width: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideUpSheet 0.28s var(--ease);
  }
  @keyframes slideUpSheet {
    from { transform: translateY(100%); opacity: 1; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .modal::before {
    content: '';
    display: block;
    width: 36px; height: 4px;
    background: var(--border-md);
    border-radius: 2px;
    margin: 0 auto 20px;
  }
  .book-layout {
    grid-template-columns: 1fr;
    padding: 16px 16px 90px;
    gap: 16px;
  }
  .book-sidebar { order: -1; }
  .booking-summary {
    position: static;
    padding: 14px 16px;
  }
  .lock-timer { margin-top: 10px; }
  .stepper-label { font-size: 10px; }
  .stepper-dot { width: 24px; height: 24px; font-size: 11px; }
  .stepper::before { top: 12px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .confirm-screen { padding: 20px 0; }
  .confirm-icon { width: 60px; height: 60px; font-size: 26px; }
  .login-card {
    padding: 28px 20px;
    max-width: 100%;
    border-radius: var(--r-xl);
  }
  .login-page { align-items: flex-start; padding-top: 24px; }
  .checkin-card { padding: 28px 20px; }
  .admin-layout { padding-left: 0; }
  .admin-sidebar { display: none; }
  .admin-content {
    padding: 16px 16px;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .stats-grid-2 { grid-template-columns: 1fr; }
  .stats-grid-4 { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 14px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 11px; }
  .admin-header { flex-wrap: wrap; gap: 10px; }
  .page-title { font-size: 18px; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 560px; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  .admin-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 90;
    padding: 6px 6px;
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .admin-mobile-nav::-webkit-scrollbar { display: none; }
  .admin-mobile-nav::after {
    content: ""; position: fixed; right: 0; bottom: 0;
    width: 24px; height: 60px; pointer-events: none;
    background: linear-gradient(to right, transparent, var(--nav-bg));
    z-index: 91;
  }
  .admin-mobile-nav-item {
    flex: 0 0 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 4px;
    border-radius: var(--r-md);
    color: var(--t3);
    font-size: 9.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.12s, background 0.12s;
    text-align: center;
    scroll-snap-align: center;
    -webkit-tap-highlight-color: transparent;
  }
  .admin-mobile-nav-item i { font-size: 20px; line-height: 1; }
  .admin-mobile-nav-item.active {
    color: var(--gold);
    background: var(--gold-muted);
  }
  .admin-mobile-nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
  .toast {
    left: 12px; right: 12px; bottom: 80px;
    max-width: none;
    font-size: 13px;
  }
}
@media (max-width: 480px) {
  .hero-headline { font-size: clamp(26px, 9vw, 38px); }
  .hero-sub { font-size: 14px; }
  .browse-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .checkin-card { padding: 20px 14px; }
  .login-card { padding: 24px 16px; }
  .step-title-sm { font-size: 17px; }
  .btn-lg { font-size: 14px; padding: 10px 18px; }
  #campus-photo-grid > div:nth-child(2),
  #campus-photo-grid > div:nth-child(3) { display: none; }
}

/* Ios scroll & interaction polish */
body.modal-open { overflow: hidden; }
.slot-dates,
.mobile-filter-bar,
.table-wrap,
.admin-mobile-nav,
.admin-sidebar {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}
.btn, .resource-card, .slot-item, .slot-date,
.user-type-card, .admin-nav-item,
.admin-mobile-nav-item, .mobile-filter-chip,
.sidebar-item, .stepper-step {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.live-slot { font-size: 11px; padding: 6px 8px; border-radius: 6px; background: var(--bg-3); color: var(--t2); display: flex; flex-direction: column; min-width: 52px; }
.live-slot small { font-size: 10px; color: var(--t3); }
.live-slot.busy { background: var(--gold-muted); color: var(--gold); }
.live-slot.pending { background: var(--pending-bg); color: var(--pending); }
.live-slot.in { background: var(--success-bg); color: var(--success); }
.kind-picker {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.kind-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--t2); font-size: 12.5px; font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.kind-btn i { font-size: 22px; color: var(--t3); transition: color 0.12s; }
.kind-btn:hover { background: var(--bg-3); color: var(--t1); }
.kind-btn.active {
  background: var(--gold-muted); border-color: var(--gold);
  color: var(--gold);
}
.kind-btn.active i { color: var(--gold); }
@media (max-width: 480px) {
  .kind-picker { grid-template-columns: 1fr; }
  .kind-btn { flex-direction: row; justify-content: flex-start; padding: 12px 14px; font-size: 14px; }
  .kind-btn i { font-size: 18px; }
}
.priority-banner {
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(139,92,246,0.08));
  border: 1px solid var(--border-gold);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.priority-banner i { font-size: 24px; color: var(--gold); margin-top: 2px; }
.priority-banner-title { font-size: 15px; font-weight: 600; color: var(--t1); }
.priority-banner-sub { font-size: 12.5px; color: var(--t3); margin-top: 4px; line-height: 1.5; }
.priority-banner.priority-paid { background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(255,255,255,0.03)); }
.priority-banner.priority-teacher { background: linear-gradient(135deg, rgba(16,185,129,0.14), rgba(255,255,255,0.03)); }
.priority-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px; margin-top: 16px;
}
.priority-day {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
}
.priority-day.is-today {
  background: linear-gradient(135deg, rgba(212,175,55,0.14), rgba(139,92,246,0.08));
  border-color: var(--gold);
}
.priority-day-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--t1);
  margin-bottom: 8px;
}
.priority-day-head i { font-size: 20px; color: var(--gold); }
.priority-today-pill {
  margin-left: auto;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); background: var(--gold-muted);
  padding: 2px 8px; border-radius: 99px;
}
.priority-day-body { font-size: 13px; color: var(--t2); }
.priority-day--edit input,
.priority-day--edit select {
  font-size: 12px !important; padding: 6px 10px; min-height: 32px; width: 100%;
}
.priority-day--edit .form-label { margin-bottom: 2px; color: var(--t3); }
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--t3); font-size: 13px;
}
.empty-state i { font-size: 32px; display: block; margin-bottom: 10px; color: var(--t3); opacity: 0.6; }
.empty-state-title { font-size: 14px; font-weight: 600; color: var(--t2); margin-bottom: 4px; }
.skeleton {
  display: inline-block;
  background: linear-gradient(90deg, var(--bg-3) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--r-sm);
  color: transparent;
  user-select: none;
  pointer-events: none;
}
.skeleton-row    { display: block; height: 44px; margin-bottom: 10px; width: 100%; }
.skeleton-card   { display: block; height: 110px; margin-bottom: 12px; width: 100%; }
.skeleton-text   { height: 12px; width: 80%; vertical-align: middle; }
.skeleton-text.sk-sm  { height: 10px; }
.skeleton-text.sk-lg  { height: 16px; }
.skeleton-text.w-30 { width: 30%; } .skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-50 { width: 50%; } .skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-70 { width: 70%; } .skeleton-text.w-80 { width: 80%; }
.skeleton-title  { height: 18px; width: 60%; margin-bottom: 8px; }
.skeleton-badge  { height: 20px; width: 72px; border-radius: 99px; }
.skeleton-avatar { width: 32px; height: 32px; border-radius: 50%; }
.skeleton-chart  { display: block; height: 180px; width: 100%; }
.skeleton-pill   { height: 16px; width: 28px; border-radius: 99px; }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skeleton { animation: none; background: var(--bg-3); }
}
.admin-contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.admin-contact {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.admin-contact-head { display: flex; flex-direction: column; gap: 2px; }
.admin-contact-name { font-size: 14px; font-weight: 600; }
.admin-contact-role { font-size: 12px; color: var(--t3); }
.admin-contact-links { display: flex; flex-direction: column; gap: 6px; }
.admin-contact-phone,
.admin-contact-email {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; text-decoration: none;
}
.admin-contact-phone { color: var(--gold); font-weight: 500; }
.admin-contact-email { color: var(--t2); }
.admin-contact-phone i, .admin-contact-email i { font-size: 14px; }
.admin-contact-nophone { font-size: 12px; color: var(--t3); font-style: italic; }
.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.filter-bar .filter-field {
  width: 100%;
  padding: 9px 12px;
  font-size: 13px;
  min-height: 40px;
  box-sizing: border-box;
}
.filter-date-group {
  display: flex; gap: 8px; align-items: stretch; min-width: 0;
}
.filter-date-group .filter-field { flex: 1; min-width: 0; width: auto; }
.filter-date-group .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 540px) {
  .filter-bar { grid-template-columns: 1fr; padding: 12px; }
}
.live-stack { display: flex; flex-direction: column; gap: 24px; }
.live-section { }
.live-section-head {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 600; color: var(--t1);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.live-section-head i { font-size: 18px; color: var(--gold); }
.live-section-count {
  margin-left: auto;
  font-size: 11px; font-weight: 600;
  color: var(--t3);
  background: var(--bg-3); border-radius: 99px; padding: 2px 10px;
}
.live-card {
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .15s ease, transform .15s ease;
}
.live-card:hover { border-color: var(--border-gold); }
.live-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
}
.live-card-name { font-weight: 600; font-size: 14px; }
.live-card-loc { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
.live-card-badge {
  font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px;
  background: var(--bg-3); color: var(--t2); white-space: nowrap;
}
.live-card-badge.free { background: var(--success-bg); color: var(--success); }
.live-card-badge.mid  { background: var(--pending-bg); color: var(--pending); }
.live-card-badge.full { background: var(--gold-muted); color: var(--gold); }
.live-stay {
  background: var(--bg-3); border-radius: var(--r-md); padding: 10px 12px;
}
.live-stay-name { font-size: 13px; font-weight: 600; }
.live-stay-meta { font-size: 11.5px; color: var(--t3); margin-top: 2px; }
.live-stay-phone { margin-top: 6px; font-size: 12.5px; }
.live-stay-phone a {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--gold); font-weight: 500; text-decoration: none;
}
.live-stay-phone i { font-size: 13px; }
.live-stay-empty {
  font-size: 12px; color: var(--t3); padding: 10px 12px;
  background: var(--bg-3); border-radius: var(--r-md);
  text-align: center;
}
.live-court-group { margin-bottom: 18px; }
.live-court-group:last-child { margin-bottom: 0; }
.live-court-head {
  font-size: 12.5px; font-weight: 600; color: var(--t2);
  margin-bottom: 10px; padding: 6px 2px;
}
.live-court-head span { color: var(--t3); font-weight: 500; }

#dhue-intro {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: #19191e;
  transition: opacity .7s ease, visibility .7s;
  cursor: pointer;
}
#dhue-intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
#dhue-intro svg { width: min(520px, 80vw); height: auto; display: block; }
html.dhue-intro-skip #dhue-intro { display: none; }
@supports (padding: max(0px)) {
  .nav  { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .hero { padding-top: max(80px, calc(56px + env(safe-area-inset-top))); }
}
.nav-bell { position: relative; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; color: var(--t2); font-size: 18px; text-decoration: none; }
.nav-bell:hover { color: var(--t1); }
.unread-dot { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--error); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }
.unread-dot[hidden] { display: none; }
.unread-dot-inline { position: static; margin-left: auto; }
.mobile-tabbar-item { position: relative; }
.mobile-tabbar-item .unread-dot { top: 2px; right: calc(50% - 20px); }
.notify-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.notify-device-text { flex: 1 1 220px; font-size: 13px; color: var(--t2); }
.notify-list { display: flex; flex-direction: column; gap: 8px; }
.notify-item { display: flex; align-items: flex-start; gap: 4px; padding: 6px; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.notify-item-link { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 8px; color: inherit; text-decoration: none; }
.notify-item-delete { flex-shrink: 0; width: 44px; height: 44px; color: var(--t3); }
.notify-item.is-unread { border-color: var(--border-gold); }
.notify-item-icon { flex-shrink: 0; font-size: 20px; color: var(--gold); }
.notify-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.notify-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.notify-item-text { font-size: 13px; color: var(--t2); overflow-wrap: anywhere; }
.notify-item-time { font-size: 11.5px; color: var(--t3); overflow-wrap: anywhere; }
.toast-stack { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast-stack .toast { position: static; }
.browse-main { min-width: 0; }

@media (max-width: 768px) {
  .toast-stack { left: 12px; right: 12px; bottom: 100px; }
  .cookie-banner { z-index: 150; font-size: 12px; padding: 10px 12px; gap: 8px; }
  .mobile-tabbar ~ .cookie-banner, .admin-mobile-nav ~ .cookie-banner { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .cookie-text { min-width: 0; flex-basis: 100%; }
  .data-table { min-width: 0; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody { display: block; }
  .data-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--border); }
  .data-table tr:last-child { border-bottom: none; }
  .data-table td { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 6px 14px; border: none; text-align: right; }
  .data-table td::before { content: attr(data-label); color: var(--t3); font-size: 11.5px; text-align: left; }
  .data-table td:not([data-label])::before { content: none; }
  .data-table td:not([data-label]) { justify-content: flex-end; }
  .data-table td[colspan] { display: block; text-align: center; }
  .table-wrap::after { display: none; }
  .nav-bell, .btn-icon, .password-toggle { width: 44px; height: 44px; }
  .btn-sm { min-width: 44px; min-height: 44px; }
  .theme-toggle { position: relative; }
  .theme-toggle::before { content: ''; position: absolute; inset: -8px -2px; }
  .mobile-filter-chip { min-height: 44px; display: inline-flex; align-items: center; }
  #resource-modal .btn-icon { flex-shrink: 0; }
  .tab-panel select, .tab-panel input { min-height: 44px; }
  .link-gold, #forgot-link, .footer a, .auth-links a, .admin-contact-links a { display: inline-block; min-width: 44px; padding-top: 12px; padding-bottom: 12px; }
  .nav-user { min-height: 44px; }
}
@media (max-width: 560px) {
  .stats-grid-2 { grid-template-columns: 1fr; }
}
