/* ═══════════════════════════════════════════════════════════════════
   AarogyaPractice — Master Design System v5
   Single source of truth. Change here → every page updates instantly.
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ── DESIGN TOKENS ─────────────────────────────────────────────────── */
:root {
  --primary:        #047857;
  --primary-dark:   #065f46;
  --primary-mid:    #a7f3d0;
  --primary-lt:     #ecfdf5;
  --primary-glow:   rgba(4,120,87,.16);
  /* legacy aliases — keep for backward compat */
  --primary-light:  #ecfdf5;
  --border-light:   #f1f5f9;
  --border-mid:     #a7f3d0;
  --bg-light:       #f0fdf4;

  /* brand accent tokens */
  --brand-blue:     #1e3a5f;
  --brand-gold:     #c4952a;

  --success:        #059669;
  --success-lt:     #d1fae5;
  --warning:        #d97706;
  --warning-lt:     #fef3c7;
  --danger:         #dc2626;
  --danger-lt:      #fee2e2;
  --danger-mid:     #fca5a5;

  --chart-blue:     #3b82f6;
  --chart-teal:     #14b8a6;
  --chart-violet:   #8b5cf6;
  --chart-amber:    #f59e0b;
  --chart-rose:     #f43f5e;
  --chart-green:    #22c55e;
  --chart-slate:    #64748b;

  --bg:             #f0f4ff;
  --bg-card:        #ffffff;
  --bg-input:       #f4f7ff;
  --bg-hover:       #eef2ff;
  --bg-sidebar:     #080f1e;

  --text:           #0f172a;
  --text-2:         #1e293b;
  --text-muted:     #64748b;
  --text-faint:     #94a3b8;

  --border:         #e2e8f0;
  --border-lt:      #f1f5f9;

  --shadow-sm:  0 1px 4px rgba(37,99,235,.06);
  --shadow:     0 4px 16px rgba(37,99,235,.09);
  --shadow-md:  0 8px 28px rgba(37,99,235,.12);
  --shadow-lg:  0 16px 48px rgba(37,99,235,.15);
  --shadow-xl:  0 24px 64px rgba(37,99,235,.18);

  --sidebar-w:  220px;
  --header-h:   62px;
  --radius:     14px;
  --radius-lg:  18px;
  --tr:         all .18s ease;
  --spring:     cubic-bezier(.34,1.4,.64,1);
}

[data-theme="dark"] {
  --primary:       #3b82f6;
  --primary-lt:    #172554;
  --primary-mid:   #1e40af;
  --primary-light: #172554;
  --border-light:  #1e2d42;
  --bg:            #080e1e;
  --bg-card:       #0f1829;
  --bg-input:      #14213a;
  --bg-hover:      #172554;
  --bg-sidebar:    #06091a;
  --text:          #f0f6ff;
  --text-2:        #e2e8f0;
  --text-muted:    #64748b;
  --border:        #1e2d42;
  --border-lt:     #162032;
}

