/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --co-accent:       oklch(0.66 0.14 155);
  --co-accent-soft:  oklch(0.95 0.04 155);
  --co-accent-ink:   oklch(0.38 0.12 155);
  --co-warn:         oklch(0.74 0.13 75);
  --co-warn-soft:    oklch(0.96 0.04 80);
  --co-warn-ink:     oklch(0.42 0.12 65);
  --co-rose:         oklch(0.66 0.18 18);
  --co-rose-soft:    oklch(0.96 0.03 20);
  --co-rose-ink:     oklch(0.42 0.16 20);
  --co-blue:         oklch(0.62 0.13 250);
  --co-blue-soft:    oklch(0.96 0.03 250);
  --co-blue-ink:     oklch(0.38 0.13 255);
  --co-violet:       oklch(0.6 0.14 295);
  --co-violet-soft:  oklch(0.96 0.03 295);
  --co-violet-ink:   oklch(0.38 0.12 295);

  --co-bg:           oklch(0.985 0.004 250);
  --co-surface:      #ffffff;
  --co-surface2:     oklch(0.975 0.005 250);
  --co-border:       oklch(0.92 0.006 250);
  --co-border-str:   oklch(0.86 0.008 250);
  --co-text:         oklch(0.22 0.012 260);
  --co-muted:        oklch(0.52 0.012 260);
  --co-faint:        oklch(0.68 0.01 260);

  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --sidebar-w:       232px;
  --radius:          12px;
  --radius-sm:       8px;
  --shadow:          0 1px 0 rgba(15,23,42,0.02);
  --shadow-md:       0 8px 24px -8px rgba(15,23,42,0.12), 0 1px 3px rgba(15,23,42,0.06);
  --transition:      .15s ease;

  /* Legacy aliases keep Bootstrap overrides working */
  --co-blue-dark:    oklch(0.50 0.13 255);
  --co-blue-light:   var(--co-blue-soft);
  --co-teal:         var(--co-accent);
  --co-green:        var(--co-accent);
  --co-amber:        var(--co-warn);
  --co-red:          var(--co-rose);
  --co-purple:       var(--co-violet);
  --sidebar-bg:      var(--co-surface);
  --sidebar-hover:   var(--co-surface2);
  --sidebar-active:  var(--co-accent-soft);
  --body-bg:         var(--co-bg);
  --card-bg:         var(--co-surface);
  --border:          var(--co-border);
  --text:            var(--co-text);
  --text-muted:      var(--co-muted);
  --text-light:      var(--co-faint);
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  font-feature-settings: "ss01", "cv11";
  background: var(--co-bg);
  color: var(--co-text);
  font-size: .9rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--co-blue); text-decoration: none; }
a:hover { color: var(--co-blue-dark); }

/* ─── Pulse dot ─────────────────────────────────────────────── */
.pulse-dot {
  display: inline-block; width: 7px; height: 7px;
  border-radius: 99px; position: relative;
  background: var(--co-accent);
  animation: pulseGrow 2.2s ease-out infinite;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 99px; background: inherit;
  animation: pulseRing 2.2s ease-out infinite;
}
@keyframes pulseGrow {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}
@keyframes pulseRing {
  0%   { transform: scale(1);   opacity: 0.6; }
  100% { transform: scale(2.6); opacity: 0;   }
}

/* ─── Sidebar (light) ───────────────────────────────────────── */
#sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--co-surface);
  border-right: 1px solid var(--co-border);
  display: flex; flex-direction: column;
  z-index: 1040;
  transition: transform var(--transition);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--co-border) transparent;
}

.sidebar-brand-row {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 14px;
  text-decoration: none;
  border-bottom: 1px solid var(--co-border);
}
.sidebar-brand-icon {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--co-accent), var(--co-blue));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px; letter-spacing: -0.3px;
  box-shadow: 0 4px 10px -2px oklch(0.66 0.14 155 / 0.35);
}
.sidebar-brand-name {
  font-size: 18px; font-weight: 700;
  color: var(--co-text); letter-spacing: -0.2px; line-height: 1.1;
}
.sidebar-brand-version {
  font-size: 11.5px; color: var(--co-faint); font-weight: 500; line-height: 1.1;
}

