/* ═══════════════════════════════════════════════════════════
   Fade — Design System v2
   Neutral slate palette · Blue accent · Clean app feel
   ═══════════════════════════════════════════════════════════ */


/* ── Dark theme (default) ── */
:root {
  --bg: #0B0F19;
  --surface: #111827;
  --surface-raised: #1A2236;
  --surface-overlay: #1F2B3D;
  --border: #1E293B;
  --border-light: #2A3A50;
  --ring: rgba(96, 165, 250, 0.4);

  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-tertiary: #64748B;
  --text-inverse: #0F172A;

  --accent: #60A5FA;
  --accent-hover: #93C5FD;
  --accent-muted: rgba(96, 165, 250, 0.1);
  --accent-subtle: rgba(96, 165, 250, 0.06);

  --brass: #c79a54;

  --success: #34D399;
  --success-muted: rgba(52, 211, 153, 0.1);
  --warning: #FBBF24;
  --warning-muted: rgba(251, 191, 36, 0.1);
  --danger: #F87171;
  --danger-muted: rgba(248, 113, 113, 0.1);

  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.35);

  --sidebar-width: 216px;
  --sidebar-collapsed: 80px;
  --topbar-height: 56px;

  color-scheme: dark;
}

/* ── Light theme ── */
[data-theme="light"] {
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --surface-raised: #FFFFFF;
  --surface-overlay: #F1F5F9;
  --border: #E2E8F0;
  --border-light: #CBD5E1;
  --ring: rgba(59, 130, 246, 0.35);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #F8FAFC;

  --accent: #3B82F6;
  --accent-hover: #2563EB;
  --accent-muted: rgba(59, 130, 246, 0.08);
  --accent-subtle: rgba(59, 130, 246, 0.04);

  --success-muted: rgba(52, 211, 153, 0.08);
  --warning-muted: rgba(251, 191, 36, 0.08);
  --danger-muted: rgba(248, 113, 113, 0.08);

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);

  color-scheme: light;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}
h1 { font-size: 1.75rem; letter-spacing: -0.03em; }
h2 { font-size: 1.15rem; letter-spacing: -0.02em; }
h3 { font-size: 0.95rem; }
h4 { font-size: 0.88rem; font-weight: 600; }

p { color: var(--text-secondary); margin: 0; }
strong { color: var(--text-primary); font-weight: 600; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.app-shell__main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.page-wrap {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.2s ease;
  overflow: hidden;
}
.sidebar--collapsed { width: var(--sidebar-collapsed); }

.sidebar__top { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

.sidebar__brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--topbar-height);
  flex-shrink: 0;
}
.sidebar__wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}
.sidebar--collapsed .sidebar__wordmark {
  font-size: 1.1rem;
}
.sidebar__toggle {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 8px 12px;
  margin: 4px 8px 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.sidebar__toggle:hover { color: var(--text-secondary); background: var(--accent-muted); }
.sidebar--collapsed .sidebar__toggle { padding: 10px; margin: 4px 8px 0; }

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 8px;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}
.sidebar__link:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
  text-decoration: none;
}
.sidebar__link.is-active {
  color: var(--accent);
  background: var(--accent-muted);
  font-weight: 600;
}
.sidebar--collapsed .sidebar__link {
  justify-content: center;
  padding: 10px;
}

/* Sidebar: user at bottom */
.sidebar__bottom {
  border-top: 1px solid var(--border);
  padding: 12px 8px;
}
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.sidebar__user:hover { background: var(--accent-muted); }
.sidebar__user--collapsed { justify-content: center; }
.sidebar__user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: white;
  font-weight: 600;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar__user-info {
  flex: 1;
  min-width: 0;
}
.sidebar__user-info strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__user-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar__logout {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: all 0.15s;
}
.sidebar__logout:hover { color: var(--danger); background: var(--danger-muted); }

/* Mobile-only top bar (hamburger + branding) */
.mobile-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.mobile-bar__menu {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.mobile-bar__menu:hover { color: var(--text-primary); background: var(--accent-muted); }
.mobile-bar__brand {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--text-primary);
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    z-index: 200;
    top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar--collapsed { width: var(--sidebar-width); transform: translateX(-100%); }
  .sidebar:not(.sidebar--collapsed) { transform: translateX(0); box-shadow: var(--shadow-lg); }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
  }
}

/* ── Sidebar location switcher ── */
.sidebar__location-switcher {
  padding: 8px 16px;
  border-top: 1px solid var(--border);
}
.sidebar__location-select {
  width: 100%;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
}

/* Theme picker (Settings page) */
.theme-picker {
  display: flex;
  gap: 10px;
}
.theme-picker__option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.theme-picker__option:hover {
  border-color: var(--border-light);
  background: var(--accent-subtle);
}
.theme-picker__option.is-active {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}

.inline-success {
  padding: 10px 14px;
  background: var(--success-muted);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: var(--radius);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 500;
}

.form-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}
@media (max-width: 640px) {
  .form-grid--3 { grid-template-columns: 1fr; }
}

/* ── Buttons ── */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 600;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.button:active:not(:disabled) { transform: scale(0.98); }
.button:disabled { opacity: 0.45; cursor: not-allowed; }

.button--md { height: 36px; padding: 0 16px; font-size: 0.82rem; }
.button--sm { height: 30px; padding: 0 12px; font-size: 0.78rem; }

.button--primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.button--primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.button--primary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.button--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--accent-muted);
  border-color: var(--border-light);
}

.button--surface {
  background: var(--surface-raised);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.button--surface:hover:not(:disabled) {
  background: var(--surface-overlay);
}

.button--danger {
  background: var(--danger);
  color: white;
}
.button--danger:hover:not(:disabled) {
  background: #EF4444;
}

.button__icon { display: flex; align-items: center; }

/* ── Eyebrow / Label ── */
.eyebrow {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  display: block;
  margin-bottom: 4px;
}

/* ── Page Structure ── */
.page-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1400px;
}

.page-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { margin-bottom: 4px; }
.page-hero__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.page-hero__actions--wrap { flex-wrap: wrap; }

.schedule-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.schedule-toolbar__group {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.schedule-toolbar__group--date {
  min-width: 180px;
}
.schedule-toolbar__group--date .field {
  min-width: 180px;
}
.schedule-toolbar__group--view {
  align-self: flex-end;
}
.schedule-toolbar__group--actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Panel (card surface) ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .stats-grid { grid-template-columns: 1fr; } }

.stat-card {
  padding: 20px;
}
.stat-card__top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card__accent {
  display: inline-flex;
  color: var(--text-tertiary);
  flex-shrink: 0;
  order: -1;
}
.stat-card .eyebrow { margin-bottom: 8px; }
.stat-card strong {
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.stat-card p { font-size: 0.78rem; color: var(--text-tertiary); }

/* ── Side-by-side grid (stacks on mobile) ── */
.settings-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .settings-grid-2 { grid-template-columns: 1fr; }
}

/* ── Section Card ── */
.section-card { padding: 24px; }
.section-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-card__header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.section-card__actions { display: flex; gap: 8px; margin-top: 20px; }
.section-card__actions--stacked { flex-direction: column; }

.two-column-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 20px;
}
@media (max-width: 900px) { .two-column-grid { grid-template-columns: 1fr; } }

