/* ============================================================
   ServiceFlow — Design System
   Colors, Typography, Components, Utilities
   ============================================================ */

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

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-glow: rgba(99, 102, 241, 0.25);

  --accent: #06b6d4;
  --accent-dark: #0891b2;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-dark: #dc2626;

  /* Dark Theme */
  --bg-0: #0a0a0f;
  --bg-1: #111118;
  --bg-2: #1a1a24;
  --bg-3: #22222e;
  --bg-card: #16161f;
  --bg-glass: rgba(22, 22, 31, 0.85);

  /* Text */
  --text-primary: #f1f1f5;
  --text-secondary: #9898aa;
  --text-muted: #5e5e70;
  --text-link: #818cf8;

  /* Borders */
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.4);

  /* Spacing */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-primary: 0 8px 32px rgba(99,102,241,0.3);

  /* Transitions */
  --transition: 0.2s ease;
  --transition-slow: 0.4s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-0);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-light); }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-secondary); }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.page-header { padding: 100px 0 60px; }

/* ── Navbar ────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 68px;
  display: flex; align-items: center;
  transition: all var(--transition);
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: #fff;
  flex-shrink: 0;
}
.brand-icon {
  font-size: 1.5rem;
}
.brand-name {
  font-size: 1.35rem; font-weight: 800; letter-spacing: -0.5px;
}

/* Nav Menu Wrapper */
.nav-menu-wrapper {
  display: flex; align-items: center; justify-content: space-between;
  flex: 1; margin-left: 28px;
}
.nav-links {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links li a {
  display: block;
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.nav-links li a:hover, .nav-links li a.active {
  color: #fff; background: var(--bg-3);
}

.nav-actions {
  display: flex; align-items: center; gap: 12px;
}
.auth-actions-group {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.nav-user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 4px 10px; border-radius: 999px;
  color: #fff; text-decoration: none;
  font-size: 0.85rem; font-weight: 500;
  transition: border-color var(--transition);
}
.nav-user-chip:hover {
  border-color: var(--primary);
  color: #fff;
}
.user-avatar-sm {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-name-text {
  max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Mobile Toggle Hamburger Button */
.nav-toggle-btn {
  display: none;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #fff;
  font-size: 1.25rem;
  width: 42px; height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.nav-toggle-btn:hover {
  background: var(--bg-3);
  border-color: var(--primary);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; font-family: 'Inter', sans-serif;
  border: none; cursor: pointer;
  transition: all var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 40px rgba(99,102,241,0.4); color: #fff; }
.btn-secondary {
  background: var(--bg-3); color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); color: var(--text-primary); }
.btn-outline {
  background: transparent; color: var(--primary-light);
  border: 1px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-glow); color: var(--primary-light); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: var(--radius-sm); }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg-2); }

/* ── Glass Card ────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ── Stats Card ────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex; align-items: flex-start; gap: 16px;
  transition: all var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-hover); }
.stat-icon {
  width: 48px; height: 48px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.purple  { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.stat-icon.cyan    { background: rgba(6,182,212,0.15);  color: var(--accent); }
.stat-icon.green   { background: rgba(16,185,129,0.15); color: var(--success); }
.stat-icon.yellow  { background: rgba(245,158,11,0.15); color: var(--warning); }
.stat-icon.red     { background: rgba(239,68,68,0.15);  color: var(--danger); }
.stat-value { font-size: 2rem; font-weight: 800; line-height: 1; color: var(--text-primary); }
.stat-label { color: var(--text-secondary); font-size: 0.85rem; margin-top: 4px; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); }
.form-control {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  width: 100%;
  transition: all var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control::placeholder { color: var(--text-muted); }
.form-control.error { border-color: var(--danger); }
.form-error { font-size: 0.8rem; color: var(--danger); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Badges / Status ───────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600;
}
.badge-pending    { background: rgba(245,158,11,0.15); color: var(--warning); }
.badge-confirmed  { background: rgba(6,182,212,0.15);  color: var(--accent); }
.badge-inprogress { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.badge-completed  { background: rgba(16,185,129,0.15); color: var(--success); }
.badge-cancelled  { background: rgba(239,68,68,0.15);  color: var(--danger); }

/* ── Table ─────────────────────────────────────────────────── */
.table-container { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
th {
  background: var(--bg-2);
  padding: 12px 16px; text-align: left;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.5px; color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
td {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  font-size: 0.9rem; vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--bg-2); }

/* ── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 12px;
}
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  min-width: 280px; max-width: 380px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--primary); }
.toast-icon { font-size: 1.1rem; margin-top: 1px; }
.toast-msg  { font-size: 0.9rem; }
@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  animation: scaleIn 0.3s ease;
}
.modal-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-body    { padding: 24px 28px; }
.modal-footer  { padding: 20px 28px 24px; display: flex; gap: 12px; justify-content: flex-end; }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ── Sidebar (Admin/Employee) ──────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 260px; min-height: 100vh; flex-shrink: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  padding: 24px 0;
  position: fixed; top: 0; left: 0; z-index: 100;
  display: flex; flex-direction: column;
}
.sidebar-logo {
  padding: 0 24px 24px;
  font-size: 1.2rem; font-weight: 800;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
}
.sidebar-section { padding: 16px 12px 0; }
.sidebar-section-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  padding: 0 12px; margin-bottom: 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-secondary); font-size: 0.9rem; font-weight: 500;
  transition: all var(--transition); width: 100%;
}
.sidebar-link:hover { color: var(--text-primary); background: var(--bg-3); }
.sidebar-link.active { color: var(--primary-light); background: rgba(99,102,241,0.1); }
.sidebar-link i { width: 18px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding: 16px 12px; border-top: 1px solid var(--border); }
.main-content { margin-left: 260px; flex: 1; padding: 32px; background: var(--bg-0); }

/* ── Loading Spinner ───────────────────────────────────────── */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--bg-3);
  border-top-color: var(--primary);
  animation: spin 0.7s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}

/* ── Service Card ──────────────────────────────────────────── */
.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-hover); }
.service-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  background: rgba(99,102,241,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--primary-light);
  margin-bottom: 16px;
}
.service-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.service-desc { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.service-price { font-size: 1.4rem; font-weight: 800; color: var(--primary-light); }
.service-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.service-duration { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }

/* ── Stars ─────────────────────────────────────────────────── */
.stars { display: flex; gap: 2px; }
.star  { color: var(--warning); font-size: 0.9rem; }
.star.empty { color: var(--text-muted); }

/* ── Grid ──────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-services { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* ── Filters / Search Bar ──────────────────────────────────── */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}
.search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.search-input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search-input-wrap .form-control { padding-left: 38px; }