.sidebar-workspace {
  margin: 10px 12px 0;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0F2FE 100%);
  border: 1px solid #BFDBFE;
  cursor: default;
}
.sidebar-ws-label {
  font-size: 10px; color: #3B82F6; font-weight: 700;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.sidebar-ws-name {
  font-size: 12.5px; font-weight: 700; color: #1E40AF;
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-ws-chev { color: #60A5FA; font-size: 13px; flex-shrink: 0; margin-left: auto; }

.sidebar-nav { flex: 1; padding: 0 12px; }

.sidebar-section {
  padding: 16px 10px 8px;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase; color: var(--co-faint);
}

.nav-link-side {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 10px; border-radius: 7px;
  color: var(--co-muted); font-size: 13.5px; font-weight: 500;
  transition: background var(--transition), color var(--transition);
  margin-bottom: 1px; text-decoration: none;
}
.nav-link-side i { font-size: 1.1rem; width: 20px; text-align: center; color: var(--co-faint); flex-shrink: 0; }
.nav-link-side:hover { background: var(--co-surface2); color: var(--co-text); text-decoration: none; }
.nav-link-side:hover i { color: var(--co-muted); }
.nav-link-side.active { background: var(--co-surface2); color: var(--co-text); font-weight: 600; }
.nav-link-side.active i { color: var(--co-text); }

.sidebar-footer {
  padding: 12px; border-top: 1px solid var(--co-border); margin-top: auto;
}
.sidebar-api-card {
  padding: 10px 12px; border-radius: 8px; margin-bottom: 12px;
  background: var(--co-surface2); border: 1px solid var(--co-border);
}
.sidebar-api-line1 {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600; color: var(--co-accent-ink);
}
.sidebar-api-line2 { font-size: 11px; color: var(--co-faint); font-family: var(--mono); margin-top: 4px; }

.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 4px; border-radius: var(--radius-sm);
  transition: background var(--transition); cursor: default;
}
.sidebar-user:hover { background: var(--co-surface2); }
.sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--co-accent), var(--co-blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .8rem; color: #fff;
  border: 1px solid var(--co-border);
}
.sidebar-user-name { color: var(--co-text); font-size: 12.5px; font-weight: 600; line-height: 1.15; }
.sidebar-user-role { color: var(--co-faint); font-size: 10.5px; }

/* ─── Main layout ───────────────────────────────────────────── */
#main-wrapper { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

#topbar {
  position: sticky; top: 0; z-index: 1030;
  background: oklch(0.985 0.004 250 / 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--co-border);
  padding: 13px 28px;
  display: flex; align-items: center; gap: 12px; min-height: 66px;
}

.topbar-info { flex: 1; min-width: 0; }
.topbar-breadcrumb { font-size: 13.5px; color: var(--co-faint); font-weight: 500; margin-bottom: 1px; }
.topbar-heading { margin: 0; font-size: 21px; font-weight: 700; color: var(--co-text); letter-spacing: -0.4px; line-height: 1.2; }
.topbar-sub { font-size: 12px; color: var(--co-muted); margin-top: 1px; }

