/* ═══════════════════════════════════════════════════
   CONECTLE BARBER — DESIGN SYSTEM v9
   Theme: Conectle Navy + Teal
   ═══════════════════════════════════════════════════ */

:root {
  --bg:       #091426;
  --surface:  #101f37;
  --surface2: #162842;
  --surface3: #203554;
  --border:   rgba(255,255,255,0.05);
  --border2:  rgba(255,255,255,0.1);
  --gold:     #19B8BE;
  --gold-lt:  #6DD7D7;
  --gold-dk:  #0D8D9B;
  --gold-dim: rgba(25,184,190,0.15);
  --gold-brd: rgba(25,184,190,0.32);
  --text:     #FFFFFF;
  --text2:    #A7ABB2;
  --muted:    #6b6865;
  --green:    #22c55e;
  --red:      #ef4444;
  --blue:     #3b82f6;
  --purple:   #a855f7;
  --orange:   #f97316;
  --teal:     #14b8a6;
  --sidebar:  220px;
  --topbar:   68px;
  --r:        16px;
  --r-lg:     24px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* ─── UTILS ─── */
.hidden { display: none !important; }
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 4px;
}
.muted { color: var(--muted); font-size: 13px; }
.gold-text { color: var(--gold); }

/* ─────────────────────────────────────────
   AUTH GATE
───────────────────────────────────────── */
.auth-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex;
  background: var(--bg);
}
.auth-gate.hidden { display: none !important; }

.auth-story {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  background: radial-gradient(ellipse at 20% 60%, rgba(201,168,76,0.1) 0%, transparent 55%);
  border-right: 1px solid var(--border);
}
.auth-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 20px; font-weight: 800; color: var(--text);
}
.scissors-wrap {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  border-radius: 10px;
  display: grid; place-items: center;
  color: #000;
  box-shadow: 0 4px 16px rgba(201,168,76,0.3);
}
.auth-brand em { color: var(--gold); font-style: normal; }
.conectle-mark { display:grid; place-items:center; flex-shrink:0; border-radius:11px; background:linear-gradient(145deg,#22c5c4,#12699e); box-shadow:0 6px 18px rgba(25,184,190,.25); color:#fff; font-weight:900; letter-spacing:-1px; }.auth-mark { width:40px; height:40px; font-size:22px; }.sidebar-mark { width:34px; height:34px; font-size:18px; }
.bp-onboarding{margin:18px 0 24px;border:1px solid rgba(25,184,190,.3);border-radius:18px;background:linear-gradient(118deg,rgba(16,31,55,.98),rgba(17,43,68,.92));padding:20px;box-shadow:0 12px 28px rgba(0,0,0,.16)}.bp-onboarding-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px}.bp-onboarding-head h3{margin:4px 0 5px;color:var(--text);font-size:18px;letter-spacing:-.35px}.bp-onboarding-head p:not(.eyebrow){max-width:610px;margin:0;color:var(--text2);font-size:12px;line-height:1.45}.bp-onboarding-head>span{flex:none;border-radius:99px;background:var(--gold-dim);color:var(--gold-lt);padding:7px 10px;font-size:10px;font-weight:850}.bp-onboarding-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:17px}.bp-onboarding-step{display:grid;grid-template-columns:30px minmax(0,1fr);gap:9px;align-items:start;border:1px solid rgba(255,255,255,.09);border-radius:13px;background:rgba(3,12,28,.24);padding:12px}.bp-onboarding-step>span{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--gold-dim);color:var(--gold-lt);font-size:12px;font-weight:900}.bp-onboarding-step.done>span{background:rgba(34,197,94,.16);color:#61d990}.bp-onboarding-step b{display:block;margin:2px 0 4px;color:var(--text);font-size:12px}.bp-onboarding-step p{margin:0;color:var(--text2);font-size:10px;line-height:1.45}.bp-onboarding-step button{grid-column:1/-1;justify-self:start;border:1px solid var(--gold-brd);border-radius:8px;background:var(--gold-dim);color:var(--gold-lt);padding:8px 9px;font:800 10px inherit;cursor:pointer}.bp-onboarding-step button:hover{background:rgba(25,184,190,.26)}.bp-onboarding-step em{grid-column:1/-1;color:#61d990;font-size:10px;font-style:normal;font-weight:850}@media(max-width:1080px){.bp-onboarding-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.bp-onboarding{margin:14px 0 18px;padding:16px}.bp-onboarding-head{display:block}.bp-onboarding-head>span{display:inline-block;margin-top:10px}.bp-onboarding-steps{grid-template-columns:1fr}.bp-onboarding-step{grid-template-columns:30px minmax(0,1fr) auto;align-items:center}.bp-onboarding-step button,.bp-onboarding-step em{grid-column:2/-1;justify-self:start}.bp-onboarding-step p{font-size:11px}}
.auth-overline {
  display: block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--gold);
  margin-bottom: 16px;
}
.auth-copy h1 {
  font-size: 42px; font-weight: 800; color: var(--text);
  line-height: 1.15; margin-bottom: 20px;
}
.auth-copy p { color: var(--text2); font-size: 16px; line-height: 1.6; max-width: 460px; }
.auth-trust {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: 13px;
}
.trust-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.auth-panel {
  width: 480px; flex: 0 0 480px;
  display: grid; place-items: center;
  padding: 40px;
  background: rgba(8, 8, 8, 0.95);
}
.auth-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--gold-brd);
  border-radius: var(--r-lg);
  padding: 44px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.05);
}
.auth-eyebrow {
  display: block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; color: var(--gold);
  margin-bottom: 12px;
}
.auth-card h2 { font-size: 26px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.auth-card > p { color: var(--text2); margin-bottom: 28px; }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field label { font-size: 13px; font-weight: 600; color: var(--text2); }
.auth-field input {
  padding: 13px 16px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.auth-error { color: var(--red); font-size: 13px; font-weight: 600; min-height: 18px; }
.auth-submit {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  color: #000; font-size: 15px; font-weight: 800;
  border: none; border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(201,168,76,0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 8px;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,168,76,0.5); }
.auth-submit:active { transform: translateY(0); }
.auth-footer { margin-top: 24px; text-align: center; font-size: 12px; color: var(--muted); }

/* ─────────────────────────────────────────
   APP SHELL
───────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.app-shell.hidden { display: none !important; }

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-top { padding: 22px 14px 16px; flex: 1; }
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 28px; padding: 0 4px;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  border-radius: 8px;
  display: grid; place-items: center;
  color: #000; flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(201,168,76,0.25);
}
.logo-text { font-size: 17px; font-weight: 800; color: var(--text); }
.logo-text em { color: var(--gold); font-style: normal; }

.nav-group { margin-bottom: 20px; }
.nav-group-label {
  font-size: 9px; font-weight: 700;
  letter-spacing: 1.6px; color: var(--muted);
  padding: 0 8px; margin-bottom: 6px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: transparent; border: none;
  color: var(--text2); font-size: 13px; font-weight: 500;
  cursor: pointer; width: 100%; text-align: left;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.nav-item:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.nav-item.active {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-brd);
  font-weight: 600;
}
.nav-item.nav-muted { opacity: 0.45; cursor: not-allowed; }
.ni { width: 16px; height: 16px; flex-shrink: 0; stroke: currentColor; }
.nav-badge {
  margin-left: auto;
  background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
}
.soon-pill {
  margin-left: auto;
  background: rgba(201,168,76,0.15); color: var(--gold);
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--gold-brd);
}

.sidebar-foot {
  padding: 14px;
  border-top: 1px solid var(--border);
}
.plan-block {
  background: var(--surface2);
  border: 1px solid var(--gold-brd);
  border-radius: var(--r);
  padding: 16px;
}
.plan-tier {
  font-size: 12px; font-weight: 700;
  color: var(--gold); margin-bottom: 4px;
}
.plan-exp { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.upgrade-btn {
  width: 100%; padding: 8px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  color: #000; font-size: 12px; font-weight: 800;
  border: none; border-radius: 8px; cursor: pointer;
  transition: opacity 0.15s;
}
.upgrade-btn:hover { opacity: 0.9; }

/* ─────────────────────────────────────────
   WORKSPACE
───────────────────────────────────────── */
.workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ─────────────────────────────────────────
   TOPBAR
───────────────────────────────────────── */
.topbar {
  height: var(--topbar);
  flex: 0 0 var(--topbar);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}
.topbar-welcome small { font-size: 11px; color: var(--muted); }
.topbar-welcome h1 { font-size: 20px; font-weight: 700; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 12px; color: var(--muted); }

.icon-btn {
  width: 36px; height: 36px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text2);
  cursor: pointer; display: grid; place-items: center;
  transition: all 0.15s;
}
.icon-btn:hover { border-color: var(--border2); color: var(--text); }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 6px 8px 6px 6px;
}
.user-av {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  color: #000; font-weight: 800; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; }
.user-info b { font-size: 13px; font-weight: 600; color: var(--text); }
.user-info small { font-size: 11px; color: var(--muted); }
.logout-btn { background: none !important; border: none !important; color: var(--muted) !important; }
.logout-btn:hover { color: var(--red) !important; }

/* ─────────────────────────────────────────
   VIEWS
───────────────────────────────────────── */
.views-wrap {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scroll-behavior: smooth;
}

.view { display: none; }
.view.active { display: block; }

/* ─────────────────────────────────────────
   KPI ROW
───────────────────────────────────────── */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px 22px;
  transition: border-color 0.2s, transform 0.2s;
  cursor: default;
}
.kpi-card:hover { border-color: var(--gold-brd); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.kpi-label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.3px; }
.kpi-ico {
  width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; flex-shrink: 0;
}
.kpi-ico-gold { background: rgba(201,168,76,0.15); color: var(--gold); }
.kpi-ico-blue { background: rgba(59,130,246,0.15); color: var(--blue); }
.kpi-ico-purple { background: rgba(168,85,247,0.15); color: var(--purple); }
.kpi-ico-green { background: rgba(34,197,94,0.15); color: var(--green); }
.kpi-value { font-size: 24px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.kpi-delta { font-size: 12px; color: var(--green); font-weight: 500; }
.kpi-delta.negative { color: var(--red); }

/* ─────────────────────────────────────────
   DASHBOARD GRID
───────────────────────────────────────── */
.dash-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  align-items: start;
}