/* ── Detail List (key-value pairs) ── */
.detail-list {
  display: flex;
  flex-direction: column;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  gap: 16px;
}
.detail-list > div:last-child { border-bottom: none; }
.detail-list > div span { color: var(--text-tertiary); flex-shrink: 0; }
.detail-list > div strong { text-align: right; }

/* ── Timeline / Appointment Cards ── */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.appointment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  border-radius: var(--radius);
  transition: all 0.12s ease;
  cursor: default;
}
.appointment-card--interactive { cursor: pointer; }
.appointment-card--interactive:hover { background: var(--accent-muted); }
button.appointment-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}
button.appointment-card:hover { border-color: var(--accent); }

.appointment-card__time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 52px;
  flex-shrink: 0;
}
.appointment-card__time span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.appointment-card__time small {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.appointment-card__body { flex: 1; min-width: 0; }
.appointment-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.appointment-card__header h4 { margin-bottom: 2px; }
.appointment-card__header p { font-size: 0.82rem; }
.appointment-card__notes {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 4px;
  font-style: italic;
}

.appointment-card--compact { padding: 8px 12px; }

/* ── Status Badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  white-space: nowrap;
}
.status-badge--booked { background: var(--accent-muted); color: var(--accent); }
.status-badge--in_progress { background: var(--warning-muted); color: var(--warning); }
.status-badge--completed { background: var(--success-muted); color: var(--success); }
.status-badge--cancelled { background: var(--danger-muted); color: var(--text-tertiary); }
.status-badge--no_show { background: var(--danger-muted); color: var(--danger); }

/* ── Schedule Layout ── */
.schedule-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
.schedule-layout:not(.schedule-layout--full) {
  grid-template-columns: 1fr 360px;
}
@media (max-width: 1100px) {
  .schedule-layout:not(.schedule-layout--full) {
    grid-template-columns: 1fr;
  }
}
.detail-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.detail-panel__header-actions .icon-button {
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  border-radius: var(--radius);
  background: var(--surface-overlay);
  border: 1px solid var(--border);
}

.schedule-board { display: flex; flex-direction: column; gap: 8px; }
.schedule-board--barber {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.schedule-column { padding: 16px; }
.schedule-column__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.schedule-column__header h3 { margin: 0; }
.schedule-column__header span { font-size: 0.75rem; color: var(--text-tertiary); }

/* ── Detail Panel (sidebar) ── */
.detail-panel {
  padding: 24px;
  position: sticky;
  top: 28px;
}
.detail-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
}
.detail-panel__header h2 { margin-bottom: 2px; }
.detail-panel__header p { font-size: 0.82rem; }

.detail-actions {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.detail-panel__section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-panel__section h3 { font-size: 0.88rem; }
.detail-panel__section--expanded {
  animation: expandIn 0.2s ease both;
}
@keyframes expandIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Expandable Action Buttons ── */
.detail-expand-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.detail-expand-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.detail-expand-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--accent-muted);
}
.detail-expand-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-muted);
}
.detail-expand-btn--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-muted);
}
.detail-expand-btn--danger.detail-expand-btn--active {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-muted);
}

/* ── Slot Picker ── */
.slot-picker__container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slot-picker__date-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.slot-picker__date-pills::-webkit-scrollbar { display: none; }
.slot-picker__date-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.slot-picker__date-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}
.slot-picker__date-pill--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.slot-picker__time-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.slot-picker__time-pill {
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
}
.slot-picker__time-pill:hover {
  border-color: var(--accent);
}
.slot-picker__time-pill--selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* Conflict pill: muted background + orange accent so it reads as
   "available but warning" rather than as another selectable option. The
   secondary caption sits underneath the time, which forces a tiny block
   shape — switch to column layout only when a caption is rendered. */
.slot-picker__time-pill--conflict {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: color-mix(in srgb, var(--warning, #f59e0b) 12%, transparent);
  border-color: color-mix(in srgb, var(--warning, #f59e0b) 40%, transparent);
  color: var(--warning, #c2750b);
  padding: 4px 12px;
}
.slot-picker__time-pill--conflict:hover {
  border-color: var(--warning, #f59e0b);
}
.slot-picker__time-pill--blocked {
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--text-tertiary);
}
.slot-picker__time-pill--blocked:hover {
  border-color: var(--border);
}
.slot-picker__time-pill-caption {
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1.1;
}
/* Override-confirmation dialog — lightweight modal layered above the
   slot grid. Uses fixed positioning so it doesn't get clipped by the
   modal container holding the SlotPicker. */
.slot-picker__override-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.slot-picker__override-dialog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}
.slot-picker__override-dialog-card h4 {
  margin: 0 0 8px 0;
  font-size: 1rem;
}
.slot-picker__override-dialog-card p {
  margin: 0 0 16px 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.slot-picker__override-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
/* Inline text-link affordance used for "Pick custom time" / "Back to
   available times" toggles. Plain HTML <button> styled to read as a
   link so it doesn't compete visually with the primary actions. */
.slot-picker__link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.slot-picker__link-button:hover {
  opacity: 0.8;
}
.slot-picker__custom-date {
  margin-top: 8px;
}
.slot-picker__custom-date .field__control {
  max-width: 180px;
  font-size: 0.82rem;
}
.slot-picker__custom-label {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-tertiary);
}
.slot-picker__loading,
.slot-picker__no-slots,
.slot-picker__error {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  padding: 8px 0;
}
.slot-picker__error {
  color: var(--danger);
}

/* ── Segmented Control ── */
.segmented-control {
  display: inline-flex;
  align-self: flex-start;
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2px;
  gap: 2px;
}
.segmented-control button {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.segmented-control button.is-active {
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow-sm);
}
.segmented-control--inline { flex-shrink: 0; }

/* ── Typeahead ── */
.typeahead {
  position: relative;
}
.typeahead__dropdown {
  position: absolute;
  z-index: 50;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.18));
  list-style: none;
  margin: 0;
  padding: 4px;
}
.typeahead__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  transition: background 0.1s;
}
.typeahead__option:hover {
  background: var(--accent-subtle);
}
.typeahead__option-name {
  font-weight: 600;
}
.typeahead__option-phone {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}
.typeahead__empty {
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* ── Client Chip (selected client) ── */
.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-muted, var(--border));
  border-radius: var(--radius);
  font-size: 0.85rem;
}
.client-chip__name {
  font-weight: 600;
  color: var(--text-primary);
}
.client-chip__phone {
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.client-chip__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-left: 2px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--text-tertiary);
  color: var(--bg);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s;
}
.client-chip__clear:hover {
  background: var(--danger);
  color: white;
}

/* ── Form Fields ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.field__label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.field__action {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.field__action:hover {
  color: var(--accent-hover);
}
.field--inline-action {
  gap: 6px;
}
.field__control {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.field__control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}
.field__control.is-error { border-color: var(--danger); }
.field__control--textarea { min-height: 80px; resize: vertical; }
.field__control::placeholder { color: var(--text-tertiary); }

.field__input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field__input-wrap .field__control { flex: 1; }
.field__suffix {
  position: absolute;
  right: 12px;
  color: var(--text-tertiary);
  font-size: 0.82rem;
  pointer-events: none;
}
.field__hint { font-size: 0.72rem; color: var(--text-tertiary); }
.field__error { font-size: 0.72rem; color: var(--danger); }

select.field__control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── List Grid ── */
.list-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-align: left;
  width: 100%;
  font-family: inherit;
  cursor: default;
}
button.list-card {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
}
button.list-card:hover { border-color: var(--accent); background: var(--accent-subtle); }
button.list-card.is-selected { border-color: var(--accent); background: var(--accent-muted); }

