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

:root {
  --bg: #0f0f0f;
  --bg2: #1a1a1a;
  --bg3: #242424;
  --accent: #c9a84c;
  --accent-light: #e2c77a;
  --text: #e8e8e8;
  --text-muted: #888;
  --border: rgba(255,255,255,0.08);
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }

img { max-width: 100%; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; line-height: 1.2; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-bottom: 1.5rem; }
h3 { font-size: 1.1rem; font-weight: 600; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.5rem 1rem; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg3); color: var(--text); cursor: pointer;
  font-family: inherit; font-size: 0.875rem; transition: var(--transition);
}
.btn:hover { background: var(--bg2); border-color: var(--accent); }

.btn-primary {
  background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600;
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }

.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { opacity: 0.85; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], input[type="password"], input[type="date"],
input[type="time"], select, textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px; /* 16px min: prevents iOS Safari auto-zoom on focus */
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.35);
}
select option { background: var(--bg2); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem; z-index: 9999;
}
.toast {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.2rem; border-radius: 8px;
  background: var(--bg3); border: 1px solid var(--border);
  box-shadow: var(--shadow);
  animation: slideIn 0.3s ease, fadeOut 0.4s ease 2.6s forwards;
  max-width: 320px;
}
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }
.toast.info    { border-color: var(--info); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateX(100%); } }

/* ── Status Badges ───────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 0.2rem 0.6rem;
  border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-pending  { background: rgba(243,156,18,0.15); color: var(--warning); }
.badge-confirmed { background: rgba(46,204,113,0.15); color: var(--success); }
.badge-rejected { background: rgba(231,76,60,0.15); color: var(--danger); }

/* ══════════════════════════════════════════════════════
   PUBLIC PAGE STYLES
══════════════════════════════════════════════════════ */

/* ── Header / Nav ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15,15,15,0.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { font-size: 1.3rem; font-weight: 700; color: var(--accent); letter-spacing: 0.05em; }
.nav-links { list-style: none; display: flex; gap: 2rem; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; transition: color var(--transition); }
.nav-links a:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
#hero {
  min-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,168,76,0.15) 0%, transparent 70%), var(--bg);
  position: relative; overflow: hidden;
}
#hero::before {
  content: '✂'; position: absolute; font-size: 20rem; opacity: 0.03;
  top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-30deg);
  pointer-events: none; line-height: 1;
}
.hero-content { max-width: 700px; padding: 2rem; }
.hero-content h1 { margin-bottom: 1rem; }
.hero-content p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }
.hero-accent { color: var(--accent); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
  max-width: 1200px; margin: 0 auto;
}
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header p { color: var(--text-muted); margin-top: 0.5rem; }

/* ── Service Cards ───────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; transition: all var(--transition);
}
.service-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.service-card img { width: 100%; height: 160px; object-fit: cover; }
.service-card-placeholder {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem;
}
.service-card-body { padding: 1.2rem; }
.service-card-body h3 { margin-bottom: 0.3rem; }
.service-card-body p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.service-meta { display: flex; justify-content: space-between; align-items: center; }
.service-price { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.service-duration { font-size: 0.8rem; color: var(--text-muted); }

/* ── Calendar ────────────────────────────────────────────────────────────── */
#booking { background: var(--bg2); }
.booking-container { max-width: 1200px; margin: 0 auto; padding: 5rem 2rem; }