.dash-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  overflow: hidden;
}










/* Re-arrange last row - payment and AI in bottom */

.d-payment  { grid-row: 3; grid-column: 2 / 3; }
.d-ai       { grid-row: 3; grid-column: 3 / 5; }

.dcard-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px; gap: 8px;
}
.dcard-head h3 { font-size: 15px; font-weight: 700; color: var(--text); }
.ghost-link {
  font-size: 12px; font-weight: 600; color: var(--gold);
  background: none; border: none; cursor: pointer; white-space: nowrap;
  padding: 4px 0; transition: opacity 0.15s;
}
.ghost-link:hover { opacity: 0.75; }
.gold-ghost { }
.date-tag {
  display: inline-block;
  font-size: 11px; font-weight: 500; color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 8px;
  vertical-align: middle; margin-left: 4px;
}

/* ─── Agenda Timeline ─── */
.agenda-timeline { display: flex; flex-direction: column; gap: 8px; }
.timeline-slot {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 9px;
  transition: border-color 0.15s;
}
.timeline-slot:hover { border-color: var(--border2); }
.slot-time { font-size: 11px; color: var(--muted); width: 38px; flex-shrink: 0; }
.slot-bar {
  width: 3px; height: 32px; border-radius: 2px; flex-shrink: 0;
}
.slot-info { flex: 1; min-width: 0; }
.slot-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-service { font-size: 11px; color: var(--muted); }
.slot-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
  flex-shrink: 0;
}
.slot-confirmed { background: rgba(34,197,94,0.15); color: var(--green); }
.slot-scheduled { background: rgba(201,168,76,0.15); color: var(--gold); }
.slot-done { background: rgba(107,104,101,0.2); color: var(--muted); }
.slot-cancelled { background: rgba(239,68,68,0.15); color: var(--red); }

/* ─── VIP List ─── */
.vip-list { display: flex; flex-direction: column; gap: 8px; }
.vip-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.vip-av {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--surface3);
  color: var(--gold); font-weight: 700; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0;
}
.vip-info { flex: 1; min-width: 0; }
.vip-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vip-visits { font-size: 11px; color: var(--muted); }
.vip-tag {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  background: var(--gold-dim); color: var(--gold);
  border: 1px solid var(--gold-brd); flex-shrink: 0;
}

/* ─── Bookings ─── */
.bookings-days { display: flex; flex-direction: column; gap: 8px; }
.day-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 9px;
}
.day-label { font-size: 13px; font-weight: 600; color: var(--text); }
.day-count {
  font-size: 13px; font-weight: 700; color: var(--gold);
  background: var(--gold-dim); padding: 2px 10px;
  border-radius: 6px; border: 1px solid var(--gold-brd);
}

/* ─── Shortcuts ─── */
.shortcuts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sc-btn {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 14px 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer;
  font-size: 11px; font-weight: 600; color: var(--text2);
  text-align: center; transition: all 0.15s;
}
.sc-btn:hover { border-color: var(--border2); color: var(--text); background: var(--surface3); }
.sc-ico {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; color: #fff;
}
.sc-blue   { background: rgba(59,130,246,0.2); color: var(--blue); }
.sc-gold   { background: rgba(201,168,76,0.2); color: var(--gold); }
.sc-green  { background: rgba(34,197,94,0.2); color: var(--green); }
.sc-orange { background: rgba(249,115,22,0.2); color: var(--orange); }
.sc-purple { background: rgba(168,85,247,0.2); color: var(--purple); }
.sc-teal   { background: rgba(20,184,166,0.2); color: var(--teal); }

/* ─── Chart ─── */
.chart-subtitle {
  font-size: 20px; font-weight: 800; color: var(--text); margin-top: 4px;
  display: flex; align-items: center; gap: 8px;
}
.delta-pill {
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 6px;
}
.delta-pill.positive { background: rgba(34,197,94,0.15); color: var(--green); }
.delta-pill.negative { background: rgba(239,68,68,0.15); color: var(--red); }
.chart-box { height: 140px; position: relative; margin-top: 12px; }
.chart-box canvas { width: 100% !important; }

/* ─── Payment Donut ─── */
.donut-box {
  display: flex; justify-content: center;
  margin: 12px 0;
}
.donut-chart-wrap { position: relative; width: 130px; height: 130px; }
.donut-chart-wrap canvas { width: 130px !important; height: 130px !important; }
.donut-label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted); text-align: center;
  pointer-events: none;
}
.donut-label b { font-size: 13px; font-weight: 700; color: var(--text); }
.payment-legend { display: flex; flex-direction: column; gap: 6px; }
.leg-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.leg-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.leg-pct { margin-left: auto; font-weight: 600; color: var(--text); }

