/* =====================================================================
   Hillandale Golf Auto Booker — Premium Stylesheet
   ===================================================================== */

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

/* =====================================================================
   Design Tokens
   ===================================================================== */
:root {
  /* Core palette */
  --green-950: #091f13;
  --green-900: #0d2818;
  --green-800: #163d24;
  --green-700: #1e5631;
  --green-600: #27713f;
  --green-500: #34a853;
  --green-400: #5ec27a;
  --green-300: #8cd4a0;
  --gold-500: #c4a35a;
  --gold-400: #d4b97a;
  --gold-300: #e4cf9a;
  --cream-100: #faf7f2;
  --cream-200: #f5f0e8;
  --cream-300: #ece5d8;
  --cream-400: #ddd4c4;
  --amber-500: #d4920a;
  --amber-100: #fef3cd;
  --amber-900: #856404;
  --red-500: #c0392b;
  --red-100: #f8d7da;
  --red-900: #721c24;
  --confirm-500: #27ae60;
  --confirm-100: #d4edda;
  --confirm-900: #155724;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,.05);
  --sh-sm: 0 2px 8px rgba(0,0,0,.08);
  --sh-md: 0 4px 16px rgba(0,0,0,.1);
  --sh-lg: 0 8px 32px rgba(0,0,0,.12);
  --sh-xl: 0 16px 48px rgba(0,0,0,.16);
  --sh-glow-green: 0 0 24px rgba(39,113,63,.35);
  --sh-glow-gold: 0 0 20px rgba(196,163,90,.3);

  /* Transitions */
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: .15s;
  --t-normal: .25s;
  --t-slow: .4s;

  /* Z layers */
  --z-header: 100;
  --z-sheet: 200;
  --z-overlay: 190;
  --z-toast: 300;
}

/* --- Dark theme (default) --- */
[data-theme="dark"] {
  --bg-body: var(--green-950);
  --bg-card: rgba(22,61,36,.55);
  --bg-card-solid: #163d24;
  --bg-card-hover: rgba(30,86,49,.65);
  --bg-input: rgba(255,255,255,.07);
  --bg-input-focus: rgba(255,255,255,.12);
  --bg-header: linear-gradient(135deg, #091f13 0%, #163d24 60%, #1e5631 100%);
  --bg-badge: rgba(255,255,255,.06);
  --border-subtle: rgba(255,255,255,.08);
  --border-card: rgba(255,255,255,.1);
  --border-input: rgba(255,255,255,.15);
  --text-primary: #f0ede6;
  --text-secondary: rgba(240,237,230,.7);
  --text-muted: rgba(240,237,230,.4);
  --text-inverse: #0d2818;
  --glass-bg: rgba(22,61,36,.45);
  --glass-border: rgba(255,255,255,.1);
  --glass-bg-heavy: rgba(13,40,24,.75);
  --glass-bg-light: rgba(255,255,255,.04);
  --skeleton-base: rgba(255,255,255,.06);
  --skeleton-shine: rgba(255,255,255,.1);
  --scrollbar-track: rgba(255,255,255,.03);
  --scrollbar-thumb: rgba(255,255,255,.1);
  --cal-today: rgba(196,163,90,.15);
  --cal-slot-confirmed: rgba(39,174,96,.2);
  --cal-slot-pending: rgba(212,146,10,.2);
  --cal-slot-cancelled: rgba(192,57,43,.15);
  color-scheme: dark;
}

/* --- Light theme --- */
[data-theme="light"] {
  --bg-body: var(--cream-200);
  --bg-card: rgba(255,255,255,.7);
  --bg-card-solid: #ffffff;
  --bg-card-hover: rgba(255,255,255,.85);
  --bg-input: rgba(0,0,0,.04);
  --bg-input-focus: rgba(0,0,0,.06);
  --bg-header: linear-gradient(135deg, #163d24 0%, #1e5631 60%, #27713f 100%);
  --bg-badge: rgba(0,0,0,.04);
  --border-subtle: rgba(0,0,0,.06);
  --border-card: rgba(0,0,0,.08);
  --border-input: rgba(0,0,0,.12);
  --text-primary: #1a1a1a;
  --text-secondary: rgba(26,26,26,.65);
  --text-muted: rgba(26,26,26,.4);
  --text-inverse: #f0ede6;
  --glass-bg: rgba(255,255,255,.55);
  --glass-border: rgba(0,0,0,.08);
  --glass-bg-heavy: rgba(255,255,255,.8);
  --glass-bg-light: rgba(0,0,0,.02);
  --skeleton-base: rgba(0,0,0,.05);
  --skeleton-shine: rgba(0,0,0,.08);
  --scrollbar-track: rgba(0,0,0,.03);
  --scrollbar-thumb: rgba(0,0,0,.12);
  --cal-today: rgba(196,163,90,.12);
  --cal-slot-confirmed: rgba(39,174,96,.15);
  --cal-slot-pending: rgba(212,146,10,.15);
  --cal-slot-cancelled: rgba(192,57,43,.1);
  color-scheme: light;
}

/* =====================================================================
   Global
   ===================================================================== */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--t-slow) var(--ease-out), color var(--t-slow) var(--ease-out);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }

/* =====================================================================
   Glass Morphism
   ===================================================================== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border: 1px solid var(--glass-border);
}

.glass-heavy {
  background: var(--glass-bg-heavy);
  backdrop-filter: blur(32px) saturate(1.3);
  -webkit-backdrop-filter: blur(32px) saturate(1.3);
  border: 1px solid var(--glass-border);
}

.glass-light {
  background: var(--glass-bg-light);
  border: 1px solid var(--border-subtle);
}

/* =====================================================================
   Scroll Reveal
   ===================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out);
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* =====================================================================
   PASSCODE GATE
   ===================================================================== */
.gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(145deg, #050f0a 0%, #0d2818 35%, #163d24 70%, #1e5631 100%);
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.gate-particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.6;
}

.gate-card {
  position: relative;
  z-index: 10;
  border-radius: var(--r-xl);
  padding: 3rem 2.25rem 2.5rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: gateCardIn .8s var(--ease-out);
}
.gate-card * {
  position: relative;
  z-index: 1;
}
.gate-form {
  position: relative;
  z-index: 20;
}
.gate-form input,
.gate-form button {
  position: relative;
  z-index: 30;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

@keyframes gateCardIn {
  from { opacity: 0; transform: translateY(30px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.gate-logo-ring {
  position: absolute;
  inset: -12px;
  border: 2px solid var(--gold-500);
  border-radius: 50%;
  opacity: .3;
  animation: ringPulse 3s ease-in-out infinite;
}

@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: .3; }
  50%      { transform: scale(1.12); opacity: .15; }
}

.gate-icon {
  width: 64px;
  height: 64px;
  color: var(--gold-500);
  filter: drop-shadow(0 0 8px rgba(196,163,90,.3));
}

.gate-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 2rem);
  font-weight: 700;
  color: var(--cream-100);
  letter-spacing: .02em;
  margin-bottom: .15rem;
}

.gate-subtitle {
  font-size: .8rem;
  font-weight: 500;
  color: var(--gold-400);
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.gate-divider {
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-500), transparent);
  margin: 0 auto 1.75rem;
}

.gate-form { display: flex; flex-direction: column; gap: .75rem; }

.gate-input-wrap {
  display: flex;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-lg), inset 0 0 0 1px rgba(255,255,255,.08);
  transition: box-shadow var(--t-normal) var(--ease-out);
}

.gate-input-wrap:focus-within {
  box-shadow: var(--sh-lg), var(--sh-glow-gold), inset 0 0 0 1px rgba(196,163,90,.3);
}

.gate-input-wrap {
  position: relative;
  z-index: 20;
}

.gate-input {
  flex: 1;
  padding: 1.1rem 1.4rem;
  font-size: 1.15rem;
  min-height: 52px;
  cursor: text;
  font-family: inherit;
  background: rgba(255,255,255,.92);
  border: none;
  outline: none;
  color: #1a1a1a;
  letter-spacing: .05em;
}

.gate-input::placeholder { color: #aaa; }
.gate-input:focus { background: #fff; }

[data-theme="light"] .gate-input {
  background: rgba(255,255,255,.95);
}

.gate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .95rem 1.4rem;
  background: var(--gold-500);
  color: var(--green-950);
  border: none;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.gate-btn:hover { background: var(--gold-400); }
.gate-btn:active { transform: scale(.94); }

.gate-error {
  color: #ff9999;
  font-size: .85rem;
  font-weight: 500;
  animation: errorShake .45s var(--ease-out);
}

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  15%  { transform: translateX(-8px); }
  30%  { transform: translateX(8px); }
  45%  { transform: translateX(-6px); }
  60%  { transform: translateX(6px); }
  75%  { transform: translateX(-3px); }
  90%  { transform: translateX(3px); }
}

.gate-footer {
  margin-top: 2rem;
  font-size: .75rem;
  color: rgba(196,163,90,.4);
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* =====================================================================
   HEADER
   ===================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  overflow: hidden;
}

.header-gradient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-header);
  z-index: -1;
}

