@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&display=swap');

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

:root {
  --bg: #110d10;
  --bg2: #1c1620;
  --bg3: #271e2b;
  --bg4: #332538;
  --border: #3a2838;
  --primary: #e879a0;
  --primary-dark: #c45485;
  --primary-light: rgba(232, 121, 160, 0.12);
  --primary-glow: rgba(232, 121, 160, 0.22);
  --gold: #f0b429;
  --green: #10b981;
  --red: #f43f5e;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --purple: #a855f7;
  --text: #f0e8ed;
  --text-muted: #a08898;
  --text-dim: #6b5067;
  --sidebar-w: 240px;
  --sidebar-w-sm: 64px;
  --sidebar-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-w); padding: 28px; overflow-y: auto; min-height: 100vh; transition: margin-left var(--sidebar-transition); }

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--sidebar-transition);
  overflow: hidden;
}

/* Header: logo + toggle */
.sidebar-header { display: flex; flex-direction: column; border-bottom: 1px solid var(--border); flex-shrink: 0; }

.sidebar-logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px 12px;
  min-height: 80px;
}

/* Logo expanded */
.logo-expanded {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.sidebar.collapsed .logo-expanded { opacity: 0; width: 0; overflow: hidden; padding: 0; }

.logo-img {
  width: 100%;
  max-width: 160px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1);
}

/* Logo collapsed (X icon) */
.logo-collapsed { display: none; align-items: center; justify-content: center; }
.sidebar.collapsed .logo-collapsed { display: flex; }

.logo-icon-x {
  width: 34px; height: 34px;
  filter: drop-shadow(0 0 10px rgba(232,121,160,0.55));
}

.logo-icon-img {
  width: 36px; height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(232,121,160,0.5));
}

/* Toggle button */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 6px 14px;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  width: 100%;
}
.sidebar-toggle:hover { background: var(--bg3); color: var(--text-muted); }
.sidebar-toggle svg { width: 15px; height: 15px; transition: transform var(--sidebar-transition); flex-shrink: 0; }
.sidebar.collapsed .sidebar-toggle { justify-content: center; }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }

/* Nav */
.sidebar-nav { flex: 1; padding: 8px 0; overflow-y: auto; overflow-x: hidden; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
  position: relative;
}
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; }

.nav-label {
  overflow: hidden;
  max-width: 160px;
  opacity: 1;
  transition: opacity 0.18s ease, max-width 0.32s ease;
}
.sidebar.collapsed .nav-label { opacity: 0; max-width: 0; }

/* Tooltip on collapsed */
.sidebar.collapsed .nav-item::after {
  content: attr(title);
  position: absolute;
  left: calc(var(--sidebar-w-sm) + 6px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg4);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--border);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 200;
}
.sidebar.collapsed .nav-item:hover::after { opacity: 1; }

/* Footer */
.sidebar-footer { border-top: 1px solid var(--border); flex-shrink: 0; overflow: hidden; }

.footer-expanded {
  padding: 16px 20px;
  opacity: 1;
  max-height: 200px;
  transition: opacity 0.2s ease, max-height 0.32s ease, padding 0.32s ease;
}
.sidebar.collapsed .footer-expanded { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; overflow: hidden; }

.footer-collapsed {
  display: none;
  justify-content: center;
  padding: 10px;
}
.sidebar.collapsed .footer-collapsed { display: flex; }