/* ─── AI Card ─── */
.d-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ai-emoji { font-size: 32px; }
.d-ai h4 { font-size: 15px; font-weight: 700; color: var(--text); }
.d-ai p { font-size: 13px; color: var(--text2); line-height: 1.5; }

/* ─────────────────────────────────────────
   MINI ROW
───────────────────────────────────────── */
.mini-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.mini-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 10px;
  transition: border-color 0.2s;
}
.mini-card:hover { border-color: var(--border2); }
.mini-ico {
  font-size: 22px; line-height: 1;
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
}
.mc-gold   { background: rgba(201,168,76,0.12); }
.mc-blue   { background: rgba(59,130,246,0.12); }
.mc-purple { background: rgba(168,85,247,0.12); }
.mc-star   { background: rgba(255,200,0,0.12); }
.mini-body { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mini-lbl { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }
.mini-val { font-size: 18px; font-weight: 800; color: var(--text); }
.mini-val.gold-val { color: var(--gold); }
.mini-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); }
.open-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.mini-card > small, .mini-body small { font-size: 11px; color: var(--muted); }
.stars { color: var(--gold); font-size: 13px; letter-spacing: 1px; }
.mini-btn {
  padding: 8px; border-radius: 7px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); font-size: 11px; font-weight: 600;
  cursor: pointer; transition: all 0.15s; text-align: center;
}
.mini-btn:hover { border-color: var(--gold-brd); color: var(--gold); }
.mini-btn.mini-warn { border-color: rgba(249,115,22,0.3); color: var(--orange); }

/* Integrations mini card */
.mini-integrations { grid-column: span 1; }
.int-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); padding: 4px 0; }
.int-dot {
  width: 22px; height: 22px; border-radius: 6px;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center; flex-shrink: 0;
}
.int-wa   { background: #25D366; color: #fff; }
.int-pix  { background: #32bcad; color: #fff; }
.int-card { background: var(--blue); color: #fff; }
.int-badge {
  margin-left: auto; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  background: var(--surface3); color: var(--muted);
}
.int-badge.int-ok { background: rgba(34,197,94,0.15); color: var(--green); }

/* ─────────────────────────────────────────
   VIEW HEADERS
───────────────────────────────────────── */
.view-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 16px;
}
.view-hd h2 { font-size: 28px; font-weight: 800; color: var(--text); }
.view-desc { color: var(--text2); font-size: 14px; margin-top: 4px; }
.view-hd-actions { display: flex; align-items: center; gap: 12px; }
.date-pick { display: flex; flex-direction: column; gap: 4px; }
.date-pick label { font-size: 11px; color: var(--muted); }
.date-pick input, #agenda-date {
  padding: 9px 13px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 13px;
  outline: none;
  color-scheme: dark;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.primary-button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px;
  background: linear-gradient(135deg, var(--gold), #a8843c);
  color: #000; font-size: 13px; font-weight: 800;
  border: none; border-radius: 9px; cursor: pointer;
  box-shadow: 0 2px 12px rgba(201,168,76,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(201,168,76,0.4); }
.primary-button.compact { padding: 8px 14px; font-size: 12px; }
.secondary-button {
  padding: 11px 20px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text2); font-size: 13px; font-weight: 600;
  border-radius: 9px; cursor: pointer; transition: all 0.15s;
}
.secondary-button:hover { border-color: var(--border2); color: var(--text); }
.text-button {
  background: none; border: none;
  color: var(--gold); font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 4px 0;
}
.text-button:hover { opacity: 0.8; }

/* ─────────────────────────────────────────
   PANEL
───────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.panel-heading {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.panel-heading h3 { font-size: 17px; font-weight: 700; color: var(--text); }

/* ─────────────────────────────────────────
   SEARCH
───────────────────────────────────────── */
.search-row {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.search-box {
  display: flex; align-items: center; gap: 10px;
  flex: 1; padding: 0 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; cursor: text;
}
.search-box span { color: var(--muted); font-size: 12px; }
.search-box input {
  flex: 1; padding: 11px 0;
  background: none; border: none; color: var(--text); outline: none;
  font-size: 14px;
}
.count-tag { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ─────────────────────────────────────────
   APPOINTMENT LIST
───────────────────────────────────────── */
.appointment-list { display: flex; flex-direction: column; gap: 10px; }
.appointment-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; gap: 12px;
  transition: border-color 0.15s;
}
.appointment-card:hover { border-color: var(--border2); }

/* ─────────────────────────────────────────
   PATIENT GRID
───────────────────────────────────────── */
.patient-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ─────────────────────────────────────────
   TEAM GRID
───────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.team-note-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--gold-dim); border: 1px solid var(--gold-brd);
  border-radius: 10px; margin-bottom: 20px;
}
.tn-icon { font-size: 18px; color: var(--gold); flex-shrink: 0; }
.team-note-bar strong { color: var(--text); font-weight: 700; }
.team-note-bar p { color: var(--text2); font-size: 13px; margin-top: 2px; }

/* ─────────────────────────────────────────
   SERVICE GRID
───────────────────────────────────────── */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  display: flex; flex-direction: column; gap: 6px;
  transition: border-color 0.15s;
}
.service-card:hover { border-color: var(--gold-brd); }
.service-category { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--gold); text-transform: uppercase; }
.service-card strong { font-size: 15px; font-weight: 700; color: var(--text); }
.service-card span { font-size: 13px; color: var(--text2); }

/* ─────────────────────────────────────────
   FINANCIAL
───────────────────────────────────────── */
.financial-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 20px;
}
.transaction-list { display: flex; flex-direction: column; gap: 10px; }

/* ─────────────────────────────────────────
   SETTINGS
───────────────────────────────────────── */
.settings-panel {
  position: relative;
  display: flex; flex-direction: column; gap: 16px;
  max-width: 480px;
}
.settings-decor {
  position: absolute; top: -10px; right: 24px;
  font-size: 40px; color: var(--gold); opacity: 0.15;
}
.settings-panel label {
  display: flex; flex-direction: column; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text2);
}
.settings-panel input {
  padding: 13px 16px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.15s;
}
.settings-panel input:focus { border-color: var(--gold); }