@keyframes quoteSlideIn {
  0%   { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes quoteGlow {
  0%, 100% { text-shadow: none; }
  50%       { text-shadow: 0 0 16px rgba(217,119,6,0.35); }
}
.topbar-quote {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-style: italic;
  color: #D97706; font-weight: 600;
  margin-top: 3px;
  animation: quoteSlideIn 0.8s cubic-bezier(0.22,1,0.36,1) 0.2s both,
             quoteGlow 3.5s ease-in-out 1.2s infinite;
}
.topbar-quote .bi-stars { font-style: normal; font-size: 0.75rem; opacity: 0.85; }

.topbar-search {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 11px; border-radius: 8px;
  background: var(--co-surface); border: 1px solid var(--co-border);
  min-width: 240px; cursor: default;
}
.topbar-search i { font-size: .8rem; color: var(--co-faint); flex-shrink: 0; }
.topbar-search-ph { flex: 1; font-size: 12.5px; color: var(--co-faint); white-space: nowrap; overflow: hidden; }
.topbar-search-kbd {
  font-family: var(--mono); font-size: 10px;
  padding: 2px 5px; border-radius: 4px;
  background: var(--co-surface2); color: var(--co-faint);
  border: 1px solid var(--co-border); flex-shrink: 0;
}

#main-content { flex: 1; padding: 24px 28px; }

/* ─── Cards ─────────────────────────────────────────────────── */
.card { background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header-co { padding: 18px 20px 0; font-weight: 600; font-size: .9rem; color: var(--co-text); }

/* ─── KPI cards (4 gradient themes) ────────────────────────── */
.kpi-card {
  display: block; border-radius: 14px; padding: 18px;
  border: 1px solid var(--co-border);
  text-decoration: none; color: inherit;
  position: relative; overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset;
}
.kpi-card:hover { transform: translateY(-1px); text-decoration: none; color: inherit; }

.kpi-mint  { background: linear-gradient(155deg, oklch(0.97 0.04 165), oklch(0.995 0.01 165) 60%); border-color: oklch(0.92 0.05 165); box-shadow: 0 8px 24px -16px oklch(0.66 0.14 160 / 0.38), 0 1px 0 rgba(255,255,255,.7) inset; }
.kpi-sky   { background: linear-gradient(155deg, oklch(0.96 0.05 235), oklch(0.995 0.01 235) 60%); border-color: oklch(0.91 0.05 235); box-shadow: 0 8px 24px -16px oklch(0.62 0.13 245 / 0.38), 0 1px 0 rgba(255,255,255,.7) inset; }
.kpi-lilac { background: linear-gradient(155deg, oklch(0.96 0.05 295), oklch(0.995 0.01 295) 60%); border-color: oklch(0.92 0.05 295); box-shadow: 0 8px 24px -16px oklch(0.62 0.15 295 / 0.38), 0 1px 0 rgba(255,255,255,.7) inset; }
.kpi-peach { background: linear-gradient(155deg, oklch(0.95 0.06 30),  oklch(0.995 0.015 30) 60%); border-color: oklch(0.91 0.06 28);  box-shadow: 0 8px 24px -16px oklch(0.68 0.16 28  / 0.38), 0 1px 0 rgba(255,255,255,.7) inset; }

.kpi-mint  .kpi-label, .kpi-mint  .kpi-value, .kpi-mint  .kpi-delta { color: oklch(0.34 0.12 160); }
.kpi-sky   .kpi-label, .kpi-sky   .kpi-value, .kpi-sky   .kpi-delta { color: oklch(0.36 0.13 245); }
.kpi-lilac .kpi-label, .kpi-lilac .kpi-value, .kpi-lilac .kpi-delta { color: oklch(0.40 0.14 295); }
.kpi-peach .kpi-label, .kpi-peach .kpi-value, .kpi-peach .kpi-delta { color: oklch(0.42 0.14 25);  }

.kpi-label { font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.7; margin-bottom: 10px; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.8px; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-delta-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kpi-delta {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,.75); padding: 2px 8px;
  border-radius: 99px; border: 1px solid rgba(0,0,0,.06);
}
.kpi-delta-sub { font-size: 11.5px; opacity: 0.5; }

/* ─── Pipeline bar ──────────────────────────────────────────── */
.pipeline-track {
  display: flex; height: 8px; border-radius: 99px;
  overflow: hidden; background: var(--co-surface2);
  margin-bottom: 18px;
}
.pipeline-seg { transition: width .4s ease; min-width: 0; }

.pipeline-grid { display: grid; gap: 12px; }

.pipeline-stat { border-left: 2px solid; padding-left: 10px; }
.pipeline-stat-label { font-size: 11px; color: var(--co-muted); font-weight: 500; }
.pipeline-stat-value {
  font-size: 22px; font-weight: 700; color: var(--co-text);
  font-variant-numeric: tabular-nums; letter-spacing: -0.5px;
  line-height: 1; margin-top: 1px;
}

/* ─── Status pills ──────────────────────────────────────────── */
.badge-status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 6px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.badge-status::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 99px; background: currentColor; flex-shrink: 0;
}

.status-pending    { background: var(--co-surface2);    color: var(--co-muted);      }
.status-authorized { background: var(--co-accent-soft); color: var(--co-accent-ink); }
.status-in_progress{ background: var(--co-warn-soft);   color: var(--co-warn-ink);   }
.status-completed  { background: var(--co-accent-soft); color: var(--co-accent-ink); }
.status-billed     { background: var(--co-violet-soft); color: var(--co-violet-ink); }
.status-cancelled  { background: var(--co-rose-soft);   color: var(--co-rose-ink);   }

/* ─── Stat cards (dashboard quick-action area) ──────────────── */
.stat-card {
  padding: 20px; border-radius: var(--radius);
  background: var(--co-surface); border: 1px solid var(--co-border);
  box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: 16px;
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none; color: inherit;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: inherit; text-decoration: none; }
.stat-icon {
  width: 44px; height: 44px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.blue   { background: var(--co-blue-soft);   color: var(--co-blue); }
.stat-icon.amber  { background: var(--co-warn-soft);   color: var(--co-warn); }
.stat-icon.red    { background: var(--co-rose-soft);   color: var(--co-rose); }
.stat-icon.green  { background: var(--co-accent-soft); color: var(--co-accent); }
.stat-icon.purple { background: var(--co-violet-soft); color: var(--co-violet); }
.stat-value { font-size: 1.8rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--co-text); }
.stat-label { font-size: .78rem; color: var(--co-muted); margin-top: 4px; font-weight: 500; }

/* ─── Tables ────────────────────────────────────────────────── */
.co-table-wrap { border-radius: var(--radius); background: var(--co-surface); border: 1px solid var(--co-border); box-shadow: var(--shadow); overflow: hidden; }
.co-table-header { display: flex; align-items: center; padding: 16px 20px; gap: 12px; border-bottom: 1px solid var(--co-border); }
.table { margin: 0; font-size: .865rem; }
.table thead th { font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--co-faint); background: var(--co-surface); border-bottom: 1px solid var(--co-border); padding: 10px 16px; white-space: nowrap; }
.table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--co-border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--co-surface2); }