.user-salon { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { font-size: 11px; color: var(--text-muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.btn-logout {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout:hover { background: rgba(244,63,94,0.1); color: var(--red); border-color: rgba(244,63,94,0.4); }

.btn-logout-icon {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-logout-icon:hover { background: rgba(244,63,94,0.1); color: var(--red); border-color: rgba(244,63,94,0.4); }
.btn-logout-icon svg { width: 15px; height: 15px; }

/* ── Page header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--primary-glow); }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg3); color: var(--text); }

.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(244,63,94,0.3); }
.btn-danger:hover { background: rgba(244,63,94,0.1); }

.btn-success { background: transparent; color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.btn-success:hover { background: rgba(16,185,129,0.1); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.stat-card.pink::before { background: linear-gradient(90deg, var(--primary), var(--primary-dark)); }
.stat-card.green::before { background: linear-gradient(90deg, var(--green), #059669); }
.stat-card.amber::before { background: linear-gradient(90deg, var(--amber), #d97706); }
.stat-card.blue::before { background: linear-gradient(90deg, var(--blue), #3b82f6); }
.stat-card.gold::before { background: linear-gradient(90deg, var(--gold), #d97706); }

.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-value.pink { color: var(--primary); }
.stat-value.green { color: var(--green); }
.stat-value.amber { color: var(--amber); }
.stat-value.blue { color: var(--blue); }
.stat-value.gold { color: var(--gold); }
.stat-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ── Appointment cards ── */
.appt-list { display: flex; flex-direction: column; gap: 10px; }

.appt-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s;
}
.appt-card:hover { border-color: var(--bg4); }

.appt-time {
  background: var(--bg3);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
  min-width: 58px;
  flex-shrink: 0;
}
.appt-time-value { font-size: 15px; font-weight: 700; color: var(--primary); display: block; }

.appt-body { flex: 1; min-width: 0; }
.appt-client { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-details { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.appt-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ── Status badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-pending { background: rgba(251,191,36,0.15); color: var(--amber); }
.badge-confirmed { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-completed { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-cancelled { background: rgba(244,63,94,0.12); color: var(--red); }
.badge-no_show { background: rgba(107,80,103,0.3); color: var(--text-dim); }

/* ── Table ── */
.table-wrap { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }

table { width: 100%; border-collapse: collapse; }
th { padding: 11px 16px; text-align: left; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; background: var(--bg3); border-bottom: 1px solid var(--border); }
td { padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.015); }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ── Forms ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-select option { background: var(--bg3); color: var(--text); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11px; color: var(--text-dim); margin-top: 5px; }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: min(500px, calc(100vw - 40px));
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  transform: scale(0.95) translateY(8px);
  transition: transform 0.2s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }

.modal-close {
  width: 30px; height: 30px;
  border: none;
  background: var(--bg3);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg4); color: var(--text); }

.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Search bar ── */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }

.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.search-wrap svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-dim); width: 14px; height: 14px; pointer-events: none; stroke: currentColor; }
.search-wrap input {
  width: 100%;
  padding: 9px 14px 9px 34px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}
.search-wrap input:focus { border-color: var(--primary); }

/* ── Date nav ── */
.date-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 5px;
}
.date-nav button {
  width: 30px; height: 30px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.15s;
}
.date-nav button:hover { background: var(--bg3); color: var(--text); }
.date-nav button.today-btn { font-size: 11px; font-weight: 600; width: auto; padding: 0 10px; }
.date-nav button.today-btn.active { background: var(--primary-light); color: var(--primary); }
.date-display { font-size: 14px; font-weight: 600; color: var(--text); min-width: 140px; text-align: center; padding: 0 4px; }

/* ── Section ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 52px 24px; }
.empty-icon { font-size: 42px; margin-bottom: 12px; opacity: 0.35; }
.empty-state p { font-size: 14px; color: var(--text-muted); }
.empty-state small { font-size: 12px; color: var(--text-dim); display: block; margin-top: 4px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  transform: translateY(16px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: var(--green); color: white; }
.toast.error { background: var(--red); color: white; }
.toast.info { background: var(--primary); color: white; }

/* ── Auth page ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse 60% 40% at 50% 0%, rgba(232,121,160,0.1) 0%, transparent 70%);
}

.auth-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: min(400px, calc(100vw - 32px));
}

.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-logo-icon {
  width: 54px; height: 54px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
  box-shadow: 0 0 28px var(--primary-glow);
  color: white;
}
.auth-logo-title { font-size: 22px; font-weight: 700; color: var(--text); }
.auth-logo-sub { font-size: 12px; color: var(--primary); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }

.auth-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.auth-error {
  background: rgba(244,63,94,0.1);
  border: 1px solid rgba(244,63,94,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--red);
  margin-bottom: 16px;
  display: none;
}

.auth-switch { text-align: center; margin-top: 20px; font-size: 13px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ── Active badge ── */
.active-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 100px; }
.active-badge.yes { background: rgba(16,185,129,0.15); color: var(--green); }
.active-badge.no { background: rgba(107,80,103,0.25); color: var(--text-dim); }