/* ─────────────────────────────────────────
   ATTENDANCE / INBOX
───────────────────────────────────────── */
.attendance-view { display: none; }
.attendance-view.active { display: flex; flex-direction: column; gap: 0; }
.attendance-tutorial {
  display: flex; align-items: center; gap: 20px;
  padding: 14px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); margin-bottom: 16px;
}
.tutorial-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.tutorial-item span {
  width: 24px; height: 24px; border-radius: 6px;
  background: var(--gold-dim); color: var(--gold);
  font-weight: 800; display: grid; place-items: center;
  flex-shrink: 0; font-size: 12px;
  border: 1px solid var(--gold-brd);
}
.tutorial-item b { color: var(--text); }
.tutorial-item small { color: var(--muted); }
.tutorial-dismiss-btn {
  margin-left: auto; background: none; border: none;
  color: var(--muted); font-size: 12px; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
}
.attendance-workspace {
  display: grid; grid-template-columns: 290px 1fr;
  height: calc(100vh - 240px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}
.attendance-list {
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.attendance-accounts { border-bottom: 1px solid var(--border); }
.attendance-list-head {
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.attendance-list-head b { font-size: 14px; font-weight: 700; color: var(--text); }
.attendance-list-head small { font-size: 12px; color: var(--muted); }
.icon-action {
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 4px;
}
.icon-action:hover { color: var(--gold); }
.conversation-list { flex: 1; overflow-y: auto; }
.inbox-empty {
  padding: 40px 20px; text-align: center;
  display: flex; flex-direction: column; gap: 6px;
}
.inbox-empty strong { color: var(--text2); }
.inbox-empty span { color: var(--muted); font-size: 13px; }
.attendance-chat {
  display: flex; flex-direction: column;
  background: var(--bg);
}
.chat-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  color: var(--muted); text-align: center; padding: 40px;
}
.chat-empty-mark {
  font-size: 36px;
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface2); display: grid; place-items: center;
}
.chat-empty h2 { font-size: 18px; font-weight: 700; color: var(--text2); }
.chat-empty p { font-size: 13px; color: var(--muted); max-width: 300px; }

/* ─────────────────────────────────────────
   MODAL
───────────────────────────────────────── */
#modal {
  width: min(500px, 90vw);
  background: var(--surface);
  border: 1px solid var(--gold-brd);
  border-radius: var(--r-lg);
  padding: 0;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  max-height: 90vh;
  overflow-y: auto;
}
#modal::backdrop { background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); }
#modal-form { padding: 28px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; gap: 12px;
}
.modal-head h2 { font-size: 20px; font-weight: 800; color: var(--text); }
.close-btn {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px; cursor: pointer; color: var(--text2);
  display: grid; place-items: center; flex-shrink: 0;
  transition: all 0.15s;
}
.close-btn:hover { border-color: var(--red); color: var(--red); }
#modal-content { display: flex; flex-direction: column; gap: 14px; }
#modal-content label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text2);
}
#modal-content input,
#modal-content select,
#modal-content textarea {
  padding: 11px 14px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text); font-size: 14px;
  outline: none; transition: border-color 0.15s;
  color-scheme: dark;
}
#modal-content input:focus,
#modal-content select:focus,
#modal-content textarea:focus { border-color: var(--gold); }
#modal-content select option { background: var(--surface2); }
.form-error { color: var(--red); font-size: 13px; font-weight: 600; min-height: 18px; }
.modal-actions {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* WhatsApp Modal */
.whatsapp-modal {
  background: var(--surface);
  border: 1px solid var(--gold-brd);
  border-radius: var(--r-lg);
  padding: 28px;
  width: min(460px, 90vw);
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}
.whatsapp-modal::backdrop { background: rgba(0,0,0,0.75); backdrop-filter: blur(6px); }

/* ─────────────────────────────────────────
   TOAST
───────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text); border-radius: 10px;
  padding: 12px 22px; font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 10000; white-space: nowrap;
  pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ─────────────────────────────────────────
   LOADING STATES
───────────────────────────────────────── */
.loading-state, .empty-state {
  padding: 24px; text-align: center;
  color: var(--muted); font-size: 13px;
}

/* ─────────────────────────────────────────
   CONVERSATION ITEMS
───────────────────────────────────────── */
.conversation {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; text-align: left; transition: background 0.1s;
}
.conversation:hover { background: var(--surface2); }
.conversation.active { background: var(--gold-dim); }
.conversation-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface3); color: var(--gold);
  font-weight: 700; font-size: 13px;
  display: grid; place-items: center; flex-shrink: 0;
}
.conversation-copy { flex: 1; min-width: 0; }
.conversation-copy b { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-copy small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.conversation-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conversation-meta time { font-size: 11px; color: var(--muted); }

/* Attendance accounts */
.attendance-account {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer; text-align: left; color: var(--text2);
  transition: background 0.15s;
}
.attendance-account:hover { background: var(--surface2); }
.attendance-account.active { background: var(--gold-dim); color: var(--gold); }
.account-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.account-dot.online { background: var(--green); box-shadow: 0 0 6px var(--green); }

/* Connect empty */
.connect-empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 24px; width: 100%;
  background: var(--gold-dim); border: 1px solid var(--gold-brd);
  border-radius: 10px; cursor: pointer; text-align: center;
}
.connect-empty strong { color: var(--text); font-weight: 700; }
.connect-empty span { color: var(--text2); font-size: 12px; }
.connect-empty b { color: var(--gold); font-size: 12px; }

/* Conv badges */
.conv-stage-badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
}
.conv-stage-badge.ready { background: rgba(34,197,94,0.15); color: var(--green); }
.conv-stage-badge.service { background: rgba(59,130,246,0.15); color: var(--blue); }
.conv-stage-badge.progress { background: rgba(201,168,76,0.15); color: var(--gold); }

/* ─────────────────────────────────────────
   ACCESS MANAGEMENT
───────────────────────────────────────── */
.access-management article {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px;
}
.team-avatar {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #000;
  flex-shrink: 0;
}
.online { color: var(--green); font-size: 12px; font-weight: 600; }
.offline { color: var(--muted); font-size: 12px; }

