/* ═══════════════════════════════════════════════════════════════
   DawaCloud v2 — Apothecary Noir Design System
   Brand: Heritage Pharmacy | Font: Playfair Display + Source Sans 3
   Palette: Midnight Navy · Prescription Gold · Warm Ivory
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  /* Navy scale */
  --dc-navy:             #0A1628;
  --dc-navy-mid:         #132240;
  --dc-navy-light:       #1C3055;

  /* Gold / prescription amber */
  --dc-primary:          #C9A84C;
  --dc-primary-dark:     #A88838;
  --dc-primary-darker:   #0A1628;   /* navy — for appbar */
  --dc-primary-light:    #E8C87A;
  --dc-primary-ultra:    #FDF8EE;

  /* Mahogany secondary */
  --dc-secondary:        #7B4A2D;

  /* Status */
  --dc-success:          #2E6B35;
  --dc-warning:          #C47A1E;
  --dc-error:            #B83232;
  --dc-info:             #1565C0;

  /* Warm ivory / sepia gray scale */
  --dc-gray-50:   #FDFBF8;
  --dc-gray-100:  #FAF8F5;
  --dc-gray-200:  #F0EAE0;
  --dc-gray-300:  #E8E0D0;
  --dc-gray-400:  #D4C8B4;
  --dc-gray-500:  #A89880;
  --dc-gray-600:  #8A7B6A;
  --dc-gray-700:  #4A3F2F;
  --dc-gray-800:  #2D2218;
  --dc-gray-900:  #1A1208;

  /* Radii */
  --dc-radius-xs:   3px;
  --dc-radius-sm:   6px;
  --dc-radius-md:   10px;
  --dc-radius-lg:   14px;
  --dc-radius-xl:   20px;
  --dc-radius-pill: 9999px;

  /* Shadows — warm sepia-tinted */
  --dc-shadow-xs:    0 1px 2px rgba(26,18,8,.06);
  --dc-shadow-sm:    0 1px 4px rgba(26,18,8,.08), 0 1px 2px rgba(26,18,8,.04);
  --dc-shadow-md:    0 4px 14px rgba(26,18,8,.09), 0 2px 4px rgba(26,18,8,.04);
  --dc-shadow-lg:    0 8px 28px rgba(26,18,8,.11), 0 4px 8px rgba(26,18,8,.04);
  --dc-shadow-xl:    0 16px 48px rgba(26,18,8,.13), 0 8px 16px rgba(26,18,8,.04);
  --dc-shadow-brand: 0 4px 18px rgba(201,168,76,.40);
  --dc-shadow-inner: inset 0 1px 3px rgba(26,18,8,.08);
  --dc-shadow-navy:  0 4px 20px rgba(10,22,40,.30);

  --dc-transition-fast: 140ms ease;
  --dc-transition-base: 220ms ease;
  --dc-transition-slow: 340ms ease;
}

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

html, body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--dc-gray-100);
}

/* ── Custom Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar               { width: 5px; height: 5px; }
::-webkit-scrollbar-track         { background: transparent; }
::-webkit-scrollbar-thumb         { background: var(--dc-gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover   { background: var(--dc-primary); }

/* ── Main content area ─────────────────────────────────────── */
.mud-main-content { min-height: calc(100vh - 64px); }

/* ═══════════════════════════════════════════════════════════════
   MudBlazor Global Overrides — Apothecary Noir Design Language
   ═══════════════════════════════════════════════════════════════ */

/* ── Paper / Cards ──────────────────────────────────────────── */
.mud-paper {
  border-radius: var(--dc-radius-lg) !important;
  box-shadow: var(--dc-shadow-sm) !important;
  border: 1px solid var(--dc-gray-200) !important;
}
.mud-paper.mud-elevation-1 { box-shadow: var(--dc-shadow-sm) !important; }
.mud-paper.mud-elevation-2 { box-shadow: var(--dc-shadow-md) !important; }
.mud-paper.mud-elevation-4,
.mud-paper.mud-elevation-8 { box-shadow: var(--dc-shadow-lg) !important; }

/* Elevated content cards get a subtle gold top accent */
.mud-paper.mud-elevation-1:not(.mud-appbar):not(.dc-auth-paper):not(.mud-menu-list):not(.mud-popover-content) {
  border-top: 2.5px solid rgba(201,168,76,.30) !important;
}

/* Alerts */
.mud-alert {
  border-radius: var(--dc-radius-md) !important;
  border-left: 3px solid !important;
  font-size: 0.875rem !important;
}
.mud-alert-filled-error   { border-left-color: var(--dc-error)   !important; }
.mud-alert-filled-warning { border-left-color: var(--dc-warning) !important; }
.mud-alert-filled-success { border-left-color: var(--dc-success) !important; }
.mud-alert-filled-info    { border-left-color: var(--dc-info)    !important; }

/* Chips */
.mud-chip {
  border-radius: 6px !important;
  font-weight: 600 !important;
  font-size: 0.76rem !important;
  letter-spacing: 0.2px !important;
  padding: 2px 10px !important;
  height: 26px !important;
}