/* ── Service hint ── */
.service-info {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: none;
}
.service-info.visible { display: flex; gap: 16px; }
.service-info span { display: flex; gap: 4px; align-items: center; }
.service-info strong { color: var(--text); }

/* ── Glowing card effect ── */
.appt-card,
.settings-card {
  position: relative;
}

.stat-card::after,
.appt-card::after,
.settings-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    200px circle at var(--glow-x, -9999px) var(--glow-y, -9999px),
    rgba(232, 121, 160, 0.18),
    transparent 65%
  );
  opacity: var(--glow-opacity, 0);
  transition: opacity 0.55s ease;
  pointer-events: none;
  z-index: 0;
}

/* ── Settings ── */
.settings-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .settings-layout { grid-template-columns: 1fr; } }

.settings-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.settings-card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.settings-card-title svg { width: 14px; height: 14px; stroke: currentColor; flex-shrink: 0; }

.days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 6px;
}
.day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.day-chip input { display: none; }
.day-chip span {
  width: 100%;
  padding: 7px 2px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  border-radius: 7px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg3);
  transition: all 0.15s;
  user-select: none;
}
.day-chip input:checked + span {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Tab bar ── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
  margin-bottom: 20px;
}
.tab-bar .tab {
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 7px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.tab-bar .tab.active {
  background: var(--primary-light);
  color: var(--primary);
}
.tab-bar .tab:hover:not(.active) { color: var(--text); }

/* ── Kanban ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .kanban-board { grid-template-columns: 1fr; }
}
.kanban-col {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.kanban-col-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.kanban-col-icon.scheduled { background: rgba(16,185,129,.12); }
.kanban-col-icon.cancelled  { background: rgba(244,63,94,.12); }
.kanban-col-icon.followup   { background: rgba(168,85,247,.12); }
.kanban-col-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.kanban-count {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--bg4);
  color: var(--text-muted);
}
.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  gap: 8px;
}
.kanban-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: default;
  transition: border-color .15s, transform .1s;
}
.kanban-card:hover { border-color: rgba(232,121,160,.3); transform: translateY(-1px); }
.kanban-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.kanban-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1.5px solid rgba(232,121,160,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--primary);
  flex-shrink: 0;
}
.kanban-client-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.kanban-service {
  font-size: 12px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
}
.kanban-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.kanban-meta-item {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.kanban-meta-item svg { opacity: .6; flex-shrink: 0; }
.kanban-empty {
  padding: 24px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
}
.kanban-days-badge {
  font-size: 11px; font-weight: 700; padding: 2px 7px;
  border-radius: 5px; margin-left: auto;
}
.kanban-days-ok     { background: rgba(16,185,129,.12);  color: #10b981; }
.kanban-days-soon   { background: rgba(245,158,11,.12);  color: #f59e0b; }
.kanban-days-urgent { background: rgba(239,68,68,.12);   color: #ef4444; }

/* ── Maintenance modal ── */
.maint-client-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
}
.maint-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: var(--primary);
  flex-shrink: 0;
}
.maint-day-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.maint-day-btn {
  padding: 14px 6px;
  background: var(--bg3);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s, color .15s;
  color: var(--text-muted);
}
.maint-day-btn:hover { border-color: var(--primary); color: var(--primary); }
.maint-day-btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.maint-day-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.maint-day-sub {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.maint-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(232,121,160,.08), rgba(168,85,247,.08));
  border: 1px solid rgba(232,121,160,.28);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 4px;
  animation: fadeIn .18s ease;
}
.maint-preview-icon {
  font-size: 30px;
  line-height: 1;
  flex-shrink: 0;
}
.maint-preview-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--primary);
  margin-bottom: 3px;
}
.maint-preview-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Charts ── */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.chart-card-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.chart-peak-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--primary-light);
  color: var(--primary);
  white-space: nowrap;
}
.chart-wrap {
  position: relative;
  height: 200px;
}