.header-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.header-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-500);
  flex-shrink: 0;
}

.header-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  font-weight: 700;
  color: var(--cream-100);
  line-height: 1.2;
}

.header-tagline {
  font-size: .7rem;
  font-weight: 400;
  color: rgba(245,240,232,.45);
  letter-spacing: .08em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.header-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-sm);
  color: rgba(245,240,232,.6);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
}

.header-btn:hover {
  background: rgba(255,255,255,.12);
  color: var(--cream-100);
  transform: translateY(-1px);
}

.header-btn:active { transform: scale(.92); }

/* Theme toggle icon visibility */
[data-theme="dark"] .icon-sun  { display: block; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: block; }

/* Sound toggle icon visibility */
.icon-sound-off { display: none; }
body.sound-off .icon-sound-on { display: none; }
body.sound-off .icon-sound-off { display: block; }

/* =====================================================================
   MAIN
   ===================================================================== */
.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* =====================================================================
   STATS ROW
   ===================================================================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.stat-card {
  border-radius: var(--r-lg);
  padding: 1.15rem 1rem;
  display: flex;
  align-items: center;
  gap: .85rem;
  transition: transform var(--t-normal) var(--ease-spring), box-shadow var(--t-normal) var(--ease-out);
  cursor: default;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-lg);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-bookings { background: rgba(39,113,63,.2); color: var(--green-400); }
.stat-icon-success  { background: rgba(39,174,96,.15); color: var(--confirm-500); }
.stat-icon-upcoming { background: rgba(196,163,90,.15); color: var(--gold-500); }
.stat-icon-weather  { background: rgba(100,149,237,.15); color: #6495ed; }

[data-theme="light"] .stat-icon-bookings { background: rgba(30,86,49,.1); color: var(--green-700); }
[data-theme="light"] .stat-icon-success  { background: rgba(39,174,96,.1); color: var(--confirm-500); }
[data-theme="light"] .stat-icon-upcoming { background: rgba(196,163,90,.12); color: var(--gold-500); }
[data-theme="light"] .stat-icon-weather  { background: rgba(100,149,237,.1); color: #4a7ecc; }

.stat-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: .72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .03em;
}

/* =====================================================================
   SECTIONS
   ===================================================================== */
.section {
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: box-shadow var(--t-normal) var(--ease-out);
}

.section:hover {
  box-shadow: var(--sh-md);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 1rem;
}

.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.15rem, 3vw, 1.35rem);
  font-weight: 600;
  color: var(--text-primary);
}

.section-badge {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold-500);
  background: rgba(196,163,90,.12);
  padding: .25rem .65rem;
  border-radius: var(--r-sm);
  border: 1px solid rgba(196,163,90,.2);
}

.section-desc {
  font-size: .875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease-out);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--bg-input-focus);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.icon-btn:active { transform: scale(.9); }

.icon-btn.spinning svg {
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================================
   CALENDAR
   ===================================================================== */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.calendar-week-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 90px;
  text-align: center;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: .5rem;
}

.cal-day {
  border-radius: var(--r-sm);
  padding: .6rem .4rem;
  text-align: center;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--glass-bg-light);
  border: 1px solid var(--border-subtle);
  transition: background var(--t-fast), transform var(--t-fast);
  position: relative;
}

.cal-day:hover { background: var(--bg-input-focus); }

.cal-day.cal-today {
  background: var(--cal-today);
  border-color: var(--gold-500);
  box-shadow: inset 0 0 0 1px rgba(196,163,90,.15);
}

.cal-day-label {
  font-size: .65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.cal-day-num {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.cal-slot {
  font-size: .58rem;
  font-weight: 600;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-slot-confirmed {
  background: var(--cal-slot-confirmed);
  color: var(--confirm-500);
}

.cal-slot-pending {
  background: var(--cal-slot-pending);
  color: var(--amber-500);
}

.cal-slot-cancelled {
  background: var(--cal-slot-cancelled);
  color: var(--red-500);
}

/* =====================================================================
   BOOKINGS
   ===================================================================== */
.bookings-grid {
  display: grid;
  gap: .75rem;
}

/* Skeleton loader */
.skeleton-card {
  height: 100px;
  border-radius: var(--r-md);
  background: var(--skeleton-base);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--skeleton-shine) 50%, transparent 100%);
  animation: shimmer 1.8s ease-in-out infinite;
}

.skeleton-activity {
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--skeleton-base);
  position: relative;
  overflow: hidden;
  margin-bottom: 6px;
}