/* ── Progress Steps ────────────────────────────────────────── */
.status-track { display: flex; gap: 0; margin: 24px 0; }
.track-step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.track-step:not(:last-child)::after {
  content: ''; position: absolute;
  top: 16px; left: 50%; right: -50%;
  height: 2px; background: var(--border);
  z-index: 0;
}
.track-step.done::after { background: var(--success); }
.track-dot {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; z-index: 1; position: relative;
  transition: all var(--transition);
}
.track-step.done .track-dot    { border-color: var(--success); background: var(--success); color: #fff; }
.track-step.active .track-dot  { border-color: var(--primary); background: var(--primary); color: #fff; }
.track-label { font-size: 0.75rem; margin-top: 8px; color: var(--text-muted); text-align: center; }
.track-step.done .track-label, .track-step.active .track-label { color: var(--text-primary); }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  background: var(--bg-0);
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 800px 600px at 20% 50%, rgba(99,102,241,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 600px 400px at 80% 30%, rgba(6,182,212,0.08) 0%, transparent 70%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 999px; padding: 6px 16px;
  font-size: 0.85rem; font-weight: 600; color: var(--primary-light);
  margin-bottom: 24px;
}
.hero h1 { margin-bottom: 20px; }
.hero p.lead {
  font-size: 1.15rem; color: var(--text-secondary);
  margin-bottom: 36px; max-width: 560px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 60px; }
.hero-stat-value { font-size: 2rem; font-weight: 800; color: var(--text-primary); }
.hero-stat-label { font-size: 0.85rem; color: var(--text-muted); }

/* ── Appointment Slot Picker ───────────────────────────────── */
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.slot-btn {
  padding: 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2); color: var(--text-secondary);
  cursor: pointer; font-size: 0.85rem; font-weight: 500;
  text-align: center; transition: all var(--transition);
}
.slot-btn:hover:not(.unavailable) { border-color: var(--primary); color: var(--primary-light); background: var(--primary-glow); }
.slot-btn.selected { border-color: var(--primary); background: var(--primary-glow); color: var(--primary-light); font-weight: 700; }
.slot-btn.unavailable { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }

/* ── Responsive Architecture ───────────────────────────────── */
@keyframes slideDownNav {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .book-layout { grid-template-columns: 1fr; gap: 28px; }
  .booking-summary-card, .booking-summary-box { position: static !important; }
}

@media (max-width: 860px) {
  .nav-toggle-btn { display: flex; }
  .nav-menu-wrapper {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: rgba(14, 14, 20, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    margin-left: 0;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 68px);
    overflow-y: auto;
  }
  .nav-menu-wrapper.show {
    display: flex;
    animation: slideDownNav 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 4px;
  }
  .nav-links li a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
    width: 100%;
  }
  .nav-actions {
    width: 100%;
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .auth-actions-group {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    gap: 10px;
  }
  .auth-actions-group .btn {
    width: 100%;
    padding: 11px;
    font-size: 0.95rem;
  }
  .nav-user-chip {
    width: 100%;
    justify-content: center;
    padding: 10px;
    border-radius: 8px;
  }
  .user-name-text { max-width: none; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 36px; }
  .hero-actions { justify-content: center; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-input-wrap { width: 100%; }
  .table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .section { padding: 50px 0; }
  .page-header { padding: 88px 0 36px; }
  h1 { font-size: 1.85rem !important; }
  h2 { font-size: 1.45rem !important; }
  .stats-bar {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px 12px;
  }
  .stat-number { font-size: 1.6rem !important; }
  .slot-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important; }
  .hero-actions .btn { width: 100%; }
  .form-control {
    font-size: 16px; /* Prevents mobile Safari auto-zoom */
    min-height: 44px;
  }
  .btn { min-height: 42px; }
  .timeline {
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
  }
  .timeline::before { display: none; }
  .timeline-step { flex: 1 1 40%; min-width: 100px; }
}

/* ── Utility ───────────────────────────────────────────────── */
.flex  { display: flex; }
.flex-col  { flex-direction: column; }
.items-center { align-items: center; }
.items-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-4  { gap: 4px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-primary-color { color: var(--primary-light); }
.font-bold  { font-weight: 700; }
.font-600   { font-weight: 600; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.page-main { padding-top: 64px; }