.calendar-wrapper { margin-bottom: 2rem; }
.calendar-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.calendar-nav h3 { font-size: 1rem; color: var(--text-muted); }
.week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.5rem;
}
.day-column {
  background: var(--bg3); border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border);
}
.day-header {
  padding: 0.6rem 0.4rem; text-align: center;
  background: rgba(255,255,255,0.03); border-bottom: 1px solid var(--border);
}
.day-name { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.day-date { font-size: 1rem; font-weight: 600; margin-top: 0.1rem; }
.day-date.today { color: var(--accent); }
.day-slots { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.3rem; min-height: 80px; }
.day-closed {
  display: flex; align-items: center; justify-content: center;
  height: 80px; font-size: 0.75rem; color: var(--text-muted);
}
.slot-btn {
  width: 100%; padding: 0.35rem; border-radius: 4px; border: none;
  font-size: 0.75rem; font-family: inherit; cursor: pointer;
  transition: all var(--transition);
}
.slot-btn.available {
  background: rgba(46,204,113,0.15); color: var(--success);
}
.slot-btn.available:hover {
  background: var(--success); color: #fff;
}
.slot-btn.booked {
  background: rgba(231,76,60,0.1); color: var(--text-muted); cursor: not-allowed;
}
.slot-btn.selected {
  background: var(--accent); color: #000; font-weight: 600;
}
.calendar-legend {
  display: flex; gap: 1.5rem; margin-top: 1rem; flex-wrap: wrap;
}
.legend-item { display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.legend-dot {
  width: 10px; height: 10px; border-radius: 2px;
}
.legend-dot.available { background: var(--success); }
.legend-dot.booked { background: rgba(231,76,60,0.4); }
.legend-dot.selected { background: var(--accent); }

/* ── Booking Form ────────────────────────────────────────────────────────── */
.booking-form-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 2rem;
}
.booking-form-card h3 { margin-bottom: 1.5rem; }
.booking-form-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem; margin-bottom: 1rem;
}
.selected-slot-display {
  background: rgba(201,168,76,0.1); border: 1px solid var(--accent);
  border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem;
  display: none; align-items: center; gap: 0.5rem;
}
.selected-slot-display.visible { display: flex; }
.selected-slot-display .slot-info { font-weight: 600; color: var(--accent); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  text-align: center;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-inner p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-admin-link {
  display: inline-block; margin-top: 1.5rem;
  font-size: 0.8rem; color: var(--text-muted);
  transition: color var(--transition);
}
.footer-admin-link:hover { color: var(--accent); }

/* ── Reveal animation ────────────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ══════════════════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════════════════ */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(201,168,76,0.1) 0%, transparent 60%), var(--bg);
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 2.5rem;
  box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo .logo { font-size: 1.5rem; }
.login-logo p { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.3rem; }
.login-card .form-group { margin-bottom: 1rem; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 0.75rem; margin-top: 0.5rem; }
.back-link { text-align: center; margin-top: 1.2rem; font-size: 0.85rem; color: var(--text-muted); }
.error-box {
  background: rgba(231,76,60,0.1); border: 1px solid var(--danger);
  border-radius: 6px; padding: 0.6rem 0.9rem; margin-bottom: 1rem;
  font-size: 0.85rem; color: var(--danger); display: none;
}

/* ══════════════════════════════════════════════════════
   ADMIN DASHBOARD
══════════════════════════════════════════════════════ */
.admin-layout {
  display: flex; min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar {
  width: 240px; min-height: 100vh;
  background: var(--bg2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
  transition: width var(--transition);
}
.sidebar-logo {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo { font-size: 1.1rem; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted); font-size: 0.9rem;
  transition: all var(--transition); border-left: 3px solid transparent;
}
.sidebar-nav li a:hover { color: var(--text); background: var(--bg3); }
.sidebar-nav li.active a { color: var(--accent); border-left-color: var(--accent); background: rgba(201,168,76,0.07); }
.sidebar-nav .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.sidebar-footer {
  padding: 1rem 1.5rem; border-top: 1px solid var(--border);
}
.sidebar-footer a { color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 0.5rem; }
.sidebar-footer a:hover { color: var(--danger); }

/* ── Dashboard Main ──────────────────────────────────────────────────────── */
.dashboard-main {
  margin-left: 240px; flex: 1; min-width: 0; /* min-width:0 lets the flex child shrink instead of overflowing */
  background: var(--bg); min-height: 100vh;
}
.dashboard-header {
  padding: 1.5rem 2rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg);
  position: sticky; top: 0; z-index: 10;
}
.dashboard-header h1 { font-size: 1.3rem; }
.dashboard-header-right { display: flex; align-items: center; gap: 0.75rem; }
.admin-section { display: none; padding: 2rem; }
.admin-section.active { display: block; }

/* ── Stats Cards ─────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-card .stat-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Chart ───────────────────────────────────────────────────────────────── */
.chart-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem;
}
.chart-card h3 { margin-bottom: 1rem; }
.chart-wrapper { height: 250px; }