.skeleton-activity::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--skeleton-shine) 50%, transparent 100%);
  animation: shimmer 1.8s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Booking card */
.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  transition: transform var(--t-normal) var(--ease-spring), box-shadow var(--t-normal) var(--ease-out), background var(--t-fast);
  animation: cardSlideIn .45s var(--ease-out) both;
}

.booking-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
  background: var(--bg-card-hover);
}

@keyframes cardSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Pulse on pending cards */
.booking-card.is-pending {
  animation: cardSlideIn .45s var(--ease-out) both, pendingPulse 3s ease-in-out infinite 1s;
}

@keyframes pendingPulse {
  0%, 100% { box-shadow: var(--sh-sm); }
  50%      { box-shadow: var(--sh-sm), 0 0 16px rgba(212,146,10,.15); }
}

.booking-info { flex: 1; min-width: 0; }

.booking-date {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: .1rem;
}

.booking-time {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: .45rem;
}

.booking-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.booking-course {
  font-size: .75rem;
  color: var(--text-muted);
}

.booking-players {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-badge);
  padding: .15rem .5rem;
  border-radius: 4px;
}

.booking-countdown {
  font-size: .7rem;
  font-weight: 600;
  color: var(--amber-500);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .4rem;
}

.booking-countdown-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber-500);
  animation: countdownBlink 1.5s ease-in-out infinite;
}

@keyframes countdownBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .22rem .6rem;
  border-radius: 5px;
}

.badge-confirmed { background: var(--confirm-100); color: var(--confirm-900); }
.badge-pending   { background: var(--amber-100); color: var(--amber-900); }
.badge-cancelled { background: var(--red-100); color: var(--red-900); }

[data-theme="dark"] .badge-confirmed { background: rgba(39,174,96,.2); color: var(--green-300); }
[data-theme="dark"] .badge-pending   { background: rgba(212,146,10,.2); color: var(--gold-300); }
[data-theme="dark"] .badge-cancelled { background: rgba(192,57,43,.2); color: #e8a8a8; }

/* Booking actions */
.booking-actions {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex-shrink: 0;
}

/* =====================================================================
   BUTTONS
   ===================================================================== */
.btn {
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  padding: .55rem 1.15rem;
  border-radius: var(--r-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  white-space: nowrap;
  transition: all var(--t-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.15);
  opacity: 0;
  transition: opacity var(--t-fast);
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn:disabled::after { display: none; }

.btn-primary {
  background: var(--green-700);
  color: #fff;
  box-shadow: var(--sh-sm);
}

.btn-primary:hover {
  box-shadow: var(--sh-md), var(--sh-glow-green);
}

.btn-glow {
  animation: btnGlowPulse 3s ease-in-out infinite;
}

@keyframes btnGlowPulse {
  0%, 100% { box-shadow: var(--sh-sm); }
  50%      { box-shadow: var(--sh-sm), 0 0 20px rgba(30,86,49,.25); }
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-input-focus);
}

.btn-confirm {
  background: var(--confirm-500);
  color: #fff;
  box-shadow: var(--sh-xs);
}

.btn-confirm:hover { box-shadow: var(--sh-sm), 0 0 12px rgba(39,174,96,.25); }

.btn-cancel {
  background: transparent;
  color: var(--red-500);
  border: 1px solid var(--red-500);
}

.btn-cancel:hover {
  background: var(--red-500);
  color: #fff;
}

/* Ripple effect on buttons */
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  transform: scale(0);
  animation: rippleOut .5s var(--ease-out);
  pointer-events: none;
}

@keyframes rippleOut {
  to { transform: scale(4); opacity: 0; }
}

/* =====================================================================
   SCHEDULE SETTINGS
   ===================================================================== */
.schedule-days {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: 1.5rem;
}

.day-row {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: box-shadow var(--t-normal) var(--ease-out), border-color var(--t-fast);
}

.day-row.active {
  box-shadow: var(--sh-sm);
  border-color: rgba(196,163,90,.2);
}

.day-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background var(--t-fast);
}