/* ─── Alert rows ────────────────────────────────────────────── */
.alert-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 9px; margin-bottom: 8px;
  background: var(--co-surface2); border: 1px solid var(--co-border);
}
.alert-row:last-child { margin-bottom: 0; }
.alert-row-icon { width: 28px; height: 28px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.alert-row-icon.rose { background: var(--co-rose-soft);   color: var(--co-rose-ink); }
.alert-row-icon.warn { background: var(--co-warn-soft);   color: var(--co-warn-ink); }
.alert-row-icon.info { background: var(--co-blue-soft);   color: var(--co-blue-ink); }
.alert-row-title { font-size: 12.5px; font-weight: 600; color: var(--co-text); }
.alert-row-meta  { font-size: 11px; color: var(--co-muted); margin-top: 1px; }
.alert-row-time  { font-size: 11px; color: var(--co-faint); white-space: nowrap; margin-left: auto; flex-shrink: 0; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn { border-radius: var(--radius-sm); font-weight: 500; font-size: .86rem; transition: all var(--transition); }
.btn-primary { background: var(--co-text); border-color: var(--co-text); color: #fff; }
.btn-primary:hover { background: oklch(0.30 0.012 260); border-color: oklch(0.30 0.012 260); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,.22); }
.btn-co-ghost { background: transparent; border: 1px solid var(--co-border); color: var(--co-text); }
.btn-co-ghost:hover { background: var(--co-surface2); color: var(--co-text); border-color: var(--co-border-str); }

/* ─── Forms ─────────────────────────────────────────────────── */
.form-control, .form-select { border-radius: var(--radius-sm); border: 1px solid var(--co-border); color: var(--co-text); font-size: .875rem; background: var(--co-surface); transition: border-color var(--transition), box-shadow var(--transition); }
.form-control:focus, .form-select:focus { border-color: var(--co-accent); box-shadow: 0 0 0 3px oklch(0.66 0.14 155 / 0.14); outline: none; }
.form-label { font-weight: 500; font-size: .83rem; color: var(--co-muted); margin-bottom: 5px; }

/* ─── Notification panel ────────────────────────────────────── */
.offcanvas { border-left: none !important; box-shadow: -4px 0 24px rgba(0,0,0,.10); }
.offcanvas-header { border-bottom: 1px solid var(--co-border); padding: 16px 20px; }
.notif-item { display: flex; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--co-surface2); cursor: pointer; transition: background var(--transition); }
.notif-item:hover { background: var(--co-surface2); }
.notif-item.read { opacity: .55; }
.notif-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--co-accent); flex-shrink: 0; margin-top: 5px; }
.notif-item.read .notif-dot { background: var(--co-border-str); }
.notif-title { font-weight: 600; font-size: .84rem; }
.notif-msg   { font-size: .78rem; color: var(--co-muted); margin-top: 1px; }
.notif-time  { font-size: .72rem; color: var(--co-faint); margin-top: 3px; }