/* ── KEYFRAMES ──────────────────────────────────────────────────────── */
@keyframes fadeUp     { from{opacity:0;transform:translateY(18px)} to{opacity:1;transform:none} }
@keyframes fadeIn     { from{opacity:0} to{opacity:1} }
@keyframes slideUp    { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:none} }
@keyframes countUp    { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }
@keyframes shimmer    { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
@keyframes pulseDot   { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.4;transform:scale(.7)} }
@keyframes badgePop   { 0%{transform:scale(0)} 65%{transform:scale(1.3)} 100%{transform:scale(1)} }
@keyframes gradientFlow { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
@keyframes modalSpring  { 0%{opacity:0;transform:scale(.9) translateY(24px)} 60%{transform:scale(1.02)} 100%{opacity:1;transform:none} }
@keyframes toastIn    { from{opacity:0;transform:translateX(30px) scale(.9)} to{opacity:1;transform:none} }
@keyframes spin       { to{transform:rotate(360deg)} }
@keyframes pulse      { 0%,100%{opacity:1} 50%{opacity:.4} }
@keyframes float      { 0%,100%{transform:translateY(0) scale(1)} 50%{transform:translateY(-18px) scale(1.04)} }
@keyframes popIn      { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
@keyframes tokenPulse { 0%,100%{text-shadow:0 0 60px rgba(255,255,255,.3)} 50%{text-shadow:0 0 80px rgba(96,165,250,.6)} }
@keyframes tokenIn    { 0%{transform:scale(.5);opacity:0} 100%{transform:scale(1);opacity:1} }
@keyframes statusPulse{ 0%,100%{opacity:1} 50%{opacity:.5} }

/* Stagger helpers */
.fu1{animation:fadeUp .38s .05s ease both} .fu2{animation:fadeUp .38s .10s ease both}
.fu3{animation:fadeUp .38s .15s ease both} .fu4{animation:fadeUp .38s .20s ease both}
.fu5{animation:fadeUp .38s .25s ease both} .fu6{animation:fadeUp .38s .30s ease both}
.fade-up{animation:fadeUp .35s ease both}
.fade-up:nth-child(1){animation-delay:.05s} .fade-up:nth-child(2){animation-delay:.10s}
.fade-up:nth-child(3){animation-delay:.15s} .fade-up:nth-child(4){animation-delay:.20s}

/* ── RESET ──────────────────────────────────────────────────────────── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
body{font-family:'Plus Jakarta Sans',sans-serif;background:var(--bg);color:var(--text);line-height:1.6;overflow-x:hidden;transition:background .3s,color .3s}
a{text-decoration:none;color:inherit}
button,input,select,textarea{font-family:inherit}

/* ── SIDEBAR ────────────────────────────────────────────────────────── */
.sidebar{
  position:fixed;top:0;left:0;width:var(--sidebar-w);height:100vh;
  background:var(--bg-sidebar);display:flex;flex-direction:column;
  z-index:100;overflow:hidden;transition:background .3s;
}
.sidebar::before{
  content:'';position:absolute;top:0;left:0;right:0;height:2px;
  background:linear-gradient(90deg,#2563eb,#6366f1,#06b6d4,#8b5cf6,#2563eb);
  background-size:300% 100%;animation:gradientFlow 4s linear infinite;
}
.sidebar::after{
  content:'';position:absolute;top:0;bottom:0;right:0;width:1px;
  background:linear-gradient(180deg,transparent,rgba(99,102,241,.22),transparent);
}
.sb-brand{padding:18px 16px 14px;display:flex;align-items:center;gap:11px;border-bottom:1px solid rgba(255,255,255,.05)}
.sb-mark{
  width:36px;height:36px;border-radius:11px;flex-shrink:0;
  background:linear-gradient(135deg,#1d4ed8,#3b82f6,#6366f1);
  display:flex;align-items:center;justify-content:center;color:#fff;font-size:15px;
  box-shadow:0 4px 14px rgba(59,130,246,.4);transition:all .4s var(--spring);
}
.sb-mark:hover{transform:scale(1.1) rotate(-5deg);box-shadow:0 6px 20px rgba(59,130,246,.6)}
.sb-name{font-size:13px;font-weight:800;color:#f0f6ff;letter-spacing:-.2px}
.sb-role{font-size:10px;color:#475569;margin-top:1px}
.sb-nav{flex:1;padding:10px 8px;overflow-y:auto}
.sb-nav::-webkit-scrollbar{width:2px}
.sb-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.07)}
.sg-label{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1.2px;color:#334155;padding:10px 12px 4px;display:block}
.nav-link{
  display:flex;align-items:center;gap:9px;padding:8px 12px;border-radius:9px;
  color:#64748b;font-size:12.5px;font-weight:500;transition:all .18s;
  margin-bottom:1px;position:relative;overflow:hidden;
}
.nav-link:hover{color:#e2e8f0;background:rgba(255,255,255,.05)}
.nav-link.active{
  background:linear-gradient(135deg,rgba(29,78,216,.8),rgba(99,102,241,.55));
  color:#fff;font-weight:700;box-shadow:0 2px 12px rgba(37,99,235,.3);
}
.nav-link.active::after{
  content:'';position:absolute;left:0;top:22%;bottom:22%;width:3px;
  background:linear-gradient(180deg,#60a5fa,#818cf8);
  border-radius:0 3px 3px 0;box-shadow:0 0 8px rgba(96,165,250,.6);
}
.nav-link .ni{width:17px;text-align:center;font-size:13px;flex-shrink:0}
.sb-footer{padding:10px 8px;border-top:1px solid rgba(255,255,255,.05)}
.user-pill{
  display:flex;align-items:center;gap:9px;padding:9px 10px;
  background:rgba(255,255,255,.04);border-radius:10px;border:1px solid rgba(255,255,255,.06);
  transition:all .18s;cursor:pointer;
}
.user-pill:hover{background:rgba(255,255,255,.08)}
.up-av{
  width:30px;height:30px;border-radius:8px;flex-shrink:0;
  background:linear-gradient(135deg,#1d4ed8,#6366f1);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;
  box-shadow:0 2px 8px rgba(37,99,235,.35);
}
.up-name{font-size:12px;font-weight:700;color:#e2e8f0}
.up-role{font-size:10px;color:#475569}

/* ── HEADER ─────────────────────────────────────────────────────────── */
header,.top-header{
  height:var(--header-h);background:rgba(255,255,255,.9);
  backdrop-filter:blur(20px) saturate(180%);-webkit-backdrop-filter:blur(20px) saturate(180%);
  border-bottom:1px solid rgba(226,232,240,.8);
  display:flex;align-items:center;justify-content:space-between;
  padding:0 24px;position:sticky;top:0;z-index:50;
  box-shadow:0 2px 12px rgba(15,23,42,.04);transition:background .3s;
}
[data-theme="dark"] header,[data-theme="dark"] .top-header{
  background:rgba(9,14,30,.9);border-bottom-color:rgba(30,45,66,.8);
}
.page-title{font-family:'Plus Jakarta Sans',sans-serif;font-size:17px;font-weight:800;color:var(--text);letter-spacing:-.3px}
.page-sub{font-size:11px;color:var(--text-muted);margin-top:1px}
.header-left h1{font-family:'Plus Jakarta Sans',sans-serif;font-size:17px;font-weight:800;color:var(--text);letter-spacing:-.3px}
.header-left p{font-size:11px;color:var(--text-muted);margin-top:1px}
.header-right{display:flex;align-items:center;gap:8px}
.icon-btn{
  width:36px;height:36px;border-radius:10px;background:var(--bg-input);
  border:1.5px solid var(--border);display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);cursor:pointer;font-size:13px;position:relative;transition:all .3s var(--spring);
}
.icon-btn:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-lt);transform:translateY(-2px);box-shadow:0 4px 12px var(--primary-glow)}
.badge{
  position:absolute;top:-5px;right:-5px;min-width:16px;height:16px;
  background:#dc2626;color:#fff;border-radius:10px;font-size:9px;font-weight:800;
  display:flex;align-items:center;justify-content:center;border:2px solid var(--bg-card);padding:0 3px;
  animation:badgePop .35s var(--spring);
}
.search-wrap{position:relative}
.search-input{
  height:36px;padding:0 14px 0 36px;border:1.5px solid var(--border);
  border-radius:10px;background:var(--bg-input);color:var(--text);
  font-size:13px;outline:none;width:200px;transition:var(--tr);
}
.search-input:focus{border-color:var(--primary);width:240px;background:var(--bg-card)}
.search-wrap i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:12px}
.branch-select-btn{
  display:flex;align-items:center;gap:7px;padding:7px 12px;border:1.5px solid var(--border);
  border-radius:10px;background:var(--bg-input);font-size:12.5px;font-weight:700;
  color:var(--text);cursor:pointer;transition:var(--tr);white-space:nowrap;
}
.branch-select-btn:hover{border-color:var(--primary);color:var(--primary)}

/* ── MAIN LAYOUT ────────────────────────────────────────────────────── */
.app-layout{min-height:100vh;display:flex;flex-direction:column}
.main-content,.main-mount{margin-left:var(--sidebar-w)}
.page-body{padding:24px;flex:1}

/* ── CARDS ──────────────────────────────────────────────────────────── */
.card{
  background:var(--bg-card);border:1.5px solid var(--border);
  border-radius:var(--radius);padding:20px;
  box-shadow:var(--shadow-sm);position:relative;overflow:hidden;
  transition:box-shadow .22s,border-color .22s;
}
.card:hover{box-shadow:var(--shadow-md);border-color:rgba(37,99,235,.2)}
.card-title{font-size:14px;font-weight:800;color:var(--text);display:flex;align-items:center;gap:8px;margin-bottom:16px}
.card-title i{color:var(--primary)}
.card-head{padding:14px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:9px}
.card-head i{color:var(--primary)}
.card-head h3{font-size:13.5px;font-weight:700;color:var(--text)}
.card-body{padding:20px}
.section-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);margin-bottom:16px;overflow:hidden}

/* ── KPI / STAT CARDS ───────────────────────────────────────────────── */
.stat-card,.kpi-card{
  background:var(--bg-card);border:1.5px solid var(--border);
  border-radius:var(--radius-lg);padding:22px 22px 18px;
  position:relative;overflow:hidden;box-shadow:var(--shadow-sm);
  transition:transform .22s,box-shadow .22s,border-color .22s;
}
.stat-card:hover,.kpi-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md);border-color:var(--primary-mid)}
.stat-card::after,.kpi-card::after{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:linear-gradient(90deg,var(--c1,#1e40af),var(--c2,#3b82f6));
}
.kpi-card.green {--c1:#047857;--c2:#10b981}
.kpi-card.amber {--c1:#b45309;--c2:#f59e0b}
.kpi-card.red   {--c1:#b91c1c;--c2:#ef4444}
.kpi-card.purple{--c1:#6d28d9;--c2:#8b5cf6}
.kpi-icon,.sc-icon{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:17px;margin-bottom:14px}
.kpi-val,.sc-val{font-family:'Plus Jakarta Sans',sans-serif;font-size:30px;font-weight:900;color:var(--text);line-height:1;margin-bottom:5px;animation:countUp .5s .35s ease both}
.kpi-lbl,.sc-label{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted)}
/* Analytics kpi variants */
.kpi-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted);margin-bottom:6px}
.kpi-value{font-size:24px;font-weight:900;font-family:'Plus Jakarta Sans',sans-serif;color:var(--text);line-height:1.1}
.kpi-change{display:inline-flex;align-items:center;gap:3px;font-size:11.5px;font-weight:800;border-radius:6px;padding:2px 7px;margin-top:5px}
.kpi-change.up  {background:#dcfce7;color:#15803d}
.kpi-change.down{background:#fee2e2;color:#b91c1c}
.kpi-change.flat{background:#f1f5f9;color:#64748b}
/* Grids */
.kpi-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}
.kpi-grid {display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:20px}
.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}
@media(max-width:1100px){.kpi-strip{grid-template-columns:repeat(3,1fr)}.kpi-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px) {.kpi-strip,.stat-grid{grid-template-columns:1fr 1fr}}
@media(max-width:700px) {.kpi-grid{grid-template-columns:1fr 1fr}}

/* ── TABLES ─────────────────────────────────────────────────────────── */
.data-table,.inv-table,.backup-table,.warn-table,.usage-table,.tenant-table{width:100%;border-collapse:separate;border-spacing:0}
.data-table thead th,.inv-table thead th,.backup-table th,.warn-table th,.usage-table th,.tenant-table thead th{
  background:linear-gradient(180deg,var(--bg-input),var(--bg-card));
  color:var(--text-muted);font-size:10px;font-weight:800;text-transform:uppercase;
  letter-spacing:.8px;padding:10px 14px;border-bottom:2px solid var(--primary-mid);
  white-space:nowrap;text-align:left;
}
.data-table tbody tr:hover td,.inv-table tbody tr:hover td,.backup-table tr:hover td,.warn-table tr:hover td,.usage-table tr:hover td{background:var(--bg-hover)}
.data-table tbody td,.inv-table tbody td,.backup-table td,.warn-table td,.usage-table td,.tenant-table td{
  padding:12px 14px;border-bottom:1px solid var(--border-lt);font-size:13px;color:var(--text-2);vertical-align:middle;
}
.tenant-table tbody tr{border-top:1px solid var(--border);transition:background .12s}
.tenant-table tbody tr:hover{background:var(--primary-lt)}
.inv-num{font-family:'JetBrains Mono',monospace;font-size:11.5px;font-weight:700;color:var(--primary)}
.inv-total{font-family:'JetBrains Mono',monospace;font-weight:900;color:var(--primary);font-size:14px}
.inv-num-badge{font-family:'JetBrains Mono',monospace;font-size:12px;font-weight:600;color:var(--primary)}

/* ── BUTTONS ────────────────────────────────────────────────────────── */
.btn,.btn-primary,.btn-secondary,.btn-outline,.btn-ghost,.btn-sm{
  display:inline-flex;align-items:center;gap:7px;padding:9px 20px;
  border-radius:10px;border:1.5px solid transparent;font-size:13px;font-weight:700;
  cursor:pointer;white-space:nowrap;position:relative;overflow:hidden;
  transition:transform .2s var(--spring),box-shadow .18s;font-family:'Plus Jakarta Sans',sans-serif;
}
.btn:active{transform:translateY(1px) scale(.98)!important}
.btn-primary{background:linear-gradient(135deg,#1d4ed8,#2563eb,#4f46e5);color:#fff;box-shadow:0 2px 10px rgba(37,99,235,.3)}
.btn-primary:hover{transform:translateY(-2px);box-shadow:0 6px 22px rgba(37,99,235,.5)}
.btn-success{background:linear-gradient(135deg,#047857,#059669);color:#fff;box-shadow:0 2px 10px rgba(5,150,105,.25)}
.btn-success:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(5,150,105,.42)}
.btn-danger-btn{background:linear-gradient(135deg,#dc2626,#ef4444);color:#fff;box-shadow:0 2px 10px rgba(220,38,38,.25)}
.btn-danger-btn:hover{transform:translateY(-2px);box-shadow:0 6px 20px rgba(220,38,38,.42)}
.btn-outline{background:var(--bg-card);color:var(--primary);border-color:var(--primary-mid)}
.btn-outline:hover{background:var(--primary-lt);border-color:var(--primary);transform:translateY(-1px)}
.btn-ghost{background:var(--bg-input);color:var(--text-2);border-color:var(--border)}
.btn-ghost:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-lt);transform:translateY(-1px)}
.btn-sm{padding:5px 13px;font-size:12px;border-radius:8px}

/* ── FORMS ──────────────────────────────────────────────────────────── */
.form-group{margin-bottom:16px}
.form-label,.flabel,.lbl,.label{display:block;font-size:11px;font-weight:700;color:var(--text);margin-bottom:5px;text-transform:uppercase;letter-spacing:.4px}
.form-control,.form-input,.inp,.finp{
  width:100%;padding:9px 13px;border:1.5px solid var(--border);border-radius:10px;
  font-size:13px;font-family:inherit;background:var(--bg-input);color:var(--text);
  transition:all .18s;outline:none;height:40px;
}
.form-control:focus,.form-input:focus,.inp:focus,.finp:focus{border-color:var(--primary);background:var(--bg-card);box-shadow:0 0 0 3px var(--primary-glow)}
textarea.form-control,textarea.inp{height:auto;resize:vertical;min-height:80px}
select.form-control,select.inp{cursor:pointer}
.input-wrap{position:relative}
.input-icon{position:absolute;left:13px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:14px;pointer-events:none}
.input-wrap .form-control,.input-wrap .inp{padding-left:40px}

/* ── MODALS ─────────────────────────────────────────────────────────── */
.modal-overlay,.modal-ov{
  position:fixed;inset:0;background:rgba(5,10,25,.7);
  backdrop-filter:blur(10px);display:none;
  align-items:center;justify-content:center;padding:20px;z-index:1000;
}
.modal-overlay.open,.modal-ov:not(.hide){display:flex}
.modal,.modal-box{
  background:var(--bg-card);border-radius:var(--radius-lg);
  box-shadow:var(--shadow-xl);width:100%;max-width:520px;max-height:90vh;
  display:flex;flex-direction:column;overflow:hidden;border:1.5px solid var(--border);
  animation:modalSpring .36s cubic-bezier(.34,1.4,.64,1);
}
.modal-hd,.modal-head{
  padding:18px 22px;border-bottom:1.5px solid var(--border);
  display:flex;align-items:center;justify-content:space-between;
  background:linear-gradient(135deg,var(--primary-lt),var(--bg-card));
}
.modal-title,.modal-head-title{font-size:16px;font-weight:800;color:var(--text)}
.modal-close{
  width:32px;height:32px;border-radius:9px;background:var(--bg-input);
  border:1.5px solid var(--border);cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);transition:all .3s var(--spring);
}
.modal-close:hover{background:#fee2e2;color:#dc2626;border-color:#fca5a5;transform:rotate(90deg) scale(1.08)}
.modal-body{padding:22px;overflow-y:auto;flex:1}
.modal-foot{padding:14px 22px;border-top:1.5px solid var(--border);display:flex;align-items:center;justify-content:flex-end;gap:8px;background:var(--bg-input)}

/* ── TABS ───────────────────────────────────────────────────────────── */
.tab-bar,.inv-tabs,.tabs{
  display:flex;gap:3px;background:var(--bg-input);border:1.5px solid var(--border);
  border-radius:12px;padding:4px;margin-bottom:16px;
}
.tab-btn,.inv-tab,.tab-item{
  flex:1;text-align:center;padding:7px 12px;border-radius:8px;font-size:12px;
  font-weight:700;cursor:pointer;transition:all .18s;color:var(--text-muted);background:none;border:none;font-family:inherit;
}
.tab-btn:hover,.inv-tab:hover,.tab-item:hover{color:var(--primary)}
.tab-btn.active,.inv-tab.active,.tab-item.active{background:var(--bg-card);color:var(--primary);box-shadow:var(--shadow-sm)}

/* ── STATUS CHIPS ───────────────────────────────────────────────────── */
.chip,.status-chip,.action-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:20px;font-size:11px;font-weight:800}
.chip-dot{width:6px;height:6px;border-radius:50%;background:currentColor;display:inline-block;animation:pulseDot 2.5s ease infinite}
.chip-paid   {background:#f0fdf4;color:#16a34a;border:1px solid #bbf7d0}
.chip-pending{background:#fffbeb;color:#d97706;border:1px solid #fde68a}
.chip-waived {background:#f0f9ff;color:#0284c7;border:1px solid #bae6fd}
.chip-paid-b {background:#f0fdf4;color:#16a34a;padding:5px 14px;border-radius:20px;font-weight:800;font-size:12px;border:1px solid #bbf7d0}
.chip-pend-b {background:#fffbeb;color:#d97706;padding:5px 14px;border-radius:20px;font-weight:800;font-size:12px;border:1px solid #fde68a}
.sc-scheduled  {background:rgba(14,165,233,.12);color:#0369a1}
.sc-confirmed  {background:rgba(34,197,94,.12);color:#15803d}
.sc-in_progress{background:rgba(249,115,22,.12);color:#c2410c}
.sc-completed  {background:rgba(100,116,139,.12);color:#475569}
.sc-cancelled,.sc-no_show{background:rgba(239,68,68,.1);color:#b91c1c}
.lab-status-ordered   {background:#eff6ff;color:#1d4ed8;border:1.5px solid #bfdbfe}
.lab-status-collected {background:#fef3c7;color:#b45309;border:1.5px solid #fcd34d}
.lab-status-processing{background:#f5f3ff;color:#6d28d9;border:1.5px solid #c4b5fd}
.lab-status-completed {background:#d1fae5;color:#065f46;border:1.5px solid #6ee7b7}
.lab-status-cancelled {background:#fee2e2;color:#991b1b;border:1.5px solid #fca5a5}
.priority-routine{background:#f1f5f9;color:#475569;border:1.5px solid #e2e8f0}
.priority-urgent {background:#fef3c7;color:#92400e;border:1.5px solid #fcd34d}
.priority-stat   {background:#fee2e2;color:#991b1b;border:1.5px solid #fca5a5;font-weight:900}
.a-view  {background:rgba(14,165,233,.1);color:#0369a1}
.a-create{background:rgba(34,197,94,.1);color:#15803d}
.a-update{background:rgba(249,115,22,.1);color:#c2410c}
.a-delete{background:rgba(239,68,68,.1);color:#b91c1c}
.a-login {background:rgba(168,85,247,.1);color:#7c3aed}
.a-export{background:rgba(234,179,8,.1);color:#92400e}
.p-urgent{background:#fee2e2;color:#991b1b}
.p-high  {background:#ffedd5;color:#c2410c}
.p-normal{background:#dbeafe;color:#1d4ed8}
.p-low   {background:#f1f5f9;color:#64748b}
.ev-login{background:#d1fae5;color:#065f46;border-radius:6px;padding:2px 8px;font-size:10px;font-weight:800}
.ev-logout{background:#f1f5f9;color:#64748b;border-radius:6px;padding:2px 8px;font-size:10px;font-weight:800}
.ev-failed{background:#fee2e2;color:#991b1b;border-radius:6px;padding:2px 8px;font-size:10px;font-weight:800}
.ev-locked{background:#fef3c7;color:#92400e;border-radius:6px;padding:2px 8px;font-size:10px;font-weight:800}
.role-admin       {background:rgba(239,68,68,.1);color:#ef4444}
.role-doctor      {background:rgba(14,165,233,.1);color:#0ea5e9}
.role-receptionist{background:rgba(34,197,94,.1);color:#22c55e}
.role-nurse       {background:rgba(249,115,22,.1);color:#f97316}
.role-superadmin  {background:rgba(139,92,246,.1);color:#8b5cf6}
.plan-badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:20px;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.4px}
.plan-solo      {background:#f3e8ff;color:#7c3aed}
.plan-starter   {background:#e0f2fe;color:#0369a1}
.plan-pro       {background:#d1fae5;color:#065f46}
.plan-clinic    {background:#fef3c7;color:#92400e}
.plan-hospital  {background:#fce7f3;color:#9d174d}
.plan-enterprise{background:#0f172a;color:#f8fafc}

/* ── TOAST ──────────────────────────────────────────────────────────── */
.toast-container{position:fixed;bottom:24px;right:24px;z-index:9999;display:flex;flex-direction:column;gap:8px}
.toast{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:14px;background:var(--bg-card);border:1.5px solid var(--border);box-shadow:var(--shadow-lg);font-size:13px;font-weight:600;min-width:285px;animation:toastIn .35s var(--spring)}
.toast.success{border-left:4px solid #059669}
.toast.error  {border-left:4px solid #dc2626}
.toast.warning{border-left:4px solid #d97706}
.toast.success i{color:#059669}
.toast.error   i{color:#dc2626}

/* ── SKELETON ───────────────────────────────────────────────────────── */
.skel,.loading-shimmer{background:linear-gradient(90deg,var(--bg-input) 25%,var(--bg-hover) 50%,var(--bg-input) 75%);background-size:400% 100%;animation:shimmer 1.8s ease infinite;border-radius:6px}

/* ── EMPTY STATE ────────────────────────────────────────────────────── */
.empty-state,.empty{text-align:center;padding:52px 20px;color:var(--text-muted)}
.empty-state i,.empty i{font-size:36px;margin-bottom:12px;opacity:.3;display:block}
.empty-ico{width:68px;height:68px;border-radius:18px;background:var(--primary-lt);display:flex;align-items:center;justify-content:center;font-size:26px;color:var(--primary);margin:0 auto 14px}

/* ── TOOLBAR / FILTER ───────────────────────────────────────────────── */
.toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px;gap:10px;flex-wrap:wrap}
.filter-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:16px}
.filter-sel{padding:7px 11px;background:var(--bg-card);border:1.5px solid var(--border);border-radius:9px;font-size:13px;color:var(--text);outline:none;font-family:inherit;cursor:pointer}
.filter-sel:focus{border-color:var(--primary)}

/* ── TOGGLE / SWITCH ────────────────────────────────────────────────── */
.toggle-switch{position:relative;display:inline-block;width:48px;height:26px;cursor:pointer}
.toggle-switch input{opacity:0;width:0;height:0}
.toggle-slider{position:absolute;inset:0;background:#cbd5e1;border-radius:26px;transition:.3s}
.toggle-slider:before{position:absolute;content:"";height:20px;width:20px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.toggle-switch input:checked+.toggle-slider{background:var(--success)}
.toggle-switch input:checked+.toggle-slider:before{transform:translateX(22px)}
.ts-slider{position:absolute;inset:0;background:#cbd5e1;border-radius:24px;transition:.3s}
.ts-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s}
.toggle-switch input:checked+.ts-slider{background:var(--success)}
.toggle-switch input:checked+.ts-slider:before{transform:translateX(20px)}
.switch{width:46px;height:26px;border-radius:13px;background:var(--border);position:relative;cursor:pointer;transition:background .25s;flex-shrink:0}
.switch.on{background:var(--primary)}
.knob{width:20px;height:20px;border-radius:50%;background:white;position:absolute;top:3px;left:3px;transition:left .25s;box-shadow:0 1px 4px rgba(0,0,0,.2)}
.switch.on .knob{left:23px}

/* ── SPINNER ────────────────────────────────────────────────────────── */
.spinner,.spinner-sm{width:28px;height:28px;border:3px solid var(--border);border-top-color:var(--primary);border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
.spinner-sm{width:18px;height:18px;border-width:2.5px}

/* ── AUTOCOMPLETE / DROPDOWN ────────────────────────────────────────── */
.ac-drop,.icd-dropdown,.med-dropdown,.test-dropdown{position:absolute;top:100%;left:0;right:0;background:var(--bg-card);border:1.5px solid var(--primary);border-top:none;border-radius:0 0 10px 10px;z-index:500;max-height:250px;overflow-y:auto;display:none;box-shadow:var(--shadow-md)}
.ac-drop.open{display:block;animation:fadeIn .12s ease}
.ac-item,.icd-item,.med-item,.test-item{padding:10px 14px;cursor:pointer;border-bottom:1px solid var(--border-lt);transition:background .1s;font-size:13px}
.ac-item:hover,.ac-item.active,.icd-item:hover,.med-item:hover,.test-item:hover{background:var(--bg-hover)}
.ac-name{font-size:13.5px;font-weight:700;color:var(--text)}
.ac-meta{font-size:11.5px;color:var(--text-muted);margin-top:2px}
.ac-cat{float:right;font-size:10px;padding:2px 7px;border-radius:10px;background:var(--primary-lt);color:var(--primary);font-weight:600}

/* ── SECTION HEADER ─────────────────────────────────────────────────── */
.section-hdr{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.section-hdr-title{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.mono{font-family:'JetBrains Mono',monospace;font-weight:700}

/* ── ALERT BOXES ────────────────────────────────────────────────────── */
.alert-box{padding:11px 15px;border-radius:10px;margin-bottom:18px;font-size:13px;font-weight:500;display:flex;align-items:center;gap:9px}
.alert-error  {background:rgba(239,68,68,.08);color:var(--danger);border:1px solid rgba(239,68,68,.15)}
.alert-success{background:rgba(34,197,94,.08);color:var(--success);border:1px solid rgba(34,197,94,.15)}
.alert-warning{background:rgba(249,115,22,.08);color:var(--warning);border:1px solid rgba(249,115,22,.15)}
.hipaa-banner{background:linear-gradient(135deg,rgba(14,165,233,.08),rgba(168,85,247,.06));border:1.5px solid rgba(14,165,233,.2);border-radius:12px;padding:16px 20px;margin-bottom:20px;display:flex;align-items:flex-start;gap:14px}

/* ── DASHBOARD ──────────────────────────────────────────────────────── */
.content-grid{display:grid;grid-template-columns:1fr 320px;gap:18px}
.appt-row{display:grid;grid-template-columns:48px 1fr 130px 90px 110px 80px;align-items:center;gap:12px;padding:13px 18px;border-bottom:1px solid var(--border-light);transition:background .12s}
.appt-row:hover{background:var(--bg-hover)}
.appt-row:last-child{border-bottom:none}
.appt-head{background:var(--bg-input);font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);padding:10px 18px}
.token-num,.token-badge{width:36px;height:36px;border-radius:9px;background:var(--primary-lt);color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;font-family:'JetBrains Mono',monospace;flex-shrink:0}
.right-col{display:flex;flex-direction:column;gap:16px}
.alert-row{display:flex;align-items:flex-start;gap:11px;padding:13px 18px;border-bottom:1px solid var(--border-light);transition:background .12s}
.alert-row:hover{background:var(--bg-hover)}
.alert-dot{width:8px;height:8px;border-radius:50%;margin-top:5px;flex-shrink:0}
.dot-appointment{background:#0ea5e9} .dot-billing{background:#22c55e} .dot-system{background:#8b5cf6} .dot-followup{background:#f97316}
.p-row{display:flex;align-items:center;gap:11px;padding:11px 18px;border-bottom:1px solid var(--border-light);cursor:pointer;transition:background .12s}
.p-row:hover{background:var(--bg-hover)}
@media(max-width:1100px){.content-grid{grid-template-columns:1fr}.right-col{display:grid;grid-template-columns:1fr 1fr;gap:16px}}
@media(max-width:700px){.right-col{grid-template-columns:1fr}}

/* ── BILLING (clinic) ───────────────────────────────────────────────── */
.bill-items-wrap{border:1.5px solid var(--border);border-radius:10px;overflow:hidden}
.bill-items-head{display:grid;grid-template-columns:1fr 70px 110px 80px 110px 36px;gap:8px;padding:9px 14px;background:var(--bg-input);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.bill-item-row{display:grid;grid-template-columns:1fr 70px 110px 80px 110px 36px;gap:8px;padding:10px 14px;border-top:1px solid var(--border)}
.bill-item-row input{background:var(--bg-input);border:1px solid var(--border);border-radius:7px;padding:6px 9px;font-size:13px;color:var(--text);outline:none;width:100%;font-family:inherit;transition:border-color .2s}
.bill-item-row input:focus{border-color:var(--primary)}
.del-btn{width:34px;height:34px;border-radius:7px;background:rgba(239,68,68,.08);border:none;color:var(--danger);cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center}
.del-btn:hover{background:var(--danger);color:white}
.totals-preview{background:var(--bg-input);border:1.5px solid var(--border);border-radius:12px;padding:18px 20px}
.tot-row{display:flex;justify-content:space-between;padding:6px 0;font-size:13.5px;color:var(--text-2)}
.tot-row.grand{font-size:16px;font-weight:800;color:var(--text);border-top:2px solid var(--border);padding-top:10px;margin-top:6px}
.revenue-box{display:flex;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.rev-card{flex:1;min-width:120px;background:var(--bg-card);border:1.5px solid var(--border);border-radius:10px;padding:14px 16px}
.rev-val{font-size:20px;font-weight:800;font-family:'JetBrains Mono',monospace;color:var(--text)}
.rev-label{font-size:11px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.5px;margin-top:3px}

/* ── SA-BILLING (platform billing) ─────────────────────────────────── */
.billing-grid{display:grid;grid-template-columns:1fr 360px;gap:20px;align-items:start}
@media(max-width:1100px){.billing-grid{grid-template-columns:1fr}}
.plan-panel{background:var(--bg-card);border:1.5px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:var(--shadow-sm);position:sticky;top:80px}
.plan-head{padding:18px 20px;background:linear-gradient(135deg,#0f172a,#1e3a8a);display:flex;align-items:center;gap:12px}
.plan-head-icon{width:36px;height:36px;background:rgba(255,255,255,.1);border-radius:10px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.plan-head h3{font-size:14px;font-weight:800;color:#fff;margin:0}
.plan-head p{font-size:11px;color:#94a3b8;margin:2px 0 0}
.plan-body{padding:20px}
.plan-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}
.plan-opt{border:1.5px solid var(--border);border-radius:10px;padding:10px 12px;cursor:pointer;transition:var(--tr);position:relative;background:var(--bg-card)}
.plan-opt:hover{border-color:var(--primary);background:var(--primary-lt)}
.plan-opt.sel{border-color:var(--primary);background:var(--primary-lt)}
.plan-opt.sel::after{content:'\f00c';font-family:'Font Awesome 6 Free';font-weight:900;position:absolute;top:6px;right:8px;font-size:9px;color:var(--primary)}
.plan-opt-name{font-size:12px;font-weight:800;color:var(--text)}
.plan-opt-price{font-size:11px;color:var(--text-muted);margin-top:2px}
.gst-box{background:linear-gradient(135deg,var(--primary-lt),var(--bg-input));border:1.5px solid var(--primary-mid);border-radius:12px;padding:14px 16px;margin-bottom:16px}
.gst-r{display:flex;justify-content:space-between;font-size:13px;margin-bottom:5px;color:var(--text-2)}
.gst-r span:last-child{font-weight:700}
.gst-total{display:flex;justify-content:space-between;font-size:16px;font-weight:900;border-top:1.5px dashed var(--primary-mid);padding-top:10px;margin-top:6px}
.gst-total span:last-child{color:var(--primary)}
.abt{display:inline-flex;align-items:center;gap:4px;padding:5px 10px;border-radius:8px;font-size:11.5px;font-weight:800;cursor:pointer;transition:var(--tr);border:1.5px solid transparent;font-family:inherit;white-space:nowrap}
.abt-green{background:#f0fdf4;color:#16a34a;border-color:#bbf7d0}.abt-green:hover{background:#dcfce7;border-color:#16a34a}
.abt-gray {background:var(--bg-input);color:var(--text-muted);border-color:var(--border)}.abt-gray:hover{background:var(--bg-hover);color:var(--primary);border-color:var(--primary)}

/* ── APPOINTMENTS ───────────────────────────────────────────────────── */
.slot-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px;max-height:200px;overflow-y:auto;padding:2px}
.slot-btn{padding:7px 2px;border-radius:8px;border:1.5px solid var(--border);font-size:11.5px;font-weight:700;text-align:center;cursor:pointer;transition:all .15s;font-family:'JetBrains Mono',monospace;background:var(--bg-card);color:var(--text)}
.slot-btn.s-available:hover{border-color:var(--primary);color:var(--primary)}
.slot-btn.s-booked  {background:rgba(239,68,68,.08);border-color:#fca5a5;color:#b91c1c;cursor:default}
.slot-btn.s-break   {background:var(--bg-input);color:var(--text-muted);cursor:default}
.slot-btn.s-selected{background:var(--primary);border-color:var(--primary);color:white}
.slot-btn.s-offday  {opacity:.45}
.conflict-banner{background:rgba(239,68,68,.08);border:1.5px solid #fca5a5;border-radius:10px;padding:12px 16px;margin-bottom:12px;display:none;align-items:center;gap:10px;flex-wrap:wrap}
.conflict-banner i{color:#ef4444;font-size:16px}

/* ── DOCTORS ────────────────────────────────────────────────────────── */
.doctors-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}
.doc-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);overflow:hidden;transition:all .22s;animation:fadeUp .4s ease forwards;opacity:0}
.doc-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:var(--primary)}
.doc-banner{height:6px;background:linear-gradient(90deg,var(--primary),var(--primary-dark))}
.doc-body{padding:20px}
.doc-photo-wrap{position:relative;width:72px;height:72px;margin-bottom:14px}
.doc-photo{width:72px;height:72px;border-radius:16px;object-fit:cover;border:2px solid var(--border)}
.doc-initials{width:72px;height:72px;border-radius:16px;background:linear-gradient(135deg,var(--primary),var(--primary-dark));display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800;color:white}
.doc-photo-upload{position:absolute;bottom:-6px;right:-6px;width:24px;height:24px;border-radius:50%;background:var(--primary);color:white;border:2px solid var(--bg-card);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:10px;transition:transform .2s}
.doc-photo-upload:hover{transform:scale(1.15)}
.doc-photo-remove{position:absolute;top:-6px;right:-6px;width:22px;height:22px;border-radius:50%;background:rgba(239,68,68,.9);color:#fff;border:2px solid var(--bg-card);display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:9px;opacity:0;transition:all .2s;z-index:2;}
.doc-photo-wrap:hover .doc-photo-remove{opacity:1;}
.doc-photo-remove:hover{background:#dc2626;transform:scale(1.1);}
.doc-name{font-size:15px;font-weight:800;color:var(--text)}
.doc-spec{font-size:12px;color:var(--primary);font-weight:600;margin-bottom:2px}
.doc-qual{font-size:11px;color:var(--text-muted)}
.doc-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0;padding:12px;background:var(--bg-input);border-radius:10px}
.ds-item{text-align:center}
.ds-val{font-size:15px;font-weight:800;font-family:'JetBrains Mono',monospace;color:var(--text)}
.ds-lbl{font-size:10px;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px}
.day-chips{display:flex;gap:4px;flex-wrap:wrap;margin-bottom:14px}
.day-chip{padding:2px 8px;border-radius:6px;font-size:10px;font-weight:700;background:var(--primary-light);color:var(--primary)}
.day-chip.off{background:var(--bg-input);color:var(--text-muted)}
.doc-foot{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--border)}
.day-toggle{display:inline-flex;align-items:center;gap:5px;padding:6px 14px;border-radius:8px;background:var(--bg-input);border:1.5px solid var(--border);cursor:pointer;font-size:12px;font-weight:600;color:var(--text-muted);transition:all .18s}
.day-toggle input{display:none}
.day-toggle:has(input:checked){background:var(--primary);border-color:var(--primary);color:white}
.u-avatar{width:44px;height:44px;border-radius:12px;background:linear-gradient(135deg,#0ea5e9,#0284c7);color:white;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:800;flex-shrink:0}

/* ── SETTINGS ───────────────────────────────────────────────────────── */
.settings-layout{display:grid;grid-template-columns:220px 1fr;gap:20px;min-height:calc(100vh - var(--header-h) - 60px)}
.settings-nav{display:flex;flex-direction:column;gap:4px}
.snav-item{display:flex;align-items:center;gap:9px;padding:10px 14px;border-radius:10px;cursor:pointer;font-size:13px;font-weight:600;color:var(--text-muted);transition:all .15s}
.snav-item:hover{background:var(--bg-card);color:var(--text)}
.snav-item.active{background:var(--primary-light);color:var(--primary)}
.snav-item i{width:16px;text-align:center}
.settings-section{display:none;animation:fadeUp .3s ease}
.settings-section.active{display:block}
.logo-upload-area{border:2px dashed var(--border);border-radius:12px;padding:30px;text-align:center;cursor:pointer;transition:all .2s}
.logo-upload-area:hover{border-color:var(--primary);background:var(--primary-light)}
.toggle-row{display:flex;align-items:center;justify-content:space-between;padding:11px 0;border-bottom:1px solid var(--border-light)}
.toggle-row:last-child{border:none}
.toggle-row .label{font-size:13.5px;font-weight:600;color:var(--text)}
.toggle-row .sub{font-size:11.5px;color:var(--text-muted);margin-top:2px}
.swatch{width:32px;height:32px;border-radius:50%;cursor:pointer;transition:transform .2s;border:3px solid transparent}
.swatch:hover{transform:scale(1.2)}
.swatch.active{border-color:var(--text)}
.profile-hero{display:flex;align-items:center;gap:16px;background:var(--primary-light);border-radius:12px;padding:16px;margin-bottom:18px}
.profile-av{width:60px;height:60px;border-radius:50%;background:linear-gradient(135deg,var(--primary),#0284c7);display:flex;align-items:center;justify-content:center;font-size:26px;font-weight:800;color:white;flex-shrink:0;overflow:hidden;cursor:pointer}
@media(max-width:800px){.settings-layout{grid-template-columns:1fr}.settings-nav{flex-direction:row;flex-wrap:wrap}}

/* ── IPD ────────────────────────────────────────────────────────────── */
.bed-board{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin-bottom:18px}
.bed-card{border-radius:12px;padding:12px 14px;border:2px solid;cursor:pointer;transition:all .2s;position:relative;overflow:hidden}
.bed-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-md)}
.bed-card.occupied {background:#fff0f0;border-color:#fca5a5}
.bed-card.available{background:#f0fdf4;border-color:#86efac}
.bed-num{font-size:22px;font-weight:900;font-family:'JetBrains Mono',monospace}
.bed-card.occupied  .bed-num{color:#dc2626}
.bed-card.available .bed-num{color:#16a34a}
.bed-ward  {font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.bed-patient{font-size:11.5px;font-weight:800;color:#0f172a;margin-top:4px}
.bt-general{background:#dbeafe;color:#1d4ed8}
.bt-icu    {background:#fee2e2;color:#991b1b}
.charge-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--border);font-size:12.5px}
.charge-type-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.ward-header{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.7px;color:var(--text-muted);background:var(--bg-input);padding:6px 14px;border-radius:8px;margin-bottom:8px;display:flex;align-items:center;justify-content:space-between}

/* ── LAB ────────────────────────────────────────────────────────────── */
.result-row{display:grid;grid-template-columns:2fr 1fr 1fr 2fr 1fr;gap:8px;align-items:center;padding:8px 12px;border-bottom:1px solid var(--border);font-size:13px}
.result-row.header{background:var(--bg-input);font-weight:800;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.abnormal-flag{color:var(--danger);font-weight:900;font-size:11px}

/* ── CONSULTATION ───────────────────────────────────────────────────── */
.opd-shell{display:flex;height:calc(100vh - var(--header-h));overflow:hidden}
.queue-panel{width:260px;flex-shrink:0;background:var(--bg-card);border-right:1.5px solid var(--border);display:flex;flex-direction:column;overflow:hidden}
.queue-header{padding:14px 16px;border-bottom:1.5px solid var(--border);background:linear-gradient(135deg,#0f172a,#1e3a8a)}
.queue-header h3{font-size:13px;font-weight:800;color:#fff}
.queue-list{flex:1;overflow-y:auto;padding:8px}
.q-item{padding:10px 12px;border-radius:10px;margin-bottom:6px;cursor:pointer;border:1.5px solid var(--border);background:var(--bg-card);transition:all .15s;position:relative}
.q-item:hover,.q-item.active{border-color:var(--primary);background:var(--primary-lt)}
.q-token{width:26px;height:26px;border-radius:7px;background:var(--primary);color:#fff;font-weight:900;font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;font-family:'JetBrains Mono',monospace}
.q-name{font-size:13px;font-weight:700}
.q-meta{font-size:11px;color:var(--text-muted);margin-top:2px}
.consult-panel{flex:1;overflow-y:auto;background:var(--bg);padding:20px;display:flex;flex-direction:column;gap:14px}
.patient-banner{background:linear-gradient(135deg,#0f172a,#1e3a8a);border-radius:14px;padding:16px 20px;display:flex;align-items:center;gap:14px}
.banner-name{font-size:18px;font-weight:900;color:#fff}
.banner-meta{font-size:12px;color:#94a3b8;margin-top:3px;display:flex;gap:12px;flex-wrap:wrap}
.vitals-row{display:grid;grid-template-columns:repeat(6,1fr);gap:8px}
.vital-box{background:var(--bg-card);border:1.5px solid var(--border);border-radius:10px;padding:8px 10px;text-align:center;transition:all .15s}
.vital-box:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.vital-input{width:100%;border:none;outline:none;background:none;text-align:center;font-size:17px;font-weight:900;color:var(--primary);font-family:'JetBrains Mono',monospace;margin-top:2px}
.vital-label{font-size:9.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.clinical-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;overflow:hidden}
.clinical-card-head{padding:10px 16px;background:var(--bg-input);border-bottom:1.5px solid var(--border);display:flex;align-items:center;gap:8px;font-size:11.5px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted)}
.rx-panel{width:320px;flex-shrink:0;background:var(--bg-card);border-left:1.5px solid var(--border);display:flex;flex-direction:column;overflow:visible}
.rx-header{padding:14px 16px;border-bottom:1.5px solid var(--border);background:linear-gradient(135deg,#047857,#10b981)}
.rx-header h3{font-size:13px;font-weight:800;color:#fff}
.template-btn{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;background:var(--primary-lt);border:1.5px solid var(--primary-mid);border-radius:20px;font-size:11.5px;font-weight:700;color:var(--primary);cursor:pointer;transition:all .15s;white-space:nowrap;margin:2px}
.template-btn:hover{background:var(--primary);color:#fff}

/* ── ANALYTICS ──────────────────────────────────────────────────────── */
.analytics-header{background:linear-gradient(135deg,#0f172a,#1e293b 50%,#1e3a8a);border-radius:16px;padding:24px 28px;margin-bottom:20px;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;position:relative;overflow:hidden}
.analytics-header::before{content:'';position:absolute;top:-40px;right:-40px;width:200px;height:200px;background:radial-gradient(circle,rgba(59,130,246,.25) 0%,transparent 70%)}
.period-pills{display:flex;background:rgba(255,255,255,.08);border-radius:10px;padding:3px;gap:2px}
.period-pill{padding:6px 14px;border-radius:7px;font-size:12.5px;font-weight:700;cursor:pointer;color:rgba(255,255,255,.6);border:none;background:transparent;font-family:inherit;transition:all .2s}
.period-pill.active{background:rgba(255,255,255,.15);color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.2)}
.chart-grid  {display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px}
.chart-grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;margin-bottom:16px}
.chart-card  {background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:20px 22px}
.chart-title {font-size:13px;font-weight:800;font-family:'Plus Jakarta Sans',sans-serif;color:var(--text);margin-bottom:16px;display:flex;align-items:center;justify-content:space-between}
@media(max-width:900px){.chart-grid,.chart-grid-3{grid-template-columns:1fr}}
.bar-row {display:flex;align-items:center;gap:10px;margin-bottom:9px}
.bar-label{width:130px;font-size:12.5px;font-weight:700;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}
.bar-track{flex:1;height:22px;background:var(--bg-input);border-radius:6px;overflow:hidden}
.bar-fill {height:100%;border-radius:6px;display:flex;align-items:center;padding-left:8px;transition:width .6s cubic-bezier(.4,0,.2,1)}
.pp-btn{padding:5px 13px;border-radius:6px;border:none;font-size:12px;font-weight:800;cursor:pointer;background:transparent;color:var(--text-muted)}
.pp-btn.active{background:var(--primary);color:#fff;box-shadow:0 2px 8px rgba(79,70,229,.3)}
canvas{max-height:240px}
.sa-kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
@media(max-width:800px){.sa-kpi-row{grid-template-columns:1fr 1fr}}
.sa-kpi{background:var(--bg-card);border:1.5px solid var(--border);border-radius:16px;padding:24px 26px;transition:box-shadow .2s,border-color .2s}
.sa-kpi:hover{box-shadow:0 8px 32px rgba(0,0,0,.08);border-color:var(--primary-mid)}
.sa-kpi-val  {font-family:'Plus Jakarta Sans',sans-serif;font-size:38px;font-weight:900;color:var(--text);line-height:1;margin-bottom:6px}
.sa-kpi-label{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.6px;color:var(--text-muted)}
.charts-row{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
@media(max-width:900px){.charts-row{grid-template-columns:1fr}}
.tristat{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}
.tristat-item{border-radius:12px;padding:16px;text-align:center}
.tristat-val{font-family:'Plus Jakarta Sans',sans-serif;font-size:30px;font-weight:900;line-height:1}
.tristat-lbl{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;margin-top:5px}

/* ── ORG / PLATFORM ─────────────────────────────────────────────────── */
.platform-hero{background:linear-gradient(135deg,#0f172a,#1e3a8a 50%,#312e81);border-radius:18px;padding:32px 36px;margin-bottom:24px;position:relative;overflow:hidden}
.platform-hero::before{content:'';position:absolute;top:-80px;right:-80px;width:320px;height:320px;background:radial-gradient(circle,rgba(99,102,241,.25) 0%,transparent 70%)}
.platform-kpis{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;margin-bottom:24px}
@media(max-width:1100px){.platform-kpis{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.platform-kpis{grid-template-columns:1fr 1fr}}
.pkpi{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:18px 20px;display:flex;align-items:center;gap:12px;transition:all .2s}
.pkpi:hover{border-color:var(--primary-mid);box-shadow:var(--shadow-md)}
.pkpi-icon{width:42px;height:42px;border-radius:11px;display:flex;align-items:center;justify-content:center;font-size:17px;flex-shrink:0}
.pi-indigo{background:#eef2ff;color:#4f46e5} .pi-teal {background:#f0fdfa;color:#0d9488}
.pi-amber {background:#fffbeb;color:#d97706} .pi-green{background:#f0fdf4;color:#16a34a}
.pi-blue  {background:#eff6ff;color:#2563eb} .pi-rose {background:#fff1f2;color:#e11d48}
.pkpi-val{font-size:20px;font-weight:900;font-family:'Plus Jakarta Sans',sans-serif;color:var(--text)}
.pkpi-lbl{font-size:10.5px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:.4px}
.tenant-table-wrap{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;overflow:hidden}
.tenant-name {font-weight:800;font-size:13.5px;color:var(--text)}
.tenant-email{font-size:11px;color:var(--text-muted);margin-top:1px}
.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;margin-right:5px}
.dot-active   {background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.15)}
.dot-suspended{background:#f43f5e;box-shadow:0 0 0 3px rgba(244,63,94,.15)}
.act-btn{padding:4px 9px;border-radius:7px;font-size:11px;font-weight:700;border:1.5px solid var(--border);background:var(--bg-card);color:var(--text);cursor:pointer;white-space:nowrap;font-family:inherit;transition:all .15s}
.act-btn:hover{background:var(--bg-input);border-color:var(--primary-mid)}
.act-btn.danger {color:#e11d48;border-color:#fecdd3;background:#fff1f2}.act-btn.danger:hover{background:#fecdd3}
.act-btn.success{color:#16a34a;border-color:#bbf7d0;background:#f0fdf4}.act-btn.success:hover{background:#bbf7d0}
.tenant-actions{display:flex;gap:4px;flex-wrap:nowrap}
.branch-bar-wrap{display:flex;align-items:center;gap:7px;min-width:90px}
.branch-bar-bg  {flex:1;height:5px;background:var(--border);border-radius:3px;overflow:hidden}
.branch-bar-fill{height:100%;border-radius:3px;transition:width .4s}
.branch-bar-lbl {font-size:10.5px;font-weight:700;white-space:nowrap;font-family:'JetBrains Mono',monospace}
.branch-comp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;margin-bottom:24px}
.branch-comp-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:18px 20px;transition:all .2s}
.branch-comp-card:hover{border-color:var(--primary-mid);box-shadow:var(--shadow-md)}
.branch-comp-card.current-branch{border-color:var(--primary);background:var(--primary-lt)}

/* ── SA GUARDRAILS ──────────────────────────────────────────────────── */
.stat-trio{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:24px}
.stat-item{background:var(--bg-card);border:1.5px solid var(--border);border-radius:16px;padding:22px;text-align:center;transition:all .2s}
.stat-item:hover{box-shadow:0 6px 24px rgba(0,0,0,.07)}
.stat-val{font-family:'Plus Jakarta Sans',sans-serif;font-size:36px;font-weight:900;line-height:1}
.stat-lbl{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;margin-top:6px}
.stat-sub{font-size:12px;margin-top:4px;opacity:.7}
.limit-pct{display:flex;align-items:center;gap:8px}
.lt{flex:1;height:8px;border-radius:4px;background:var(--bg-input);overflow:hidden;min-width:60px}
.lf{height:100%;border-radius:4px;transition:width .5s cubic-bezier(.4,0,.2,1)}
.mini-bar-wrap{display:flex;align-items:center;gap:7px}
.mini-bar     {flex:1;height:8px;border-radius:4px;background:var(--bg-input);overflow:hidden;min-width:50px}
.mini-bar-fill{height:100%;border-radius:4px;transition:width .5s cubic-bezier(.4,0,.2,1)}

/* ── CASH REGISTER ──────────────────────────────────────────────────── */
.cash-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.cash-tile{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:16px 18px;position:relative;overflow:hidden;transition:box-shadow .2s}
.cash-tile:hover{box-shadow:var(--shadow-md)}
.ct-label{font-size:10.5px;font-weight:800;text-transform:uppercase;letter-spacing:.7px;color:var(--text-muted)}
.ct-val  {font-size:26px;font-weight:900;font-family:'JetBrains Mono',monospace;margin:6px 0 2px}
.ct-icon {position:absolute;right:14px;top:14px;font-size:20px;opacity:.15}
.ct-cash {border-top:3px solid #16a34a} .ct-cash .ct-val{color:#16a34a}
.ct-upi  {border-top:3px solid #7c3aed} .ct-upi  .ct-val{color:#7c3aed}
.ct-card {border-top:3px solid #0369a1} .ct-card .ct-val{color:#0369a1}
.ct-gross{border-top:3px solid #1e40af} .ct-gross .ct-val{color:#1e40af;font-size:30px}
.variance-box  {border-radius:12px;padding:14px 18px;margin:16px 0;display:flex;align-items:center;gap:14px}
.variance-match{background:#d1fae5;border:1.5px solid #6ee7b7}
.variance-short{background:#fee2e2;border:1.5px solid #fca5a5}
.variance-over {background:#fffbeb;border:1.5px solid #fcd34d}

/* ── SERVICES / DEPARTMENTS ─────────────────────────────────────────── */
.services-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.svc-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);padding:18px;cursor:pointer;transition:all .2s;animation:fadeUp .35s ease forwards;opacity:0}
.svc-card:hover{border-color:var(--primary);box-shadow:var(--shadow-md);transform:translateY(-2px)}
.svc-icon {width:46px;height:46px;border-radius:12px;background:var(--primary-light);display:flex;align-items:center;justify-content:center;font-size:20px;margin-bottom:12px}
.svc-name {font-size:14.5px;font-weight:800;color:var(--text);margin-bottom:4px}
.svc-price{font-size:20px;font-weight:800;font-family:'JetBrains Mono',monospace;color:var(--primary)}
.dept-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:20px;transition:box-shadow .2s,border-color .2s;cursor:pointer}
.dept-card:hover{box-shadow:var(--shadow-md);border-color:var(--primary)}
.dept-icon{width:50px;height:50px;border-radius:12px;background:var(--primary-light);color:var(--primary);display:flex;align-items:center;justify-content:center;font-size:22px;flex-shrink:0}
.preset-chip{display:inline-flex;align-items:center;gap:5px;padding:5px 11px;border-radius:20px;border:1.5px dashed var(--border);font-size:12px;cursor:pointer;color:var(--text-muted);transition:all .15s;margin:3px}
.preset-chip:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-light)}

/* ── MEDICINES ──────────────────────────────────────────────────────── */
.summary-strip{display:flex;gap:10px;margin-bottom:16px}
.sum-card{flex:1;background:var(--bg-card);border:1.5px solid var(--border);border-radius:10px;padding:12px 16px}
.sum-val {font-size:20px;font-weight:800;font-family:'JetBrains Mono',monospace;color:var(--text)}
.sum-lbl {font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted);margin-top:2px}
.stock-low {color:var(--danger)!important;font-weight:700!important}
.stock-ok  {color:var(--success)!important}
.stock-zero{color:var(--danger)!important;font-weight:800!important}

/* ── COUPONS / DISCOUNTS ────────────────────────────────────────────── */
.coupon-card{background:var(--bg-card);border:2px dashed var(--border);border-radius:14px;padding:18px 20px;display:grid;grid-template-columns:auto 1fr auto auto;align-items:center;gap:14px;transition:all .2s}
.coupon-card:hover{border-color:var(--primary);box-shadow:var(--shadow-md)}
.coupon-card.expired{opacity:.55}
.coupon-code-badge{font-family:'JetBrains Mono',monospace;font-size:18px;font-weight:800;background:linear-gradient(135deg,var(--primary-lt),#e0f2fe);color:var(--primary);padding:10px 16px;border-radius:10px;border:1.5px solid var(--primary-mid);letter-spacing:1px;white-space:nowrap}
.disc-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:20px;transition:box-shadow .2s;position:relative;overflow:hidden}
.disc-card::before{content:'';position:absolute;top:0;left:0;width:4px;height:100%;background:var(--primary)}
.disc-value{font-size:28px;font-weight:900;font-family:'JetBrains Mono',monospace;color:var(--primary)}
.progress-bar {background:var(--bg-input);border-radius:4px;height:6px;overflow:hidden}
.progress-fill{height:100%;border-radius:4px;background:var(--primary);transition:width .3s}
.type-percent    {background:#dcfce7;color:#14532d}
.type-flat       {background:#fef3c7;color:#78350f}
.type-appointment{background:#f3e8ff;color:#581c87}

/* ── ALERTS PAGE ────────────────────────────────────────────────────── */
.alert-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:12px;padding:16px 20px;margin-bottom:10px;display:flex;align-items:flex-start;gap:14px;transition:all .2s;cursor:pointer;animation:fadeUp .4s ease forwards;opacity:0}
.alert-card:hover{border-color:var(--primary);box-shadow:var(--shadow)}
.alert-card.unread{border-left:4px solid var(--primary);background:var(--primary-light)}
.alert-icon-wrap{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:17px;flex-shrink:0}
.ai-appointment{background:rgba(14,165,233,.12);color:#0ea5e9}
.ai-billing    {background:rgba(34,197,94,.12);color:#22c55e}
.ai-system     {background:rgba(139,92,246,.12);color:#8b5cf6}
.ai-followup   {background:rgba(249,115,22,.12);color:#f97316}
.alert-title{font-size:14px;font-weight:700;color:var(--text);margin-bottom:4px}
.alert-msg  {font-size:13px;color:var(--text-2);line-height:1.5}
.alert-time {font-size:11.5px;color:var(--text-muted);margin-top:6px}
.unread-dot {width:8px;height:8px;border-radius:50%;background:var(--primary);flex-shrink:0;margin-top:6px}

/* ── ANNOUNCEMENTS ──────────────────────────────────────────────────── */
.ann-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:18px 20px;margin-bottom:12px;border-left:4px solid;transition:box-shadow .2s;position:relative}
.ann-card:hover{box-shadow:var(--shadow-md)}
.ann-card.priority-urgent{border-left-color:#dc2626;background:linear-gradient(135deg,#fff5f5,var(--bg-card))}
.ann-card.priority-high  {border-left-color:#ea580c;background:linear-gradient(135deg,#fff7f0,var(--bg-card))}
.ann-card.priority-normal{border-left-color:#1e40af}
.ann-card.priority-low   {border-left-color:#64748b}
.ann-card.pinned::before {content:'📌';position:absolute;top:12px;right:50px;font-size:14px}
.ann-title{font-size:16px;font-weight:900;margin-bottom:5px}
.ann-body {font-size:13.5px;color:var(--text-2);line-height:1.65;margin-bottom:10px}
.ann-meta {font-size:11px;color:var(--text-muted);display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.ann-item {padding:16px 20px;border-bottom:1px solid var(--border-light);display:flex;align-items:flex-start;gap:14px;transition:background .15s}
.ann-item:hover{background:var(--bg-hover)}
.ann-prio-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0;margin-top:4px}
.role-chip{background:var(--bg-input);border:1px solid var(--border);border-radius:6px;padding:1px 7px;font-size:10.5px;color:var(--text-muted);font-weight:700}

/* ── SCHEDULE ───────────────────────────────────────────────────────── */
.sched-wrap{display:flex;gap:16px;height:calc(100vh - var(--header-h) - 80px)}
.sched-main{flex:1;background:var(--bg-card);border:1.5px solid var(--border);border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column}
.cal-header{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid var(--border)}
.cal-day-headers{display:grid;grid-template-columns:60px repeat(7,1fr);border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--bg-card);z-index:10}
.time-grid {display:grid;grid-template-columns:60px repeat(7,1fr)}
.time-slot {border-left:1px solid var(--border-lt);border-bottom:1px solid var(--border-lt);position:relative;cursor:pointer;transition:background .1s;min-height:24px}
.time-slot:hover{background:var(--primary-light)}
.appt-block{position:absolute;left:2px;right:2px;border-radius:8px;padding:4px 7px;font-size:11px;cursor:pointer;z-index:5;overflow:hidden;border-left:3px solid}
.status-scheduled  {background:rgba(14,165,233,.15);border-color:#0ea5e9;color:#0369a1}
.status-confirmed  {background:rgba(34,197,94,.15);border-color:#22c55e;color:#15803d}
.status-in_progress{background:rgba(249,115,22,.15);border-color:#f97316;color:#c2410c}
.status-completed  {background:rgba(100,116,139,.1);border-color:#64748b;color:#475569}

/* ── SHARED MISC ────────────────────────────────────────────────────── */
.org-card{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1.5px solid var(--border);border-radius:10px;cursor:pointer;transition:all .15s;margin-bottom:8px}
.org-card:hover,.org-card.selected{border-color:var(--primary);background:var(--primary-lt)}
.warn-banner{background:linear-gradient(135deg,#fff1f2,#fff);border:1.5px solid #fca5a5;border-radius:14px;padding:16px 20px;margin-bottom:20px;display:none}
.warn-row{font-size:12.5px;padding:4px 0;border-bottom:1px solid #fee2e2;display:flex;align-items:center;gap:8px}
.log-row{display:grid;grid-template-columns:150px 50px 140px 90px 120px 110px 1fr;gap:8px;align-items:center;padding:10px 16px;border-bottom:1px solid var(--border);font-size:12.5px;transition:background .15s}
.log-row:hover{background:var(--bg-hover)}
.log-row.header{background:var(--bg-input);font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.history-row{display:grid;grid-template-columns:110px 1fr 100px 100px 100px 80px 120px;gap:8px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--border);font-size:12.5px}
.history-row.header{background:var(--bg-input);font-weight:800;font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-muted)}
.heat-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px}
.heat-cell{aspect-ratio:1;border-radius:4px;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;color:rgba(255,255,255,.8);cursor:default}
.tl-item{position:relative;padding:0 0 24px 16px}
.tl-item::before{content:'';position:absolute;left:-2px;top:14px;bottom:0;width:2px;background:var(--border)}
.tl-item.done::before{background:var(--primary)}
.tl-dot{position:absolute;left:-8px;top:6px;width:18px;height:18px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:9px;border:2px solid var(--border);background:var(--bg-card)}
.tl-item.done   .tl-dot{background:var(--primary);border-color:var(--primary);color:#fff}
.tl-item.current .tl-dot{background:var(--primary);border-color:var(--primary);color:#fff;box-shadow:0 0 0 3px var(--primary-lt)}
.otp-row{display:flex;gap:8px;justify-content:center;margin:16px 0}
.otp-box,.otp-b,.totp-box,.totp-b{width:48px;height:58px;border:2px solid var(--border);border-radius:10px;text-align:center;font-size:22px;font-weight:900;font-family:'JetBrains Mono',monospace;outline:none;transition:border-color .2s}
.otp-box:focus,.otp-b:focus,.totp-box:focus,.totp-b:focus{border-color:var(--primary);box-shadow:0 0 0 3px var(--primary-glow)}
.product-chip{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--bg-input);border-radius:9px;margin-bottom:6px}
.chip-rank{font-size:10px;font-weight:800;background:var(--primary-lt);color:var(--primary);border-radius:5px;padding:2px 6px;min-width:22px;text-align:center}
/* Doctor payments */
.doc-pay-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;padding:18px 20px;display:grid;grid-template-columns:1fr auto;gap:16px;align-items:start;margin-bottom:12px;transition:box-shadow .2s}
.doc-pay-card:hover{box-shadow:var(--shadow-md)}
.doc-pay-card.enabled{border-left:4px solid var(--success)}
.upi-set  {color:var(--success);font-weight:700}
.upi-unset{color:var(--text-muted)}
/* Shop */
.product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:14px}
.product-card{background:var(--bg-card);border:1.5px solid var(--border);border-radius:14px;overflow:hidden;transition:all .2s;cursor:pointer}
.product-card:hover{box-shadow:var(--shadow-md);transform:translateY(-2px)}
.pc-body{padding:12px 14px}
.pc-name{font-size:14px;font-weight:800;margin-bottom:4px;line-height:1.3}
.pc-sell{font-size:18px;font-weight:900;font-family:'JetBrains Mono',monospace;color:var(--primary)}
.pc-mrp {font-size:12px;color:var(--text-muted);text-decoration:line-through}
.pc-disc{font-size:11px;font-weight:800;background:#dcfce7;color:#166534;border-radius:6px;padding:1px 6px}
.pc-actions{display:flex;gap:6px;padding:8px 14px;border-top:1px solid var(--border);background:var(--bg-input)}
.status-placed    {background:#fef3c7;color:#92400e}
.status-delivered {background:#dcfce7;color:#14532d}
/* I18n */
.currency-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;max-height:340px;overflow-y:auto;border:1.5px solid var(--border);border-radius:10px;padding:10px}
.currency-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;cursor:pointer;border:1.5px solid transparent;transition:all .15s}
.currency-item:hover,.currency-item.selected{background:var(--primary-lt);border-color:var(--primary)}
.cur-sym{font-family:'JetBrains Mono',monospace;font-size:18px;font-weight:900;width:32px;text-align:center}

/* ── TOKEN DISPLAY (TV) ─────────────────────────────────────────────── */
.ns-token{font-family:'JetBrains Mono',monospace;font-size:140px;font-weight:900;line-height:1;color:#fff;text-shadow:0 0 60px rgba(255,255,255,.3);animation:tokenPulse 2s ease-in-out infinite}
.ns-token.new-token{animation:tokenIn .4s cubic-bezier(.34,1.56,.64,1)}
.token-card{background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:12px 16px;display:flex;align-items:center;gap:14px;transition:all .3s;animation:fadeUp .3s ease}
.token-card.next{background:rgba(59,130,246,.15);border-color:rgba(59,130,246,.4)}

/* ── LOGIN PAGE — FULL STYLES ────────────────────────────────────────── */
body:has(.login-wrap){min-height:100vh;display:flex;align-items:center;justify-content:center;background:var(--bg-page);overflow:hidden}
.bg-mesh{position:fixed;inset:0;background:radial-gradient(ellipse 80% 80% at 20% 20%,rgba(14,165,233,.13) 0%,transparent 60%),radial-gradient(ellipse 60% 60% at 80% 80%,rgba(99,102,241,.1) 0%,transparent 60%);pointer-events:none;z-index:0}
.bg-dots{position:fixed;inset:0;background-image:radial-gradient(var(--border) 1px,transparent 1px);background-size:28px 28px;opacity:.4;pointer-events:none;z-index:0}

/* Login card */
.login-wrap{position:relative;z-index:1;display:grid;grid-template-columns:480px 420px;border-radius:24px;overflow:hidden;box-shadow:0 24px 80px rgba(0,0,0,.18);margin:20px;animation:fadeUp .65s cubic-bezier(.34,1.56,.64,1) forwards}

/* Left panel */
.left-panel{background:linear-gradient(145deg,#0f2b44,var(--brand-blue) 45%,#2d5a8a);padding:52px 48px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden;color:#fff}
.cross-pattern{position:absolute;inset:0;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:40px 40px;pointer-events:none}
.brand{position:relative;z-index:1}
.brand-icon{width:52px;height:52px;background:rgba(255,255,255,.15);border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:22px;margin-bottom:16px;backdrop-filter:blur(8px)}
.brand h1{font-size:26px;font-weight:900;color:#fff;margin:0 0 10px}
.brand p{font-size:13.5px;color:rgba(255,255,255,.75);line-height:1.6;margin:0}
.features{display:flex;flex-direction:column;gap:14px;position:relative;z-index:1}
.feat{display:flex;align-items:center;gap:12px}
.feat-icon{width:34px;height:34px;background:rgba(255,255,255,.12);border-radius:9px;display:flex;align-items:center;justify-content:center;font-size:13px;color:rgba(255,255,255,.9);flex-shrink:0}
.feat-text{font-size:13px;color:rgba(255,255,255,.85);font-weight:500}
.left-footer{font-size:11.5px;color:rgba(255,255,255,.45);position:relative;z-index:1}

/* Right panel */
.right-panel{background:var(--bg-card);padding:48px 44px;display:flex;flex-direction:column;justify-content:center;position:relative;transition:background .3s}
.theme-btn{position:absolute;top:20px;right:20px;width:36px;height:36px;border-radius:10px;border:1.5px solid var(--border);background:var(--bg-input);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--text-muted);transition:all .2s}
.theme-btn:hover{border-color:var(--primary);color:var(--primary)}
.form-head{margin-bottom:28px}
.form-head h2{font-size:26px;font-weight:900;color:var(--text-main);margin:0 0 6px}
.form-head p{font-size:13.5px;color:var(--text-muted);margin:0}

/* Input */
.input-wrap{position:relative}
.input-wrap .form-input{padding-left:42px;padding-right:40px}
.input-icon{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:var(--text-muted);font-size:14px;pointer-events:none}
.pw-toggle{position:absolute;right:12px;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;color:var(--text-muted);font-size:14px;padding:4px;transition:color .2s}
.pw-toggle:hover{color:var(--primary)}

/* Extras row */
.form-extras{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;font-size:13px}
.remember{display:flex;align-items:center;gap:6px;cursor:pointer;color:var(--text-muted);font-weight:500}
.remember input{accent-color:var(--primary)}
.forgot{color:var(--primary);font-weight:600;text-decoration:none;transition:opacity .2s}
.forgot:hover{opacity:.75}

/* Login button */
.btn-login{width:100%;padding:13px 20px;background:linear-gradient(135deg,#1d4ed8,#2563eb);color:#fff;border:none;border-radius:12px;font-size:15px;font-weight:800;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;transition:all .22s;box-shadow:0 4px 16px rgba(37,99,235,.3);margin-bottom:24px;font-family:inherit}
.btn-login:hover{transform:translateY(-1px);box-shadow:0 6px 24px rgba(37,99,235,.4)}
.btn-login:active{transform:translateY(0)}
.btn-login:disabled{opacity:.7;cursor:not-allowed;transform:none}
.spin{width:18px;height:18px;border:2.5px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:none}

/* Alert */
.alert-box{padding:11px 15px;border-radius:10px;margin-bottom:18px;font-size:13px;font-weight:600;display:flex;align-items:center;gap:9px}
.alert-error{background:#fff1f2;border:1.5px solid #fecaca;color:#e11d48}
.alert-success{background:#f0fdf4;border:1.5px solid #bbf7d0;color:#16a34a}

/* Divider */
.divider{display:flex;align-items:center;gap:10px;margin-bottom:16px;color:var(--text-muted);font-size:12px;font-weight:600}
.divider::before,.divider::after{content:'';flex:1;height:1px;background:var(--border)}

/* Demo cards */
.demo-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px}
.demo-card{padding:11px 8px;background:var(--bg-input);border:1.5px solid var(--border);border-radius:10px;cursor:pointer;text-align:center;transition:all .22s;display:flex;flex-direction:column;align-items:center;gap:3px}
.demo-card:hover{border-color:var(--primary);background:var(--primary-lt);transform:translateY(-2px)}
.demo-icon{font-size:22px;line-height:1}
.demo-role{font-size:12px;font-weight:800;color:var(--text-main)}
.demo-email{font-size:10.5px;color:var(--text-muted);font-weight:500}

/* Responsive */
@media(max-width:960px){.login-wrap{grid-template-columns:1fr;max-width:440px}.left-panel{display:none}.right-panel{padding:40px 32px}}

/* ── RESPONSIVE ─────────────────────────────────────────────────────── */
@media(max-width:768px){
  .main-content,.main-mount{margin-left:0}
  .sidebar{transform:translateX(-100%);transition:transform .3s}
  .sidebar.open{transform:translateX(0)}
  .kpi-strip,.stat-grid,.cash-grid{grid-template-columns:1fr 1fr}
  .billing-grid{grid-template-columns:1fr}
  .vitals-row{grid-template-columns:repeat(3,1fr)}
  .opd-shell{flex-direction:column;height:auto}
}

/* ═══════════════════════════════════════════════════════════════════
   MISSING CLASSES — Added after audit of org.html + app.js output
   These are the exact class names generated by app.js sidebar/header
   ═══════════════════════════════════════════════════════════════════ */

/* ── SIDEBAR (exact names from app.js buildSidebar()) ──────────── */
.sidebar-brand {
  padding: 18px 16px 14px;
  display: flex; align-items: center; gap: 11px;
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg,#1d4ed8,#3b82f6,#6366f1);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 4px 14px rgba(59,130,246,.4);
  transition: all .4s var(--spring);
  overflow: hidden;
}
.brand-mark:hover { transform: scale(1.08) rotate(-5deg); }
.brand-mark img   { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.brand-text h2    { font-size: 13px; font-weight: 800; color: #f0f6ff; letter-spacing: -.2px; }
.brand-text span  { font-size: 10px; color: #475569; margin-top: 1px; display: block; }

.sidebar-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.sidebar-nav::-webkit-scrollbar { width: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.07); }

.nav-group { margin-bottom: 4px; }
.nav-group-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: #334155;
  padding: 10px 12px 4px; display: block;
}

.sidebar-footer { padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.05); }

/* ── USER PILL (exact names from app.js) ────────────────────────── */
.user-pill-avatar {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(135deg,#1d4ed8,#6366f1); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
  box-shadow: 0 2px 8px rgba(37,99,235,.35);
}
.user-pill-info   { flex: 1; min-width: 0; }
.user-pill-name   { font-size: 12px; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill-role   { font-size: 10px; margin-top: 1px; }
.user-pill-logout {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: rgba(255,255,255,.06); color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; transition: all .2s;
}
.user-pill-logout:hover { background: rgba(239,68,68,.15); color: #f87171; }

/* ── HEADER (exact names from app.js buildHeader()) ─────────────── */
.header-title    { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; font-weight: 800; color: var(--text); letter-spacing: -.3px; }
.header-subtitle { font-size: 11px; color: var(--text-muted); margin-top: 1px; }
.header-actions  { display: flex; align-items: center; gap: 8px; }

/* Search box in header */
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box i {
  position: absolute; left: 11px; color: var(--text-muted); font-size: 12px; pointer-events: none;
}
.search-box input {
  height: 36px; padding: 0 14px 0 34px; border: 1.5px solid var(--border);
  border-radius: 10px; background: var(--bg-input); color: var(--text);
  font-size: 13px; outline: none; width: 190px; transition: var(--tr);
  font-family: inherit;
}
.search-box input:focus {
  border-color: var(--primary); width: 230px; background: var(--bg-card);
}

/* Branch switcher in header */
.branch-switcher    { position: relative; }
.branch-switch-btn  {
  display: flex; align-items: center; gap: 7px;
  background: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: 9px; padding: 6px 12px; cursor: pointer;
  font-size: 12.5px; font-weight: 800; color: var(--text);
  font-family: inherit; transition: all .15s; max-width: 200px;
}
.branch-switch-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── MODAL HEADER & FOOTER (app uses modal-header / modal-footer) ── */
.modal-header {
  padding: 18px 22px; border-bottom: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg,var(--primary-lt),var(--bg-card));
}
.modal-footer {
  padding: 14px 22px; border-top: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: flex-end;
  gap: 8px; background: var(--bg-input);
}
/* modal-lg wider variant */
.modal-lg { max-width: 680px; }

/* ── BRANCH COMPARISON CARDS ────────────────────────────────────── */
.bcc-name {
  font-size: 14px; font-weight: 800; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bcc-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; margin-bottom: 12px; }
.bcc-kpis {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.bcc-kpi { }
.bcc-kpi-lbl {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-muted); margin-bottom: 2px;
}
.bcc-kpi-val {
  font-size: 18px; font-weight: 900; font-family: 'JetBrains Mono', monospace;
  color: var(--text); line-height: 1.1;
}
.bcc-trend { font-size: 10.5px; margin-top: 2px; }

/* Trend colours */
.trend-up   { color: #16a34a; font-weight: 700; }
.trend-down { color: #dc2626; font-weight: 700; }
.trend-flat { color: var(--text-muted); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   PATCH 2 — Missing classes found by full 6-file source audit
   ═══════════════════════════════════════════════════════════════════ */

/* sidebar-mount & header-mount — invisible mount points */
#sidebar-mount, #header-mount { display: contents; }

/* ── KPI ICON COLOUR VARIANTS (sa-billing uses si-*) ────────────── */
.si-blue   { background: #eff6ff; color: #2563eb; }
.si-green  { background: #d1fae5; color: #059669; }
.si-orange { background: #ffedd5; color: #d97706; }
.si-red    { background: #fee2e2; color: #dc2626; }

/* ── BADGE COLOUR VARIANTS ──────────────────────────────────────── */
.badge-blue { background: #dbeafe; color: #1d4ed8; border-radius: 6px; padding: 2px 7px; font-size: 10px; font-weight: 800; display: inline-block; }
.badge-gray { background: #f1f5f9; color: #475569; border-radius: 6px; padding: 2px 7px; font-size: 10px; font-weight: 800; display: inline-block; }

/* ── CARD HEADER (used in sa-email, sa-announcements, audit etc) ─ */
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; border-bottom: 1.5px solid var(--border);
  gap: 10px; flex-wrap: wrap;
}
.card-header .card-title { margin-bottom: 0; }

/* ── FORM GRID 2-COL (sa-billing plan editor) ───────────────────── */
.form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

/* ── BAR CHART VALUE LABEL ──────────────────────────────────────── */
.bar-val {
  font-size: 11.5px; font-weight: 800; color: var(--text-muted);
  white-space: nowrap; min-width: 48px; text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

/* ── LOADER WRAPPER ─────────────────────────────────────────────── */
.loader {
  display: flex; align-items: center; justify-content: center;
  padding: 32px; color: var(--text-muted);
}

/* ── LOADING TEXT (sa-analytics chart placeholders) ─────────────── */
.loading-text {
  text-align: center; padding: 24px; color: var(--text-muted);
  font-size: 13px;
}

/* ── MODAL-MD (audit compliance modal, narrower than modal-lg) ──── */
.modal-md { max-width: 560px; }

/* ── PAGINATION (audit log) ─────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 12px 16px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.pagination button {
  width: 34px; height: 34px; border-radius: 8px; border: 1.5px solid var(--border);
  background: var(--bg-card); color: var(--text-muted); font-size: 13px;
  font-weight: 700; cursor: pointer; transition: all .15s; font-family: inherit;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-lt); }
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:disabled { opacity: .35; cursor: default; }

/* ── TABLE WRAP (audit page) ────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

/* ── RECIP ITEM (sa-email recipient list) ───────────────────────── */
.recip-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-bottom: 1px solid var(--border-lt);
  cursor: pointer; transition: background .12s;
}
.recip-item:hover { background: var(--bg-hover); }
.recip-item input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; cursor: pointer;
}

/* ── SA-KPI-SUB (sa-analytics sub-label) ────────────────────────── */
.sa-kpi-sub {
  font-size: 11.5px; color: var(--text-muted); margin-top: 5px;
}

/* ── CUSTOM PLAN NAME ROW (sa-billing — JS toggled show/hide) ───── */
#customNameRow { display: none; }

/* ── USAGE TABLE — column widths + mini-bar fix ─────────────────── */
.mini-bar-wrap { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.mini-bar      { width:60px; flex-shrink:0; height:8px; border-radius:4px; background:var(--bg-input); overflow:hidden; }
.mini-bar-fill { height:100%; border-radius:4px; transition:width .5s ease; }

.usage-table th:nth-child(1), .usage-table td:nth-child(1) { min-width:180px; }
.usage-table th:nth-child(2), .usage-table td:nth-child(2) { width:90px; }
.usage-table th:nth-child(3), .usage-table td:nth-child(3) { width:80px; text-align:center; }
.usage-table th:nth-child(4), .usage-table td:nth-child(4) { width:90px; text-align:center; }
.usage-table th:nth-child(5), .usage-table td:nth-child(5) { width:100px; text-align:center; }
.usage-table th:nth-child(6), .usage-table td:nth-child(6) { width:150px; }
.usage-table th:nth-child(7), .usage-table td:nth-child(7) { width:110px; }

/* ── HOSPITAL DETAIL DRAWER ───────────────────────────────── */
.dr-tab{padding:6px 14px;border-radius:8px;border:none;font-size:12px;font-weight:700;cursor:pointer;color:rgba(255,255,255,.6);background:rgba(255,255,255,.08);transition:all .2s;display:inline-flex;align-items:center;gap:6px;}
.dr-tab.active{background:rgba(255,255,255,.2);color:#fff;}
.dr-tab:hover:not(.active){background:rgba(255,255,255,.12);color:#fff;}
.drawer-tab-pane{}
.dr-stat{background:var(--bg-input);border-radius:10px;padding:12px 14px;text-align:center;}
.dr-stat-val{font-size:20px;font-weight:900;font-family:'JetBrains Mono',monospace;color:var(--text);line-height:1;margin-bottom:3px;}
.dr-stat-lbl{font-size:10.5px;text-transform:uppercase;letter-spacing:.4px;color:var(--text-muted);font-weight:700;}
.dr-stat-lg{padding:14px 16px;}
.dr-stat-lg .dr-stat-val{font-size:22px;}
.team-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.team-row:last-child{border-bottom:none;}
.team-avatar{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:900;flex-shrink:0;}
.act-btn-view{background:var(--primary-lt)!important;color:var(--primary)!important;border-color:var(--primary-mid)!important;font-weight:800!important;}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — stats-grid, stat-info, stat-icon, quick actions,
   recent patients, alert dots, animations
   (Appended — no existing rules removed)
   ═══════════════════════════════════════════════════════════════ */

/* ── Dashboard stats grid ───────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .stats-grid { grid-template-columns: 1fr; } }

/* stat-card inner layout */
.stat-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.stat-info { flex: 1; min-width: 0; }
.stat-label {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  color: var(--text);
  margin-bottom: 6px;
}
.stat-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-sub .up { color: #16a34a; font-weight: 700; }

/* ── Stat icon (coloured circle, top-right of card) ─────────── */
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.si-blue   { background: #eff6ff; color: #2563eb; }
.si-green  { background: #d1fae5; color: #059669; }
.si-orange { background: #ffedd5; color: #d97706; }
.si-red    { background: #fee2e2; color: #dc2626; }
.si-purple { background: #f5f3ff; color: #7c3aed; }
.si-teal   { background: #f0fdfa; color: #0d9488; }
.si-rose   { background: #fff1f2; color: #e11d48; }
.si-indigo { background: #eef2ff; color: #4338ca; }
.si-amber  { background: #fffbeb; color: #d97706; }

/* ── Card accent stripe per stat type ───────────────────────── */
.stat-card.anim-1::after { background: linear-gradient(90deg,#1e40af,#3b82f6); }
.stat-card.anim-2::after { background: linear-gradient(90deg,#6d28d9,#8b5cf6); }
.stat-card.anim-3::after { background: linear-gradient(90deg,#047857,#10b981); }
.stat-card.anim-4::after { background: linear-gradient(90deg,#b45309,#f59e0b); }

/* ── Staggered fade-up entrance animations ──────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.stat-card.anim-1 { animation: fadeUp .45s .05s ease both; }
.stat-card.anim-2 { animation: fadeUp .45s .12s ease both; }
.stat-card.anim-3 { animation: fadeUp .45s .19s ease both; }
.stat-card.anim-4 { animation: fadeUp .45s .26s ease both; }

/* ── Quick actions grid ─────────────────────────────────────── */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px 18px 18px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  transition: all .18s;
  cursor: pointer;
}
.quick-item i { font-size: 18px; color: var(--primary); }
.quick-item:hover {
  border-color: var(--primary-mid);
  background: var(--primary-lt);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(14,165,233,.12);
}

/* ── Recent patients row ────────────────────────────────────── */
.p-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background .12s;
}
.p-row:hover { background: var(--bg-hover); }
.p-row:last-child { border-bottom: none; }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-lt);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.patient-info-name { font-size: 13px; font-weight: 700; color: var(--text); }
.patient-info-sub  { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }

/* ── Alert dot colour variants ──────────────────────────────── */
.alert-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.dot-info    { background: #3b82f6; }
.dot-warning { background: #f59e0b; }
.dot-warn    { background: #f59e0b; }
.dot-error   { background: #ef4444; }
.dot-danger  { background: #ef4444; }
.dot-success { background: #22c55e; }
.dot-default { background: #94a3b8; }

/* ── Utility helpers ────────────────────────────────────────── */
.fs-12  { font-size: 12px; }
.fs-11  { font-size: 11px; }
.up     { color: #16a34a; font-weight: 700; }
.down   { color: #e11d48; font-weight: 700; }
.text-muted { color: var(--text-muted); }

/* ── Branch context banner ──────────────────────────────────── */
#branchContextBanner {
  background: var(--primary-lt);
  border: 1.5px solid var(--primary-mid);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE PAGE — sched-sidebar, doc-*, avail-*, cal-*, time-*,
   appt-block inner, status variants, today/unavailable/break
   (Appended — no existing rules removed)
   ═══════════════════════════════════════════════════════════════ */

/* ── Schedule layout ────────────────────────────────────────── */
.sched-sidebar {
  width: 220px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
@media (max-width: 900px) {
  .sched-wrap    { flex-direction: column; height: auto; }
  .sched-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; overflow: visible; }
}

/* ── Doctor filter card ─────────────────────────────────────── */
.doc-filter-card,
.avail-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.doc-filter-card h4,
.avail-card h4 {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Doctor list item ───────────────────────────────────────── */
.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  border: 1.5px solid transparent;
  margin-bottom: 4px;
}
.doc-item:hover   { background: var(--bg-hover); }
.doc-item.active  { background: var(--primary-lt); border-color: var(--primary-mid); }
.doc-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.doc-info { min-width: 0; }
.dn {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ── Availability card rows ─────────────────────────────────── */
.avail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
}
.avail-row:last-child { border-bottom: none; }
.avail-row span:first-child { color: var(--text-muted); }

/* ── Calendar navigation ────────────────────────────────────── */
.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cal-nav button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all .15s;
}
.cal-nav button:hover { border-color: var(--primary); color: var(--primary); }
.cal-week-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  padding: 0 4px;
  white-space: nowrap;
}

/* ── Calendar grid container ────────────────────────────────── */
.cal-grid {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Day column headers ─────────────────────────────────────── */
.cal-day-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  border-left: 1px solid var(--border);
  min-height: 56px;
}
.cal-day-col.today { background: var(--primary-lt); }
.cal-day-col.unavailable { background: var(--bg-input); opacity: .6; }
.day-name {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.day-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}
.cal-day-col.today .day-num {
  color: var(--primary);
  background: var(--primary);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* ── Time row + label ───────────────────────────────────────── */
.time-row {
  display: contents; /* lets children participate in the time-grid columns */
}
.time-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-right: 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-right: 1px solid var(--border);
  user-select: none;
}

/* ── Time slot states ───────────────────────────────────────── */
.time-slot.break         { background: repeating-linear-gradient(45deg,transparent,transparent 4px,rgba(0,0,0,.03) 4px,rgba(0,0,0,.03) 8px); cursor: not-allowed; }
.time-slot.outside-hours { background: var(--bg-input); opacity: .5; cursor: default; }

/* ── Appointment block inner elements ───────────────────────── */
.ab-time {
  font-size: 10px;
  font-weight: 700;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ab-name {
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.ab-type {
  font-size: 10px;
  opacity: .7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Additional status variants ─────────────────────────────── */
.status-no_show  { background: rgba(185,28,28,.12); border-color: #b91c1c; color: #b91c1c; }
.status-no-show  { background: rgba(185,28,28,.12); border-color: #b91c1c; color: #b91c1c; }
.status-cancelled{ background: rgba(100,116,139,.1); border-color: #94a3b8; color: #64748b; }
.status-pending  { background: rgba(245,158,11,.12); border-color: #f59e0b; color: #b45309; }

/* ── Today / unavailable cell highlights ────────────────────── */
.cal-day-col.today .time-slot:not(.outside-hours):not(.break) {
  background: rgba(14,165,233,.03);
}
.cal-day-col.today .time-slot:hover { background: rgba(14,165,233,.1); }

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE MISSING CSS — All pages, all classes
   Auto-generated from full scan of 50 HTML files
   ═══════════════════════════════════════════════════════════════ */

/* ── Missing CSS Variables ──────────────────────────────────── */
:root {
  --c:              #0ea5e9;
  --muted:          #64748b;
  --card:           #ffffff;
  --accent:         #0ea5e9;
  --pri:            #0ea5e9;
  --info:           #0ea5e9;
  --info-lt:        #e0f2fe;
  --success:        #16a34a;
  --success-lt:     #dcfce7;
  --warning:        #d97706;
  --warning-lt:     #fef3c7;
  --danger-lt:      #fee2e2;
  --danger-mid:     #fca5a5;
  --teal:           #0d9488;
  --teal-lt:        #f0fdfa;
  --teal-dk:        #0f766e;
  --blue:           #2563eb;
  --cd:             #0ea5e9;
  --shadow-sm:      0 1px 4px rgba(0,0,0,.06);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --text:           #0f172a;
  --shadow:         0 2px 8px rgba(0,0,0,.08);
}
[data-theme="dark"] {
  --c:        #38bdf8;
  --muted:    #94a3b8;
  --card:     #1e293b;
  --teal:     #2dd4bf;
  --teal-lt:  #134e4a;
  --teal-dk:  #5eead4;
  --blue:     #60a5fa;
  --text:     #f1f5f9;
}

/* ═══════════════════════════════════════════════════════════════
   TOKEN DISPLAY (tv = token viewer / TV display mode)
   ═══════════════════════════════════════════════════════════════ */
.shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #f1f5f9;
  font-family: 'Plus Jakarta Sans', sans-serif;
  overflow: hidden;
}
.tv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 36px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.clinic-name   { font-size: 22px; font-weight: 900; color: #f8fafc; }
.clinic-tagline{ font-size: 13px; color: #94a3b8; margin-top: 2px; }
.header-right  { text-align: right; }
.live-clock    { font-size: 32px; font-weight: 900; font-family: 'JetBrains Mono',monospace; color: #38bdf8; }
.live-date     { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.tv-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  overflow: hidden;
}
.now-serving {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: rgba(14,165,233,.05);
  border-right: 1px solid rgba(255,255,255,.06);
}
.ns-label  { font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #94a3b8; margin-bottom: 16px; }
.ns-token  { font-size: 120px; font-weight: 900; font-family: 'JetBrains Mono',monospace; color: #38bdf8; line-height: 1; text-shadow: 0 0 60px rgba(56,189,248,.4); }
.ns-name   { font-size: 26px; font-weight: 800; color: #f8fafc; margin-top: 16px; }
.ns-dept   { font-size: 16px; color: #94a3b8; margin-top: 4px; }
.ns-doc    { font-size: 14px; color: #60a5fa; margin-top: 4px; }

.queue-side       { display: flex; flex-direction: column; padding: 20px; overflow: hidden; }
.queue-side-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #64748b; margin-bottom: 12px; }
.token-grid       { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.token-card       { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; transition: all .2s; }
.token-card:first-child { background: rgba(14,165,233,.15); border-color: rgba(56,189,248,.3); }
.token-info    { flex: 1; min-width: 0; }
.token-meta    { font-size: 10px; color: #64748b; margin-top: 2px; }
.token-patient { font-size: 13px; font-weight: 700; color: #f1f5f9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-status  { font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 20px; }
.token-num     { width: 44px; height: 44px; border-radius: 10px; background: rgba(56,189,248,.15); color: #38bdf8; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; font-family: 'JetBrains Mono',monospace; flex-shrink: 0; }
.st-scheduled  { background: rgba(14,165,233,.2); color: #38bdf8; }
.st-confirmed  { background: rgba(34,197,94,.2); color: #4ade80; }
.st-in_progress{ background: rgba(249,115,22,.2); color: #fb923c; }
.st-completed  { background: rgba(100,116,139,.2); color: #94a3b8; }
.st-no_show    { background: rgba(239,68,68,.2); color: #f87171; }

.tv-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 36px;
  background: rgba(0,0,0,.2);
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: 12.5px;
  flex-shrink: 0;
}
.footer-msg         { color: #94a3b8; display: flex; align-items: center; gap: 8px; }
.refresh-indicator  { display: flex; align-items: center; gap: 6px; color: #4ade80; font-size: 11px; font-weight: 700; }
.refresh-dot        { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; animation: pulse 2s infinite; }

.config-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.config-overlay.open, .config-overlay[style*="flex"] { display: flex; }
.config-box {
  background: #1e293b;
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 20px;
  padding: 32px;
  width: 420px;
  max-width: 90vw;
}
.config-box h2   { font-size: 18px; font-weight: 900; color: #f8fafc; margin-bottom: 20px; }
.config-field    { margin-bottom: 14px; }
.config-field label { font-size: 11.5px; font-weight: 700; color: #94a3b8; display: block; margin-bottom: 5px; }
.config-input    { width: 100%; padding: 9px 12px; border-radius: 8px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: #f1f5f9; font-size: 13px; font-family: inherit; box-sizing: border-box; }
.config-btn      { width: 100%; padding: 12px; border-radius: 10px; border: none; background: #0ea5e9; color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; font-family: inherit; margin-top: 8px; transition: background .15s; }
.config-btn:hover{ background: #0284c7; }

/* ═══════════════════════════════════════════════════════════════
   ONLINE BOOKING WIDGET (book.html) — uses Outfit font, no sidebar
   ═══════════════════════════════════════════════════════════════ */
body:not(.app-layout) {
  background: #f0f9ff;
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  margin: 0;
  min-height: 100vh;
}
.page-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}
.clinic-header {
  text-align: center;
  padding: 28px 20px 20px;
  margin-bottom: 4px;
}
.bcard {
  background: #fff;
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  border: 1px solid #e0f2fe;
}

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0; transition: all .25s;
}
.step-dot.active  { background: #0ea5e9; color: #fff; box-shadow: 0 0 0 4px rgba(14,165,233,.2); }
.step-dot.done    { background: #16a34a; color: #fff; }
.step-dot.pending { background: #f1f5f9; color: #94a3b8; border: 2px solid #e2e8f0; }
.step-label { font-size: 10.5px; font-weight: 700; color: #94a3b8; text-align: center; white-space: nowrap; }
.step-line {
  flex: 1; height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
  margin-bottom: 16px; /* align with dots */
  transition: background .25s;
}
.step-line.done { background: #16a34a; }

/* Booking form fields */
.fld  { margin-bottom: 14px; }
.lbl  { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #64748b; display: block; margin-bottom: 5px; }
.inp  {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 14px; font-family: inherit;
  background: #f8fafc; color: #0f172a;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.inp:focus { outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14,165,233,.12); background: #fff; }

/* Doctor selector grid */
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.doc-card {
  padding: 14px;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  background: #f8fafc;
}
.doc-card:hover   { border-color: #0ea5e9; background: #f0f9ff; }
.doc-card.selected{ border-color: #0ea5e9; background: #e0f2fe; }
.doc-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900;
  margin: 0 auto 8px;
}

/* Time slots grid */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.slot {
  padding: 8px 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9px;
  font-size: 12.5px; font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: #f8fafc;
}
.slot:hover     { border-color: #0ea5e9; background: #f0f9ff; }
.slot.selected  { border-color: #0ea5e9; background: #0ea5e9; color: #fff; }
.slot.taken     { background: #f1f5f9; color: #cbd5e1; border-color: #e2e8f0; cursor: not-allowed; text-decoration: line-through; }

/* Booking button */
.btn-c {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: #fff; border: none;
  border-radius: 12px;
  font-size: 15px; font-weight: 800;
  cursor: pointer; font-family: inherit;
  position: relative; overflow: hidden;
  margin-top: 8px; transition: all .2s;
  box-shadow: 0 4px 14px rgba(14,165,233,.3);
}
.btn-c:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,.4); }
.btn-shine {
  position: absolute; top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  animation: shine 2.5s infinite;
}
@keyframes shine {
  0%   { left: -100%; }
  100% { left: 200%; }
}
.btn-ghost {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc; color: #64748b;
  border-radius: 12px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.btn-ghost:hover { border-color: #94a3b8; background: #f1f5f9; }

/* OTP boxes */
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 16px 0; }
.otp-b {
  width: 48px; height: 56px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 22px; font-weight: 900;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  transition: all .15s; background: #f8fafc;
}
.otp-b:focus { outline: none; border-color: #0ea5e9; background: #fff; box-shadow: 0 0 0 3px rgba(14,165,233,.15); }

/* Confirmation card */
.conf-card  { text-align: center; padding: 8px; }
.conf-icon  { font-size: 56px; margin-bottom: 12px; }
.conf-detail{
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 16px;
  margin: 20px 0 16px;
  text-align: left;
}
.conf-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #dcfce7; font-size: 13.5px; }
.conf-row:last-child { border-bottom: none; }
.conf-row span { color: #166534; }

/* Alert variants */
.alert       { padding: 10px 14px; border-radius: 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.alert-r, .alert-red   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.alert-g, .alert-green { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-red   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.alert-green { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-blue  { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* Spin loader */
.spin {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   SCHEDULE — Fix appointment overlap + improve block layout
   ═══════════════════════════════════════════════════════════════ */

/* Override: time-slot needs to stack blocks vertically, not overlap */
.time-slot {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  padding: 1px !important;
  box-sizing: border-box !important;
  vertical-align: top !important;
}

/* Appointment block: relative (not absolute) so they stack */
.appt-block {
  position: relative !important;
  left: auto !important; right: auto !important; top: auto !important;
  width: calc(100% - 4px) !important;
  margin: 1px 2px !important;
  border-radius: 6px !important;
  padding: 3px 6px !important;
  font-size: 10.5px !important;
  cursor: pointer !important;
  z-index: 5 !important;
  overflow: hidden !important;
  border-left: 3px solid !important;
  flex-shrink: 0 !important;
  transition: opacity .15s !important;
}
.appt-block:hover { opacity: .85; }

/* When multiple slots in same cell — give the cell auto height */
.time-slot:has(.appt-block) { min-height: auto; }

/* ═══════════════════════════════════════════════════════════════
   BADGE COLOUR VARIANTS
   ═══════════════════════════════════════════════════════════════ */
.badge-green  { background: #dcfce7; color: #166534; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }
.badge-red    { background: #fee2e2; color: #b91c1c; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }
.badge-orange { background: #ffedd5; color: #c2410c; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }
.badge-teal   { background: #ccfbf1; color: #0f766e; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }
.badge-purple { background: #f5f3ff; color: #6d28d9; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }
.badge-yellow { background: #fef9c3; color: #854d0e; border-radius: 6px; padding: 2px 8px; font-size: 10.5px; font-weight: 800; display: inline-block; }

/* ═══════════════════════════════════════════════════════════════
   SHARED LAYOUT HELPERS
   ═══════════════════════════════════════════════════════════════ */
.card-link { font-size: 12px; font-weight: 700; color: var(--primary); text-decoration: none; opacity: .8; }
.card-link:hover { opacity: 1; }
.section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 12px; }
.section-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.form-hint     { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-sub      { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.form-title    { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.form-grid-3   { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.form-grid-4   { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
@media (max-width:900px) { .form-grid-3,.form-grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width:600px) { .form-grid-3,.form-grid-4 { grid-template-columns: 1fr; } }
.w-full        { width: 100%; }
.fw-600        { font-weight: 600; }
.form-control-sm { padding: 6px 10px; font-size: 12.5px; }
.input-group   { display: flex; gap: 0; }
.input-group .form-control { border-radius: 0; }
.input-group .form-control:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.input-group .form-control:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.tab-row  { display: flex; gap: 4px; padding: 4px; background: var(--bg-input); border-radius: 12px; margin-bottom: 16px; }
.tab-pill {
  flex: 1; padding: 8px 14px; border-radius: 9px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  background: transparent; color: var(--text-muted); transition: all .18s;
}
.tab-pill.active { background: var(--bg-card); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tab-count { background: var(--primary-lt); color: var(--primary); border-radius: 20px; padding: 1px 7px; font-size: 10.5px; font-weight: 800; margin-left: 4px; }
.sort-select { padding: 7px 10px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg-input); color: var(--text); font-size: 12.5px; font-family: inherit; cursor: pointer; }
.avatar-sm { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; }
.chip-blue  { background: #dbeafe; color: #1d4ed8; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; display: inline-block; }
.chip-green { background: #dcfce7; color: #166534; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; display: inline-block; }
.chip-red   { background: #fee2e2; color: #b91c1c; border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; display: inline-block; }
.btn-icon   { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg-input); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; transition: all .15s; }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }
.btn-gray   { background: var(--bg-input); border: 1.5px solid var(--border); color: var(--text); padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; font-family: inherit; }
.btn-teal   { background: var(--teal); color: #fff; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; border: none; font-family: inherit; }
.btn-main   { background: var(--primary); color: #fff; padding: 10px 20px; border-radius: 10px; font-weight: 800; font-size: 14px; cursor: pointer; border: none; font-family: inherit; }
.btn-back   { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; padding: 4px; }
.link-btn   { background: none; border: none; color: var(--primary); font-weight: 700; cursor: pointer; font-size: 13px; font-family: inherit; text-decoration: underline; }
.page-btn   { width: 32px; height: 32px; border-radius: 8px; border: 1.5px solid var(--border); background: var(--bg-input); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.page-info  { font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   KPI COLOUR CHIPS (sa-billing, analytics)
   ═══════════════════════════════════════════════════════════════ */
.k-blue   { --c1:#1e40af;--c2:#3b82f6; }
.k-green  { --c1:#047857;--c2:#10b981; }
.k-amber  { --c1:#b45309;--c2:#f59e0b; }
.k-violet { --c1:#6d28d9;--c2:#8b5cf6; }
.k-teal   { --c1:#0f766e;--c2:#2dd4bf; }
.blue  { color: #2563eb; }
.teal  { color: #0d9488; }
.orange{ color: #d97706; }

/* ═══════════════════════════════════════════════════════════════
   MISC PAGE ELEMENTS
   ═══════════════════════════════════════════════════════════════ */
.section-box       { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 16px; }
.section-box-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.summary-grid   { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.cd-block       { background: var(--bg-input); border-radius: 12px; padding: 16px; text-align: center; }
.cd-num         { font-size: 28px; font-weight: 900; color: var(--text); line-height: 1; }
.cd-unit        { font-size: 11px; color: var(--text-muted); margin-top: 4px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.priority-chip  { border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 800; display: inline-block; }
.results-count  { font-size: 12.5px; color: var(--text-muted); margin-bottom: 10px; }
.scope-tag      { background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 11.5px; font-weight: 700; display: inline-block; }
.search-dropdown{ position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border: 1.5px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md); z-index: 100; max-height: 280px; overflow-y: auto; }
.list-row       { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-light); cursor: pointer; transition: background .1s; }
.list-row:hover { background: var(--bg-hover); }
.list-row:last-child { border-bottom: none; }
.dept-row       { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-light); gap: 12px; }
.dept-row:last-child { border-bottom: none; }
.dept-code      { font-size: 11px; font-weight: 800; color: var(--text-muted); background: var(--bg-input); padding: 2px 8px; border-radius: 6px; }
.doctor-row     { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.doctor-row:last-child { border-bottom: none; }
.doc-icon       { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-lt); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.doc-av         { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-lt); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; flex-shrink: 0; }
.doc-name       { font-size: 13.5px; font-weight: 800; color: var(--text); }
.doc-spec, .dr-spec { font-size: 11.5px; color: var(--text-muted); }
.doc-fee        { font-size: 12px; font-weight: 700; color: var(--primary); }
.doc-reg        { font-size: 11px; color: var(--text-muted); }
.visit-timer    { font-size: 13px; font-weight: 700; color: var(--primary); font-family: 'JetBrains Mono',monospace; }
.close-visit-btn{ background: #ef4444; color: #fff; border: none; border-radius: 8px; padding: 6px 14px; font-weight: 700; font-size: 12px; cursor: pointer; }
.sidebar-card  { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.sidebar-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }
.add-btn       { background: var(--primary-lt); color: var(--primary); border: 1.5px dashed var(--primary-mid); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; width: 100%; text-align: center; margin-top: 8px; }
.add-btn:hover { background: var(--primary); color: #fff; }
.main-area     { flex: 1; min-width: 0; }
.wrap          { padding: 0; }
.split         { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .split { grid-template-columns: 1fr; } }
.code          { font-family: 'JetBrains Mono',monospace; font-size: 12px; background: var(--bg-input); padding: 2px 6px; border-radius: 5px; }

/* ═══════════════════════════════════════════════════════════════
   PRESCRIPTION / RX PRINT
   ═══════════════════════════════════════════════════════════════ */
.paper-wrap  { background: #e2e8f0; min-height: 100vh; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.paper       { background: #fff; width: 100%; max-width: 800px; min-height: 297mm; box-shadow: 0 4px 24px rgba(0,0,0,.12); border-radius: 4px; overflow: hidden; }
.print-toolbar { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
.no-print    { }
@media print { .no-print { display: none !important; } .paper-wrap { background: white; padding: 0; } .paper { box-shadow: none; } }
.ph-left,.ph-right { }
.ph-clinic   { font-size: 18px; font-weight: 900; }
.ph-name     { font-size: 13px; font-weight: 700; }
.ph-sub,.ph-mrn,.ph-logo { font-size: 11.5px; color: #64748b; }
.rx-body     { padding: 20px 28px; }
.rx-symbol   { font-size: 32px; font-weight: 900; color: #1e40af; font-family: serif; }
.rx-med-row  { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
.rx-med-row:last-child { border-bottom: none; }
.rx-med-name { font-size: 14px; font-weight: 800; }
.rx-med-detail { font-size: 12.5px; color: #64748b; }
.rx-footer   { padding: 20px 28px; border-top: 1px solid #e2e8f0; }
.sig-line    { border-bottom: 1.5px solid #000; width: 180px; margin-top: 36px; }
.watermark   { position: absolute; opacity: .04; font-size: 80px; font-weight: 900; transform: rotate(-25deg); pointer-events: none; }
.parties     { display: flex; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid #e2e8f0; }
.party-label { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: #94a3b8; margin-bottom: 4px; }
.party-name  { font-size: 15px; font-weight: 900; }
.party-sub   { font-size: 12px; color: #64748b; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════
   CONSULTATION PAGE
   ═══════════════════════════════════════════════════════════════ */
.patient-strip { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-header  { font-size: 16px; font-weight: 900; color: var(--text); }
.pname     { font-size: 14px; font-weight: 800; }
.psub      { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.pstat     { text-align: center; }
.pstat-val { font-size: 20px; font-weight: 900; }
.pstat-lbl { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 700; }
.vital-unit{ font-size: 10px; color: var(--text-muted); }
.diag-box  { background: var(--bg-input); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; }
.diag-label{ font-size: 11.5px; font-weight: 700; color: var(--text-muted); }
.diag-text { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 2px; }
.diag-icd  { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono',monospace; }
.med-row   { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.med-num   { width: 22px; height: 22px; border-radius: 6px; background: var(--primary-lt); color: var(--primary); font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.med-name  { font-size: 13.5px; font-weight: 800; color: var(--text); }
.med-dose-row { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.med-instr { font-size: 11.5px; color: var(--text-muted); }
.med-generic { font-size: 11px; color: var(--text-muted); font-style: italic; }
.advice-section { background: #fffbeb; border: 1.5px solid #fde68a; border-radius: 12px; padding: 14px; }
.advice-row { display: flex; align-items: flex-start; gap: 10px; padding: 4px 0; }
.advice-icon{ font-size: 14px; flex-shrink: 0; margin-top: 2px; }
.advice-text{ font-size: 13px; color: #78350f; }
.followup-box  { background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 12px; }
.followup-date { font-size: 20px; font-weight: 900; color: #166534; }
.followup-note { font-size: 12.5px; color: #166534; }
.timeline  { display: flex; flex-direction: column; }
.tl-label  { font-size: 12px; font-weight: 700; color: var(--text); }
.tl-time   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.last-visit-box{ background: var(--bg-input); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; }
.lv-label  { font-size: 11px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.allergy-pill { display: inline-block; background: #fee2e2; color: #b91c1c; border-radius: 20px; padding: 3px 10px; font-size: 11.5px; font-weight: 700; margin: 3px; }

/* ═══════════════════════════════════════════════════════════════
   PORTAL (patient-facing portal)
   ═══════════════════════════════════════════════════════════════ */
.portal-header { background: linear-gradient(135deg,#0f172a,#1e3a8a); color: #fff; padding: 20px 24px; }
.portal-main   { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 140px); }
.portal-nav    { background: var(--bg-card); border-right: 1.5px solid var(--border); padding: 16px 0; }
.portal-body   { padding: 20px 24px; }
.portal-stats  { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.pnav-item     { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); transition: background .12s; }
.pnav-item:hover,.pnav-item.active { background: var(--primary-lt); color: var(--primary); }
.pnav-badge    { background: var(--primary); color: #fff; border-radius: 20px; padding: 1px 7px; font-size: 10px; font-weight: 800; margin-left: auto; }
.ps-item,.ps-label,.ps-value { }
.ps-label      { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); font-weight: 700; }
.ps-value      { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.2; }

/* ═══════════════════════════════════════════════════════════════
   SHOP / E-COMMERCE
   ═══════════════════════════════════════════════════════════════ */
.shop-layout    { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.shop-logo      { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.shop-name      { font-size: 20px; font-weight: 900; color: var(--text); }
.shop-tagline   { font-size: 12.5px; color: var(--text-muted); }
.prod-img-wrap  { position: relative; border-radius: 12px; overflow: hidden; background: var(--bg-input); aspect-ratio: 1; }
.prod-img       { width: 100%; height: 100%; object-fit: cover; }
.prod-img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 32px; background: var(--bg-input); border-radius: 12px; aspect-ratio: 1; }
.prod-name      { font-size: 14px; font-weight: 800; color: var(--text); margin-top: 8px; }
.prod-price     { font-size: 16px; font-weight: 900; color: var(--primary); }
.prod-mrp       { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.prod-disc      { font-size: 11px; font-weight: 700; color: #16a34a; }
.prod-cat       { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; margin-bottom: 4px; }
.prod-body      { padding: 10px; }
.prod-footer    { padding: 10px; border-top: 1px solid var(--border-light); display: flex; align-items: center; justify-content: space-between; }
.prod-badge     { position: absolute; top: 8px; left: 8px; }
.prod-featured  { position: absolute; top: 8px; right: 8px; }
.prod-pricing   { display: flex; align-items: center; gap: 6px; }
.prod-rec       { font-size: 11px; color: var(--text-muted); }
.cart-drawer    { position: fixed; top: 0; right: -380px; width: 380px; height: 100vh; background: var(--bg-card); border-left: 1.5px solid var(--border); z-index: 500; transition: right .3s; display: flex; flex-direction: column; box-shadow: -8px 0 32px rgba(0,0,0,.1); }
.cart-drawer.open { right: 0; }
.cart-overlay   { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 499; display: none; }
.cart-overlay.open { display: block; }
.cart-head      { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-head-title{ font-size: 16px; font-weight: 900; }
.cart-items     { flex: 1; overflow-y: auto; padding: 12px; }
.cart-item      { display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--border-light); }
.cart-foot      { padding: 16px; border-top: 1px solid var(--border); }
.cart-total-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.cart-grand     { font-size: 18px; font-weight: 900; color: var(--text); }
.cart-count     { background: #ef4444; color: #fff; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; position: absolute; top: -4px; right: -4px; }
.cart-btn       { position: relative; }
.qty-ctrl       { display: flex; align-items: center; gap: 4px; }
.qty-btn        { width: 26px; height: 26px; border-radius: 6px; border: 1.5px solid var(--border); background: var(--bg-input); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; }
.qty-val        { font-size: 13px; font-weight: 800; min-width: 24px; text-align: center; }
.qty            { font-size: 12px; color: var(--text-muted); }
.price          { font-size: 15px; font-weight: 900; color: var(--primary); }
.discount       { color: #16a34a; font-size: 12px; font-weight: 700; }
.cat-header     { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); padding: 12px 0 8px; border-bottom: 1.5px solid var(--border); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.cat-icon       { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.cat-item       { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); transition: background .12s; }
.cat-item:hover,.cat-item.active { background: var(--primary-lt); color: var(--primary); }
.cat           { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.cat-badge     { background: var(--bg-input); border-radius: 20px; padding: 1px 7px; font-size: 10.5px; font-weight: 700; margin-left: auto; }
.ci-img        { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.ci-img-placeholder { width: 56px; height: 56px; border-radius: 10px; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.ci-name       { font-size: 13.5px; font-weight: 800; color: var(--text); }
.ci-price      { font-size: 14px; font-weight: 900; color: var(--primary); }
.ci-remove     { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; }
.checkout-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 600; display: none; align-items: center; justify-content: center; }
.checkout-overlay.open { display: flex; }
.checkout-box   { background: var(--bg-card); border-radius: 20px; padding: 28px; max-width: 480px; width: 90%; max-height: 85vh; overflow-y: auto; }
.checkout-btn   { width: 100%; padding: 14px; border-radius: 12px; background: var(--primary); color: #fff; border: none; font-size: 15px; font-weight: 800; cursor: pointer; font-family: inherit; }
.coupon-type-badge { border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 800; display: inline-block; }
.totals-box     { background: var(--bg-input); border-radius: 12px; padding: 14px; }
.sum-row,.total-row,.subtotal,.tax,.tr-tot { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.tr-tot,.total-row { font-size: 15px; font-weight: 900; border-top: 1.5px solid var(--border); padding-top: 10px; margin-top: 6px; }
.subtotal,.tax { color: var(--text-muted); }
.method-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.payment-box    { padding: 14px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; text-align: center; font-size: 13px; font-weight: 700; transition: all .15s; }
.payment-box.selected,.payment-box:hover { border-color: var(--primary); background: var(--primary-lt); }
.order-confirmed{ text-align: center; padding: 32px 20px; }
.success-screen { text-align: center; padding: 32px; }
.success-icon   { font-size: 64px; margin-bottom: 16px; }
.success-title  { font-size: 22px; font-weight: 900; }
.order-row      { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border-light); font-size: 13px; }
.order-row:last-child { border-bottom: none; }
.qr-box         { background: white; border-radius: 12px; padding: 12px; display: inline-block; margin: 8px auto; }
.upi-block      { background: var(--bg-input); border-radius: 12px; padding: 16px; text-align: center; }
.upi-box        { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 700; transition: all .15s; }
.upi-box:hover,.upi-box.selected { border-color: var(--primary); background: var(--primary-lt); }
.upi-id         { font-family: 'JetBrains Mono',monospace; font-size: 13px; font-weight: 700; }
.upi-amount     { font-size: 22px; font-weight: 900; color: var(--primary); }
.upi-qr         { text-align: center; }
.upi-status,.upi-name,.upi-info-label { font-size: 12px; color: var(--text-muted); }
.sg-item,.sg-val { }

/* ═══════════════════════════════════════════════════════════════
   BILLING / INVOICE PRINT
   ═══════════════════════════════════════════════════════════════ */
.inv-header  { padding: 20px 28px; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: flex-start; }
.inv-title   { font-size: 22px; font-weight: 900; }
.inv-status  { font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 20px; }
.inv-meta    { padding: 14px 28px; background: #f8fafc; border-bottom: 1px solid #e2e8f0; font-size: 12.5px; }
.inv-parties { padding: 16px 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; border-bottom: 1px solid #e2e8f0; }
.inv-body    { padding: 20px 28px; }
.inv-totals  { padding: 16px 28px; border-top: 2px solid #e2e8f0; background: #f8fafc; }
.inv-footer  { padding: 14px 28px; border-top: 1px solid #e2e8f0; font-size: 11.5px; color: #64748b; text-align: center; }
.bills-table,.items-table,.result-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bills-table th,.items-table th,.result-table th { background: #f8fafc; padding: 9px 12px; text-align: left; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: #64748b; border-bottom: 1.5px solid #e2e8f0; }
.bills-table td,.items-table td,.result-table td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
.bills-table tr:last-child td,.items-table tr:last-child td { border-bottom: none; }
.invoice     { background: #fff; }
.hosp-brand  { font-size: 18px; font-weight: 900; }
.hosp-name   { font-size: 14px; font-weight: 800; }
.hosp-contact,.hosp-tag { font-size: 11.5px; color: #64748b; }
.hosp-logo   { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.paid        { background: #dcfce7; color: #166534; border-radius: 6px; padding: 2px 9px; font-size: 11px; font-weight: 800; }
.item-desc   { font-size: 13px; }
.amt         { font-family: 'JetBrains Mono',monospace; font-size: 13px; font-weight: 700; }
.rep-header,.rep-footer { display: flex; justify-content: space-between; align-items: flex-start; padding: 16px 0; }
.rep-title   { font-size: 18px; font-weight: 900; }
.rep-sub,.rep-type,.rep-num { font-size: 12px; color: #64748b; }
.rep-right   { text-align: right; }
.rep-footer-left { font-size: 12px; color: #64748b; }

/* ═══════════════════════════════════════════════════════════════
   LAB RESULTS
   ═══════════════════════════════════════════════════════════════ */
.lab-list      { display: flex; flex-direction: column; gap: 8px; }
.labs-section  { margin-bottom: 20px; }
.lab-chip      { display: inline-block; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; }
.lab-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.test-name     { font-size: 13.5px; font-weight: 700; }
.test-search-wrap { position: relative; }
.result-val    { font-family: 'JetBrains Mono',monospace; font-weight: 800; }
.normal-range  { font-size: 11px; color: var(--text-muted); }
.results-bar   { display: flex; gap: 6px; margin-bottom: 12px; }
.results-section { margin-bottom: 20px; }

/* ═══════════════════════════════════════════════════════════════
   MISC REMAINING
   ═══════════════════════════════════════════════════════════════ */
.topbar        { background: var(--bg-card); border-bottom: 1.5px solid var(--border); padding: 10px 20px; }
.topbar-inner  { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topbar-search { flex: 1; max-width: 400px; }
.pcard         { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.pcard-head    { padding: 16px 18px; border-bottom: 1px solid var(--border-light); background: var(--bg-input); }
.pcard-title   { font-size: 14px; font-weight: 800; }
.pcard-body    { padding: 16px 18px; }
.photo-upload-wrap { position: relative; }
.photo-upload-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-upload-btn  { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 2px dashed var(--border); border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text-muted); transition: all .15s; }
.photo-upload-btn:hover { border-color: var(--primary); color: var(--primary); }
.photo-preview { width: 80px; height: 80px; border-radius: 10px; object-fit: cover; border: 2px solid var(--border); }
.doc-upload-zone { border: 2px dashed var(--border); border-radius: 12px; padding: 24px; text-align: center; cursor: pointer; transition: all .15s; }
.doc-upload-zone:hover { border-color: var(--primary); background: var(--primary-lt); }
.loader-full   { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.err-box       { background: #fff1f2; border: 1.5px solid #fca5a5; border-radius: 12px; padding: 16px; color: #b91c1c; font-size: 13px; }
.suc-box       { background: #f0fdf4; border: 1.5px solid #bbf7d0; border-radius: 12px; padding: 16px; color: #166534; font-size: 13px; }
.var-box       { background: var(--bg-input); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.option-pills  { display: flex; flex-wrap: wrap; gap: 6px; }
.option-pill   { padding: 5px 12px; border: 1.5px solid var(--border); border-radius: 20px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: all .15s; }
.option-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.feature-list  { display: flex; flex-direction: column; gap: 8px; }
.feat-dot      { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }
.sdot          { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.dots          { display: flex; gap: 4px; align-items: center; }
.countdown-wrap  { display: flex; align-items: center; justify-content: center; gap: 12px; }
.countdown-blocks{ display: flex; gap: 8px; }
.countdown-label { font-size: 10px; text-align: center; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.m-item   { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.m-item:last-child { border-bottom: none; }
.m-label  { font-size: 13px; color: var(--text-muted); }
.m-val    { font-size: 13px; font-weight: 700; color: var(--text); }
.balance  { font-size: 20px; font-weight: 900; }
.date-grid{ display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.date-cell{ aspect-ratio: 1; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; }
.date-cell:hover { background: var(--primary-lt); }
.date-cell.selected { background: var(--primary); color: #fff; }
.date-cell.today { border: 2px solid var(--primary); }
.sa-nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 16px; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); border-radius: 8px; transition: all .12s; }
.sa-nav-item:hover,.sa-nav-item.active { background: var(--primary-lt); color: var(--primary); }
.sa-section { margin-bottom: 28px; }
.totp-row   { display: flex; gap: 10px; justify-content: center; margin: 16px 0; }
.totp-boxes { display: flex; gap: 8px; }
.dr-bar-wrap{ display: flex; align-items: center; gap: 8px; }
.dr-bar     { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-input); overflow: hidden; }
.dr-bar-fill{ height: 100%; border-radius: 4px; background: var(--primary); transition: width .5s; }
.dr-rank    { font-size: 11px; font-weight: 800; color: var(--text-muted); min-width: 20px; }
.dr-name    { font-size: 13.5px; font-weight: 800; }
.dr-info    { min-width: 0; flex: 1; }
.dr-rev     { font-size: 12px; font-weight: 700; color: var(--primary); }
.bank-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bank-block { background: var(--bg-input); border-radius: 12px; padding: 16px; }
.bank-block-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }
.bank-key   { font-size: 11.5px; color: var(--text-muted); margin-bottom: 2px; }
.bank-val   { font-size: 14px; font-weight: 800; font-family: 'JetBrains Mono',monospace; }
.sline      { height: 1px; background: var(--border); margin: 12px 0; }
.foot       { padding: 16px 20px; border-top: 1px solid var(--border); }
.footer-brand{ font-size: 12px; color: var(--text-muted); }
.footer-txt  { font-size: 11px; color: var(--text-muted); }
.brand-name  { font-size: 18px; font-weight: 900; color: var(--text); }
.brand-sub   { font-size: 12px; color: var(--text-muted); }
.clinic-info { display: flex; align-items: center; gap: 12px; }
.clinic-logo,.clinic-logo-placeholder { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.clinic-badge{ border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 800; display: inline-block; }
.clinic-logo-placeholder { background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 20px; }
.org-pick-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 10px; cursor: pointer; transition: background .12s; border: 1.5px solid transparent; }
.org-pick-item:hover { background: var(--bg-hover); }
.org-pick-item.active { border-color: var(--primary); background: var(--primary-lt); }
.cb-name    { font-size: 13px; font-weight: 700; color: var(--text); }
.cb-sub     { font-size: 11.5px; color: var(--text-muted); }
.branch-dept-card   { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.branch-dept-header { background: var(--bg-input); padding: 10px 14px; font-size: 12px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.pay-section{ margin-bottom: 16px; }
.pay-label  { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-bottom: 8px; }
.pay-val    { font-size: 22px; font-weight: 900; color: var(--text); }
.clinical-card-body { padding: 14px 18px; }
.bed-type-chip { border-radius: 20px; padding: 4px 12px; font-size: 12px; font-weight: 700; display: inline-block; }
.bed-days   { font-size: 24px; font-weight: 900; color: var(--text); }
.ward-section { margin-bottom: 16px; }
.master-table { width: 100%; border-collapse: collapse; }
.med-pill   { display: inline-block; background: var(--primary-lt); color: var(--primary); border-radius: 20px; padding: 2px 9px; font-size: 11.5px; font-weight: 700; margin: 2px; }
.med-body   { padding: 0; }
.med-qty,.med-note { font-size: 12px; color: var(--text-muted); }
.med-stock  { font-size: 11px; font-weight: 700; }
.med-search-wrap { position: relative; }
.med-generic    { font-style: italic; color: var(--text-muted); font-size: 12px; }
.icd-wrap       { display: flex; flex-wrap: wrap; gap: 4px; }
.banner-avatar  { width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; }
.bg-orb,.bg-art { position: absolute; border-radius: 50%; pointer-events: none; }
.bg-orb-1   { width: 300px; height: 300px; background: rgba(14,165,233,.08); filter: blur(60px); top: -100px; right: -100px; }
.bg-orb-2   { width: 200px; height: 200px; background: rgba(139,92,246,.06); filter: blur(40px); bottom: -50px; left: -50px; }
.bg-orb-3   { width: 150px; height: 150px; background: rgba(34,197,94,.05); filter: blur(30px); top: 50%; right: 20%; }
.blob       { border-radius: 50%; filter: blur(50px); position: absolute; pointer-events: none; }
.hero       { position: relative; overflow: hidden; }
.lp-title   { font-size: 36px; font-weight: 900; line-height: 1.15; }
.lp-sub     { font-size: 16px; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }
.stat-value { font-size: 32px; font-weight: 900; }
.tbtn,.tbtn-g,.tbtn-p,.tbtn-ghost,.tbtn-primary { padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 800; cursor: pointer; border: none; font-family: inherit; transition: all .15s; }
.tbtn-primary,.tbtn-p { background: var(--primary); color: #fff; }
.tbtn-ghost,.tbtn-g   { background: var(--bg-input); color: var(--text); border: 1.5px solid var(--border); }
.tbtn-ghost:hover,.tbtn-g:hover { border-color: var(--primary); color: var(--primary); }
.rcb        { display: flex; align-items: center; gap: 8px; padding: 6px 0; cursor: pointer; font-size: 13px; }
.atab       { padding: 8px 16px; border-radius: 8px; border: none; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; background: var(--bg-input); color: var(--text-muted); transition: all .15s; }
.atab.active { background: var(--primary); color: #fff; }
.pcard.anim-1 { animation: fadeUp .4s .05s ease both; }
.pcard.anim-2 { animation: fadeUp .4s .10s ease both; }
.doc-rank-row  { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.enabled-by    { font-size: 11.5px; color: var(--text-muted); font-style: italic; }
.scope-tag     { font-size: 11px; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 20px; padding: 3px 10px; font-weight: 700; }
.refresh-btn   { background: var(--bg-input); border: 1.5px solid var(--border); border-radius: 8px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--text); }
.toolbar-actions { display: flex; gap: 8px; align-items: center; }
.logout-btn  { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.open-badge,.closed-badge { border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 800; }
.open-badge   { background: #dcfce7; color: #166534; }
.closed-badge { background: #f1f5f9; color: #64748b; }
.flbl         { font-size: 11.5px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: .4px; }
.field        { margin-bottom: 14px; }
.desc         { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.signature-area,.sig-area { border: 1.5px dashed var(--border); border-radius: 10px; padding: 20px; text-align: center; min-height: 80px; }
.sig-text     { font-size: 12px; color: var(--text-muted); }
.inp-wrap     { position: relative; }
.inp-icon     { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 14px; }
.lang-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.lang-item    { padding: 10px; border: 1.5px solid var(--border); border-radius: 10px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 700; transition: all .15s; }
.lang-item:hover,.lang-item.active { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }
.validity-nodate { font-size: 12px; color: var(--text-muted); font-style: italic; }
.screen-wrap  { display: flex; flex-direction: column; min-height: 100vh; }
.wrench-wrap  { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; padding: 40px; text-align: center; }
.wrench-icon  { font-size: 72px; margin-bottom: 20px; }
.wbody        { background: var(--bg-card); border-radius: 20px; padding: 32px; max-width: 480px; width: 100%; box-shadow: var(--shadow-lg); }
.wh-clinic,.wh-steps,.wh-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.step,.step-title,.step-sub { }
.nc-trial-chip { padding: 4px 12px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg-input); color: var(--text-muted); font-size: 12px; font-weight: 700; cursor: pointer; transition: all .15s; font-family: inherit; }
.nc-trial-chip.active,.nc-trial-chip:hover { border-color: var(--primary); background: var(--primary-lt); color: var(--primary); }
.modal-sm  { max-width: 380px; }
.modal-xl  { max-width: 900px; }
.svc-meta,.svc-spec { font-size: 12px; color: var(--text-muted); }
/* login page */
.bg-art     { }
.clinic-badge { }
.hosp-tag   { }
/* dashboard card accent lines */
.card-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.card-title  { font-size: 13.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 8px; }

/* ═══════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════
   FINAL PATCH — truly missing classes confirmed by checker
   ═══════════════════════════════════════════════════════════════ */

/* Trend indicators */
.trend-up   { color: #16a34a; font-size: 11px; font-weight: 800; }
.trend-down { color: #e11d48; font-size: 11px; font-weight: 800; }
.out        { color: #e11d48; }
.red        { color: #e11d48; }

/* SA KPI */
.sa-kpi-val { font-size: 28px; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--text); line-height: 1; }

/* Chart card */
.chart-card     { background: var(--bg-card); border: 1.5px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; }
.chart-subtitle { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* Branch bar */
.branch-bar-bg { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-input); overflow: hidden; }

/* Bed/ward */
.bed-ward { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* Alert message */
.alert         { padding: 10px 14px; border-radius: 10px; font-size: 13px; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.alert-content { flex: 1; }
.alert-msg     { font-size: 13px; }
.alert-red     { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }

/* Misc */
.dot           { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-active    { background: #22c55e; }
.icon          { display: inline-flex; align-items: center; justify-content: center; }
.oc-icon       { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.op-icon       { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: var(--primary-lt); color: var(--primary); }
.op-label      { font-size: 13px; font-weight: 700; color: var(--text); }
.op-sub        { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.feature       { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.gst           { font-size: 11px; color: var(--text-muted); }
.pi-blue       { background: #dbeafe; color: #1d4ed8; }
.co-head       { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.summary       { background: var(--bg-input); border-radius: 10px; padding: 12px 14px; }
.ref-strip     { background: var(--bg-input); border-radius: 8px; padding: 8px 12px; font-size: 12px; font-weight: 700; }
.section       { margin-bottom: 24px; }
.table         { width: 100%; border-collapse: collapse; }
.top           { background: var(--primary); color: #fff; }
.out           { opacity: .5; pointer-events: none; }
.meds-section  { margin-bottom: 16px; }
.q-status-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.upi-set       { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.variance-box  { background: var(--bg-input); border-radius: 10px; padding: 14px; }
.token-chip    { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-lt); color: var(--primary); font-size: 14px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.mini-bar      { flex: 1; height: 8px; border-radius: 4px; background: var(--bg-input); overflow: hidden; }
.plan-         { } /* dynamic plan- prefix handled inline */
.preview-box   { background: var(--bg-input); border-radius: 12px; padding: 16px; border: 1.5px dashed var(--border); }
.add-med-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5,10,25,.65);
  backdrop-filter: blur(4px);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.add-med-modal.open {
  display: flex;
}
.add-med-modal .modal {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.message       { font-size: 13px; color: var(--text); line-height: 1.5; }
.err           { color: #e11d48; font-size: 12.5px; margin-top: 4px; }
.upi-info-label{ font-size: 11.5px; color: var(--text-muted); }
.upi-name      { font-size: 14px; font-weight: 800; }
.upi-status    { font-size: 11px; color: var(--text-muted); }
.pd-body       { padding: 16px; }
.pd-img-gallery{ display: flex; gap: 8px; flex-direction: column; }
.pd-main-img   { width: 100%; border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; background: var(--bg-input); }
.pd-thumbnails { display: flex; gap: 6px; overflow-x: auto; }
.pd-thumb      { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.pd-thumb.active { border-color: var(--primary); }
.prod-detail-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 600; display: none; align-items: center; justify-content: center; padding: 20px; }
.prod-detail-overlay.open { display: flex; }
.prod-detail-box { background: var(--bg-card); border-radius: 20px; max-width: 640px; width: 100%; max-height: 85vh; overflow-y: auto; }
.rx-med-count  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rx-date       { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.rx-mark-row   { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border-light); }
.rx-med-remove { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 14px; padding: 4px; }
.rx-footer-left{ flex: 1; }
.pc-img        { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px 10px 0 0; background: var(--bg-input); }
.pc-img-placeholder { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--bg-input); border-radius: 10px 10px 0 0; }
.pc-cat        { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; padding: 8px 10px 0; }
.pc-price      { font-size: 16px; font-weight: 900; color: var(--primary); padding: 0 10px; }
.pc-stock      { font-size: 11px; color: var(--text-muted); padding: 0 10px 8px; }
.chip-name     { font-size: 12px; font-weight: 700; }
.chip-val      { font-size: 11.5px; color: var(--text-muted); }
.patient-info-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
/* ═══════════════════════════════════════════════════════════════ */

/* ── Discount filter tabs ──────────────────────────────────────── */
.disc-tab {
  padding: 7px 14px; border-radius: 9px; border: none;
  font-size: 12.5px; font-weight: 700; cursor: pointer;
  font-family: inherit; background: transparent; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px; transition: all .15s;
}
.disc-tab.active { background: var(--bg-card); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.disc-tab:hover:not(.active) { background: var(--bg-hover); }

/* ── Inactive / Expired discount cards ────────────────────────── */
.disc-card.inactive {
  opacity: .65;
  filter: grayscale(.4);
  background: var(--bg-input) !important;
}
.disc-card.inactive::before { background: #94a3b8 !important; }
.disc-card.expired {
  background: #fff7ed !important;
  border-color: #fed7aa !important;
}
.disc-card.expired::before { background: #f97316 !important; }

/* Inactive banner pill inside card */
.disc-status-pill {
  font-size: 10px; font-weight: 800; padding: 2px 8px;
  border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
}
.dsp-inactive { background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; }
.dsp-expired  { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.dsp-active   { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ── Password strength bar (doctors page) ─────────────────────── */
.pw-strength-bar { flex: 1; height: 4px; border-radius: 2px; overflow: hidden; background: #e2e8f0; }

/* ── Role chip badges (used in users.html table) ──────────────── */
.role-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 800; letter-spacing: .2px;
  text-transform: capitalize; white-space: nowrap;
}
.role-superadmin { background: rgba(139,92,246,.12); color: #7c3aed; border: 1px solid rgba(139,92,246,.3); }
.role-admin       { background: rgba(239,68,68,.1);  color: #dc2626; border: 1px solid rgba(239,68,68,.25); }
.role-doctor      { background: rgba(14,165,233,.1); color: #0284c7; border: 1px solid rgba(14,165,233,.25); }
.role-receptionist{ background: rgba(34,197,94,.1);  color: #16a34a; border: 1px solid rgba(34,197,94,.25); }
.role-nurse       { background: rgba(249,115,22,.1); color: #ea580c; border: 1px solid rgba(249,115,22,.25); }
.role-other       { background: var(--bg-input); color: var(--text-muted); border: 1px solid var(--border); }
/* ════════════════════════════════════════════════════════════════ */

/* ── Payment Gateway cards ─────────────────────────────────────── */
.gw-card {
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 12px;
  cursor: pointer;
  transition: all .18s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: var(--bg-card);
  text-align: center;
  position: relative;
}
.gw-card:hover { border-color: var(--primary); box-shadow: 0 4px 16px rgba(14,165,233,.1); transform: translateY(-1px); }
.gw-card.active { border-color: var(--primary); background: var(--primary-lt); box-shadow: 0 0 0 3px rgba(14,165,233,.15); }
.gw-card.active::after {
  content: '✓'; position: absolute; top: 6px; right: 8px;
  font-size: 10px; font-weight: 900; color: var(--primary);
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--primary-lt); display: flex; align-items: center; justify-content: center;
}
.gw-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; flex-shrink: 0;
}
.gw-label { font-size: 13px; font-weight: 800; color: var(--text); }
.gw-sub   { font-size: 10.5px; color: var(--text-muted); line-height: 1.3; }

/* Gateway credential panels */
.pg-panel { background: var(--bg-input); border-radius: 12px; padding: 18px; margin-top: 4px; border: 1.5px solid var(--border); }
.pg-panel-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

/* Payment method checkboxes */
.method-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: 20px;
  border: 1.5px solid var(--border); cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: var(--text);
  background: var(--bg-card); transition: all .15s;
  user-select: none;
}
.method-toggle:has(input:checked) {
  border-color: var(--primary); background: var(--primary-lt); color: var(--primary);
}
.method-toggle input[type="checkbox"] { display: none; }
/* ════════════════════════════════════════════════════════════════ */

/* ── Vitals row — 8 vital boxes (added RR + Pain Score) ───────── */
.vitals-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 1200px) { .vitals-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px)  { .vitals-row { grid-template-columns: repeat(3, 1fr); } }

/* Pain score box — relative for the colored bottom bar */
.vital-box-pain { position: relative; overflow: visible; padding-bottom: 8px; }
/* ════════════════════════════════════════════════════════════════ */