.day-header:hover { background: var(--bg-input); }

/* Custom toggle switch */
.day-toggle, .toggle-switch {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
  flex-shrink: 0;
}

.day-toggle::after, .toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: transform var(--t-normal) var(--ease-spring), background var(--t-fast);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.day-toggle:checked, .toggle-switch:checked {
  background: var(--green-600);
  border-color: var(--green-500);
}

.day-toggle:checked::after, .toggle-switch:checked::after {
  transform: translateX(20px);
  background: #fff;
}

.day-name {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text-primary);
  flex: 1;
  transition: color var(--t-fast);
}

.day-row:not(.active) .day-name { color: var(--text-muted); }

.day-times {
  padding: 0 1rem 1rem;
  display: none;
  animation: timesIn .3s var(--ease-out);
}

.day-row.active .day-times { display: block; }

@keyframes timesIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .75rem;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  padding: .35rem .65rem;
  border-radius: var(--r-sm);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-primary);
  animation: chipIn .25s var(--ease-spring);
}

@keyframes chipIn {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

.time-chip-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
  padding: 0 .1rem;
  transition: color var(--t-fast), transform var(--t-fast);
  display: flex;
  align-items: center;
}

.time-chip-remove:hover { color: var(--red-500); transform: scale(1.15); }

.add-time-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.time-input {
  font-family: inherit;
  font-size: .85rem;
  padding: .45rem .6rem;
  border: 1px solid var(--border-input);
  border-radius: var(--r-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.time-input:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(39,113,63,.15);
}

.btn-add-time {
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--green-600);
  background: transparent;
  color: var(--green-500);
  cursor: pointer;
  transition: all var(--t-fast);
}

.btn-add-time:hover {
  background: var(--green-600);
  color: #fff;
}

.btn-add-time:active { transform: scale(.93); }

.schedule-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.schedule-status {
  font-size: .85rem;
  font-weight: 600;
  color: var(--confirm-500);
  animation: statusFlash 2.2s ease forwards;
}

@keyframes statusFlash {
  0%   { opacity: 0; transform: translateX(-6px); }
  15%  { opacity: 1; transform: translateX(0); }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* =====================================================================
   NOTIFICATIONS
   ===================================================================== */
.notification-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1.25rem;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}

.notification-row:hover {
  background: var(--bg-input);
  transform: translateX(2px);
}

.notification-row:active { transform: scale(.99); }

.notification-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.notification-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-email    { background: rgba(100,149,237,.12); color: #6495ed; }
.notif-sms      { background: rgba(39,174,96,.12); color: var(--confirm-500); }
.notif-reminder { background: rgba(196,163,90,.12); color: var(--gold-500); }
.notif-failure  { background: rgba(192,57,43,.12); color: var(--red-500); }

.notification-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.notification-hint {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.notification-save-row {
  display: flex;
}

/* =====================================================================
   ACTIVITY LOG
   ===================================================================== */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem .75rem;
  border-radius: var(--r-sm);
  transition: background var(--t-fast);
  animation: activityIn .4s var(--ease-out) both;
}

.activity-item:hover { background: var(--bg-input); }

@keyframes activityIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

.activity-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-icon-booked    { background: rgba(39,174,96,.15); color: var(--confirm-500); }
.activity-icon-confirmed { background: rgba(30,86,49,.15); color: var(--green-400); }
.activity-icon-cancelled { background: rgba(192,57,43,.15); color: var(--red-500); }
.activity-icon-failed    { background: rgba(120,120,120,.12); color: var(--text-muted); }

.activity-content { flex: 1; min-width: 0; }

.activity-message {
  font-size: .875rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-timestamp {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .15rem;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: .75rem;
  opacity: .3;
  filter: grayscale(.5);
}

/* =====================================================================
   TOAST NOTIFICATIONS
   ===================================================================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column-reverse;
  gap: .5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  padding: .85rem 1.25rem;
  border-radius: var(--r-md);
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--sh-xl);
  pointer-events: auto;
  animation: toastSlideIn .4s var(--ease-spring);
  max-width: 380px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-error  { border-color: var(--red-500); }
.toast-error .toast-icon  { color: var(--red-500); }
.toast-success { border-color: var(--confirm-500); }
.toast-success .toast-icon { color: var(--confirm-500); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(24px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.toast-out {
  animation: toastSlideOut .3s var(--ease-out) forwards;
}

@keyframes toastSlideOut {
  to { opacity: 0; transform: translateX(24px) scale(.95); }
}

/* =====================================================================
   MOBILE BOTTOM SHEET
   ===================================================================== */
.bottom-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  animation: fadeIn .25s var(--ease-out);
}

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

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--bg-card-solid);
  border-top-left-radius: var(--r-xl);
  border-top-right-radius: var(--r-xl);
  z-index: var(--z-sheet);
  animation: sheetSlideUp .4s var(--ease-spring);
  overflow-y: auto;
  overscroll-behavior: contain;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.bottom-sheet.sheet-closing {
  animation: sheetSlideDown .3s var(--ease-out) forwards;
}