/* ─── Bell button ───────────────────────────────────────────── */
.notif-bell-btn {
  position: relative; background: var(--co-surface);
  border: 1px solid var(--co-border); border-radius: var(--radius-sm);
  width: 34px; height: 34px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--co-muted); cursor: pointer; transition: all var(--transition);
}
.notif-bell-btn:hover { background: var(--co-surface2); color: var(--co-text); border-color: var(--co-border-str); }
.notif-bell-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--co-rose); color: #fff; border-radius: 10px;
  font-size: .62rem; font-weight: 700; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
  border: 2px solid var(--co-bg);
}

/* ─── Toast ─────────────────────────────────────────────────── */
.co-toast {
  min-width: 320px; max-width: 380px;
  background: var(--co-surface); color: var(--co-text);
  border: 1px solid var(--co-border); border-left: 3px solid var(--co-accent);
  border-radius: 10px;
  box-shadow: 0 10px 30px -12px rgba(15,23,42,.18), 0 2px 6px -2px rgba(15,23,42,.06);
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  animation: toastIn .3s cubic-bezier(0.2,0.8,0.2,1);
}
.co-toast-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; margin-top: 2px; }
.co-toast-title { font-weight: 600; font-size: .84rem; }
.co-toast-msg   { font-size: .78rem; color: var(--co-muted); margin-top: 2px; }
.co-toast-close { margin-left: auto; background: none; border: none; color: var(--co-faint); cursor: pointer; font-size: 1rem; padding: 0; flex-shrink: 0; }
.co-toast-close:hover { color: var(--co-muted); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) translateX(8px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; transform: translateY(4px); }
}
.co-toast.removing { animation: fadeOut .3s ease forwards; }