/* ─────────────────────────────────────────
   SCROLLBARS
───────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border2); }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 1280px) {
  .mini-row { grid-template-columns: repeat(3, 1fr); }
}

/* ─────────────────────────────────────────
   DESKTOP NO-SCROLL ARCHITECTURE (PROFESSIONAL APP LAYOUT)
───────────────────────────────────────── */
@media (min-width: 1025px) {
  /* Lock the main layout to 100vh */
  body, html, .app-shell {
    height: 100dvh;
    overflow: hidden;
  }
  
  .workspace {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .views-wrap {
    flex: 1;
    overflow: hidden !important; /* NO PAGE SCROLL */
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
  }

  .view.active {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .kpi-row {
    flex-shrink: 0;
  }

  .dash-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch !important;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  
  .dash-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .dcard-head {
    flex-shrink: 0;
  }
  
  /* Make inner containers scrollable instead of the page */
  .agenda-timeline, 
  .bookings-days, 
  .shortcuts-grid,
  .dash-card > div:not(.dcard-head) {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
  }

  /* Custom thin scrollbar for internal cards */
  .dash-card *::-webkit-scrollbar { width: 4px; }
  .dash-card *::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

  /* Re-apply grid placement for desktop so it fits perfectly in 2 rows */
  .d-agenda   { grid-column: 1; grid-row: 1 / 3; }
  .d-bookings { grid-column: 2; grid-row: 1; }
  .d-shortcuts{ grid-column: 3; grid-row: 1; }
  .d-chart    { grid-column: 2; grid-row: 2; }
  .d-payment  { grid-column: 3; grid-row: 2; }
}

@media (max-width: 1024px) {
  :root { --sidebar: 190px; }
  
  
  .d-agenda { grid-row: 1; grid-column: 1 / 3; }
  
  
  .d-payment, 
}
@media (max-width: 768px) {
  .auth-story { display: none; }
  .auth-panel { flex: 1; padding: 20px; width: 100%; }
  .auth-card { padding: 30px 20px; }
  .auth-story { display: none; }
  .auth-panel { width: 100%; flex: 1; }
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; flex: none; }
  .mini-row { grid-template-columns: repeat(2, 1fr); }
  
}


/* ==========================================================================
   CHAT / ATENDIMENTO - 3 COLUMNS LAYOUT (BARBER PRO STYLE)
   ========================================================================== */

/* Top KPI Row */
.chat-kpi-row {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}
.chat-kpi-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.chat-kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ck-green { background: rgba(74, 222, 128, 0.1); color: #4ade80; }
.ck-purple { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.ck-yellow { background: rgba(201, 168, 76, 0.1); color: #c9a84c; }
.ck-orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.chat-kpi-info {
  display: flex;
  flex-direction: column;
}
.chat-kpi-title { font-size: 12px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.chat-kpi-val { font-size: 20px; color: var(--text-base); line-height: 1.1; }
.chat-kpi-delta { font-size: 11px; margin-top: 4px; font-weight: 500; }
.chat-kpi-delta.positive { color: #4ade80; }
.chat-kpi-delta.negative { color: #f43f5e; }

.chat-kpi-action {
  display: flex;
  align-items: center;
}
.chat-kpi-action .primary-button {
  background: var(--gold-base);
  color: #111;
  padding: 12px 20px;
  height: 48px;
  border-radius: 8px;
  font-weight: 600;
}
.chat-kpi-action .primary-button:hover { background: var(--gold-light); }

/* Main Grid */
.attendance-workspace-grid {
  display: grid;
  grid-template-columns: 320px 1fr 340px;
  gap: 16px;
  height: calc(100vh - 180px);
  min-height: 600px;
}

/* Sidebar Left (Conversations) */
.chat-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}
.chat-sidebar-header h3 { margin: 0; font-size: 16px; font-weight: 600; }
.chat-filter-select { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; }

.chat-search-box {
  margin: 0 16px 12px;
  position: relative;
}
.chat-search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.chat-search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 10px 10px 10px 36px;
  color: var(--text-base);
  font-size: 13px;
  outline: none;
}
.chat-search-box input:focus { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.05); }

.chat-filters {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-light);
  scrollbar-width: none;
}
.chat-filters::-webkit-scrollbar { display: none; }
.cf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 0;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cf-btn.active { color: var(--gold-base); border-bottom: 2px solid var(--gold-base); }
.cf-badge { background: rgba(255, 255, 255, 0.1); padding: 2px 6px; border-radius: 10px; font-size: 10px; }
.cf-btn.active .cf-badge { background: rgba(201, 168, 76, 0.2); color: var(--gold-base); }

.conversation-list {
  flex: 1;
  overflow-y: auto;
}
.chat-item {
  display: flex;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.2s;
  position: relative;
}
.chat-item:hover, .chat-item.active { background: rgba(255, 255, 255, 0.02); }
.chat-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--gold-base);
}
.chat-item-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 18px; color: var(--text-base); flex-shrink: 0;}
.chat-item-content { flex: 1; min-width: 0; }
.chat-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.chat-item-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px;}
.vip-badge { font-size: 9px; background: var(--gold-base); color: #111; padding: 1px 4px; border-radius: 4px; font-weight: bold; }
.chat-item-time { font-size: 11px; color: var(--text-muted); }
.chat-item-bot { display: flex; justify-content: space-between; align-items: center; }
.chat-item-msg { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.unread-badge { background: #4ade80; color: #111; font-size: 10px; font-weight: bold; height: 18px; min-width: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

/* Main Chat Window */
.chat-main {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20c0 10-10 10-10 20s10 10 10 20-10 10-10 20 10 10 10 20' stroke='rgba(255,255,255,0.01)' fill='none' stroke-width='1'/%3E%3C/svg%3E");
}
.chat-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  z-index: 2;
}
.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-info img, .chat-header-info .fake-av { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-hover); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; }
.chat-header-text h3 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.chat-header-text span { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.chat-header-actions { display: flex; align-items: center; gap: 12px; }
.chat-header-actions .icon-btn { background: transparent; color: var(--text-muted); border: 1px solid var(--border-light); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; }
.chat-header-actions .icon-btn:hover { color: var(--text-base); border-color: var(--border-hover); }
.btn-finish { background: transparent; border: 1px solid var(--gold-base); color: var(--gold-base); padding: 8px 16px; border-radius: 6px; font-weight: 500; font-size: 13px; cursor: pointer; transition: 0.2s; }
.btn-finish:hover { background: rgba(201, 168, 76, 0.1); }

.chat-history {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-date-sep {
  text-align: center;
  margin: 10px 0;
}
.chat-date-sep span {
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  color: var(--text-muted);
}
.msg-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  position: relative;
}
.msg-received {
  align-self: flex-start;
  background: #23262b;
  border-bottom-left-radius: 4px;
  color: var(--text-base);
}
.msg-sent {
  align-self: flex-end;
  background: #144d37;
  border-bottom-right-radius: 4px;
  color: #fff;
}
.msg-time {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}
.msg-sent .msg-time { color: rgba(255,255,255,0.7); }
.tick-read { color: #4ade80; }

.chat-input-area {
  padding: 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-input-wrap {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 8px 16px;
  transition: 0.2s;
}
.chat-input-wrap:focus-within { border-color: var(--border-hover); background: rgba(255,255,255,0.05); }
.chat-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-base);
  font-size: 14px;
  outline: none;
  padding: 0 8px;
}
.chat-input-wrap button {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
}
.chat-input-wrap button:hover { color: var(--text-base); }
.btn-mic {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-base);
  color: #111;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: 0.2s;
}
.btn-mic:hover { background: var(--gold-light); transform: scale(1.05); }

/* Right Panel (Details) */
.chat-details-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cd-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-light);
}
.cd-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  padding: 16px 0;
  cursor: pointer;
}
.cd-tab.active {
  color: var(--gold-base);
  border-bottom: 2px solid var(--gold-base);
}

.cd-content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}
.cd-profile {
  text-align: center;
  margin-bottom: 24px;
}
.cd-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-hover);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
}
.cd-profile h3 { margin: 0 0 4px; font-size: 18px; display: flex; align-items: center; justify-content: center; gap: 8px;}
.cd-phone { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; display: inline-block; }
.cd-meta-list {
  text-align: left;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
}
.cd-meta-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.cd-meta-item:last-child { margin-bottom: 0; }