@keyframes sheetSlideDown {
  to { transform: translateY(100%); }
}

.bottom-sheet-handle-area {
  display: flex;
  justify-content: center;
  padding: .75rem 0 .5rem;
  cursor: grab;
}

.bottom-sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--text-muted);
  opacity: .4;
}

.bottom-sheet-content {
  padding: 0 1.5rem 2rem;
}

.bottom-sheet-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (min-width: 640px) {
  .stats-row {
    grid-template-columns: repeat(4, 1fr);
  }

  .booking-actions { flex-direction: row; }
}

@media (min-width: 768px) {
  .main { padding: 2rem 1.5rem 5rem; gap: 2rem; }
  .section { padding: 2rem; }
  .header-inner { padding: 1.1rem 1.5rem; }

  .bookings-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  }

  .calendar-grid {
    gap: 6px;
  }

  .cal-day { min-height: 100px; padding: .75rem .5rem; }

  .toast-container { bottom: 2rem; right: 2rem; }
}

@media (min-width: 1024px) {
  .main { padding: 2rem; gap: 2rem; }

  .cal-day { min-height: 110px; }
}

/* Touch targets on mobile */
@media (max-width: 639px) {
  .btn { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  .header-btn { min-width: 44px; min-height: 44px; }

  .cal-day-label { font-size: .55rem; }
  .cal-day-num { font-size: .8rem; }
  .cal-slot { font-size: .5rem; }

  .toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
  }

  .toast { max-width: none; }
}

/* =====================================================================
   REDUCED MOTION
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .scroll-reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* =====================================================================
   SECTION HEADER ACTIONS
   ===================================================================== */
.section-header-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* =====================================================================
   BUTTON SIZE VARIANTS
   ===================================================================== */
.btn-sm {
  font-size: .75rem;
  padding: .4rem .85rem;
  border-radius: 6px;
}

/* =====================================================================
   CANCEL UX — CANCELLING STATE
   ===================================================================== */
.booking-card.cancelling {
  opacity: .5;
  pointer-events: none;
  position: relative;
}

.card-spinner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .15);
  border-radius: var(--r-md);
  z-index: 5;
  backdrop-filter: blur(2px);
}

.card-spinner-ring {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: cardSpin .8s linear infinite;
}

@keyframes cardSpin {
  to { transform: rotate(360deg); }
}

/* =====================================================================
   MANUAL BOOKING MODAL
   ===================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .3s var(--ease-out);
  padding: 1rem;
}

.modal-overlay.modal-visible {
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 420px;
  border-radius: var(--r-xl);
  padding: 2rem 1.75rem 1.75rem;
  background: #1a2f23;
  border: 1px solid rgba(255,255,255,0.15);
  opacity: 1;
  transform: none;
}

.modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--text-primary);
}

.modal-desc {
  font-size: .82rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-field {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.modal-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.modal-input {
  font-family: inherit;
  font-size: .95rem;
  padding: .65rem .85rem;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.modal-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, .15);
  background: var(--bg-input-focus);
}

.modal-input[readonly] {
  opacity: .6;
  cursor: not-allowed;
}

.modal-actions {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .5rem;
}

.modal-actions .btn {
  min-width: 90px;
}

/* =====================================================================
   PAGE TRANSITION
   ===================================================================== */
.dashboard-entering {
  animation: dashboardIn .7s var(--ease-out);
}

@keyframes dashboardIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes gateOut {
  to { opacity: 0; transform: scale(.96); }
}
.gate-exiting {
  animation: gateOut .4s var(--ease-out) forwards;
}
.dashboard-entering {
  animation: gateCardIn .5s var(--ease-out);
}

@keyframes gateOut {
  to { opacity: 0; transform: scale(.97); }
}
