/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:           #f0ede8;
  --bg-card:      #ffffff;
  --primary:      #2d4a3e;
  --primary-h:    #3a5f51;
  --primary-lt:   #edf2f0;
  --text:         #1a1a1a;
  --text-muted:   #666666;
  --text-light:   #999999;
  --border:       #e8e4df;
  --gold:         #c8960c;
  --gold-bg:      #fff8e1;
  --green:        #2d7a4f;
  --green-bg:     #e8f5e9;
  --red:          #c62828;
  --red-bg:       #fdecea;
  --blue-bg:      #e3f2fd;
  --blue:         #1565c0;
  --yellow-bg:    #fffde7;
  --yellow:       #f57f17;
  --sidebar-w:    200px;
  --r:            12px;
  --r-sm:         8px;
  --shadow:       0 2px 8px rgba(0,0,0,.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,.10);
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.5; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }
img { max-width: 100%; }
ul { list-style: none; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Cards ──────────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-sm { padding: 14px 16px; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 24px; border: none;
  font-size: .875rem; font-weight: 600; transition: all .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; border: none; color: var(--text-muted); padding: 8px 12px; }
.btn-ghost:hover { color: var(--primary); background: var(--primary-lt); }
.btn-danger { background: var(--red-bg); color: var(--red); border: none; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--r); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; }

/* ── Inputs ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.input, .select, .textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg-card); color: var(--text);
  font-size: .9rem; transition: border-color .15s; outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.textarea { resize: vertical; min-height: 80px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: .75rem; font-weight: 600;
}
.badge-green   { background: var(--green-bg);  color: var(--green); }
.badge-gold    { background: var(--gold-bg);   color: var(--gold); }
.badge-red     { background: var(--red-bg);    color: var(--red); }
.badge-blue    { background: var(--blue-bg);   color: var(--blue); }
.badge-yellow  { background: var(--yellow-bg); color: var(--yellow); }
.badge-gray    { background: #f0f0f0;           color: #666; }

/* ── Navbar (public) ────────────────────────────────────────────────────────── */
.navbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px; height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand { font-size: 1.3rem; font-weight: 800; color: var(--primary); letter-spacing: -.02em; }
.navbar-brand span { color: var(--gold); }
.navbar-right { display: flex; align-items: center; gap: 16px; }
.navbar-tagline { font-size: .8rem; color: var(--text-muted); }