/* ── Text fields / Inputs ───────────────────────────────────── */
.mud-input-outlined .mud-input-outlined-border {
  border-radius: var(--dc-radius-md) !important;
  border-color: var(--dc-gray-300) !important;
  transition: border-color var(--dc-transition-fast), box-shadow var(--dc-transition-fast) !important;
}
.mud-input-outlined:hover .mud-input-outlined-border {
  border-color: var(--dc-gray-400) !important;
}
.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
  border-color: var(--dc-primary) !important;
  box-shadow: 0 0 0 3px rgba(201,168,76,.12) !important;
}
.mud-label.mud-input-label-inputcontrol { font-weight: 500 !important; font-size: 0.875rem !important; }

/* Select */
.mud-select-input { border-radius: var(--dc-radius-md) !important; }

/* ── Buttons ────────────────────────────────────────────────── */
.mud-button-root {
  transition: all var(--dc-transition-base) !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  font-family: 'Source Sans 3', sans-serif !important;
  text-transform: none !important;
}

/* Filled primary → pill shape, gold */
.mud-button-filled.mud-button-color-primary {
  background: var(--dc-primary) !important;
  color: #0A1628 !important;
  border-radius: var(--dc-radius-pill) !important;
  padding: 0 22px !important;
  box-shadow: 0 2px 8px rgba(201,168,76,.30) !important;
}
.mud-button-filled.mud-button-color-primary:hover {
  background: var(--dc-primary-dark) !important;
  box-shadow: var(--dc-shadow-brand) !important;
  transform: translateY(-1px) !important;
}

/* Outlined primary → sharp rect with gold border */
.mud-button-outlined.mud-button-color-primary {
  border-color: var(--dc-primary) !important;
  border-width: 1.5px !important;
  color: var(--dc-primary-dark) !important;
  border-radius: var(--dc-radius-md) !important;
}
.mud-button-outlined.mud-button-color-primary:hover {
  background: rgba(201,168,76,.08) !important;
  border-color: var(--dc-primary-dark) !important;
}

/* Text button */
.mud-button-text.mud-button-color-primary { color: var(--dc-primary-dark) !important; }
.mud-button-text.mud-button-color-primary:hover { background: rgba(201,168,76,.08) !important; }

/* Icon buttons */
.mud-icon-button {
  border-radius: var(--dc-radius-md) !important;
  transition: all var(--dc-transition-fast) !important;
}
.mud-icon-button:hover { background: rgba(201,168,76,.10) !important; }

/* Fab */
.mud-fab { box-shadow: var(--dc-shadow-brand) !important; }

/* Dividers */
.mud-divider { border-color: var(--dc-gray-300) !important; opacity: 0.7; }

/* ── AppBar ─────────────────────────────────────────────────── */
.mud-appbar {
  background: var(--dc-navy) !important;
  border-bottom: 1px solid rgba(201,168,76,.18) !important;
  box-shadow: 0 2px 16px rgba(10,22,40,.35) !important;
  backdrop-filter: none !important;
}

/* ── Drawer ─────────────────────────────────────────────────── */
.mud-drawer {
  border-right: 1px solid var(--dc-gray-300) !important;
  box-shadow: 2px 0 16px rgba(10,22,40,.06) !important;
  background: #F5F0E8 !important;
}

/* ── Nav Menu ───────────────────────────────────────────────── */
.mud-nav-link {
  position: relative !important;
  border-radius: var(--dc-radius-md) !important;
  margin: 2px 8px !important;
  padding: 9px 14px !important;
  font-size: 0.87rem !important;
  font-weight: 500 !important;
  transition: all var(--dc-transition-fast) !important;
  color: var(--dc-gray-700) !important;
}
.mud-nav-link:hover:not(.active) {
  background: rgba(201,168,76,.10) !important;
  color: var(--dc-primary-dark) !important;
  padding-left: 18px !important;
}

/* Active nav link: gold left-border accent + pill bg */
.mud-nav-link.active {
  background: linear-gradient(90deg, rgba(201,168,76,.18) 0%, rgba(201,168,76,.07) 100%) !important;
  color: var(--dc-primary-dark) !important;
  font-weight: 700 !important;
  box-shadow: inset 3px 0 0 var(--dc-primary) !important;
}
.mud-nav-link.active .mud-nav-link-icon-default {
  color: var(--dc-primary) !important;
}

/* Nav group header chevron */
.mud-nav-group > .mud-nav-link {
  font-size: 0.84rem !important;
  font-weight: 600 !important;
  color: var(--dc-gray-800) !important;
  letter-spacing: 0.01em !important;
}
.mud-nav-group-children {
  border-left: 1.5px solid var(--dc-gray-300) !important;
  margin-left: 24px !important;
}

/* Section label in drawer */
.dc-nav-section {
  font-size: 9.5px !important;
  font-weight: 800 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  color: var(--dc-gray-500) !important;
  padding: 14px 18px 4px !important;
}

/* ── DataGrid / Table ───────────────────────────────────────── */
.mud-table-root { border-radius: var(--dc-radius-lg) !important; overflow: hidden !important; }

.mud-table-head .mud-table-cell,
.mud-table-head th {
  font-size: 0.7rem !important;
  font-weight: 800 !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  color: var(--dc-gray-600) !important;
  background: var(--dc-gray-100) !important;
  border-bottom: 1px solid var(--dc-gray-300) !important;
  padding: 12px 18px !important;
  white-space: nowrap !important;
}