.cd-section {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 20px;
}
.cd-section:last-child { border-bottom: none; }
.cd-section h4 { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.cd-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cd-section-header h4 { margin: 0; }
.cd-link { color: var(--gold-base); font-size: 12px; text-decoration: none; cursor: pointer; background: transparent; border: none; padding: 0; }
.cd-link:hover { text-decoration: underline; }

.cd-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: 500; }
.tag-vip { background: var(--gold-base); color: #111; }
.tag-gray { background: rgba(255,255,255,0.05); color: var(--text-muted); border: 1px solid var(--border-light); }
.tag-add { background: transparent; border: 1px dashed var(--border-light); color: var(--text-muted); cursor: pointer; }
.tag-add:hover { border-color: var(--text-muted); }

.cd-history-list { display: flex; flex-direction: column; gap: 12px; }
.cd-history-item { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.cd-hist-left { display: flex; align-items: center; gap: 10px; }
.cd-hist-date { color: var(--text-muted); font-size: 11px; width: 65px; }
.cd-hist-svc { color: var(--text-base); }
.cd-hist-right { color: var(--text-muted); font-weight: 500; }

.cd-prefs { font-size: 13px; }
.cd-pref-row { display: flex; justify-content: space-between; margin-bottom: 8px; }
.cd-pref-row span { color: var(--text-muted); }
.cd-pref-row strong { color: var(--text-base); font-weight: 500; }

.cd-obs-text { font-size: 13px; color: var(--text-base); background: rgba(255,255,255,0.02); padding: 12px; border-radius: 8px; border: 1px solid var(--border-light); margin: 0; line-height: 1.4; }

.cd-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cd-action-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: 0.2s;
}
.cd-action-btn svg { color: var(--gold-base); }
.cd-action-btn span { font-size: 12px; font-weight: 500; }
.cd-action-btn:hover { background: rgba(255,255,255,0.02); color: var(--text-base); border-color: var(--border-hover); }


/* --- PHASE 2: Kanban & Light Mode --- */

:root[data-theme="light"] {
  --bg-app: #f9f9fb;
  --bg-sidebar: #ffffff;
  --bg-panel: #ffffff;
  --bg-input: #f0f0f4;
  --text-main: #111111;
  --text-muted: #666666;
  --border: #e0e0e0;
  --border-light: #f0f0f0;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --gold: #0d8d9b;
  --gold-glow: rgba(25, 184, 190, 0.2);
}

:root[data-theme="light"] .sidebar {
  border-right: 1px solid var(--border);
}

:root[data-theme="light"] .nav-item {
  color: var(--text-muted);
}
:root[data-theme="light"] .nav-item:hover {
  background: var(--bg-input);
  color: var(--text-main);
}
:root[data-theme="light"] .nav-item.active {
  background: rgba(179, 130, 63, 0.1);
  color: var(--gold);
}

:root[data-theme="light"] .panel {
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

/* Kanban Board Styles */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 16px 0;
  min-height: 60vh;
}

.kanban-column {
  flex: 1;
  min-width: 280px;
  max-width: 350px;
  background: var(--bg-app);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.kanban-title {
  padding: 12px 16px;
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.kanban-dropzone {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}

.kanban-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px;
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

.kanban-card strong {
  display: block;
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 4px;
}

.kanban-card span {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kanban-card .kb-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.kanban-card .kb-prof {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
}

.kanban-dropzone.drag-over {
  background: rgba(179, 130, 63, 0.05);
  border-radius: 8px;
}

/* --- RESPONSIVE LAYOUT (SMARTPHONES & TABLETS) --- */

/* ─────────────────────────────────────────
   DESKTOP NO-SCROLL ARCHITECTURE (PROFESSIONAL APP LAYOUT)
───────────────────────────────────────── */
@media (min-width: 1025px) {
  /* Lock the main layout to 100vh */
  body, html, .app-shell {
    height: 100dvh;
    overflow: hidden;
  }
  
  .workspace {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  
  .views-wrap {
    flex: 1;
    overflow: hidden !important; /* NO PAGE SCROLL */
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
  }

  .view.active {
    display: flex !important;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  .kpi-row {
    flex-shrink: 0;
  }

  .dash-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch !important;
    grid-template-columns: 1.5fr 1fr 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  }
  
  .dash-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  
  .dcard-head {
    flex-shrink: 0;
  }
  
  /* Make inner containers scrollable instead of the page */
  .agenda-timeline, 
  .bookings-days, 
  .shortcuts-grid,
  .dash-card > div:not(.dcard-head) {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 4px;
  }

  /* Custom thin scrollbar for internal cards */
  .dash-card *::-webkit-scrollbar { width: 4px; }
  .dash-card *::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }

  /* Re-apply grid placement for desktop so it fits perfectly in 2 rows */
  .d-agenda   { grid-column: 1; grid-row: 1 / 3; }
  .d-bookings { grid-column: 2; grid-row: 1; }
  .d-shortcuts{ grid-column: 3; grid-row: 1; }
  .d-chart    { grid-column: 2; grid-row: 2; }
  .d-payment  { grid-column: 3; grid-row: 2; }
}

@media (max-width: 1024px) {
  .app-shell { flex-direction: column; height: 100dvh; }
  .sidebar { width: 100%; flex: 0 0 60px; flex-direction: row; height: 60px; overflow-x: auto; overflow-y: hidden; border-right: none; border-bottom: 1px solid var(--border); padding: 0 16px; align-items: center; z-index: 100; }
  .sidebar-top { padding: 0; display: flex; align-items: center; width: 100%; }
  .sidebar-logo { margin-bottom: 0; margin-right: 20px; }
  .sidebar-logo .logo-text { display: none; } /* Hide text, just show icon to save space */
  .sidebar-head, .sidebar-foot, .nav-group-label { display: none; }
  .nav-group { margin: 0; }
  .sidebar-nav { display: flex; flex-direction: row; gap: 8px; margin: 0; }
  .nav-item { white-space: nowrap; padding: 8px 12px; margin: 0; }
  
  
  
  .attendance-workspace-grid { grid-template-columns: 1fr; grid-template-rows: 150px 1fr; }
  .chat-sidebar { border-right: none; border-bottom: 1px solid var(--border-light); }
  .chat-details-panel { display: none; }
  
  /* Keep Kanban horizontal so user doesn't have to scroll down */
  .kanban-board { flex-direction: row; flex-wrap: nowrap; min-height: calc(100dvh - 180px); overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; scroll-snap-type: x mandatory; scroll-behavior: smooth; }\n  .kanban-column { flex: 0 0 85vw; min-width: 280px; max-width: none; scroll-snap-align: center; }
  .kanban-column { flex: 0 0 85vw; min-width: 280px; max-width: none; }
}

@media (max-width: 768px) {
  .auth-story { display: none; }
  .auth-panel { flex: 1; padding: 20px; width: 100%; }
  .auth-card { padding: 30px 20px; }
  .mini-row { grid-template-columns: 1fr 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr 1fr; }
  .topbar { padding: 10px; }
  .topbar-welcome h1 { font-size: 16px; }
  .topbar-date { display: none; }
}

@media (max-width: 480px) {
  .mini-row { grid-template-columns: 1fr; }
  .shortcuts-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   ULTIMATE MOBILE RESPONSIVE FIX (APP-LIKE EXPERIENCE)
   ========================================================================== */
/* Lock everything globally so no weird body scrolls occur */
html, body, .app-shell, .workspace {
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow: hidden !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.views-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
}

@media (max-width: 1024px) {
  /* Let the main container handle vertical scrolling on mobile/tablet */
  .views-wrap {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 14px !important;
  }
  
  .view.active {
    display: flex !important;
    flex-direction: column;
    height: auto !important;
  }
  
  /* Disable horizontal scroll on Kanban and make it stack or scroll cleanly */
  .kanban-board {
    flex-direction: column !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
    min-height: auto !important;
  }
  
  .kanban-column {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    margin-bottom: 20px;
  }
  
  /* Stack dashboard components */
  .dash-grid {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .dash-card {
    width: 100% !important;
    min-height: 300px; /* give cards some room to breathe */
    flex: none !important;
    overflow: visible !important;
  }
  
  /* Attendance grid */
  .attendance-workspace-grid {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
  }
  
  .chat-sidebar {
    flex: 1 !important;
    max-height: 40vh !important;
    overflow-y: auto !important;
  }
  
  .chat-area {
    flex: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }
  
  /* Sidebar for mobile */
  .sidebar {
    width: 100vw !important;
    flex: 0 0 60px !important;
    height: 60px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 10px !important;
  }
  
  .sidebar-nav {
    display: flex !important;
    flex-direction: row !important;
  }
  
  /* Modals */
  .modal-box, .whatsapp-modal-box {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
/* ==========================================================================
   MOBILE BOTTOM NAV (BARBER PRO)
   ========================================================================== */
.mobile-bottom-nav {
  display: none; /* hidden on desktop */
}

@media (max-width: 1024px) {
  /* Hide the old top/side bar completely on mobile */
  .sidebar, .topbar {
    display: none !important;
  }
  
  /* Make room for the bottom nav */
  .app-shell {
    padding: 0 !important;
    height: 100dvh;
    background: var(--bg);
  }
  
  /* The Bottom Nav itself */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 70px;
    background: var(--surface2);
    border-top: 1px solid var(--border);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6);
    user-select: none;
    touch-action: manipulation;
  }
  
  .mobile-bottom-nav .nav-item {
    background: transparent;
    border: none;
    color: var(--text2);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 60px;
    height: 100%;
    padding: 0;
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
  }
  
  .mobile-bottom-nav .nav-item i {
    font-size: 24px;
    margin: 0;
    transition: all 0.2s ease;
  }
  
  .mobile-bottom-nav .nav-item.active {
    color: var(--gold);
  }
  
  .mobile-bottom-nav .nav-item.active i {
    filter: drop-shadow(0 0 5px rgba(240, 193, 90, 0.4));
  }

  /* Floating Action Button (Center +) */
  .mobile-bottom-nav .nav-item.fab-button {
    position: relative;
    top: -15px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dk));
    border-radius: 50%;
    color: #000;
    box-shadow: 0 8px 24px rgba(217, 164, 65, 0.3);
    justify-content: center;
  }
  
  .mobile-bottom-nav .nav-item.fab-button i {
    font-size: 28px;
    color: #111;
  }
  
  .mobile-bottom-nav .nav-item.fab-button span {
    display: none; /* Hide label for fab */
  }
  
  /* Adjust workspace padding */
  .workspace {
    height: calc(100dvh - 70px - env(safe-area-inset-bottom, 0px)) !important;
    max-height: calc(100dvh - 70px - env(safe-area-inset-bottom, 0px)) !important;
    padding: 0 !important;
    overflow-y: auto;
  }
  
  .views-wrap {
    padding: 16px !important;
    padding-bottom: 40px !important;
    min-height: 100%;
  }
}
/* ==========================================================================
   BARBER PRO DASHBOARD (MOBILE FIRST)
   ========================================================================== */

.bp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 16px;
}

.bp-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bp-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
}

.bp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bp-greeting h1 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bp-greeting .wave {
  font-size: 16px;
}

.bp-greeting p {
  font-size: 12px;
  color: var(--text2);
}

.bp-actions {
  display: flex;
  gap: 12px;
}

.bp-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  position: relative;
}

.bp-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--surface);
}