/* ── Admin Layout ───────────────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 16px 20px;
  font-size: 1.3rem; font-weight: 800; color: var(--primary);
  border-bottom: 1px solid var(--border); letter-spacing: -.02em;
}
.sidebar-nav { flex: 1; padding: 8px 0; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; color: var(--text-muted);
  font-size: .875rem; font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s; cursor: pointer;
}
.sidebar-link:hover { color: var(--primary); background: var(--primary-lt); }
.sidebar-link.active { color: var(--primary); background: var(--primary-lt); border-left-color: var(--primary); font-weight: 600; }
.sidebar-link .icon { font-size: 1rem; width: 20px; text-align: center; }
.sidebar-bottom { padding: 16px 20px; border-top: 1px solid var(--border); }
.sidebar-user { font-size: .8rem; color: var(--text-muted); }
.sidebar-user strong { display: block; font-size: .875rem; color: var(--text); margin-bottom: 2px; }
.sidebar-logout { margin-top: 8px; font-size: .8rem; color: var(--red); cursor: pointer; }
.sidebar-logout:hover { text-decoration: underline; }

.admin-main { margin-left: var(--sidebar-w); flex: 1; padding: 24px; min-height: 100vh; }

.admin-topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.admin-topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar-circle {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem;
}

/* ── KPI Cards ──────────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi-card {
  background: var(--bg-card); border-radius: var(--r);
  padding: 18px 20px; box-shadow: var(--shadow);
  border-top: 3px solid transparent;
}
.kpi-card:nth-child(1) { border-top-color: var(--gold); }
.kpi-card:nth-child(2) { border-top-color: var(--primary); }
.kpi-card:nth-child(3) { border-top-color: #9c27b0; }
.kpi-card:nth-child(4) { border-top-color: var(--blue); }
.kpi-label { font-size: .7rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.kpi-value { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.kpi-card:nth-child(1) .kpi-value { color: var(--gold); }
.kpi-sub { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.kpi-sub.up { color: var(--green); } .kpi-sub.down { color: var(--red); }

/* ── Schedule Grid ──────────────────────────────────────────────────────────── */
.schedule-grid-wrap { overflow-x: auto; }
.schedule-grid { display: grid; min-width: 500px; }
.schedule-header { display: flex; border-bottom: 1px solid var(--border); }
.schedule-time-col { width: 60px; flex-shrink: 0; }
.schedule-master-col { flex: 1; padding: 8px 12px; font-size: .8rem; font-weight: 600; text-align: center; }
.schedule-row { display: flex; border-bottom: 1px solid var(--border); min-height: 44px; }
.schedule-time { width: 60px; flex-shrink: 0; padding: 6px 8px; font-size: .78rem; color: var(--text-muted); }
.schedule-cell { flex: 1; padding: 3px 4px; position: relative; }
.appt-block {
  background: var(--primary-lt); border-left: 3px solid var(--primary);
  border-radius: var(--r-sm); padding: 4px 8px;
  font-size: .75rem; cursor: pointer; transition: background .1s;
}
.appt-block:hover { background: #d4e6df; }
.appt-block.status-pending { border-left-color: var(--gold); background: var(--gold-bg); }
.appt-block.status-cancelled { opacity: .4; }
.appt-block.status-completed { background: #f0f0f0; border-left-color: #aaa; }
.appt-name { font-weight: 600; }
.appt-service { color: var(--text-muted); }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 10px 14px; text-align: left;
  font-size: .72rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .875rem; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--primary-lt); }