.list-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--surface-overlay);
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-card__body { flex: 1; min-width: 0; }
.list-card__body h3 { font-size: 0.88rem; margin-bottom: 1px; }
.list-card__body p { font-size: 0.82rem; margin: 0; }
.list-card__actions { flex-shrink: 0; }

/* ── Tables ── */
.data-table-wrap { padding: 0; overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.data-table th {
  text-align: left;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-secondary);
}
.data-table td strong { color: var(--text-primary); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-subtle); }
.row--dimmed { opacity: 0.5; }
.truncate-cell { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 8px;
}
.modal__header h3 { font-size: 1.1rem; margin-bottom: 4px; }
.modal__header p { font-size: 0.85rem; color: var(--text-tertiary); }
.modal__body { padding: 16px 24px 24px; }

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

/* ── Icon Button ── */
.icon-button {
  background: none;
  border: none;
  color: var(--text-tertiary);
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.15s;
  font-family: inherit;
}
.icon-button:hover { color: var(--text-primary); background: var(--accent-muted); }

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  border: none;
  background: transparent;
  box-shadow: none;
}
.empty-state h3 { margin-bottom: 8px; color: var(--text-secondary); font-weight: 600; }
.empty-state p { max-width: 360px; margin: 0 auto; font-size: 0.85rem; color: var(--text-tertiary); }
.empty-state__action { margin-top: 20px; }

/* ── Inline Feedback ── */
.loading-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}
.inline-error {
  padding: 10px 14px;
  background: var(--danger-muted);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 500;
}
.muted-copy {
  color: var(--text-tertiary);
  font-size: 0.82rem;
}
.text-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Spinner ── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; }

/* ── Login Screen ── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-panel {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
}
.login-panel__brand {
  text-align: center;
  margin-bottom: 36px;
}
.login-panel__brand .wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  display: block;
  margin: 8px 0;
}
.login-panel__brand p {
  font-size: 0.88rem;
  color: var(--text-tertiary);
  line-height: 1.5;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── App Loader ── */
.app-loader-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.app-loader-card {
  text-align: center;
  color: var(--text-tertiary);
  max-width: 320px;
}
.app-loader-card h2 {
  margin-bottom: 8px;
}

/* ═══════════════════════════════════════════════════════════
   Schedule Views — Day / Week / Month
   ═══════════════════════════════════════════════════════════ */

/* ── Schedule Header ── */
.sch-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.sch-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.sch-header__date-label {
  margin-bottom: 0;
}
.sch-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sch-header__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ── Shared Filter Bar (all views) ── */
.sch-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sch-filter-bar__filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Schedule Navigation ── */
.sch-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sch-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.12s;
  font-family: inherit;
}
.sch-nav__btn:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
  border-color: var(--border-light);
}
.sch-nav__today {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.12s;
}
.sch-nav__today:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
  border-color: var(--border-light);
}

/* ── Schedule main content ── */
.sch-main {
  min-width: 0;
}

/* ═══ DAY VIEW ═══ */
.sch-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  max-height: calc(100vh - 220px);
}
.sch-day__header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.sch-day__gutter-header {
  width: 64px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.sch-day__col-header {
  flex: 1;
  min-width: 120px;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 3px solid var(--accent);
}
.sch-day__col-header:last-child {
  border-right: none;
}
.sch-day__body {
  display: flex;
  position: relative;
}
.sch-day__gutter {
  width: 64px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
}
.sch-day__gutter-cell {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 0 8px;
  position: relative;
}
.sch-day__gutter-cell span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-tertiary);
  line-height: 1;
  margin-top: -0.34em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  background: var(--surface);
  padding: 0 2px;
}
.sch-day__column {
  flex: 1;
  min-width: 120px;
  position: relative;
  border-right: 1px solid var(--border);
}
.sch-day__column:last-child {
  border-right: none;
}
.sch-day__cell {
  border-bottom: 1px solid transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.1s;
}
.sch-day__cell:hover {
  background: var(--accent-subtle);
}
.sch-day__cell--hover {
  background: var(--accent-muted);
}
.sch-day__cell-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  pointer-events: none;
}
.sch-day__cell--hour {
  border-bottom: 1px solid var(--border);
}

/* Appointment blocks */
.sch-day__block {
  position: absolute;
  left: 3px;
  right: 3px;
  z-index: 5;
  background: var(--accent-muted);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 3px 8px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  transition: box-shadow 0.12s, border-color 0.12s, background 0.12s;
  text-align: left;
  font-family: inherit;
}
.sch-day__block:hover {
  background: rgba(96, 165, 250, 0.18);
  box-shadow: var(--shadow-md);
  z-index: 6;
}
.sch-day__block--selected {
  background: rgba(96, 165, 250, 0.22);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring);
  z-index: 7;
}
.sch-day__block-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sch-day__block-service {
  font-size: 0.65rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}
.sch-day__block-time {
  font-size: 0.6rem;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

/* Current time indicator */
.sch-day__now {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #EF4444;
  z-index: 8;
  pointer-events: none;
}
.sch-day__now::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  background: #EF4444;
  border-radius: 50%;
}

/* ═══ WEEK VIEW ═══ */
.sch-week {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sch-week__columns {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.sch-week__col {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.sch-week__col:last-child {
  border-right: none;
}
.sch-week__col--today {
  background: var(--accent-subtle);
}
.sch-week__col-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.sch-week__day-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sch-week__day-num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sch-week__day-num--today {
  background: var(--accent);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sch-week__col-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 5px;
  min-height: 240px;
  flex: 1;
}
.sch-week__empty {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-align: center;
  padding-top: 20px;
}
.sch-week__add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 6px 0;
  margin-top: 4px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px dashed rgba(96, 165, 250, 0.3);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.sch-week__add-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: var(--accent);
}
.sch-week__appt {
  padding: 4px 8px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 1px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.12s, border-color 0.12s;
}
.sch-week__appt:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}
.sch-week__appt--selected {
  background: var(--accent-muted);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring);
}
.sch-week__appt-time {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sch-week__appt-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.sch-week__appt-service {
  font-size: 0.68rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══ MONTH VIEW ═══ */
.sch-month {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sch-month__header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.sch-month__day-label {
  padding: 10px 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}
.sch-month__body {
  display: flex;
  flex-direction: column;
}
.sch-month__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.sch-month__cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 8px;
  min-height: 80px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-top: none;
  border-left: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s;
}
.sch-month__cell:nth-child(7n) {
  border-right: none;
}
.sch-month__cell:hover {
  background: var(--accent-subtle);
}
.sch-month__cell--today {
  background: var(--accent-subtle);
}
.sch-month__cell--outside {
  opacity: 0.35;
}
.sch-month__date {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}
.sch-month__date--today {
  background: var(--accent);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}
.sch-month__indicators {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sch-month__count {
  font-size: 0.68rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.sch-month__dots {
  display: flex;
  gap: 3px;
}
.sch-month__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ── List View ── */
.sch-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sch-list__filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.sch-list__filters .field--compact {
  min-width: 0;
}
.sch-list__filters .field--compact .field__label {
  font-size: 0.72rem;
  margin-bottom: 4px;
}
.sch-list__filters .field--compact .field__control {
  padding: 6px 10px;
  font-size: 0.82rem;
}
.sch-list__count {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-left: auto;
  white-space: nowrap;
  align-self: flex-end;
  padding-bottom: 6px;
}
.sch-list__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.sch-list__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.sch-list__table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.sch-list__table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.sch-list__table tbody tr:last-child td { border-bottom: none; }
.sch-list__row {
  cursor: pointer;
  transition: background 0.1s;
}
.sch-list__row:hover {
  background: var(--accent-muted);
}
.sch-list__row--selected {
  background: var(--accent-muted);
}
.sch-list__row--inactive {
  opacity: 0.55;
}
.sch-list__cell-datetime {
  display: flex;
  flex-direction: column;
  gap: 2px;
  white-space: nowrap;
}
.sch-list__date {
  font-weight: 500;
}
.sch-list__time {
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.sch-list__cell-source {
  text-transform: capitalize;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

/* ── Multi-select filter dropdowns ── */
.filter-multi {
  position: relative;
}

.filter-multi__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
}

.filter-multi__trigger:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}

.filter-multi__trigger--open {
  border-color: var(--accent);
  color: var(--text-primary);
}

.filter-multi__trigger--active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-muted);
}

.filter-multi__menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  min-width: 180px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 4px 0;
}

.filter-multi__option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.filter-multi__option:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
}