/* RESUMO DO DIA */
.bp-daily-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border);
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  position: relative;
  overflow: hidden;
}

.bp-daily-left {
  flex: 1;
}

.bp-daily-right {
  flex: 1;
  padding-left: 16px;
}

.bp-daily-divider {
  width: 1px;
  height: 50px;
  background: var(--border2);
  margin: 0 16px;
}

.bp-label {
  display: block;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 4px;
}

.bp-daily-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 4px;
  white-space: nowrap;
}

.bp-daily-right h2 {
  color: var(--text);
}

.bp-delta {
  font-size: 11px;
  font-weight: 500;
}
.bp-delta.positive { color: var(--green); }
.bp-delta.negative { color: var(--red); }
.bp-delta .muted { color: var(--text2); font-weight: 400; }

.bp-next {
  font-size: 12px;
  color: var(--text2);
}

.bp-daily-btn {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--gold-brd);
  background: transparent;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

/* SECTIONS */
.bp-section {
  margin-bottom: 24px;
}

.bp-sec-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}

.bp-sec-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.bp-sec-header .bp-sec-title {
  margin-bottom: 0;
}

.bp-link {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* AÇÕES RÁPIDAS */
.bp-quick-actions {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  padding-right: 20px;
}
.bp-quick-actions::-webkit-scrollbar { display: none; }

.bp-qa-btn {
  flex: 0 0 88px;
  height: 96px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text2);
  transition: all 0.2s ease;
}

.bp-qa-btn:active {
  background: var(--surface2);
  transform: scale(0.96);
}

.bp-qa-ico {
  font-size: 24px;
  color: var(--text);
}

.bp-qa-btn span {
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}

/* AGENDA LIST */
.bp-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bp-agenda-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.bp-agenda-time {
  display: flex;
  flex-direction: column;
  min-width: 50px;
}

.bp-agenda-time strong {
  font-size: 16px;
  color: var(--gold);
  font-weight: 600;
}

.bp-agenda-time span {
  font-size: 12px;
  color: var(--text2);
}

.bp-agenda-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface2);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}
.bp-agenda-avatar img { width: 100%; height: 100%; object-fit: cover; }

.bp-agenda-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.bp-agenda-info strong {
  font-size: 15px;
  color: var(--text);
}

.bp-agenda-info span {
  font-size: 13px;
  color: var(--text2);
}

.bp-agenda-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 100px;
  text-transform: uppercase;
}