.td-name { display: flex; align-items: center; gap: 10px; }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ── Avatar colors ───────────────────────────────────────────────────────────── */
.av-0 { background: var(--primary); }
.av-1 { background: #e67e22; }
.av-2 { background: #8e44ad; }
.av-3 { background: #2980b9; }
.av-4 { background: #27ae60; }
.av-5 { background: #c0392b; }
.av-6 { background: #d35400; }
.av-7 { background: #16a085; }

/* ── Progress Bar ────────────────────────────────────────────────────────────── */
.progress { background: var(--border); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-fill { background: var(--primary); border-radius: 4px; height: 100%; transition: width .3s; }

/* ── Modals ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn .15s;
}
.modal {
  background: var(--bg-card); border-radius: var(--r);
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow-y: auto; box-shadow: var(--shadow-md);
  animation: slideUp .2s;
}
.modal-lg { max-width: 640px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
}
.modal-body { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.modal-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text-muted); }
.modal-close:hover { color: var(--text); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ── Tabs ────────────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; background: var(--border); padding: 4px; border-radius: var(--r-sm); }
.tab-btn { padding: 6px 16px; border-radius: 6px; border: none; background: none; font-size: .875rem; color: var(--text-muted); cursor: pointer; font-weight: 500; }
.tab-btn.active { background: var(--bg-card); color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }

/* ── Filter Pills ────────────────────────────────────────────────────────────── */
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { padding: 6px 16px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg-card); font-size: .8rem; cursor: pointer; font-weight: 500; color: var(--text-muted); transition: all .15s; }
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pill:hover:not(.active) { border-color: var(--primary); color: var(--primary); }

/* ── Search ──────────────────────────────────────────────────────────────────── */
.search-wrap { position: relative; }
.search-wrap .input { padding-left: 36px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .9rem; }

/* ── Booking Page ────────────────────────────────────────────────────────────── */
.booking-layout { display: flex; gap: 24px; max-width: 1060px; margin: 0 auto; padding: 24px; }
.booking-main { flex: 1; min-width: 0; }
.booking-sidebar { width: 280px; flex-shrink: 0; }
.booking-sidebar-sticky { position: sticky; top: 72px; }

.salon-header { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.salon-avatar { width: 56px; height: 56px; border-radius: 12px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 800; flex-shrink: 0; }
.salon-name { font-size: 1.2rem; font-weight: 700; }
.salon-meta { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.open-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; color: var(--green); }
.open-badge::before { content: '●'; font-size: .6rem; }

.steps-bar { display: flex; align-items: center; gap: 0; margin-bottom: 24px; }
.step-item { display: flex; align-items: center; gap: 6px; }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; flex-shrink: 0; }
.step-num.done { background: var(--primary); color: #fff; }
.step-num.active { background: var(--primary); color: #fff; }
.step-num.inactive { background: var(--border); color: var(--text-muted); }
.step-label { font-size: .82rem; color: var(--text-muted); }
.step-label.active { color: var(--text); font-weight: 600; }
.step-sep { flex: 1; height: 1.5px; background: var(--border); margin: 0 6px; min-width: 16px; }
.step-sep.done { background: var(--primary); }

.section-label { font-size: .72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }

.masters-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.master-card {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--bg-card); border-radius: var(--r-sm);
  border: 1.5px solid var(--border); cursor: pointer; transition: all .15s;
}
.master-card:hover { border-color: var(--primary); }
.master-card.selected { border-color: var(--primary); background: var(--primary-lt); }
.master-card-info { flex: 1; min-width: 0; }
.master-card-name { font-size: .875rem; font-weight: 600; }
.master-card-spec { font-size: .75rem; color: var(--text-muted); }
.master-card-rating { font-size: .75rem; color: var(--gold); }

.services-list { display: flex; flex-direction: column; gap: 8px; }
.service-card {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; background: var(--bg-card); border-radius: var(--r-sm);
  border: 1.5px solid var(--border); cursor: pointer; transition: all .15s;
}
.service-card:hover { border-color: var(--primary); }
.service-card.selected { border-color: var(--primary); background: var(--primary-lt); }
.service-name { font-weight: 600; font-size: .9rem; }
.service-meta { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.service-price { font-size: 1rem; font-weight: 700; color: var(--primary); }
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Calendar */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-month { font-weight: 600; }
.cal-nav { background: none; border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 4px 10px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-label { text-align: center; font-size: .72rem; font-weight: 600; color: var(--text-muted); padding: 4px; }
.cal-day {
  text-align: center; padding: 8px 4px; border-radius: var(--r-sm);
  font-size: .85rem; cursor: pointer; transition: all .12s;
}
.cal-day:hover:not(.empty):not(.disabled) { background: var(--primary-lt); }
.cal-day.today { font-weight: 700; color: var(--primary); }
.cal-day.selected { background: var(--primary); color: #fff; }
.cal-day.disabled { color: var(--border); cursor: default; }
.cal-day.empty { cursor: default; }

/* Time slots */
.slots-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.slot-btn {
  padding: 10px; text-align: center; border-radius: var(--r-sm);
  border: 1.5px solid var(--border); background: var(--bg-card);
  font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .12s;
}
.slot-btn:hover:not(.taken) { border-color: var(--primary); color: var(--primary); }
.slot-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.slot-btn.taken { background: var(--border); color: var(--text-light); cursor: not-allowed; text-decoration: line-through; }

/* Summary sidebar */
.summary-section { margin-bottom: 14px; }
.summary-label { font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.summary-value { display: flex; align-items: center; gap: 8px; }
.summary-value .av { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; flex-shrink: 0; }
.summary-name { font-weight: 600; font-size: .9rem; }
.summary-sub { font-size: .78rem; color: var(--text-muted); }
.summary-placeholder { color: var(--text-light); font-size: .85rem; display: flex; align-items: center; gap: 6px; }

/* Confirmation step */
.confirm-summary { background: var(--primary-lt); border-radius: var(--r); padding: 16px; margin-bottom: 16px; }
.confirm-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .875rem; }
.confirm-row + .confirm-row { border-top: 1px solid var(--border); }
.confirm-row span:first-child { color: var(--text-muted); }
.confirm-row strong { font-weight: 700; }

/* Success */
.booking-success { text-align: center; padding: 40px 20px; }
.booking-success .check { font-size: 3rem; margin-bottom: 16px; }
.booking-success h2 { margin-bottom: 8px; }
.booking-success p { color: var(--text-muted); margin-bottom: 24px; }

/* ── Master Profile ──────────────────────────────────────────────────────────── */
.master-profile-layout { max-width: 1000px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.master-card-profile { background: var(--bg-card); border-radius: var(--r); padding: 24px; box-shadow: var(--shadow); text-align: center; }
.master-avatar-lg { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 800; margin: 0 auto 12px; }
.master-profile-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.master-profile-spec { color: var(--text-muted); font-size: .875rem; margin-bottom: 8px; }
.master-stars { color: var(--gold); margin-bottom: 4px; }
.master-status { font-size: .78rem; font-weight: 600; }
.master-status.on { color: var(--green); } .master-status.off { color: var(--red); }
.master-bio { font-size: .85rem; color: var(--text-muted); margin: 12px 0; text-align: left; }
.master-stats { display: flex; justify-content: center; gap: 20px; padding: 12px 0; border-top: 1px solid var(--border); margin-top: 12px; }
.master-stat { text-align: center; }
.master-stat strong { display: block; font-size: 1.1rem; font-weight: 800; }
.master-stat span { font-size: .72rem; color: var(--text-muted); }
.master-location { font-size: .8rem; color: var(--text-muted); padding: 10px 0; border-top: 1px solid var(--border); margin-top: 12px; }
.master-socials { padding-top: 10px; border-top: 1px solid var(--border); }
.master-social { font-size: .82rem; color: var(--text-muted); padding: 3px 0; }

.profile-content { background: var(--bg-card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.profile-tabs { display: flex; border-bottom: 1px solid var(--border); }
.profile-tab { padding: 14px 20px; font-size: .875rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2.5px solid transparent; }
.profile-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.profile-tab-content { padding: 20px; }

.profile-services { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-service-card { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border: 1.5px solid var(--border); border-radius: var(--r-sm); }
.psc-info .name { font-weight: 600; } .psc-info .dur { font-size: .78rem; color: var(--text-muted); }
.psc-right { text-align: right; }
.psc-price { font-weight: 700; font-size: 1rem; }

.review-card { padding: 14px 0; border-bottom: 1px solid var(--border); }
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.review-stars { color: var(--gold); }
.review-comment { font-size: .875rem; color: var(--text-muted); }

/* ── Login / Register ────────────────────────────────────────────────────────── */
.auth-layout { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { background: var(--bg-card); border-radius: var(--r); padding: 40px; width: 100%; max-width: 420px; box-shadow: var(--shadow-md); }
.auth-logo { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.auth-subtitle { color: var(--text-muted); font-size: .875rem; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-footer { text-align: center; margin-top: 16px; font-size: .85rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.error-msg { background: var(--red-bg); color: var(--red); padding: 10px 14px; border-radius: var(--r-sm); font-size: .85rem; }

/* ── Landing ─────────────────────────────────────────────────────────────────── */
.hero { padding: 80px 24px; text-align: center; max-width: 700px; margin: 0 auto; }
.hero h1 { font-size: 2.6rem; line-height: 1.2; margin-bottom: 16px; }
.hero h1 span { color: var(--primary); }
.hero p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 32px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 24px 64px; max-width: 900px; margin: 0 auto; }
.feature-card { background: var(--bg-card); border-radius: var(--r); padding: 24px; text-align: center; }
.feature-icon { font-size: 2rem; margin-bottom: 12px; }
.feature-title { font-weight: 700; margin-bottom: 6px; }
.feature-desc { font-size: .85rem; color: var(--text-muted); }

/* ── Analytics ───────────────────────────────────────────────────────────────── */
.analytics-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.analytics-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.chart-area { min-height: 180px; display: flex; align-items: flex-end; gap: 4px; padding-top: 20px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar { width: 100%; background: var(--primary); border-radius: 3px 3px 0 0; transition: height .3s; min-height: 2px; }
.bar-label { font-size: .65rem; color: var(--text-muted); }
.bar-val { font-size: .65rem; font-weight: 600; }

/* ── Day/Week nav ────────────────────────────────────────────────────────────── */
.week-nav { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.week-day {
  padding: 8px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--border);
  background: var(--bg-card); cursor: pointer; text-align: center;
  font-size: .78rem; min-width: 52px;
}
.week-day strong { display: block; font-size: 1rem; font-weight: 800; }
.week-day:hover { border-color: var(--primary); }
.week-day.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.week-nav-btn { padding: 8px 12px; border-radius: var(--r-sm); border: 1.5px solid var(--border); background: var(--bg-card); cursor: pointer; }

/* ── Side panel (client history) ────────────────────────────────────────────── */
.side-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 360px;
  background: var(--bg-card); box-shadow: -4px 0 24px rgba(0,0,0,.1);
  z-index: 200; overflow-y: auto; transform: translateX(100%);
  transition: transform .25s; padding: 24px;
}
.side-panel.open { transform: none; }
.side-panel-close { position: absolute; top: 16px; right: 16px; background: none; border: none; font-size: 1.2rem; cursor: pointer; }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 12px 18px; border-radius: var(--r-sm); font-size: .875rem; font-weight: 500; box-shadow: var(--shadow-md); animation: slideUp .2s; }
.toast.success { background: var(--primary); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: #333; color: #fff; }

/* ── Loader ──────────────────────────────────────────────────────────────────── */
.loader { display: flex; justify-content: center; padding: 40px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Misc ────────────────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.5rem; margin-bottom: 12px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.ml-auto { margin-left: auto; }
.text-muted { color: var(--text-muted); } .text-sm { font-size: .85rem; } .text-xs { font-size: .75rem; }
.fw-bold { font-weight: 700; } .fw-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.w-full { width: 100%; }

/* ── Bottom nav (mobile admin) ───────────────────────────────────────────────── */
.bottom-nav { display: none; }

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 16px; padding-bottom: 70px; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .analytics-grid { grid-template-columns: 1fr; }
  .analytics-row { grid-template-columns: 1fr; }
  .input-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--bg-card); border-top: 1px solid var(--border);
    z-index: 50; height: 60px;
  }
  .bottom-nav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 2px; color: var(--text-muted);
    font-size: .65rem; font-weight: 600; cursor: pointer; transition: color .15s;
    text-decoration: none;
  }
  .bottom-nav-item .nav-icon { font-size: 1.1rem; }
  .bottom-nav-item.active { color: var(--primary); }

  .booking-layout { flex-direction: column; padding: 16px; }
  .booking-sidebar { width: 100%; }
  .booking-sidebar-sticky { position: static; }
  .masters-grid, .services-grid { grid-template-columns: 1fr; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }

  .master-profile-layout { grid-template-columns: 1fr; }
  .profile-services { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }

  .side-panel { width: 100%; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .slots-grid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 1.8rem; }
}

/* ── Master cabinet ──────────────────────────────────────────────────────────── */
.my-link-box { background: var(--primary); color: #fff; border-radius: var(--r); padding: 16px; margin-top: 16px; }
.my-link-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .7; margin-bottom: 4px; }
.my-link-url { font-weight: 700; word-break: break-all; margin-bottom: 10px; }
.my-link-hint { font-size: .78rem; opacity: .8; margin-bottom: 10px; }

/* ── Salary block ────────────────────────────────────────────────────────────── */
.salary-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.salary-row:last-child { border-bottom: none; font-weight: 700; }

/* ══ SUPER ADMIN — DARK THEME ════════════════════════════════════════════════ */
.sa-layout { display: flex; min-height: 100vh; background: #0f0f13; }

.sa-sidebar {
  width: 210px; background: #16161d; border-right: 1px solid #2a2a35;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50; overflow-y: auto;
}
.sa-logo { padding: 18px 20px; border-bottom: 1px solid #2a2a35; display: flex; align-items: center; gap: 8px; }
.sa-logo-text { font-size: 1.2rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.sa-badge { background: #d4a017; color: #000; font-size: .6rem; font-weight: 800; padding: 2px 7px; border-radius: 8px; text-transform: uppercase; letter-spacing: .05em; }
.sa-nav { flex: 1; padding: 8px 0; }
.sa-link { display: flex; align-items: center; gap: 10px; padding: 10px 20px; color: #8a8a9a; font-size: .875rem; font-weight: 500; border-left: 3px solid transparent; transition: all .15s; cursor: pointer; text-decoration: none; }
.sa-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.sa-link.active { color: #fff; background: rgba(255,255,255,.07); border-left-color: #d4a017; }
.sa-link .icon { font-size: 1rem; width: 20px; text-align: center; }
.sa-bottom { padding: 16px 20px; border-top: 1px solid #2a2a35; }
.sa-user { font-size: .78rem; color: #666; }
.sa-user strong { display: block; color: #ccc; font-size: .875rem; margin-bottom: 2px; }
.sa-logout { margin-top: 8px; font-size: .78rem; color: #e57373; cursor: pointer; }
.sa-logout:hover { text-decoration: underline; }
.sa-main { margin-left: 210px; flex: 1; padding: 24px; min-height: 100vh; background: #0f0f13; }
.sa-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.sa-topbar h1 { color: #fff; font-size: 1.5rem; }
.sa-topbar .sub { color: #666; font-size: .85rem; margin-top: 4px; }
.sa-avatar { width: 36px; height: 36px; border-radius: 50%; background: #d4a017; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; }

.sa-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.sa-kpi { background: #16161d; border-radius: 12px; padding: 18px 20px; border-top: 3px solid transparent; border: 1px solid #2a2a35; border-top-width: 3px; }
.sa-kpi:nth-child(1) { border-top-color: #d4a017; }
.sa-kpi:nth-child(2) { border-top-color: #4caf50; }
.sa-kpi:nth-child(3) { border-top-color: #2196f3; }
.sa-kpi:nth-child(4) { border-top-color: #f44336; }
.sa-kpi-label { font-size: .68rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.sa-kpi-value { font-size: 1.7rem; font-weight: 800; color: #fff; line-height: 1.1; }
.sa-kpi:nth-child(1) .sa-kpi-value { color: #d4a017; }
.sa-kpi:nth-child(3) .sa-kpi-value { color: #64b5f6; }
.sa-kpi:nth-child(4) .sa-kpi-value { color: #ef9a9a; }
.sa-kpi-sub { font-size: .78rem; margin-top: 4px; }
.sa-kpi-sub.up { color: #4caf50; } .sa-kpi-sub.down { color: #f44336; } .sa-kpi-sub.neutral { color: #555; }

.sa-card { background: #16161d; border-radius: 12px; padding: 20px; border: 1px solid #2a2a35; }
.sa-card h3 { color: #fff; margin-bottom: 14px; font-size: .95rem; }
.sa-grid-main { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 16px; }
.sa-grid-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.sa-table-wrap { overflow-x: auto; }
.sa-table { width: 100%; border-collapse: collapse; }
.sa-table thead th { padding: 10px 12px; text-align: left; font-size: .7rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid #2a2a35; }
.sa-table tbody td { padding: 11px 12px; border-bottom: 1px solid #1e1e27; font-size: .85rem; color: #ccc; }
.sa-table tbody tr:last-child td { border-bottom: none; }
.sa-table tbody tr:hover td { background: rgba(255,255,255,.03); cursor: pointer; }
.sa-td-name { display: flex; align-items: center; gap: 10px; }
.sa-plan { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: .72rem; font-weight: 700; }
.sa-plan-free { background: #1e1e27; color: #555; }
.sa-plan-lite { background: rgba(33,150,243,.15); color: #64b5f6; }
.sa-plan-pro  { background: rgba(212,160,23,.15); color: #d4a017; }
.sa-plan-vip  { background: rgba(156,39,176,.15); color: #ce93d8; }

.sa-expiry-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 8px; margin-bottom: 8px; background: rgba(244,67,54,.08); border: 1px solid rgba(244,67,54,.2); }
.sa-expiry-item.warn { background: rgba(212,160,23,.08); border-color: rgba(212,160,23,.2); }
.sa-expiry-name { color: #fff; font-weight: 600; font-size: .85rem; }
.sa-expiry-sub  { color: #666; font-size: .75rem; }
.sa-expiry-btn  { padding: 4px 12px; border-radius: 8px; border: 1px solid #333; background: #1e1e27; color: #ccc; font-size: .75rem; cursor: pointer; }
.sa-expiry-btn:hover { border-color: #555; color: #fff; }

.sa-distrib { display: flex; flex-direction: column; gap: 8px; }
.sa-distrib-row { display: flex; align-items: center; gap: 10px; }
.sa-distrib-label { width: 40px; font-size: .78rem; color: #666; font-weight: 600; }
.sa-distrib-bar-wrap { flex: 1; background: #1e1e27; border-radius: 4px; height: 8px; overflow: hidden; }
.sa-distrib-bar { height: 8px; border-radius: 4px; }
.sa-distrib-count { font-size: .78rem; color: #888; width: 24px; text-align: right; }

.sa-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.sa-input { background: #1e1e27; border: 1px solid #2a2a35; border-radius: 8px; color: #ccc; padding: 8px 14px; font-size: .85rem; outline: none; }
.sa-input:focus { border-color: #d4a017; }
.sa-input::placeholder { color: #444; }
.sa-select { background: #1e1e27; border: 1px solid #2a2a35; border-radius: 8px; color: #ccc; padding: 8px 14px; font-size: .85rem; outline: none; cursor: pointer; }
.sa-btn { padding: 8px 16px; border-radius: 8px; border: none; font-size: .85rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.sa-btn-gold { background: #d4a017; color: #000; }
.sa-btn-gold:hover { background: #e6b020; }
.sa-btn-outline { background: transparent; border: 1px solid #2a2a35; color: #888; }
.sa-btn-outline:hover { border-color: #555; color: #ccc; }

.sa-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.sa-modal { background: #16161d; border: 1px solid #2a2a35; border-radius: 12px; width: 100%; max-width: 440px; box-shadow: 0 8px 40px rgba(0,0,0,.6); animation: slideUp .2s; }
.sa-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #2a2a35; }
.sa-modal-header h3 { color: #fff; margin: 0; }
.sa-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.sa-modal-footer { padding: 14px 20px; border-top: 1px solid #2a2a35; display: flex; gap: 8px; justify-content: flex-end; }
.sa-modal-close { background: none; border: none; color: #555; font-size: 1.2rem; cursor: pointer; }
.sa-modal-close:hover { color: #ccc; }
.sa-form-group { display: flex; flex-direction: column; gap: 6px; }
.sa-label { font-size: .75rem; font-weight: 700; color: #555; text-transform: uppercase; letter-spacing: .05em; }

.sa-new-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #1e1e27; }
.sa-new-item:last-child { border-bottom: none; }
.sa-new-name { color: #ccc; font-size: .85rem; font-weight: 600; }
.sa-new-date { color: #555; font-size: .75rem; }

.sa-filter-btn { background: #1e1e27; border: 1px solid #2a2a35; border-radius: 8px; color: #666; padding: 6px 14px; font-size: .8rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.sa-filter-btn:hover { border-color: #555; color: #ccc; }
.sa-filter-btn.active { background: #d4a017; border-color: #d4a017; color: #000; }
.sa-filter-btn:disabled { opacity: .35; cursor: default; }

@media (max-width: 768px) {
  .sa-sidebar { display: none; }
  .sa-main { margin-left: 0; padding: 14px; padding-bottom: 70px; }
  .sa-kpi-grid { grid-template-columns: 1fr 1fr; }
  .sa-grid-main, .sa-grid-bottom { grid-template-columns: 1fr; }
  .sa-bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #16161d; border-top: 1px solid #2a2a35; z-index: 50; height: 60px; }
  .sa-bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #555; font-size: .62rem; font-weight: 600; cursor: pointer; text-decoration: none; transition: color .15s; }
  .sa-bottom-nav-item .nav-icon { font-size: 1.1rem; }
  .sa-bottom-nav-item.active { color: #d4a017; }
}