.filter-multi__option--selected {
  color: var(--text-primary);
  font-weight: 500;
}

.filter-multi__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--border-light);
  font-size: 0.7rem;
  color: transparent;
  flex-shrink: 0;
  transition: border-color 0.12s, background 0.12s, color 0.12s;
}

.filter-multi__option--selected .filter-multi__check {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ── Filter pills ── */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.filter-pill--status {
  color: var(--text-primary);
  background: var(--surface-raised);
  border-color: var(--border-light);
}

.filter-pill__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  font-size: 0.8rem;
  line-height: 1;
  color: inherit;
  opacity: 0.6;
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: opacity 0.12s, background 0.12s;
}

.filter-pill__x:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.filter-pills__clear {
  padding: 3px 8px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.12s;
}

.filter-pills__clear:hover {
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════
   Availability Page
   ═══════════════════════════════════════════════════════════ */

.avail-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  justify-content: space-between;
}
.avail-toolbar .field { flex: 1; max-width: 300px; }

.avail-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.avail-day-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 20px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: center;
  color: var(--text-primary);
  font-family: inherit;
  font-size: inherit;
}
.avail-day-card:hover {
  background: var(--surface-raised);
  border-color: var(--accent);
}
.avail-day-card--off {
  border-left-color: var(--border-light);
  opacity: 0.6;
}
.avail-day-card--off:hover {
  opacity: 0.85;
}

.avail-day-card__name {
  display: none;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.avail-day-card__full-name {
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}
.avail-day-card__hours {
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}
.avail-day-card__hours--off {
  color: var(--text-tertiary);
  font-style: italic;
}
.avail-day-card__edit-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  color: var(--text-tertiary);
  opacity: 0;
  transition: opacity 0.15s;
}
.avail-day-card:hover .avail-day-card__edit-icon {
  opacity: 1;
}

.avail-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 4px 0;
}
.avail-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ── Day chip multi-select (Breaks modal) ──
 * Mirrors the iOS AddBreakSheet chip row so the two screens read
 * the same. Capsule pills with an accent-tinted idle state and a
 * filled selected state. */
.day-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.day-chip {
  border: none;
  background: color-mix(in oklab, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.day-chip:hover {
  background: color-mix(in oklab, var(--accent) 18%, transparent);
}
.day-chip--selected {
  background: var(--accent);
  color: white;
}
.day-chip--selected:hover {
  background: var(--accent);
}
.day-chip-shortcuts {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  align-items: center;
}

.field__help {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 6px 0 0;
}

.section-card__subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

@media (max-width: 900px) {
  .avail-week-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .avail-week-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .avail-day-card__full-name { display: none; }
  .avail-day-card__name { display: block; }
  .avail-toolbar { flex-direction: column; align-items: stretch; }
  .avail-toolbar .field { max-width: 100%; }
  .barber-profile-header { align-items: flex-start; }
  .hours-visual { padding: 12px; overflow-x: auto; }
  .hours-visual__grid { min-width: 760px; }
}

/* ── Barber profile / hours ── */
.barber-profile-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.barber-avatar-upload {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}
.barber-avatar-upload__img,
.barber-avatar-upload__placeholder {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
}
.barber-avatar-upload__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 2rem;
  font-weight: 700;
}
.barber-avatar-upload__btn {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

/* ── Barber self-profile ── */
.barber-self-profile {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}
.barber-self-profile__avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.barber-self-profile__avatar {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 2.2rem;
  font-weight: 700;
}
.barber-self-profile__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.barber-self-profile__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.barber-self-profile__row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.barber-self-profile__label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.barber-self-profile__value {
  font-size: 0.95rem;
  color: var(--text-primary);
}
@media (max-width: 600px) {
  .barber-self-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

.hours-visual {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.hours-visual--dirty {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.18);
  animation: hours-dirty-pulse 1.4s ease-in-out infinite;
}
@keyframes hours-dirty-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12); }
  50% { box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.22); }
}
.hours-visual__grid {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(88px, 1fr));
  gap: 8px;
  align-items: start;
}
.hours-visual__gutter {
  display: flex;
  flex-direction: column;
}
.hours-visual__gutter-header {
  height: 36px;
}
.hours-visual__gutter-cell {
  position: relative;
}
.hours-visual__gutter-cell span {
  position: absolute;
  top: -0.45rem;
  right: 6px;
  font-size: 0.66rem;
  color: var(--text-tertiary);
  background: var(--surface);
  padding: 0 2px;
}
.hours-visual__col {
  min-width: 0;
}
.hours-visual__col-header {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
}
.hours-visual__col-body {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(to bottom, rgba(255,255,255,0.01), rgba(255,255,255,0));
  overflow: hidden;
}
.hours-visual__gridline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
}
.hours-visual__block {
  position: absolute;
  /* left/width are set inline per-lane; 6px gutter when full-width */
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: var(--accent-muted);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  min-height: 18px;
  overflow: hidden;
}
.hours-visual__block-label {
  position: absolute;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-primary);
  pointer-events: none;
}
.hours-visual__block-label--start { top: 6px; left: 8px; }
.hours-visual__block-label--end { bottom: 6px; left: 8px; }
.hours-visual__block-label--location {
  top: 6px;
  right: 8px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.9;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* When lanes are packed (overlap), the block is too narrow for all labels.
   Hide the location chip (color already disambiguates via the legend) and
   tighten time labels so they fit. */
.hours-visual__block--narrow .hours-visual__block-label--location {
  display: none;
}
.hours-visual__block--narrow .hours-visual__block-label--start,
.hours-visual__block--narrow .hours-visual__block-label--end {
  font-size: 0.58rem;
  left: 4px;
}
.hours-visual__handle {
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
}
.hours-visual__handle--top { top: 0; }
.hours-visual__handle--bottom { bottom: 0; }
.hours-visual__off {
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--border-light);
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}
/* Per-location empty lane in multi-location mode — clickable placeholder. */
.hours-visual__lane-off {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border: 1px dashed;
  border-color: var(--border-light);
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 8px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 2px;
  cursor: pointer;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.15s, background-color 0.15s;
}
.hours-visual__lane-off:hover:not(:disabled) {
  opacity: 1;
  background: rgba(127, 127, 127, 0.06);
}
.hours-visual__lane-off:disabled {
  cursor: default;
}
.hours-visual__lane-off-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-height: 100%;
}
.hours-visual__hint {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── Sub-tabs ── */
.sub-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.sub-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-tertiary);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
}
.sub-tab:hover {
  color: var(--text-secondary);
}
.sub-tab--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
  transition: color 0.12s;
}
.back-link:hover {
  color: var(--accent);
}