/* ── Table ───────────────────────────────────────────────────────────────── */
.table-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.table-card-header {
  padding: 1rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.table-card-header h3 { font-size: 1rem; }
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
thead th {
  padding: 0.75rem 1rem; text-align: left;
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
tbody td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }
.actions-cell { display: flex; gap: 0.4rem; }

/* ── Filters ─────────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { width: auto; }

/* ── Settings Section ────────────────────────────────────────────────────── */
.settings-grid { display: grid; gap: 1.5rem; }
.settings-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
}
.settings-card h3 { margin-bottom: 1.2rem; font-size: 1rem; }
.settings-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

/* ── Working Hours ───────────────────────────────────────────────────────── */
.wh-row {
  display: grid; grid-template-columns: 100px 1fr 1fr auto;
  align-items: center; gap: 1rem; padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.wh-row:last-child { border-bottom: none; }
.wh-day { font-weight: 600; font-size: 0.9rem; }
.wh-toggle { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ── Product / Service List ──────────────────────────────────────────────── */
.service-list-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--border);
}
.service-list-item:last-child { border-bottom: none; }
.service-list-info { flex: 1; }
.service-list-info strong { display: block; margin-bottom: 0.2rem; }
.service-list-info span { font-size: 0.8rem; color: var(--text-muted); }
.service-list-price { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 200; display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 14px; padding: 2rem; width: 100%; max-width: 480px;
  transform: scale(0.95); transition: transform var(--transition);
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-header h3 { font-size: 1.1rem; }
.modal-close {
  background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.3rem;
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  margin: -0.5rem -0.5rem -0.5rem 0;
}
.modal-close:hover { color: var(--text); }
.modal-form-group { margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ── Loading / Empty States ──────────────────────────────────────────────── */
.loading-row td, .empty-row td { text-align: center; color: var(--text-muted); padding: 2rem; }
.loading-spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mobile nav toggle (hamburger) — hidden on desktop ───────────────────── */
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 5px; padding: 8px;
}
.nav-toggle span {
  display: block; height: 2px; width: 24px; background: var(--accent);
  border-radius: 2px; transition: transform .25s ease, opacity .25s ease;
}

/* ── Touch affordances (active feedback for non-hover devices) ───────────── */
.service-card:active { transform: translateY(-2px); border-color: var(--accent); }
.slot-btn.available:active { background: var(--success); color: #fff; }

/* ══ Responsive ══════════════════════════════════════════════════════════ */

/* Tablet (769–900px): admin sidebar shrinks to an icon rail */
@media (min-width: 769px) and (max-width: 900px) {
  .sidebar { width: 60px; }
  .sidebar .nav-text, .sidebar-logo .logo-text, .sidebar-footer span { display: none; }
  .sidebar-logo { padding: 1rem; text-align: center; }
  .dashboard-main { margin-left: 60px; }
  .sidebar-nav li a { padding: 0.75rem; justify-content: center; }
  .sidebar-nav .nav-icon { width: auto; }
  .week-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ≤768px: mobile nav patterns — hamburger menu + admin bottom tab bar */
@media (max-width: 768px) {
  /* main header → hamburger dropdown */
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0; list-style: none; padding: 0;
    background: rgba(15,15,15,0.98); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 280px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 1rem 2rem; font-size: 1rem; border-top: 1px solid var(--border); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* keep the calendar readable in the 601–768px band (rail block no longer covers it) */
  .week-grid { grid-template-columns: repeat(4, 1fr); }

  /* admin sidebar → fixed bottom tab bar */
  .admin-layout { display: block; }
  .sidebar {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; min-height: 0; height: 60px;
    flex-direction: row; align-items: stretch;
    border-right: 0; border-top: 1px solid var(--border);
    z-index: 60; transition: none;
  }
  .sidebar-logo, .sidebar-footer { display: none; }
  .sidebar-nav { flex: 1; padding: 0; }
  .sidebar-nav ul { display: flex; height: 100%; }
  .sidebar-nav li { flex: 1; }
  .sidebar-nav li a {
    flex-direction: column; gap: 2px; justify-content: center;
    height: 100%; padding: 6px 2px;
    border-left: 0; border-top: 3px solid transparent; font-size: 0;
  }
  .sidebar-nav li.active a { border-left: 0; border-top-color: var(--accent); background: rgba(201,168,76,0.07); }
  .sidebar-nav .nav-icon { font-size: 1.25rem; width: auto; }
  .sidebar-nav .nav-text { display: block; font-size: 0.62rem; line-height: 1; }
  .dashboard-main { margin-left: 0; padding-bottom: 72px; overflow-x: hidden; }

  /* logout relocates to the header (bottom-bar hides the footer logout) */
  #logout-btn-top { display: inline-flex !important; }
  .dashboard-header-right span { display: none; }

  /* toasts must clear the bottom tab bar (admin pages only) */
  .admin-layout ~ .toast-container { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* ≤600px: phone layout — padding, touch targets, stacking */
@media (max-width: 600px) {
  /* calendar → 2 cols, tappable slots */
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .slot-btn { min-height: 44px; padding: 0.6rem 0.4rem; font-size: 0.85rem; }
  .day-slots { gap: 0.4rem; }

  /* small buttons become real tap targets */
  .btn-sm { min-height: 40px; padding: 0.45rem 0.8rem; }
  .actions-cell { gap: 0.6rem; flex-wrap: nowrap; }
  .actions-cell .btn-sm { min-width: 40px; min-height: 40px; padding: 0.5rem; justify-content: center; }

  /* reclaim side padding on small screens */
  .section { padding: 3rem 1rem; }
  .booking-container { padding: 3rem 1rem; }
  .admin-section { padding: 1.25rem 1rem; }
  .dashboard-header { padding: 1rem; gap: 0.5rem; }
  .dashboard-header h1 { font-size: 1.1rem; min-width: 0; }
  .site-footer { padding: 2rem 1rem; }
  .hero-content { padding: 1.5rem 1rem; }

  /* filter bar stacks full-width */
  .filter-bar { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  #bookings-date-filter, #bookings-status-filter { width: 100% !important; }
  .filter-bar .btn { width: 100%; justify-content: center; }

  /* working-hours row: day + toggle on their own rows, then the two time
     inputs side-by-side in DOM order (start | end) so they never clip */
  .wh-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem; padding: 1rem 0;
  }
  .wh-day { grid-column: 1 / -1; }
  .wh-toggle { grid-column: 1 / -1; }
  .wh-row .form-group input { min-width: 0; }

  /* modal fills the small screen comfortably */
  .modal { padding: 1.5rem; max-width: 100%; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; justify-content: center; min-height: 44px; }

  /* settings / stats grids stack; save buttons full-width */
  .settings-form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .settings-card, .stat-card { padding: 1.25rem; }
  #save-settings-btn, #save-password-btn, #save-hours-btn { width: 100%; justify-content: center; }

  /* table-card header stacks */
  .table-card-header { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  #add-service-btn { width: 100%; justify-content: center; }

  /* service list rows wrap */
  .service-list-item { flex-wrap: wrap; gap: 0.5rem; }
  .service-list-info { flex: 1 1 100%; }
  .service-list-price { margin-right: auto; }
  .service-list-item .btn-sm { min-width: 40px; min-height: 40px; justify-content: center; }

  /* toasts full-width with gutters */
  .toast-container { left: 0.75rem; right: 0.75rem; align-items: stretch; }
  .toast { max-width: none; }

  /* chart + hero density */
  .chart-wrapper { height: 200px; }
  .chart-card { padding: 1rem; }
  #hero { min-height: 80vh; }
  #hero::before { font-size: 12rem; }

  /* login card breathing room */
  .login-card { padding: 1.75rem; margin: 0 1rem; }
}

/* ≤480px: small phones — header padding + logo shrink */
@media (max-width: 480px) {
  .site-header { padding: 0 1rem; }
  .logo { font-size: 1.05rem; letter-spacing: 0.02em; }
}