.mud-table-body .mud-table-row {
  transition: background var(--dc-transition-fast) !important;
}
.mud-table-body .mud-table-row:hover .mud-table-cell {
  background: rgba(201,168,76,.05) !important;
}
.mud-table-body .mud-table-cell {
  padding: 13px 18px !important;
  border-bottom: 1px solid var(--dc-gray-200) !important;
  font-size: 0.885rem !important;
}
.mud-table-body .mud-table-row:last-child .mud-table-cell { border-bottom: none !important; }

/* DataGrid toolbar */
.mud-table-toolbar {
  background: var(--dc-gray-50) !important;
  border-bottom: 1px solid var(--dc-gray-200) !important;
  padding: 10px 18px !important;
  min-height: 52px !important;
}

/* DataGrid footer / pagination */
.mud-table-pagination { border-top: 1px solid var(--dc-gray-200) !important; }

/* Striped rows */
.mud-table.mud-table-striped .mud-table-body .mud-table-row:nth-child(odd) .mud-table-cell {
  background: rgba(250,248,245,.7) !important;
}

/* ── Progress bar ───────────────────────────────────────────── */
.mud-progress-linear { border-radius: var(--dc-radius-pill) !important; }
.mud-progress-linear-bar { background: var(--dc-primary) !important; }

/* ── Popover / Menu ─────────────────────────────────────────── */
.mud-popover-content {
  border-radius: var(--dc-radius-md) !important;
  box-shadow: var(--dc-shadow-lg) !important;
  border: 1px solid var(--dc-gray-200) !important;
}
.mud-list-item {
  border-radius: var(--dc-radius-sm) !important;
  margin: 2px 4px !important;
  font-size: 0.88rem !important;
}

/* ── Dialog ─────────────────────────────────────────────────── */
.mud-dialog {
  border-radius: var(--dc-radius-xl) !important;
  box-shadow: var(--dc-shadow-xl) !important;
  overflow: hidden !important;
}
.mud-dialog-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  border-bottom: 1px solid var(--dc-gray-200) !important;
  padding: 16px 24px !important;
}
.mud-dialog-content { padding: 20px 24px !important; }
.mud-dialog-actions {
  padding: 12px 20px !important;
  border-top: 1px solid var(--dc-gray-200) !important;
  background: var(--dc-gray-50) !important;
}

/* ── Tooltip ────────────────────────────────────────────────── */
.mud-tooltip {
  border-radius: var(--dc-radius-sm) !important;
  font-size: 0.78rem !important;
  font-weight: 500 !important;
  background: var(--dc-gray-900) !important;
}

/* ── Snackbar ───────────────────────────────────────────────── */
.mud-snackbar {
  border-radius: var(--dc-radius-md) !important;
  box-shadow: var(--dc-shadow-lg) !important;
  font-size: 0.875rem !important;
}

/* ── Badge ──────────────────────────────────────────────────── */
.mud-badge { border-radius: var(--dc-radius-pill) !important; font-weight: 700 !important; }

/* ── Switch / Toggle ────────────────────────────────────────── */
.mud-switch-track { border-radius: var(--dc-radius-pill) !important; }

/* ── Tabs ───────────────────────────────────────────────────── */
.mud-tab {
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  min-width: 100px !important;
}
.mud-tab.mud-tab-active { color: var(--dc-primary-dark) !important; font-weight: 700 !important; }
.mud-tabs-indicator { background: var(--dc-primary) !important; height: 3px !important; border-radius: 3px 3px 0 0 !important; }

/* ═══════════════════════════════════════════════════════════════
   DawaCloud Component Classes
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Header ─────────────────────────────────────────────── */
.dc-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding: 20px 24px;
  background: #fff;
  border-radius: var(--dc-radius-lg);
  border: 1px solid var(--dc-gray-200);
  border-top: 3px solid var(--dc-primary);
  box-shadow: var(--dc-shadow-sm);
}
.dc-page-header-title {
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.4px !important;
  line-height: 1.2 !important;
  color: var(--dc-gray-900);
  font-family: 'Playfair Display', Georgia, serif !important;
}
.dc-page-header-sub {
  font-size: 0.855rem;
  color: var(--dc-gray-500);
  margin-top: 3px;
}
.dc-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* ── KPI Card ────────────────────────────────────────────────── */
.dc-kpi-card {
  border-radius: var(--dc-radius-md) !important;
  overflow: hidden !important;
  transition: transform var(--dc-transition-base), box-shadow var(--dc-transition-base) !important;
  cursor: default;
  position: relative;
}
.dc-kpi-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--dc-shadow-lg) !important;
}
.dc-kpi-card-header {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dc-kpi-card-body {
  padding: 14px 18px 16px;
}
.dc-kpi-value {
  font-size: 1.7rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.5px !important;
  line-height: 1.1 !important;
  font-family: 'Playfair Display', serif !important;
}
.dc-kpi-label {
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  opacity: 0.85;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.dc-kpi-sub {
  font-size: 0.78rem;
  margin-top: 4px;
}
.dc-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--dc-radius-pill);
  margin-top: 8px;
}
.dc-kpi-trend.up   { background: rgba(46,107,53,.12); color: #1B5E20; }
.dc-kpi-trend.down { background: rgba(184,50,50,.10); color: #B71C1C; }
.dc-kpi-trend.neutral { background: var(--dc-gray-200); color: var(--dc-gray-600); }
.dc-kpi-icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--dc-radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.20);
  flex-shrink: 0;
}