/* ── Status badges ── */
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.badge--success { background: var(--success-muted, rgba(34,197,94,0.12)); color: var(--success, #16a34a); }
.badge--info { background: var(--accent-subtle, rgba(59,130,246,0.10)); color: var(--accent); }
.badge--warning { background: var(--warning-muted, rgba(251,191,36,0.12)); color: var(--warning, #ca8a04); }
.badge--danger { background: rgba(239,68,68,0.10); color: var(--danger, #dc2626); }
.badge--neutral { background: var(--surface-secondary); color: var(--text-tertiary); }

/* ── Unsaved changes bar ── */
.avail-save-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--warning-muted);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--warning);
}

/* ═══════════════════════════════════════════════════════════
   Mobile Responsive
   ═══════════════════════════════════════════════════════════ */
/* ── Toggle Switch ── */
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-switch__track {
  width: 100%;
  height: 100%;
  background: var(--surface-overlay);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  transition: background 0.2s, border-color 0.2s;
}
/* Light-mode OFF state — the default --surface-overlay (#F1F5F9) is
   barely visible against the white card background. Bump to a more
   contrasted gray so the OFF state reads as a clear "switch you can
   flip" rather than blending into the page. Dark mode's default colors
   already have adequate contrast (#1F2B3D track on a darker surface). */
[data-theme="light"] .toggle-switch__track {
  background: var(--border-light);
  border-color: var(--text-tertiary);
}
.toggle-switch input:checked + .toggle-switch__track {
  background: var(--accent);
  border-color: var(--accent);
}
[data-theme="light"] .toggle-switch input:checked + .toggle-switch__track {
  /* Restore the accent color override when ON in light mode (otherwise
     the rule above would set border to --text-tertiary). */
  border-color: var(--accent);
}
.toggle-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
[data-theme="light"] .toggle-switch__thumb {
  /* White thumb against the gray track in light mode reads as a more
     conventional iOS-style switch. Keeps the OFF state legible without
     the thumb melting into the track. */
  background: white;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.toggle-switch input:checked ~ .toggle-switch__thumb {
  transform: translateX(18px);
  background: white;
}
.toggle-switch input:focus-visible + .toggle-switch__track {
  box-shadow: 0 0 0 3px var(--ring);
}
/* Disabled modifier — used for toggles that exist in the UI but
   can't be flipped (e.g., required notifications, push channel
   pre-Chunk 4). Preserves the color so users can tell ON-disabled
   apart from OFF-disabled. */
.toggle-switch--disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.toggle-switch--disabled .toggle-switch__track {
  cursor: not-allowed;
}

/* ── Slide-in Detail Panel ── */
.slide-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  justify-content: flex-end;
}
.slide-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s ease;
}
.slide-panel {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 90vw;
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  animation: slideInRight 0.25s ease;
}
.slide-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 24px 24px 16px;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.slide-panel__header h2 { margin-bottom: 2px; }
.slide-panel__header p { font-size: 0.82rem; }
.slide-panel__body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.slide-panel__section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.slide-panel__section h3 {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Inline Editable Row ── */
.service-row { cursor: pointer; transition: background 0.12s; }
.service-row:hover td { background: var(--accent-subtle); }
.service-row.is-expanded td { background: var(--accent-muted); border-bottom-color: transparent; }
.service-row__expand td {
  padding: 0 16px 16px;
  background: var(--accent-muted);
  border-bottom: 1px solid var(--border);
}
.service-row__expand-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
.service-row__expand-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ── Sort Arrows ── */
.sort-arrows {
  display: flex;
  flex-direction: column;
  gap: 0;
  opacity: 0.5;
  transition: opacity 0.12s;
}
.sort-arrows:hover { opacity: 1; }
.sort-arrow {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  transition: color 0.12s;
}
.sort-arrow:hover { color: var(--accent); }

/* ── Inline Notes Editor ── */
.inline-notes {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inline-notes__display {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: border-color 0.15s, background 0.15s;
  min-height: 60px;
  white-space: pre-wrap;
}
.inline-notes__display:hover {
  border-color: var(--border);
  background: var(--surface-raised);
}
.inline-notes__placeholder {
  color: var(--text-tertiary);
  font-style: italic;
}

/* ── Coming Soon Placeholder ── */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  background: var(--accent-subtle);
}
.coming-soon h4 { color: var(--text-secondary); font-size: 0.85rem; }
.coming-soon p { font-size: 0.78rem; color: var(--text-tertiary); }

/* ── Focus-visible rings (accessibility) ── */
.button:focus-visible,
.icon-button:focus-visible,
.sidebar__link:focus-visible,
.sidebar__toggle:focus-visible,
.sidebar__logout:focus-visible,
.segmented-control button:focus-visible,
.theme-picker__option:focus-visible,
.sub-tab:focus-visible,
.sch-nav__btn:focus-visible,
.sch-nav__today:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
select.field__control:focus-visible,
textarea.field__control:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

/* ── Transition polish ── */
.modal-backdrop {
  animation: fadeIn 0.15s ease;
}
.modal {
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Client row clickable ── */
tr.client-row { cursor: pointer; transition: background 0.12s; }
tr.client-row:hover td { background: var(--accent-subtle); }
tr.client-row.is-selected td { background: var(--accent-muted); }

/* ── No-show badge ── */
.no-show-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.no-show-count--zero {
  background: var(--surface-overlay);
  color: var(--text-tertiary);
}
.no-show-count--warn {
  background: var(--warning-muted);
  color: var(--warning);
}
.no-show-count--danger {
  background: var(--danger-muted);
  color: var(--danger);
}

@media (max-width: 768px) {
  .slide-panel { width: 340px; }
  .modal { max-width: calc(100vw - 32px); }
}

@media (max-width: 640px) {
  .page-wrap { padding: 20px 16px; }
  .page-hero { flex-direction: column; gap: 12px; }
  .page-hero__actions { width: 100%; }
  .page-hero__actions--wrap { flex-wrap: wrap; }
  .schedule-toolbar {
    width: 100%;
    justify-content: stretch;
    align-items: stretch;
  }
  .schedule-toolbar__group,
  .schedule-toolbar__group--actions {
    width: 100%;
    justify-content: stretch;
  }
  .schedule-toolbar__group--actions {
    flex-direction: column;
  }
  .schedule-toolbar__group--date .field,
  .schedule-toolbar__group--actions .button,
  .schedule-toolbar__group--view .segmented-control {
    width: 100%;
  }
  .schedule-toolbar__group--view .segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .form-grid { grid-template-columns: 1fr; }
  .schedule-layout { grid-template-columns: 1fr; }
  .two-column-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .modal { max-width: 100%; margin: 0 12px; border-radius: var(--radius-lg); }
  .login-panel { padding: 32px 20px; }
  h1 { font-size: 1.25rem; }

  /* Slide panel mobile */
  .slide-panel { width: 100%; max-width: 100vw; }

  /* Tables scroll horizontally */
  .data-table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table, table { min-width: 520px; }

  /* Sub-tabs scroll */
  .sub-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .sub-tab { white-space: nowrap; }

  /* Schedule views mobile */
  .sch-header__top { flex-direction: column; }
  .sch-header__controls { flex-direction: column; align-items: stretch; gap: 10px; }
  .sch-nav { justify-content: center; }
  .sch-day { max-height: calc(100vh - 280px); }
  .sch-day__gutter-header,
  .sch-day__gutter { width: 48px; }
  .sch-day__gutter-cell span { font-size: 0.6rem; }
  .sch-day__col-header { min-width: 80px; font-size: 0.72rem; padding: 8px 4px; }
  .sch-day__column { min-width: 80px; }
  .sch-week__columns { grid-template-columns: repeat(3, 1fr); }
  .sch-week__col:nth-child(n+4) { display: none; }
  .sch-month__cell { min-height: 56px; padding: 4px; }
  .sch-month__count { font-size: 0.6rem; }
}

/* ═══════════════════════════════════════════════════════════
   Money Page — Revenue Dashboard
   ═══════════════════════════════════════════════════════════ */

/* Custom date range inputs */
.money-custom-dates {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.money-custom-dates .field {
  max-width: 200px;
}

/* Barber breakdown list */
.money-barber-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.money-barber-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  transition: border-color 0.12s;
}
.money-barber-card:hover {
  border-color: var(--border-light);
}

.money-barber-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.money-barber-card__name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.money-barber-card__name-row h4 {
  font-size: 0.9rem;
  margin: 0;
}

.money-barber-card__type {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.money-barber-card__payout {
  text-align: right;
  flex-shrink: 0;
}
.money-barber-card__payout .eyebrow {
  margin-bottom: 2px;
}
.money-barber-card__payout strong {
  font-size: 1.25rem;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

.money-barber-card__details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.money-barber-card__details > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.money-barber-card__details span {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}
.money-barber-card__details strong {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.money-barber-card__fee-note {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  padding-top: 8px;
  font-style: italic;
}

/* Transaction list */
.money-tx-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 520px;
  overflow-y: auto;
}

.money-tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.1s;
}
.money-tx-row:hover {
  background: var(--accent-subtle);
}

.money-tx-row__time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  min-width: 70px;
  flex-shrink: 0;
}
.money-tx-row__time span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}
.money-tx-row__time small {
  font-size: 0.68rem;
  color: var(--text-tertiary);
}

.money-tx-row__body {
  flex: 1;
  min-width: 0;
}
.money-tx-row__body strong {
  display: block;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.money-tx-row__meta {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.money-tx-row__tip {
  color: var(--success);
  font-weight: 500;
}

.money-tx-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.money-tx-row__method {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* Barber filter dropdown */
.money-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-tertiary);
}
.money-filter__select {
  width: auto;
  min-width: 140px;
  padding: 5px 28px 5px 10px;
  font-size: 0.78rem;
}

/* Mobile adjustments for money page */
@media (max-width: 640px) {
  .money-custom-dates {
    flex-direction: column;
  }
  .money-custom-dates .field {
    max-width: 100%;
  }
  .money-barber-card__header {
    flex-direction: column;
    gap: 8px;
  }
  .money-barber-card__payout {
    text-align: left;
  }
  .money-barber-card__details {
    grid-template-columns: repeat(2, 1fr);
  }
  .money-tx-row__time {
    min-width: 56px;
  }
  .money-tx-row__time small {
    display: none;
  }
}

/* ── Onboarding Wizard ── */

.onboarding-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.onboarding-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.onboarding-wordmark {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
}

.onboarding-step-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.onboarding-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 60px;
  overflow-y: auto;
}

/* Step dots */
.onboarding-steps {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  position: relative;
}

.onboarding-steps__dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--surface-overlay);
  border: 2px solid var(--border);
  position: relative;
  z-index: 1;
  transition: all 0.2s;
}

.onboarding-steps__dot--active {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

.onboarding-steps__dot--done {
  color: white;
  background: var(--success);
  border-color: var(--success);
}

.onboarding-steps__line {
  position: absolute;
  top: 50%;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--border);
  z-index: 0;
  transform: translateY(-50%);
}

/* Card */
.onboarding-card {
  width: 100%;
  max-width: 580px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  animation: modalIn 0.25s ease;
}

.onboarding-card--done {
  text-align: center;
}

.onboarding-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.onboarding-card--done .onboarding-card__icon {
  margin: 0 auto 20px;
}

.onboarding-card__icon--success {
  background: var(--success-muted);
  color: var(--success);
}

.onboarding-card h2 {
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.onboarding-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Form inside card */
.onboarding-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Action buttons row */
.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 12px;
}

.onboarding-actions--split {
  justify-content: space-between;
}

/* Services list */
.onboarding-services {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.onboarding-service-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-service-row__fields {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.onboarding-service-row__name {
  flex: 2;
  min-width: 0;
}

.onboarding-service-row__num {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 88px;
}

.onboarding-service-row__num .field__control {
  width: 100%;
}

.onboarding-service-row__unit {
  position: absolute;
  right: 10px;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  pointer-events: none;
}

.onboarding-service-row__dollar {
  position: absolute;
  left: 10px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
  pointer-events: none;
  z-index: 1;
}

.onboarding-service-row__num:has(.onboarding-service-row__dollar) .field__control {
  padding-left: 24px;
}

/* Add button */
.onboarding-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.12s;
  align-self: flex-start;
}

.onboarding-add-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
}

/* Barbers form */
.onboarding-barbers {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.onboarding-barber-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.onboarding-barber-row .form-grid {
  flex: 1;
  min-width: 0;
}

/* Invite results */
.onboarding-invite-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.onboarding-invite-result-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.onboarding-invite-result-row code {
  font-family: 'Space Grotesk', monospace;
  background: var(--surface-overlay);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--accent);
}

/* Summary (step 4) */
.onboarding-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  text-align: left;
}

