/* Aangan Clinic App — shared design tokens
   Extracted from the mockup screens (overview.html, call-queue.html, etc.)
   so every route shares one source of truth instead of nine copies. */

:root {
  --bg-page:      #f4f5f7;
  --bg-sidebar:   #fbfbfa;
  --surface:      #ffffff;
  --surface-tint: #f7f8fa;
  --border:       #e4e6eb;
  --border-strong:#d5d8df;
  --text:         #1a1d24;
  --text-secondary:#5b616e;
  --text-muted:   #8b909c;

  --coral:        #d85a30;
  --coral-bg:      #faece7;
  --coral-border: #f0997b;
  --coral-text:   #993c1d;

  --teal:         #1d9e75;
  --teal-bg:       #e1f5ee;
  --teal-text:    #0f6e56;

  --blue:         #378add;
  --blue-bg:       #e6f1fb;
  --blue-text:    #185fa5;

  --amber:        #ba7517;
  --amber-bg:      #faeeda;
  --amber-text:   #854f0b;

  --gray-bg:      #f1efe8;
  --gray-text:    #5f5e5a;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

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

body {
  font-family: 'Figtree', sans-serif;
  background: var(--bg-page);
  color: var(--text);
  min-height: 100vh;
}

#app { display: flex; min-height: 100vh; }

/* ── SIDEBAR (shared shell) ── */
.sidebar { width: 220px; background: var(--bg-sidebar); border-right: 1px solid var(--border); padding: 24px 16px; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--blue-bg); color: var(--blue-text); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; flex-shrink: 0; }
.brand-title { font-size: 16px; font-weight: 600; line-height: 1.2; }
.brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 0.04em; margin: 6px 0 24px 0; }
.nav-list { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: background 0.15s; text-decoration: none; }
.nav-item:hover { background: var(--surface-tint); }
.nav-item.active { background: var(--blue-bg); color: var(--blue-text); }
.nav-left { display: flex; align-items: center; gap: 10px; }
.nav-icon { width: 17px; text-align: center; font-size: 15px; }
.nav-badge { background: var(--coral); color: #fff; font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 20px; }

/* ── MAIN ── */
.main { flex: 1; padding: 24px 32px; min-width: 0; overflow-x: hidden; }

/* ── SHARED FORM/BUTTON PRIMITIVES (used across every view) ── */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; }
.btn { font-family: inherit; font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: var(--radius-sm); cursor: pointer; border: 1px solid var(--border); background: var(--surface); }
.btn.primary { background: var(--teal); color: #fff; border: none; }
.btn.primary:disabled { background: var(--border-strong); cursor: not-allowed; }
label.field-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); display: block; margin-bottom: 6px; }
input, select, textarea {
  font-family: inherit; font-size: 13.5px; padding: 9px 12px; width: 100%;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-tint);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { text-align: left; padding: 10px 18px; font-size: 10.5px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; border-bottom: 1px solid var(--border); }
tbody td { padding: 12px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
.tag { font-size: 10.5px; padding: 2px 8px; border-radius: 20px; font-weight: 500; }
.tag-dept { background: var(--gray-bg); color: var(--gray-text); }

/* ── LOADING / AUTH ── */
.centered-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; width: 100%; }

/* ── PRINT (invoice modal) — used by Checkout step 4/5 and, later, the
   standalone Billing screen; both scope printable content to this id */
@media print {
  body * { visibility: hidden; }
  #printable-invoice, #printable-invoice * { visibility: visible; }
  #printable-invoice { position: fixed; top: 0; left: 0; width: 100%; box-shadow: none; }
  .no-print { display: none !important; }
}