/* ── Date filter bar ── */
.date-filter-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.date-filter-bar::-webkit-scrollbar { display: none; }
.date-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.date-chip:hover:not(.active) { border-color: var(--primary); color: var(--primary); }
.date-chip.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Appointment date mini label (multi-day ranges) ── */
.appt-date-mini {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 2px;
  line-height: 1;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bg4); }

/* ── Brand Logo ── */
.logo-icon-x { width: 38px; height: 38px; flex-shrink: 0; }

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

.brand-logo-stacked { text-align: center; }

.brand-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0;
  justify-content: center;
  line-height: 0.85;
}

.brand-grid span {
  font-size: 46px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

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

.brand-beauty-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 7px;
  color: var(--primary);
  text-transform: uppercase;
  margin: 10px 0 8px;
  font-family: 'Montserrat', -apple-system, sans-serif;
}

.brand-tagline {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--text-muted);
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}

/* ── Appointment Detail Modal ── */
.appt-body-clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}
.appt-body-clickable:hover { background: rgba(255,255,255,0.04); }

.detail-avatar-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.detail-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--primary));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.detail-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.detail-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.detail-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.detail-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 100px;
}
.detail-value {
  color: var(--text-primary);
  text-align: right;
}

/* ── Trial Card (dashboard) ── */
.trial-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.12), rgba(168,85,247,0.07));
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: 14px;
  padding: 18px 22px;
}
.trial-card-urgent {
  background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(249,115,22,0.07));
  border-color: rgba(239,68,68,0.35);
}
.trial-card-left {
  text-align: center;
  min-width: 56px;
}
.trial-card-counter {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}
.trial-card-urgent .trial-card-counter { color: #ef4444; }
.trial-card-counter-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.trial-card-center {
  flex: 1;
  min-width: 0;
}
.trial-card-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.trial-card-msg strong { color: var(--text-primary); }
.trial-progress-track {
  height: 5px;
  background: rgba(168,85,247,0.15);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 6px;
}
.trial-progress-bar {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--purple), var(--primary));
  transition: width 0.4s ease;
}
.trial-progress-urgent { background: linear-gradient(90deg, #f97316, #ef4444); }
.trial-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.trial-card-right { flex-shrink: 0; }
@media (max-width: 600px) {
  .trial-card { flex-wrap: wrap; }
  .trial-card-right { width: 100%; }
  .trial-card-right .btn { width: 100%; text-align: center; }
}

/* ── Trial Banner ── */
.trial-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
}
.trial-banner-btn {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.trial-banner-btn:hover { background: rgba(255,255,255,0.35); }

/* ── Billing Page ── */
.billing-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 20px;
}
.billing-hero {
  text-align: center;
  margin-bottom: 40px;
}
.billing-hero h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.billing-hero p {
  color: var(--text-muted);
  font-size: 15px;
}
.billing-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 600px) { .billing-plans { grid-template-columns: 1fr; } }
.plan-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.plan-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 8px 32px rgba(168,85,247,0.15);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--purple), var(--primary));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 14px;
  border-radius: 20px;
  text-transform: uppercase;
}
.plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.plan-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin: 12px 0 4px;
}
.plan-price span {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}
.plan-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
}
.plan-features li::before {
  content: '✓';
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}
.plan-btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.plan-btn:hover { opacity: 0.85; }
.plan-btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--primary));
  color: #fff;
}
.plan-btn-secondary {
  background: var(--border);
  color: var(--text-primary);
}
.billing-manage {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.billing-manage a {
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
}

/* ── Billing Success ── */
.billing-success-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px 20px;
}
.billing-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 36px;
}
.billing-success-page h1 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 10px;
}
.billing-success-page p {
  color: var(--text-muted);
  font-size: 15px;
  max-width: 380px;
  margin-bottom: 28px;
}

.brand-tagline em { color: var(--primary); font-style: normal; }