.onboarding-summary__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--accent);
}

.onboarding-summary__item div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.onboarding-summary__item strong {
  font-size: 0.88rem;
}

.onboarding-summary__item .muted-copy {
  font-size: 0.78rem;
}

/* Mobile responsive for onboarding */
@media (max-width: 640px) {
  .onboarding-header {
    padding: 12px 16px;
  }

  .onboarding-body {
    padding: 24px 16px 40px;
  }

  .onboarding-steps {
    margin-bottom: 28px;
  }

  .onboarding-steps__dot {
    width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }

  .onboarding-card {
    padding: 24px 20px;
  }

  .onboarding-card h2 {
    font-size: 1.15rem;
  }

  .onboarding-service-row__fields {
    flex-wrap: wrap;
  }

  .onboarding-service-row__name {
    flex: 1 0 100%;
  }

  .onboarding-service-row__num {
    flex: 1 0 calc(50% - 4px);
  }

  .onboarding-actions--split {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .onboarding-actions--split > * {
    width: 100%;
  }

  .onboarding-actions--split .button {
    width: 100%;
  }

  .onboarding-barber-row .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════
   Barber Role — Dashboard & Earnings
   ═══════════════════════════════════════════════════════════ */

/* "Now" card — the prominent current-client card at top of barber dashboard */
.barber-now-card {
  background: var(--accent-subtle);
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}

.barber-now-card__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.barber-now-card__info {
  flex: 1;
  min-width: 0;
}

.barber-now-card__client {
  font-size: 1.5rem;
  margin: 4px 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.barber-now-card__detail {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Timeline item with inline complete action */
.barber-timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.barber-timeline-item .appointment-card {
  flex: 1;
  min-width: 0;
}

.barber-timeline-item__actions {
  flex-shrink: 0;
}

/* Earnings transaction list */
.earnings-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.earnings-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  transition: background 0.1s;
}
.earnings-list__item:hover {
  background: var(--accent-subtle);
}

.earnings-list__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.earnings-list__info strong {
  font-size: 0.88rem;
}
.earnings-list__info span {
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.earnings-list__info small {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

.earnings-list__amount {
  flex-shrink: 0;
}
.earnings-list__amount strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  color: var(--success);
}

/* Mobile adjustments for barber pages */
@media (max-width: 640px) {
  .barber-now-card {
    padding: 20px 16px;
  }
  .barber-now-card__content {
    flex-direction: column;
    align-items: flex-start;
  }
  .barber-now-card__client {
    font-size: 1.2rem;
  }
  .barber-timeline-item {
    flex-direction: column;
    align-items: stretch;
  }
  .barber-timeline-item__actions {
    padding-left: 0;
  }
}

/* ═══════════════════════════════════════════════════════════
   Toasts & Activity Feed
   ═══════════════════════════════════════════════════════════ */

/* ── Toast container ── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: auto;
  animation: toastSlideIn 0.25s ease;
}

.toast--success { border-left: 4px solid var(--success); }
.toast--error   { border-left: 4px solid var(--danger); }
.toast--info    { border-left: 4px solid var(--accent); }

.toast__message {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-tertiary);
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.12s, background 0.12s;
}
.toast__close:hover {
  color: var(--text-primary);
  background: var(--accent-muted);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Activity Feed ── */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-feed__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}
.activity-feed__item:last-child {
  border-bottom: none;
}

.activity-feed__time {
  flex-shrink: 0;
  min-width: 56px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
  padding-top: 1px;
}

.activity-feed__desc {
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  line-height: 1.4;
}
.activity-feed__desc strong {
  color: var(--text-primary);
  font-weight: 600;
}
.activity-feed__desc .activity-feed__amount {
  color: var(--success);
  font-weight: 600;
}

@media (max-width: 640px) {
  .toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
    max-width: none;
  }
}

/* ── Reports Page ── */
.reports-period-control {
  flex-wrap: wrap;
}

.reports-custom-range {
  padding: 20px 24px;
}

.reports-custom-range__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.reports-compare-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.reports-compare-card {
  padding: 20px;
}

.reports-compare-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.reports-compare-card__value {
  display: block;
  font-size: 1.65rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.reports-compare-card__detail {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.82rem;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}

.reports-compare-card__detail span {
  color: var(--text-tertiary);
}

.reports-compare-card__detail--muted strong {
  color: var(--text-secondary);
}

.reports-delta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  white-space: nowrap;
}

.reports-delta strong {
  color: inherit;
  font-size: 0.74rem;
}

.reports-delta--positive {
  color: var(--success);
  background: var(--success-muted);
}

.reports-delta--negative {
  color: var(--danger);
  background: var(--danger-muted);
}

.reports-delta--neutral {
  color: var(--text-secondary);
  background: var(--surface-raised);
}

.reports-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.reports-bars__row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reports-bars__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.84rem;
}

.reports-bars__label span {
  color: var(--text-secondary);
}

.reports-bars__track {
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  overflow: hidden;
}

.reports-bars__fill {
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.reports-sources {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.reports-sources__stacked-bar {
  display: flex;
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--surface-raised);
}

.reports-sources__segment {
  display: block;
  height: 100%;
}

.reports-sources__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reports-sources__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reports-sources__meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reports-sources__meta p {
  font-size: 0.78rem;
  color: var(--text-tertiary);
}

.reports-sources__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.reports-leaderboard {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reports-leaderboard__row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.reports-leaderboard__row.is-top {
  border-color: rgba(199, 154, 84, 0.4);
  background: linear-gradient(180deg, rgba(199, 154, 84, 0.08), var(--surface-raised));
}

.reports-leaderboard__rank {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-muted);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.88rem;
}

.reports-leaderboard__identity {
  min-width: 0;
}

.reports-leaderboard__identity p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.reports-leaderboard__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reports-leaderboard__stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reports-leaderboard__stats span {
  font-size: 0.72rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.reports-service-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reports-service-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.reports-service-list__row:first-child {
  padding-top: 0;
}

.reports-service-list__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.reports-service-list__row p {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.reports-service-list__stats {
  flex-shrink: 0;
  text-align: right;
}

.reports-service-list__stats span {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Commission report table ── */
.commission-table-wrap {
  /* Cancel section-card padding so the table's own cell padding lines the
     rows up flush with the card edges, like the other data tables. */
  margin: 0 -24px -24px;
  width: calc(100% + 48px);
}
/* Tighter horizontal padding than the default data-table so all 9 columns
   (with fully-spelled-out headers) fit without a horizontal scroll. */
.commission-table th,
.commission-table td { padding-left: 11px; padding-right: 11px; }
.commission-table th { letter-spacing: 0.03em; }
.commission-table th.num,
.commission-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.commission-table th:first-child,
.commission-table td:first-child { padding-left: 24px; white-space: nowrap; }
.commission-table th:last-child,
.commission-table td:last-child { padding-right: 24px; }
.commission-table tfoot .commission-table__total td {
  border-top: 2px solid var(--border);
  border-bottom: none;
  background: var(--surface-overlay);
  color: var(--text-primary);
  padding-top: 14px;
  padding-bottom: 14px;
}
.commission-table tfoot .commission-table__total:hover td {
  /* Totals row isn't a hoverable record — keep it steady. */
  background: var(--surface-overlay);
}
.commission-table__note {
  margin: 14px 0 0;
  font-size: 0.78rem;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ── Commission controls + date-range picker ── */
.commission-controls { justify-content: space-between; }
.commission-controls__actions { display: flex; gap: 8px; flex-wrap: wrap; }

.period-picker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.period-picker__range {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-overlay);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px 4px;
}
.period-picker__range input[type="date"] {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  color-scheme: light dark;
}
.period-picker__range input[type="date"]:hover { background: var(--surface-hover); }
.period-picker__range input[type="date"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.period-picker__dash { color: var(--text-tertiary); font-size: 0.8rem; padding: 0 2px; }
.period-picker__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}
.period-picker__step:hover { background: var(--surface-hover); color: var(--text-primary); }

@media (max-width: 640px) {
  .commission-controls { justify-content: flex-start; }
  .period-picker { width: 100%; }
  .period-picker__range { flex: 1; justify-content: space-between; }
}

@media (max-width: 1200px) {
  .reports-compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reports-leaderboard__row {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .reports-leaderboard__stats {
    grid-column: 2;
  }
}

@media (max-width: 900px) {
  .reports-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reports-custom-range {
    padding: 16px;
  }

  .reports-custom-range__grid,
  .reports-compare-grid,
  .reports-leaderboard__stats {
    grid-template-columns: 1fr;
  }

  .reports-leaderboard__row {
    grid-template-columns: 1fr;
  }

  .reports-leaderboard__rank {
    width: 36px;
    height: 36px;
  }

  .reports-compare-card__top,
  .reports-service-list__row,
  .reports-bars__label,
  .reports-sources__item {
    flex-direction: column;
    align-items: flex-start;
  }

  .reports-service-list__stats {
    text-align: left;
  }
}

/* ── Payment Badges ── */
.appointment-card__badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.payment-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.payment-badge--prepaid {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.payment-badge--pending {
  background: rgba(251, 191, 36, 0.15);
  color: #FBBF24;
}

.payment-badge--refunded {
  background: rgba(96, 165, 250, 0.15);
  color: #60A5FA;
}

.payment-badge--forfeited {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}

/* Card-on-file: saved card, charged at completion. */
.payment-badge--card {
  background: rgba(139, 92, 246, 0.15);
  color: #A78BFA;
}

/* No prepay + no saved card: collect at the chair. */
.payment-badge--in-person {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
}

/* ── Payment-situation tones (utils/payment.ts vocabulary, shared w/ iOS) ──
   ok     = hands-off, money handled (Prepaid / Auto-pay / Auto-paid)
   action = barber collects at the chair (Charge card / Pays in shop)
   alert  = needs attention (Card declined / Forfeited)
   muted  = in-flight or historical (Processing / Refunded) */
.payment-badge--tone-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}
.payment-badge--tone-action {
  background: rgba(251, 146, 60, 0.15);
  color: #FB923C;
}
.payment-badge--tone-alert {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
}
.payment-badge--tone-muted {
  background: rgba(148, 163, 184, 0.15);
  color: #94A3B8;
}

/* Extra-compact variant for day/week grid blocks. */
.payment-badge--xs {
  padding: 1px 6px;
  font-size: 0.6rem;
  border-radius: 8px;
  align-self: flex-start;
  margin-top: 2px;
}

/* ── Client photo gallery ── */
.client-photo-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.client-photo-gallery__header {
  display: flex;
  justify-content: flex-end;
}
.client-photo-gallery__loading {
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.client-photo-gallery__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 32px 12px;
  color: var(--text-tertiary);
  text-align: center;
}
.client-photo-gallery__empty p {
  margin: 0;
  font-size: 0.9rem;
}
.client-photo-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 700px) {
  .client-photo-gallery__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.client-photo-gallery__tile {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: 10px;
  background: var(--surface-secondary, #f4f4f5);
  cursor: pointer;
  overflow: hidden;
  transition: transform 120ms ease;
}
.client-photo-gallery__tile:hover {
  transform: scale(1.02);
}
.client-photo-gallery__tile--primary {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.client-photo-gallery__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.client-photo-gallery__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Lightbox viewer */
.photo-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.photo-viewer__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: var(--surface-primary, #fff);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.photo-viewer__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.photo-viewer__image {
  display: block;
  max-width: 90vw;
  max-height: calc(90vh - 64px);
  object-fit: contain;
  background: #0f1014;
}
.photo-viewer__actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  justify-content: flex-end;
}

/* ═══ IA v2 (2026-06-11): sectioned sidebar + location switcher ═══ */

/* Section headers between nav groups */
.sidebar__group { display: flex; flex-direction: column; gap: 2px; }
.sidebar__section {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 14px 12px 4px;
  user-select: none;
}
.sidebar__section-rule {
  border-top: 1px solid var(--border);
  margin: 10px 8px;
}

/* Theme toggle in the brand row */
.sidebar__theme-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-tertiary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.sidebar__theme-btn:hover { color: var(--text-primary); border-color: var(--border-light); }

/* The one location switcher — top of sidebar */
.locswitch-wrap { padding: 0 8px 4px; }
.locswitch {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-overlay);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;
}
.locswitch:hover { border-color: var(--border-light); }
.locswitch--static { cursor: default; }
.locswitch--static:hover { border-color: var(--border); }
.locswitch--collapsed { justify-content: center; padding: 8px 0; }
.locswitch__icon { color: var(--text-secondary); flex-shrink: 0; }
.locswitch__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.locswitch__text small {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.locswitch__text strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.locswitch__caret { color: var(--text-tertiary); flex-shrink: 0; }

/* "All locations" mode is visually distinct — you always know your scope */
.locswitch--all { border-color: var(--accent); background: var(--accent-subtle); }
.locswitch--all .locswitch__icon,
.locswitch--all .locswitch__text strong { color: var(--accent); }

.locswitch__menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.locswitch__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  font-family: inherit;
  color: var(--text-secondary);
}
.locswitch__item:hover { background: var(--accent-muted); color: var(--text-primary); }
.locswitch__item.is-current { color: var(--accent); font-weight: 600; }
.locswitch__menu-sep { border-top: 1px solid var(--border); margin: 4px 0; }

/* Controls row for tab-embedded pages (period selectors etc. without a page hero) */
.tab-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Settings: grouped left rail ── */
.settings-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-rail { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-rail__group {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  padding: 14px 10px 4px;
}
.settings-rail__group:first-child { padding-top: 0; }
.settings-rail__link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: none;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}
.settings-rail__link:hover { color: var(--text-primary); background: var(--accent-subtle); }
.settings-rail__link.is-active { background: var(--accent-muted); color: var(--accent); font-weight: 600; }
.settings-content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.settings-content__head { display: flex; align-items: center; gap: 10px; }
.settings-content__head h2 { margin: 0; font-size: 1.05rem; }
.scope-pill {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: var(--surface-overlay);
  color: var(--text-tertiary);
  white-space: nowrap;
}
.scope-pill--location { background: var(--accent-muted); color: var(--accent); }
/* Second pill next to "Per location": WHICH location is being edited right
   now (mirrors the parent location picker — the single source of truth). */
.scope-pill--current { background: rgba(52, 211, 153, 0.14); color: #34d399; }
.scope-pill--none { background: rgba(251, 191, 36, 0.14); color: #fbbf24; }
/* The mint/amber above are dark-theme colors — on the light theme they wash
   out next to the accent-blue pill (Josh, 2026-07-09). Deeper text + a touch
   more tint for readable contrast on white. */
[data-theme="light"] .scope-pill--current { background: rgba(4, 120, 87, 0.12); color: #047857; }
[data-theme="light"] .scope-pill--none { background: rgba(180, 83, 9, 0.14); color: #b45309; }
@media (max-width: 860px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-rail { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .settings-rail__group { width: 100%; padding: 10px 10px 2px; }
  .settings-rail__link { width: auto; }
}

/* ── Today page: composed sections for the owner+barber ── */
.today-section { display: flex; flex-direction: column; gap: 12px; }
.today-section__title {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 8px 0 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}