.badge-green { background: rgba(34,197,94,0.1); color: #22c55e; border: 1px solid rgba(34,197,94,0.2); }
.badge-blue { background: rgba(59,130,246,0.1); color: #3b82f6; border: 1px solid rgba(59,130,246,0.2); }
.badge-gray { background: rgba(167,171,178,0.1); color: #A7ABB2; border: 1px solid rgba(167,171,178,0.2); }

/* STATS GRID */
.bp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.bp-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-stat-card i {
  font-size: 24px;
  color: var(--gold);
}

.bp-stat-card span {
  font-size: 12px;
  color: var(--text2);
}

.bp-stat-card strong {
  font-size: 18px;
  color: var(--text);
}

.bp-stat-card small.positive { color: var(--green); font-size: 12px; font-weight: 500; }
.bp-stat-card small.stars { color: var(--gold); font-size: 12px; letter-spacing: 2px; }

/* PROMO BANNER */
.bp-promo-banner {
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface2) 100%);
  border: 1px solid var(--gold-brd);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.bp-promo-content {
  position: relative;
  z-index: 2;
  max-width: 65%;
}

.bp-promo-content h3 {
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 8px;
}

.bp-promo-content p {
  font-size: 13px;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.4;
}

.bp-btn-gold {
  background: var(--gold);
  color: #000;
  border: none;
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
}

.bp-promo-img {
  position: absolute;
  right: 0;
  bottom: -10px;
  z-index: 1;
}


/* =========================================================
   PHASE 3: SECONDARY VIEWS (Barber Pro Aesthetic)
   ========================================================= */

.bp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.bp-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bp-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-base);
}
.bp-action-btn {
  background: rgba(217, 164, 65, 0.1);
  color: var(--gold);
  border: 1px solid rgba(217, 164, 65, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bp-action-btn i {
  font-size: 16px;
}

/* Tabs */
.bp-tabs {
  display: flex;
  background: var(--surface);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.bp-tab {
  flex: 1;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bp-tab.active {
  background: var(--surface-light);
  color: var(--gold);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Lists and Cards */
.bp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 32px; /* space for fab */
}
.bp-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Agenda Card */
.bp-agenda-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 50px;
}
.bp-agenda-time strong {
  font-size: 18px;
  color: var(--gold);
  font-weight: 700;
}
.bp-agenda-time span {
  font-size: 11px;
  color: var(--text-muted);
}
.bp-agenda-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bp-agenda-info strong {
  font-size: 15px;
  color: var(--text-base);
  margin-bottom: 4px;
}
.bp-agenda-info span {
  font-size: 13px;
  color: var(--text-muted);
}
.bp-agenda-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}
.status-confirmed { background: rgba(74, 222, 128, 0.1); color: #4ade80; }
.status-in_progress { background: rgba(217, 164, 65, 0.1); color: var(--gold); }
.status-done { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); }
.status-cancelled { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

/* Patient Card */
.bp-patient-avatar {
  width: 48px;
  height: 48px;
  border-radius: 24px;
  background: var(--surface-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}
.bp-patient-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bp-patient-info strong {
  font-size: 15px;
  color: var(--text-base);
}
.bp-patient-info span {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.bp-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
}

/* Tx (Financial) Card */
.bp-tx-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.bp-tx-icon.success { background: rgba(74, 222, 128, 0.1); color: #4ade80; }
.bp-tx-icon.warning { background: rgba(217, 164, 65, 0.1); color: var(--gold); }
.bp-tx-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.bp-tx-info strong {
  font-size: 15px;
  color: var(--text-base);
}
.bp-tx-info span {
  font-size: 13px;
  color: var(--text-muted);
}
.bp-tx-amount {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.bp-tx-amount strong {
  font-size: 15px;
  font-weight: 700;
}
.text-success { color: #4ade80; font-size: 11px; }
.text-warning { color: var(--gold); font-size: 11px; }

/* Menu (Mais) */
.bp-menu-list {
  background: var(--surface);
  border-radius: 16px;
  padding: 8px 16px;
}
.bp-menu-item {
  display: flex;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  cursor: pointer;
}
.bp-menu-item:last-child {
  border-bottom: none;
}
.bp-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(217, 164, 65, 0.1);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 16px;
}
.bp-menu-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-base);
}
.bp-menu-item > i {
  color: var(--text-muted);
}
.bp-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 8px -16px;
}
.text-danger .bp-menu-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.text-danger .bp-menu-text {
  color: #ef4444;
}

/* Search Bar */
.bp-search-bar {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: 12px;
  padding: 0 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.bp-search-bar i {
  color: var(--text-muted);
  font-size: 18px;
}
.bp-search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 14px 12px;
  color: var(--text-base);
  font-size: 15px;
  outline: none;
}
.bp-search-bar input::placeholder {
  color: var(--text-muted);
}

/* Empty State */
.bp-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
}

/* Stats Grid */
.bp-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bp-stat-card {
  background: rgba(74, 222, 128, 0.05);
  border: 1px solid rgba(74, 222, 128, 0.1);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.bp-stat-card span {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.bp-stat-card strong {
  font-size: 20px;
  color: #4ade80;
  font-weight: 700;
}
.bp-stat-card.warning {
  background: rgba(217, 164, 65, 0.05);
  border: 1px solid rgba(217, 164, 65, 0.1);
}
.bp-stat-card.warning strong {
  color: var(--gold);
}

.bp-section-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-base);
  margin-bottom: 16px;
}


/* =========================================================
   PHASE 4: APPOINTMENT WIZARD (Bottom Sheet)
   ========================================================= */

.bp-wizard-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  animation: bpFadeIn 0.3s ease;
}

@keyframes bpFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.bp-wizard-sheet {
  background: var(--surface);
  width: 100%;
  height: 90vh; /* Takes most of the screen */
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  animation: bpSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
  border-top: 1px solid rgba(255,255,255,0.05);
}

@keyframes bpSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bp-wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.bp-wizard-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-base);
  margin: 0;
  text-align: center;
  flex: 1;
}

.bp-wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.bp-step-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.bp-wizard-footer {
  padding: 20px 24px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255,255,255,0.05);
  background: var(--surface);
}

/* Step 1: Service Grid */
.bp-wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.bp-service-card {
  background: var(--surface-light);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}
.bp-service-card.selected {
  border-color: var(--gold);
  background: rgba(217, 164, 65, 0.05);
}
.bp-service-card i {
  font-size: 28px;
  color: var(--gold);
  margin-bottom: 8px;
}
.bp-service-card strong {
  font-size: 14px;
  color: var(--text-base);
  margin-bottom: 4px;
}
.bp-service-card span {
  font-size: 12px;
  color: var(--text-muted);
}

/* Step 2: Date & Time Selector */
.bp-label {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
.bp-select {
  width: 100%;
  background: var(--surface-light);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--text-base);
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
}
.bp-date-selector {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  /* hide scrollbar */
  scrollbar-width: none; 
}
.bp-date-selector::-webkit-scrollbar { display: none; }

.bp-date-chip {
  min-width: 64px;
  background: var(--surface-light);
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s;
}
.bp-date-chip.selected {
  border-color: var(--gold);
  background: rgba(217, 164, 65, 0.05);
}
.bp-date-chip span {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bp-date-chip strong {
  font-size: 18px;
  color: var(--text-base);
}

.bp-time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bp-time-chip {
  background: var(--surface-light);
  border: 2px solid transparent;
  padding: 10px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-base);
  cursor: pointer;
  transition: all 0.2s;
}
.bp-time-chip.selected {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}
.bp-time-chip:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Step 3: Patients List */
.bp-compact-list {
  gap: 8px;
}
.bp-patient-row {
  display: flex;
  align-items: center;
  padding: 12px;
  background: var(--surface-light);
  border-radius: 12px;
  cursor: pointer;
  border: 2px solid transparent;
}
.bp-patient-row.selected {
  border-color: var(--gold);
  background: rgba(217, 164, 65, 0.05);
}
.bp-patient-row .avatar {
  width: 40px; height: 40px;
  border-radius: 20px;
  background: rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--gold);
  margin-right: 12px;
}
.bp-patient-row .info {
  flex: 1;
}
.bp-patient-row .info strong { display: block; font-size: 14px; color: var(--text-base); }
.bp-patient-row .info span { display: block; font-size: 12px; color: var(--text-muted); }


.bp-wa-btn {
  background: #25D366;
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37,211,102,0.3);
  transition: all 0.2s ease;
}
.bp-wa-btn:active {
  transform: scale(0.9);
}


/* Loyalty Card */
.loyalty-card {
  background: linear-gradient(145deg, #1f1f1f, #141414);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  margin: 16px 0;
  box-shadow: 0 8px 16px rgba(0,0,0,0.4);
  position: relative;
  overflow: hidden;
}
.loyalty-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), #f9d976);
}
.loyalty-title {
  color: var(--gold);
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 8px;
}
.loyalty-subtitle {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 24px;
}
.loyalty-stamps {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.loyalty-stamp {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--border);
  background: var(--surface);
  transition: all 0.3s ease;
}
.loyalty-stamp.filled {
  border: 2px solid var(--gold);
  background: rgba(199, 154, 75, 0.1);
  color: var(--gold);
  box-shadow: 0 0 10px rgba(199, 154, 75, 0.2);
}
.loyalty-stamp.gift {
  border: 2px solid var(--text);
  color: var(--text);
}
.loyalty-stamp.gift.filled {
  border: 2px solid var(--gold);
  background: var(--gold);
  color: #000;
}
.customer-profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 24px;
}
.customer-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  border: 2px solid var(--gold);
}
.customer-profile-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.customer-profile-phone {
  font-size: 14px;
  color: var(--text2);
  margin-top: 4px;
}