/* ── Chart Card ──────────────────────────────────────────────── */
.dc-chart-card {
  border-radius: var(--dc-radius-md) !important;
  overflow: hidden !important;
  box-shadow: var(--dc-shadow-sm) !important;
  transition: box-shadow var(--dc-transition-base) !important;
  background: #fff !important;
  border: 1px solid var(--dc-gray-200) !important;
}
.dc-chart-card:hover {
  box-shadow: var(--dc-shadow-md) !important;
}
.dc-chart-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--dc-gray-200);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dc-chart-title {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--dc-gray-900);
  font-family: 'Playfair Display', Georgia, serif !important;
}
.dc-chart-subtitle {
  font-size: 0.78rem;
  color: var(--dc-gray-500);
  margin-top: 2px;
}
.dc-chart-body { padding: 8px 4px 4px; }

/* ── Colored card header ──── */
.dc-card-header-gradient {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ── Status Badge ─────────────────────────────────────────────── */
.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--dc-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.dc-badge-success { background: #E8F5E9; color: #1B5E20; }
.dc-badge-warning { background: #FFF3E0; color: #BF360C; }
.dc-badge-error   { background: #FFEBEE; color: #B71C1C; }
.dc-badge-info    { background: #E3F2FD; color: #0D47A1; }
.dc-badge-neutral { background: var(--dc-gray-200); color: var(--dc-gray-700); }
.dc-badge-primary { background: rgba(201,168,76,.12); color: var(--dc-primary-dark); }

/* ── Empty State ─────────────────────────────────────────────── */
.dc-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 24px;
  gap: 10px;
  text-align: center;
}
.dc-empty-icon {
  font-size: 64px !important;
  opacity: 0.15;
  color: var(--dc-primary);
}
.dc-empty-title {
  font-weight: 600 !important;
  color: var(--dc-gray-700) !important;
}
.dc-empty-sub {
  color: var(--dc-gray-500) !important;
  font-size: 0.875rem !important;
}

/* ── Filter Bar ──────────────────────────────────────────────── */
.dc-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--dc-radius-lg);
  border: 1px solid var(--dc-gray-200);
  border-left: 3px solid var(--dc-gray-300);
  background: #fff;
  margin-bottom: 16px;
  box-shadow: var(--dc-shadow-xs);
}

/* ── User Avatar ─────────────────────────────────────────────── */
.dc-avatar {
  width: 36px; height: 36px;
  border-radius: var(--dc-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 700;
  background: rgba(201,168,76,.28);
  color: #0A1628;
  cursor: pointer;
  flex-shrink: 0;
  letter-spacing: 0.5px;
  transition: background var(--dc-transition-fast);
  border: 1.5px solid rgba(201,168,76,.55);
  user-select: none;
}
.dc-avatar:hover { background: rgba(201,168,76,.42); }

/* ── User menu ───────────────────────────────────────────────── */
.dc-user-menu .mud-list-item { font-family: 'Source Sans 3', sans-serif !important; }

/* ── Loader / Progress ───────────────────────────────────────── */
.dc-page-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  gap: 16px;
}

/* ── Stat Row ────────────────────────────────────────────────── */
.dc-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--dc-gray-200);
}
.dc-stat-row:last-child { border-bottom: none; }

/* ── Section Title ───────────────────────────────────────────── */
.dc-section-title {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: var(--dc-gray-600) !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  margin-bottom: 12px !important;
}

/* ── Action Row ─────────────────────────────────────────────── */
.dc-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--dc-gray-200);
  flex-wrap: wrap;
}

/* ── Rx badge ───────────────────────────────────────────────── */
.dc-rx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--dc-primary);
  color: #0A1628;
  padding: 4px 12px;
  border-radius: var(--dc-radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════
   Auth Pages — Apothecary Noir
   ═══════════════════════════════════════════════════════════════ */
.dc-auth-bg {
  min-height: 100vh;
  background: linear-gradient(150deg, #070E1A 0%, #0A1628 40%, #132240 75%, #1C3055 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow: hidden;
}

/* Diagonal thin-line ornament overlay */
.dc-auth-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -55deg,
      rgba(201,168,76,.035) 0px,
      rgba(201,168,76,.035) 1px,
      transparent 1px,
      transparent 60px
    );
  pointer-events: none;
}

/* Warm radial glow bottom-right */
.dc-auth-bg::after {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.07) 0%, transparent 65%);
  bottom: -150px; right: -120px;
  pointer-events: none;
}