/* ─── Order stepper ─────────────────────────────────────────── */
.order-stepper { display: flex; align-items: center; padding: 20px 0; overflow-x: auto; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 80px; position: relative; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--co-border); z-index: 0; }
.step.done:not(:last-child)::after { background: var(--co-accent); }
.step-circle { width: 30px; height: 30px; border-radius: 50%; background: var(--co-surface2); color: var(--co-muted); display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; z-index: 1; position: relative; }
.step.done .step-circle   { background: var(--co-accent); color: #fff; }
.step.active .step-circle { background: #fff; border: 2px solid var(--co-accent); color: var(--co-accent); }
.step-label { font-size: .7rem; font-weight: 600; color: var(--co-faint); margin-top: 6px; text-align: center; white-space: nowrap; }
.step.active .step-label { color: var(--co-accent-ink); }
.step.done   .step-label { color: var(--co-muted); }

/* ─── Stock bar ─────────────────────────────────────────────── */
.stock-bar-wrap { display: flex; align-items: center; gap: 8px; }
.stock-bar { flex: 1; height: 4px; background: var(--co-surface2); border-radius: 4px; overflow: hidden; }
.stock-bar-fill { height: 100%; border-radius: 4px; transition: width .6s ease; }

/* ─── Login ─────────────────────────────────────────────────── */
.login-split { min-height: 100vh; display: flex; }
.login-brand-pane {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 60px 40px;
  background: linear-gradient(150deg, oklch(0.22 0.012 260) 0%, oklch(0.28 0.06 255) 50%, oklch(0.22 0.012 260) 100%);
  position: relative; overflow: hidden;
}
.login-brand-pane::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, oklch(0.66 0.14 155 / 0.18) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, oklch(0.62 0.13 250 / 0.12) 0%, transparent 50%);
}
.login-brand-content { position: relative; z-index: 1; text-align: center; }
.login-brand-logo { width: 68px; height: 68px; background: linear-gradient(135deg, var(--co-accent), var(--co-blue)); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #fff; margin: 0 auto 20px; box-shadow: 0 8px 32px oklch(0.66 0.14 155 / 0.28); }
.login-brand-title { font-size: 2.5rem; font-weight: 800; color: #fff; letter-spacing: -.04em; }
.login-brand-sub   { color: oklch(0.68 0.01 260); font-size: .95rem; margin-top: 8px; }
.login-dots { display: flex; gap: 8px; margin-top: 40px; justify-content: center; }
.login-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.18); }
.login-dot.active { background: var(--co-accent); }
.login-form-pane { width: 440px; flex-shrink: 0; background: #fff; display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-form-inner { width: 100%; }
.login-heading { font-size: 1.6rem; font-weight: 700; color: var(--co-text); letter-spacing: -.03em; }
.login-sub { color: var(--co-muted); font-size: .875rem; margin-top: 6px; }
.login-input-group { margin-top: 24px; }
.login-field-icon { position: relative; }
.login-field-icon .icon-left { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--co-faint); font-size: 1rem; }
.login-field-icon input { padding-left: 38px; height: 44px; }
.btn-login { height: 44px; font-size: .9rem; font-weight: 600; background: var(--co-text); border: none; border-radius: var(--radius-sm); width: 100%; color: #fff; margin-top: 24px; cursor: pointer; transition: all var(--transition); letter-spacing: .01em; }
.btn-login:hover { background: oklch(0.30 0.012 260); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(15,23,42,.22); }

/* ─── Page header ───────────────────────────────────────────── */
.page-header { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.page-header h4 { display: none; } /* heading lives in topbar now */

/* ─── Section head ──────────────────────────────────────────── */
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head h6 { margin: 0; font-size: 14px; font-weight: 600; color: var(--co-text); letter-spacing: -0.2px; }
.section-head-sub { font-size: 12px; color: var(--co-muted); }

/* ─── Alert flashes ─────────────────────────────────────────── */
.alert { border-radius: var(--radius-sm); font-size: .875rem; }

/* ─── Utilities ─────────────────────────────────────────────── */
.text-co-muted { color: var(--co-muted); }
.text-co-light { color: var(--co-faint); }
.fw-600 { font-weight: 600; }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
  #sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  #sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.12); }
  #main-wrapper { margin-left: 0; }
  #sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1039; }
  #sidebar-overlay.show { display: block; }
  .hamburger-btn { display: flex !important; }
  .topbar-search { display: none; }
}

/* ─── Mobile topbar: bigger title + subtitle ────────────────── */
@media (max-width: 768px) {
  #topbar { padding: 14px 16px; min-height: 72px; gap: 10px; }
  .topbar-breadcrumb { font-size: 16px; }
  .topbar-sub { font-size: 13.5px; margin-top: 3px; }
  #main-content { padding: 18px 16px; }
}
.hamburger-btn { display: flex; background: none; border: none; width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--co-muted); font-size: 1.5rem; cursor: pointer; border-radius: var(--radius-sm); transition: background var(--transition); flex-shrink: 0; }
.hamburger-btn:hover { background: var(--co-surface2); color: var(--co-text); }

/* ─── Sidebar collapsed (desktop) ───────────────────────────── */
body.sidebar-collapsed #sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); box-shadow: none; }
body.sidebar-collapsed #main-wrapper { margin-left: 0; transition: margin-left var(--transition); }
#main-wrapper { transition: margin-left var(--transition); }

/* ─── Chart container ───────────────────────────────────────── */
.chart-container { position: relative; }

/* ─── Patient search ────────────────────────────────────────── */
.patient-result-item { padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--co-surface2); transition: background var(--transition); }
.patient-result-item:hover { background: var(--co-accent-soft); }
.patient-result-item:last-child { border-bottom: none; }

/* ─── Expiry ─────────────────────────────────────────────────── */
.expiry-danger { color: var(--co-rose-ink); font-weight: 600; }
.expiry-warn   { color: var(--co-warn-ink); font-weight: 600; }

/* ─── Live badge ─────────────────────────────────────────────── */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; color: var(--co-muted);
}