.dc-auth-card {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

.dc-auth-logo-wrap {
  background: rgba(201,168,76,.12);
  border-radius: var(--dc-radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(201,168,76,.22);
  display: inline-flex;
}

.dc-auth-paper {
  border-radius: var(--dc-radius-lg) !important;
  padding: 28px 32px !important;
  background: rgba(250,248,245,.98) !important;
  box-shadow: 0 28px 72px rgba(10,22,40,.5), 0 8px 28px rgba(10,22,40,.28),
              0 0 0 1px rgba(201,168,76,.12) !important;
  border: 1px solid rgba(201,168,76,.12) !important;
  border-top: 3px solid #C9A84C !important;
}

/* ═══════════════════════════════════════════════════════════════
   Animations & Transitions
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse-ring {
  0%   { transform: scale(.95); box-shadow: 0 0 0 0 rgba(201,168,76,.4); }
  70%  { transform: scale(1);   box-shadow: 0 0 0 8px rgba(201,168,76,0); }
  100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
@keyframes goldGlow {
  0%, 100% { opacity: 0.05; }
  50%       { opacity: 0.10; }
}
@keyframes floatOrb {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33%       { transform: translateY(-22px) rotate(2deg); }
  66%       { transform: translateY(11px) rotate(-1.5deg); }
}
@keyframes floatOrbAlt {
  0%, 100% { transform: translateY(0px) scale(1); }
  50%       { transform: translateY(24px) scale(1.05); }
}
@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes rotateSlowCCW {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ── Auth animated background elements ───────────────────────── */
.dc-orb-1 {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(28,48,85,.58) 0%, transparent 70%);
  top: -190px; left: -190px;
  pointer-events: none; z-index: 0;
  animation: floatOrb 16s ease-in-out infinite;
}
.dc-orb-2 {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.075) 0%, transparent 65%);
  bottom: -140px; right: -110px;
  pointer-events: none; z-index: 0;
  animation: floatOrbAlt 19s ease-in-out infinite;
}
.dc-orb-3 {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(19,34,64,.62) 0%, transparent 70%);
  top: 42%; left: 54%;
  pointer-events: none; z-index: 0;
  animation: floatOrb 23s ease-in-out infinite 5s;
}
.dc-ring-1 {
  position: absolute;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.052);
  top: -75px; right: 6%;
  pointer-events: none; z-index: 0;
  animation: rotateSlow 38s linear infinite;
}
.dc-ring-2 {
  position: absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,.042);
  bottom: 7%; left: 2%;
  pointer-events: none; z-index: 0;
  animation: rotateSlowCCW 26s linear infinite;
}
.dc-ring-3 {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1.5px solid rgba(201,168,76,.068);
  top: 27%; right: 21%;
  pointer-events: none; z-index: 0;
  animation: rotateSlow 21s linear infinite 3.5s;
}

.dc-animate-in    { animation: fadeInUp .35s ease both; }
.dc-fade-in       { animation: fadeIn   .25s ease both; }
.dc-delay-1       { animation-delay: .08s; }
.dc-delay-2       { animation-delay: .16s; }
.dc-delay-3       { animation-delay: .24s; }
.dc-delay-4       { animation-delay: .32s; }
.dc-delay-5       { animation-delay: .40s; }
.dc-delay-6       { animation-delay: .48s; }
.dc-delay-7       { animation-delay: .56s; }
.dc-delay-8       { animation-delay: .64s; }

/* Skeleton shimmer */
.dc-skeleton {
  background: linear-gradient(90deg, var(--dc-gray-100) 25%, var(--dc-gray-200) 50%, var(--dc-gray-100) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.8s infinite linear;
  border-radius: var(--dc-radius-xs);
}

/* ── Auth form refinements ────────────────────────────────────── */

/* Warm glow on focused outlined field inside auth card */
.dc-auth-paper .mud-input-outlined:focus-within {
  box-shadow: 0 0 0 3px rgba(201,168,76,.09);
  border-radius: 6px;
  transition: box-shadow .2s;
}
/* Label turns gold on focus */
.dc-auth-paper .mud-input-outlined:focus-within label.mud-input-label {
  color: #A88838 !important;
}
/* Adornment icon turns gold on focus */
.dc-auth-paper .mud-input-outlined:focus-within .mud-input-adornment .mud-icon-root {
  color: #A88838 !important;
  transition: color .2s;
}
/* Non-focused border: warm sepia instead of gray */
.dc-auth-paper .mud-input-outlined .mud-notch-leading,
.dc-auth-paper .mud-input-outlined .mud-notch-trailing,
.dc-auth-paper .mud-input-outlined .mud-notch-center {
  border-color: #DDD5C5;
  transition: border-color .2s;
}

/* 2FA input — large monospace centered digits */
.dc-2fa-input .mud-input-inner {
  font-size: 2.4rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.55em !important;
  text-align: center !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace !important;
  color: #1A1208 !important;
}

/* Gold CTA button — shimmer sweep on hover */
.dc-btn-gold { position: relative; overflow: hidden; }
.dc-btn-gold::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.24) 50%, transparent 100%);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
.dc-btn-gold:hover::after { animation: goldSweep .58s ease forwards; }
@keyframes goldSweep {
  0%   { transform: translateX(-120%) skewX(-18deg); }
  100% { transform: translateX(220%) skewX(-18deg); }
}

/* OR divider — gradient lines via pseudo-elements */
.dc-or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0;
}
.dc-or-divider::before,
.dc-or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #E0D4C0, transparent);
}
.dc-or-text {
  color: #C0AE98;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  font-family: 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Demo hint — apothecary prescription pad aesthetic */
.dc-demo-hint {
  background: rgba(201,168,76,.05);
  border: 1px dashed rgba(201,168,76,.30);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}
.dc-demo-hint::after {
  content: 'Rₓ';
  position: absolute;
  top: 5px; right: 12px;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-style: italic;
  color: rgba(201,168,76,.28);
  font-weight: 700;
  pointer-events: none;
  line-height: 1;
}

/* Register section divider: gold bar + small-caps label + fading rule */
.dc-field-section {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 14px;
}
.dc-field-section::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(201,168,76,.22), transparent);
}

/* Online pulse indicator */
.dc-online-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dc-primary);
  animation: pulse-ring 2s infinite;
  display: inline-block;
}
.dc-offline-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--dc-gray-400);
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════════════════════════ */
.cursor-pointer { cursor: pointer; }
.select-none    { user-select: none; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full         { width: 100%; }
.h-full         { height: 100%; }
.border-0       { border: none !important; }
.rounded-full   { border-radius: var(--dc-radius-pill) !important; }
.text-mono      { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.875em; }
.font-bold      { font-weight: 700 !important; }
.font-semibold  { font-weight: 600 !important; }
.text-muted     { color: var(--dc-gray-500) !important; }
.text-xs        { font-size: 0.75rem !important; }
.text-sm        { font-size: 0.875rem !important; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap    { flex-wrap: wrap; }
.font-serif   { font-family: 'Playfair Display', Georgia, serif !important; }

/* ═══════════════════════════════════════════════════════════════
   Dark Mode Overrides
   ═══════════════════════════════════════════════════════════════ */
.mud-theme-dark {
  --dc-gray-50:  #0E1828;
  --dc-gray-100: #121E30;
  --dc-gray-200: #1E2E44;
  --dc-gray-300: #2A3E58;
  --dc-gray-400: #3A5070;
  --dc-gray-500: #6A8898;
  --dc-gray-600: #8AA2B0;
  --dc-gray-700: #BED0DC;
  --dc-gray-800: #D8E8F0;
  --dc-gray-900: #EEF4FA;
}

.mud-theme-dark .mud-paper {
  border-color: rgba(201,168,76,.08) !important;
  background: #121E30 !important;
}
.mud-theme-dark .mud-paper.mud-elevation-1:not(.mud-appbar):not(.dc-auth-paper):not(.mud-menu-list):not(.mud-popover-content) {
  border-top-color: rgba(201,168,76,.25) !important;
}

.mud-theme-dark .mud-drawer {
  background: #0E1828 !important;
  border-right-color: rgba(201,168,76,.10) !important;
}
.mud-theme-dark .mud-nav-group-children {
  border-left-color: rgba(201,168,76,.12) !important;
}

.mud-theme-dark .mud-table-head .mud-table-cell,
.mud-theme-dark .mud-table-head th {
  background: rgba(14,24,40,.80) !important;
  color: #A89880 !important;
  border-bottom-color: rgba(201,168,76,.12) !important;
}
.mud-theme-dark .mud-table-body .mud-table-cell {
  border-bottom-color: rgba(201,168,76,.06) !important;
}
.mud-theme-dark .mud-table-body .mud-table-row:hover .mud-table-cell {
  background: rgba(201,168,76,.06) !important;
}
.mud-theme-dark .mud-table-toolbar {
  background: #0E1828 !important;
  border-bottom-color: rgba(201,168,76,.10) !important;
}
.mud-theme-dark .mud-table-pagination { border-top-color: rgba(201,168,76,.10) !important; }

.mud-theme-dark .mud-nav-link { color: #A89880 !important; }
.mud-theme-dark .mud-nav-link:hover:not(.active) {
  background: rgba(201,168,76,.10) !important;
  color: var(--dc-primary-light) !important;
}
.mud-theme-dark .mud-nav-link.active {
  background: linear-gradient(90deg, rgba(201,168,76,.20) 0%, rgba(201,168,76,.06) 100%) !important;
  color: var(--dc-primary) !important;
  box-shadow: inset 3px 0 0 var(--dc-primary) !important;
}
.mud-theme-dark .mud-nav-link.active .mud-nav-link-icon-default { color: var(--dc-primary) !important; }

.mud-theme-dark .mud-popover-content {
  background: #121E30 !important;
  border-color: rgba(201,168,76,.10) !important;
}
.mud-theme-dark .mud-dialog { background: #121E30 !important; }
.mud-theme-dark .mud-dialog-title { border-bottom-color: rgba(201,168,76,.10) !important; }
.mud-theme-dark .mud-dialog-actions {
  border-top-color: rgba(201,168,76,.10) !important;
  background: #0E1828 !important;
}

.mud-theme-dark .dc-page-header {
  background: #121E30;
  border-color: rgba(201,168,76,.10);
  border-top-color: var(--dc-primary);
}
.mud-theme-dark .dc-filter-bar {
  background: #121E30;
  border-color: rgba(201,168,76,.10);
  border-left-color: rgba(201,168,76,.25);
}
.mud-theme-dark .dc-chart-card {
  background: #121E30 !important;
  border-color: rgba(201,168,76,.08) !important;
}
.mud-theme-dark .dc-chart-header { border-bottom-color: rgba(201,168,76,.10); }
.mud-theme-dark .dc-stat-row { border-bottom-color: rgba(201,168,76,.08); }
.mud-theme-dark .dc-action-row { border-bottom-color: rgba(201,168,76,.10); }

.mud-theme-dark .dc-badge-success { background: rgba(46,107,53,.22);  color: #5AA864; }
.mud-theme-dark .dc-badge-warning { background: rgba(196,122,30,.20); color: #E8A020; }
.mud-theme-dark .dc-badge-error   { background: rgba(184,50,50,.20);  color: #D95555; }
.mud-theme-dark .dc-badge-info    { background: rgba(21,101,192,.22); color: #42A5F5; }
.mud-theme-dark .dc-badge-neutral { background: rgba(90,78,62,.28);   color: #A89880; }
.mud-theme-dark .dc-badge-primary { background: rgba(201,168,76,.20); color: #E8C87A; }
.mud-theme-dark .dc-kpi-trend.up   { background: rgba(46,107,53,.20); color: #5AA864; }
.mud-theme-dark .dc-kpi-trend.down { background: rgba(184,50,50,.18); color: #D95555; }

.mud-theme-dark .dc-auth-bg {
  background: linear-gradient(150deg, #030810 0%, #070E1A 40%, #0A1628 75%, #0E1E38 100%);
}
.mud-theme-dark .dc-skeleton {
  background: linear-gradient(90deg, #121E30 25%, #1E2E44 50%, #121E30 75%);
  background-size: 800px 100%;
}

/* ── Auth card dark mode ── */
.mud-theme-dark .dc-auth-paper {
  background: rgba(18,30,48,.97) !important;
  border-color: rgba(201,168,76,.18) !important;
  box-shadow: 0 28px 72px rgba(0,0,0,.7), 0 8px 28px rgba(0,0,0,.5),
              0 0 0 1px rgba(201,168,76,.14) !important;
}

/* Auth text helper classes — light mode */
.dc-auth-heading  { color: #1A1208; }
.dc-auth-subtitle { color: #8A7B6A; }
.dc-auth-body     { color: #4A3F2F; }
.dc-auth-muted    { color: #8A7B6A; }
.dc-auth-label    { color: #A88838; }
.dc-auth-error-text { color: #7D1010; }
.dc-auth-badge-text { color: #A89880; }
.dc-auth-link-text  { color: #4A3F2F; }

/* Auth text helper classes — dark mode */
.mud-theme-dark .dc-auth-heading  { color: #EDE5D5; }
.mud-theme-dark .dc-auth-subtitle { color: #9A8B7A; }
.mud-theme-dark .dc-auth-body     { color: #C4B490; }
.mud-theme-dark .dc-auth-muted    { color: #8A7B6A; }
.mud-theme-dark .dc-auth-label    { color: #C9A84C; }
.mud-theme-dark .dc-auth-error-text { color: #FF8A80; }
.mud-theme-dark .dc-auth-badge-text { color: #6A5B4A; }
.mud-theme-dark .dc-auth-link-text  { color: #C4B490; }

/* Dark mode — input fields inside auth card */
.mud-theme-dark .dc-auth-paper .mud-input-outlined .mud-input-root { color: #EDE5D5 !important; }
.mud-theme-dark .dc-auth-paper .mud-input-label { color: #9A8B7A !important; }
.mud-theme-dark .dc-auth-paper .mud-input-outlined:not(:focus-within) .mud-notch-leading,
.mud-theme-dark .dc-auth-paper .mud-input-outlined:not(:focus-within) .mud-notch-trailing,
.mud-theme-dark .dc-auth-paper .mud-input-outlined:not(:focus-within) .mud-notch-center {
  border-color: rgba(201,168,76,.22) !important;
}
.mud-theme-dark .dc-auth-paper .mud-input-helper-text { color: #8A7B6A !important; }

/* Dark mode — OR divider */
.mud-theme-dark .dc-or-divider::before,
.mud-theme-dark .dc-or-divider::after { border-color: rgba(201,168,76,.15) !important; }
.mud-theme-dark .dc-or-text { color: #6A5B4A !important; background: #121E30 !important; }

/* Dark mode — error/alert boxes */
.mud-theme-dark .dc-auth-error-box {
  background: rgba(184,50,50,.12) !important;
  border-color: rgba(184,50,50,.30) !important;
}
.mud-theme-dark .dc-auth-success-box {
  background: rgba(46,107,53,.12) !important;
  border-color: rgba(46,107,53,.28) !important;
}

/* Dark mode — field section separator */
.mud-theme-dark .dc-field-section { border-bottom-color: rgba(201,168,76,.12) !important; }

/* Dark mode — MudAlert improvements */
.mud-theme-dark .mud-alert.mud-alert-filled-info    { background: rgba(21,101,192,.25) !important; }
.mud-theme-dark .mud-alert.mud-alert-filled-success { background: rgba(46,107,53,.25)  !important; }
.mud-theme-dark .mud-alert.mud-alert-filled-warning { background: rgba(196,122,30,.25) !important; }
.mud-theme-dark .mud-alert.mud-alert-filled-error   { background: rgba(184,50,50,.25)  !important; }
.mud-theme-dark .mud-alert.mud-alert-outlined-info    { border-color: rgba(66,165,245,.35) !important; color: #90CAF9 !important; }
.mud-theme-dark .mud-alert.mud-alert-outlined-success { border-color: rgba(90,168,100,.35) !important; color: #A5D6A7 !important; }
.mud-theme-dark .mud-alert.mud-alert-outlined-warning { border-color: rgba(232,160,32,.35) !important; color: #FFD54F !important; }
.mud-theme-dark .mud-alert.mud-alert-outlined-error   { border-color: rgba(217,85,85,.35)  !important; color: #EF9A9A !important; }

/* Dark mode — MudSelect / MudTextField improvements */
.mud-theme-dark .mud-input-outlined .mud-input-root { color: #EDE5D5 !important; }
.mud-theme-dark .mud-input-control .mud-input-label { color: #9A8B7A !important; }
.mud-theme-dark .mud-input-helper-text { color: #6A5B4A !important; }
.mud-theme-dark .mud-select-input { color: #EDE5D5 !important; }

/* Dark mode — Chips */
.mud-theme-dark .mud-chip { background: rgba(201,168,76,.10) !important; color: #C9A84C !important; }
.mud-theme-dark .mud-chip:hover { background: rgba(201,168,76,.18) !important; }

/* Dark mode — MudCard improvements */
.mud-theme-dark .mud-card { background: #121E30 !important; border-color: rgba(201,168,76,.08) !important; }
.mud-theme-dark .mud-card-header { border-bottom-color: rgba(201,168,76,.10) !important; }

/* Dark mode — page-specific stat boxes */
.mud-theme-dark [style*="background:#FAF8F5"],
.mud-theme-dark [style*="background: #FAF8F5"] {
  background: #0E1828 !important;
}
.mud-theme-dark [style*="background:#F5F0E8"],
.mud-theme-dark [style*="background: #F5F0E8"] {
  background: #0E1828 !important;
}

/* ── Reusable light/dark component classes ── */

/* Card header tinted strip */
.dc-card-header-tinted {
  background: #F5F5F5;
  border-bottom: 1px solid #E0E0E0;
}
.mud-theme-dark .dc-card-header-tinted {
  background: rgba(201,168,76,.06) !important;
  border-bottom-color: rgba(201,168,76,.12) !important;
}

/* Activity log item */
.dc-activity-item {
  background: #F8F9FA;
}
.mud-theme-dark .dc-activity-item {
  background: rgba(201,168,76,.04) !important;
  border: 1px solid rgba(201,168,76,.08) !important;
}

/* Support ticket chat bubbles */
.dc-chat-bubble-client {
  background: #E0F2F1;
}
.dc-chat-bubble-agent {
  background: #F5F5F5;
}
.mud-theme-dark .dc-chat-bubble-client {
  background: rgba(0,150,136,.18) !important;
}
.mud-theme-dark .dc-chat-bubble-agent {
  background: rgba(201,168,76,.07) !important;
}

/* Support ticket resolved success panel */
.dc-success-panel {
  background: #E8F5E9;
  border: 1px solid #C8E6C9;
}
.mud-theme-dark .dc-success-panel {
  background: rgba(46,125,50,.15) !important;
  border-color: rgba(46,125,50,.30) !important;
}

/* POS grand total highlight */
.dc-total-highlight {
  background: rgba(0,150,136,.08);
  border: 1px solid rgba(0,150,136,.18);
}
.mud-theme-dark .dc-total-highlight {
  background: rgba(201,168,76,.08) !important;
  border-color: rgba(201,168,76,.20) !important;
}

/* ── Analytics Print / PDF Export ──────────────────────────── */
@media print {
  /* Hide navigation, sidebar, header, and control buttons */
  .mud-drawer,
  .mud-drawer-overlay,
  .mud-layout-main > .mud-appbar,
  .mud-appbar,
  nav,
  .dc-page-header,
  .mud-button-group,
  [class*="ExportPdf"],
  .mud-progress-linear,
  .mud-alert {
    display: none !important;
  }

  /* Full-width content area */
  .mud-main-content,
  .mud-layout-main,
  body,
  html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Print-safe KPI cards */
  .mud-paper,
  .mud-card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    break-inside: avoid;
  }

  /* Page setup */
  @page {
    size: A4 landscape;
    margin: 12mm 10mm;
  }

  /* Analytics title printed at top */
  .dc-print-title {
    display: block !important;
    font-size: 18pt;
    font-weight: 700;
    color: #C9A84C;
    margin-bottom: 8mm;
    border-bottom: 2px solid #C9A84C;
    padding-bottom: 4mm;
  }

  /* Charts need explicit height */
  .apexcharts-canvas,
  .apexcharts-canvas svg {
    width: 100% !important;
  }
}

/* Hidden in normal view, visible only when printing */
.dc-print-title {
  display: none;
}
