/* ============================================
   JEWELFLOW — Enterprise Design System v3.0
   Inspired by Linear, Stripe, Vercel
   ============================================ */

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

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Surface & Background — Cream & White */
  --surface: #ffffff;
  --surface-dim: #f3efe6;
  --surface-bright: #ffffff;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #f9f6ee;
  --surface-container: #f5f0e6;
  --surface-container-high: #e8e4db;
  --surface-container-highest: #e2ded5;
  --on-surface: #1a1a1a;
  --on-surface-variant: #444748;
  --background: #faf8f2;
  --on-background: #1c1c1c;

  /* Primary — Dark Charcoal */
  --primary: #1c1c1c;
  --gold: #1c1c1c;
  --primary-hover: #000000;
  --primary-container: #e8e8e8;
  --primary-muted: rgba(0, 0, 0, 0.05);
  --on-primary: #ffffff;
  --on-primary-container: #000000;

  /* Secondary — Lavender Accent */
  --secondary: #e8d5ff;
  --secondary-container: #d9bfff;
  --on-secondary: #000000;

  /* Tertiary (Forest Green accent) */
  --tertiary: #0f4c3a;
  --tertiary-container: #0b3629;

  /* Error */
  --error: #ef4444;
  --error-container: #fee2e2;

  /* Outline */
  --outline: rgba(0, 0, 0, 0.15);
  --outline-hover: rgba(0, 0, 0, 0.3);
  --outline-strong: #000000;

  /* Status Colors */
  --emerald: #10b981;
  --emerald-dim: rgba(16, 185, 129, 0.15);
  --ruby: #ef4444;
  --ruby-dim: rgba(239, 68, 68, 0.15);
  --sapphire: #3b82f6;
  --sapphire-dim: rgba(59, 130, 246, 0.15);
  --amber: #f59e0b;
  --amber-dim: rgba(245, 158, 11, 0.15);

  /* Spacing — Strict 4px grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  --gutter: 20px;
  --container-padding: 28px;

  /* Radii — Clean, modern */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Shadows — Layered for depth */
  --shadow-sm: 2px 2px 0px rgba(0,0,0,1);
  --shadow-md: 4px 4px 0px rgba(0,0,0,1);
  --shadow-lg: 6px 6px 0px rgba(0,0,0,1);
  --shadow-xl: 8px 8px 0px rgba(0,0,0,1);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 56px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --surface: #111111;
  --surface-dim: #171717;
  --surface-bright: #1c1c1c;
  --surface-container-lowest: #0b0b0b;
  --surface-container-low: #181818;
  --surface-container: #202020;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #333333;
  --on-surface: #eeeeee;
  --on-surface-variant: #b8b8b8;
  --background: #050505;
  --on-background: #eeeeee;
  --primary: #f1f1f1;
  --gold: #f1f1f1;
  --primary-hover: #2c2c2c;
  --primary-container: #2a2a2a;
  --primary-muted: rgba(255, 255, 255, 0.08);
  --on-primary: #050505;
  --on-primary-container: #f5f5f5;
  --secondary: #4d4d4d;
  --secondary-container: #353535;
  --on-secondary: #ffffff;
  --tertiary: #9cd6c1;
  --tertiary-container: #244236;
  --error-container: rgba(239, 68, 68, 0.18);
  --outline: rgba(255, 255, 255, 0.14);
  --outline-hover: rgba(255, 255, 255, 0.28);
  --outline-strong: #555555;
  --shadow-sm: 2px 2px 0px rgba(0,0,0,0.85);
  --shadow-md: 4px 4px 0px rgba(0,0,0,0.85);
  --shadow-lg: 6px 6px 0px rgba(0,0,0,0.85);
  --shadow-xl: 8px 8px 0px rgba(0,0,0,0.85);
}

body[data-theme="dark"] ::selection {
  background: #444444;
  color: #ffffff;
}

body[data-theme="dark"] .glass-panel,
body[data-theme="dark"] .glass-panel--elevated {
  box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.9);
}

body[data-theme="dark"] .glass-panel--elevated {
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.9);
}

body[data-theme="dark"] .sidebar__subtitle,
body[data-theme="dark"] .text-slate,
body[data-theme="dark"] .input-glass::placeholder,
body[data-theme="dark"] .input-with-icon input::placeholder {
  color: #9a9a9a;
}

body[data-theme="dark"] .btn--primary,
body[data-theme="dark"] .sidebar__link--active {
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.9);
}

body[data-theme="dark"] .input-glass,
body[data-theme="dark"] .input-with-icon input {
  background: #121212;
}

body[data-theme="dark"] .glass-panel,
body[data-theme="dark"] .glass-panel--elevated,
body[data-theme="dark"] .pricing-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .inventory-card {
  background-color: #111111;
}

body[data-theme="dark"] .glass-panel--subtle,
body[data-theme="dark"] .role-box,
body[data-theme="dark"] .search-input,
body[data-theme="dark"] .table-user .avatar,
body[data-theme="dark"] .header__avatar {
  background-color: #202020;
}

body[data-theme="dark"] .tab--active,
body[data-theme="dark"] .sidebar__link--active {
  background: #343434;
  border-color: #777777;
  color: #f2f2f2;
}

body[data-theme="dark"] .role-option input:checked + .role-box {
  background: #343434;
  border-color: #777777;
  color: #f2f2f2;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .tab:hover,
body[data-theme="dark"] .sidebar__link:hover {
  background: #262626;
}

body[data-theme="dark"] .btn--primary {
  background: #565656;
  color: #f6f6f6;
  border-color: #777777;
}

body[data-theme="dark"] .btn--primary:hover {
  background: #666666;
}

body[data-theme="dark"] .btn--secondary,
body[data-theme="dark"] .btn--ghost {
  background: #1a1a1a;
  color: #eeeeee;
  border-color: #555555;
}

body[data-theme="dark"] .fab {
  background: #8a8a8a !important;
  color: #111111 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65) !important;
}

body[data-theme="dark"] .fab:hover {
  background: #9a9a9a !important;
}

/* ---------- Reset & Globals ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background-color: var(--background);
  color: var(--on-background);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
  font-weight: 400;
  overflow-x: hidden;
  min-height: 100vh;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

body:has(.login-overlay:not(.hidden)) {
  overflow: hidden;
}

::selection {
  background: var(--secondary);
  color: var(--on-secondary);
}

a { color: inherit; text-decoration: none; }

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
}

input, select, textarea {
  font-family: inherit;
  color: inherit;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ---------- Typography Tokens ---------- */
.text-display-lg {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.text-headline-md {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.text-headline-sm {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.005em;
}

.text-body {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
}

.text-body-sm {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
}

.text-label-caps {
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-label-sm {
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.text-currency {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.text-currency-lg {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Color Utilities ---------- */
.text-primary { color: var(--primary); }
.text-gold { color: var(--primary); }
.text-muted { color: var(--on-surface-variant); }
.text-slate { color: #6b7280; }
.text-emerald { color: var(--emerald); }
.text-ruby { color: var(--ruby); }
.text-sapphire { color: var(--sapphire); }

/* ---------- Surface System ---------- */
.glass-panel {
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 0px rgba(0,0,0,1);
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}

.glass-panel > * {
  position: relative;
  z-index: 1;
}

.glass-panel--elevated {
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  box-shadow: 6px 6px 0px rgba(0,0,0,1);
}

.glass-panel--subtle {
  background: var(--surface-dim);
  border: 1px solid var(--outline);
}

.gold-glow {
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.08),
              0 1px 4px rgba(0, 0, 0, 0.2);
}

.gold-glow-strong {
  box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.15),
              0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Gold shimmer top border — subtle, not garish */
.glass-gold-edge::after {
  content: "";
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.2), transparent);
  z-index: 2;
}

/* ============================================
   LAYOUT — Header, Sidebar, Main
   ============================================ */

/* ---------- Top Header Bar ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--container-padding);
  background: var(--surface);
  border-bottom: 1px solid var(--outline-strong);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__logo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--primary);
  text-transform: uppercase;
}

.header__divider {
  width: 1px;
  height: 20px;
  background: var(--outline);
}

.header__section-name {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--on-surface-variant);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.header__icon-btn:hover {
  color: var(--on-surface);
  background: var(--surface-container-low);
}

.header__avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: var(--radius-full);
  border: 1.5px solid rgba(201, 168, 76, 0.25);
  overflow: hidden;
  background: var(--surface-container-high);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color var(--duration-fast);
  appearance: none;
  -webkit-appearance: none;
}

.header__avatar:hover {
  border-color: var(--primary);
}

.header__avatar img,
.profile-summary__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

.profile-summary-modal {
  max-width: 620px;
}

.profile-summary {
  display: grid;
  gap: 18px;
}

.profile-summary__hero {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.profile-summary__avatar {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 50%;
  border: 1.5px solid var(--outline-strong);
  background: var(--surface-container-high);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
}

.profile-summary__identity,
.profile-summary__item {
  min-width: 0;
}

.profile-summary__name {
  color: var(--on-surface);
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.profile-summary__meta {
  margin-top: 4px;
  color: var(--on-surface-variant);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.profile-summary__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-summary__item {
  padding: 12px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface-container-low);
}

.profile-summary__item--wide {
  grid-column: 1 / -1;
}

.profile-summary__item span {
  display: block;
  margin-bottom: 5px;
  color: var(--on-surface-variant);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-summary__item strong {
  display: block;
  min-width: 0;
  color: var(--on-surface);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.profile-summary__actions {
  margin-top: 4px;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  z-index: 90;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-height) + var(--space-6));
  padding-bottom: var(--space-6);
  background: var(--background);
  border-right: 1px solid var(--outline-strong);
  transition: transform 0.3s var(--ease-out);
}

.sidebar__header {
  padding: 0 var(--space-5);
  margin-bottom: var(--space-8);
}

.sidebar__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.02em;
}

.sidebar__subtitle {
  font-size: 10px;
  color: #4b5563;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 var(--space-3);
  overflow-y: auto;
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: all var(--duration-fast) var(--ease-in-out);
  position: relative;
}

.sidebar__link:hover {
  color: var(--on-surface);
  background: var(--secondary-container);
}

.sidebar__link--active {
  color: var(--on-surface);
  background: var(--secondary);
  border: 1px solid var(--outline-strong);
  box-shadow: 2px 2px 0px rgba(0,0,0,1);
}

.sidebar__link--active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--primary);
  border-radius: 1px;
}

.sidebar__link--active:hover {
  color: var(--on-surface);
}

.sidebar__link .material-symbols-outlined {
  font-size: 20px;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

.sidebar__link--active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  color: var(--primary);
}

.sidebar__footer {
  padding: var(--space-4) var(--space-3) 0;
  border-top: 1px solid var(--outline);
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Main Content ---------- */
.main {
  margin-left: var(--sidebar-width);
  padding-top: calc(var(--header-height) + var(--space-8));
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
  padding-bottom: var(--space-12);
  min-height: 100vh;
}

/* ---------- Page Sections ---------- */
.page-section {
  display: none;
  animation: fadeIn 0.3s var(--ease-out);
}

.page-section--active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Section Header ---------- */
.section-header {
  margin-bottom: var(--space-8);
}

.section-header__overline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.section-header__title {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--on-surface);
}

.section-header__desc {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin-top: var(--space-1);
}

.section-header__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.firm-setup-gate {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px);
}

.firm-setup-gate__intro {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.firm-setup-gate__icon {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border: 1px solid var(--outline);
  font-size: 28px;
}

.firm-setup-gate__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.02;
  color: var(--on-surface);
  margin: 4px 0 10px;
  letter-spacing: 0;
}

.firm-setup-gate__desc {
  color: var(--on-surface-variant);
  max-width: 620px;
  line-height: 1.65;
  margin: 0;
}

.firm-setup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.firm-setup-form__wide,
.firm-setup-form__actions {
  grid-column: 1 / -1;
}

.firm-setup-form__actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
}

.firm-logo-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.firm-logo-picker__preview {
  display: none;
  max-width: 150px;
  max-height: 52px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--outline);
  background: var(--surface-container-low);
  padding: 6px;
}

.staff-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-5);
  align-items: start;
}

.staff-create-panel,
.staff-policy-panel,
.staff-list-panel {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-xl);
}

.staff-list-panel {
  grid-column: 1 / -1;
}

.staff-panel__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 22px;
}

.staff-panel__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-container);
  color: var(--on-primary-container);
  border: 1px solid var(--outline);
}

.staff-account-form {
  display: grid;
  gap: 16px;
}

.staff-submit-btn {
  justify-content: center;
}

.staff-policy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-policy-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  background: var(--surface-container-low);
}

.staff-policy-card h3 {
  margin: 10px 0 6px;
  color: var(--on-surface);
  font-size: 15px;
}

.staff-policy-card p {
  color: var(--on-surface-variant);
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

.staff-account-list {
  display: grid;
  gap: 10px;
}

.staff-account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  background: var(--surface-container-low);
  min-width: 0;
}

.staff-account-row__main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.staff-account-row__main strong,
.staff-account-row__main span {
  overflow-wrap: anywhere;
}

.staff-account-row__main span {
  color: var(--on-surface-variant);
  font-size: 13px;
}

/* ============================================
   COMPONENTS
   ============================================ */

/* ---------- Stats Card ---------- */
.stats-grid {
  display: grid;
  gap: var(--gutter);
  margin-bottom: var(--space-8);
}

.stats-grid--4 { grid-template-columns: repeat(4, 1fr); }
.stats-grid--3 { grid-template-columns: repeat(3, 1fr); }
.stats-grid--2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-in-out);
}

.stat-card:hover {
  border-color: var(--outline-hover);
}

.stat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.stat-card__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-card__icon--gold {
  background: var(--primary-muted);
  color: var(--primary);
}

.stat-card__icon--emerald {
  background: var(--emerald-dim);
  color: var(--emerald);
}

.stat-card__icon--ruby {
  background: var(--ruby-dim);
  color: var(--ruby);
}

.stat-card__trend {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-top: var(--space-2);
}

.stat-card__trend--up { color: var(--emerald); }
.stat-card__trend--down { color: var(--ruby); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  transition: all var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--secondary);
  color: var(--on-secondary);
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
  box-shadow: 2px 2px 0px rgba(0,0,0,1);
}

.btn--primary:hover {
  background: var(--primary-hover);
}

.btn--primary:active { transform: scale(0.98); }

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--outline-strong);
  border-radius: 999px;
}

.btn--ghost:hover {
  background: var(--primary-muted);
  border-color: rgba(201, 168, 76, 0.35);
}

.btn--secondary {
  background: var(--surface-container-low);
  color: var(--on-surface);
  border: 1px solid var(--outline);
}

.btn--secondary:hover {
  background: var(--surface-container);
  border-color: var(--outline-hover);
}

.btn--large {
  padding: 12px 24px;
  font-size: 14px;
}

.btn .material-symbols-outlined {
  font-size: 16px;
}

/* ---------- Input ---------- */
.input-glass {
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--on-surface);
  transition: all var(--duration-fast) var(--ease-in-out);
  width: 100%;
}

.input-glass:focus {
  border-color: rgba(201, 168, 76, 0.4);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.06);
}

.input-glass::placeholder {
  color: #4b5563;
}

.input-glass option,
select option {
  background-color: var(--surface);
  color: var(--on-surface);
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius-full);
  padding: 0 14px;
  height: 36px;
  transition: all var(--duration-fast) var(--ease-in-out);
  flex-shrink: 0;
}

.search-input:focus-within {
  border-color: rgba(201, 168, 76, 0.3);
  background: var(--surface-container);
}

.search-input input {
  background: transparent;
  border: none;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.search-input .material-symbols-outlined {
  color: var(--on-surface-variant);
  font-size: 18px;
}

/* ---------- Status Chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.chip--emerald {
  background: var(--emerald-dim);
  color: var(--emerald);
}

.chip--ruby {
  background: var(--ruby-dim);
  color: var(--ruby);
}

.chip--gold {
  background: var(--primary-muted);
  color: var(--primary);
}

.chip--sapphire {
  background: var(--sapphire-dim);
  color: var(--sapphire);
}

.chip--slate {
  background: rgba(107, 114, 128, 0.12);
  color: #4b5563;
}

.chip__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.chip__dot--pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---------- Table ---------- */
.data-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table thead tr {
  border-bottom: 1px solid var(--outline-strong);
}

.data-table th {
  padding: 12px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  white-space: normal;
  overflow-wrap: anywhere;
}

.data-table td {
  padding: 14px 20px;
  font-size: 13px;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  min-width: 0;
  max-width: 100%;
}

.data-table td > *,
.data-table th > * {
  min-width: 0;
  max-width: 100%;
}

.data-table .table-user,
.data-table .gift-cell,
.data-table td[style*="display:flex"],
.data-table td[style*="display: flex"] {
  min-width: 0;
  flex-wrap: wrap;
}

.data-table .table-user__info {
  min-width: 0;
}

.data-table .table-user__name,
.data-table .table-user__id {
  overflow-wrap: anywhere;
  white-space: normal;
}

div[style*="overflow-x:auto"],
div[style*="overflow-x: auto"],
.vault-table-wrap {
  max-width: 100%;
  overflow-x: hidden !important;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--outline-strong);
  transition: background var(--duration-fast);
}

.data-table tbody tr:hover {
  background: var(--secondary-container);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

/* ---------- Pricing Cards (Dashboard) ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gutter);
  margin-bottom: var(--space-8);
}

.pricing-card {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-in-out);
  cursor: default;
}

.pricing-card:hover {
  border-color: var(--outline-hover);
}

.pricing-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-4);
}

.pricing-card__label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.pricing-card__trend {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 600;
}

.pricing-card__value {
  font-size: 22px;
  font-weight: 700;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.02em;
}

.pricing-card__subtitle {
  font-size: 11px;
  color: var(--on-surface-variant);
  margin-top: var(--space-2);
}

/* ---------- Cash Flow Chart ---------- */
.chart-bar-container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  height: 200px;
  padding: 0 var(--space-2);
}

.chart-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  min-height: 6px;
  transition: all 0.5s var(--ease-out);
  position: relative;
  cursor: pointer;
}

.chart-bar-group {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 100%;
  min-width: 0;
}

.chart-bar--emerald {
  background: linear-gradient(180deg, var(--emerald), rgba(16, 185, 129, 0.35));
}

.chart-bar--ruby {
  background: linear-gradient(180deg, var(--ruby), rgba(239, 68, 68, 0.35));
}

.chart-bar:hover {
  filter: brightness(1.2);
}

.chart-bar__tooltip {
  position: absolute;
  top: -28px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-container-highest);
  color: var(--on-surface);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--duration-fast);
  pointer-events: none;
  border: 1px solid var(--outline);
}

.chart-bar:hover .chart-bar__tooltip {
  opacity: 1;
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) var(--space-2) 0;
}

.chart-labels span {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ---------- Avatar / Initials ---------- */
.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.avatar--md { width: 38px; height: 38px; font-size: 13px; }
.avatar--lg { width: 48px; height: 48px; font-size: 16px; }

.avatar--gold {
  background: var(--primary-muted);
  color: var(--primary);
}

/* ---------- Progress Bar ---------- */
.progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

.progress-bar__fill--gold { background: var(--primary); }
.progress-bar__fill--emerald { background: var(--emerald); }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  animation: fadeIn 0.15s var(--ease-out);
}

.modal-overlay--active {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  animation: modalSlideIn 0.3s var(--ease-out);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
}

.modal__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal__close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  transition: all var(--duration-fast);
}

.modal__close:hover {
  background: var(--surface-container);
  color: var(--ruby);
}

.form-group {
  margin-bottom: var(--space-5);
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-variant);
  margin-bottom: 6px;
}

.form-group select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-md);
  padding: 9px 14px;
  font-size: 14px;
  color: var(--on-surface);
  appearance: none;
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--outline);
}

/* ---------- FAB ---------- */
.fab {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--primary) !important;
  color: var(--on-primary) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 9999 !important;
  transition: all var(--duration-normal) var(--ease-out) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5) !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  box-sizing: border-box !important;
}

.fab:hover {
  transform: scale(1.06);
  background: var(--primary-hover);
  box-shadow: var(--shadow-xl);
}

.fab:active { transform: scale(0.96); }

.fab .material-symbols-outlined {
  font-size: 22px;
}

/* ============================================
   WhatsApp Section — Embedded Browser
   ============================================ */
.whatsapp-container {
  height: calc(100vh - var(--header-height) - 120px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.whatsapp-frame-wrapper {
  flex: 1;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.whatsapp-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.whatsapp-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  padding: var(--space-10);
  text-align: center;
}

.whatsapp-fallback__icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(37, 211, 102, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #25d366;
}

.whatsapp-status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 12px 20px;
  border-radius: var(--radius-lg);
}

/* ============================================
   Inventory Cards
   ============================================ */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gutter);
  margin-bottom: var(--space-8);
}

.inventory-card {
  border-radius: var(--radius-xl);
  transition: all var(--duration-normal) var(--ease-in-out);
  overflow: hidden;
}

.inventory-card:hover {
  border-color: var(--outline-hover);
  box-shadow: var(--shadow-md);
}

.inventory-card__image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.inventory-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.inventory-card:hover .inventory-card__image img {
  transform: scale(1.04);
}

.inventory-card__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(12, 15, 19, 0.85), transparent 50%);
}

.inventory-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
}

.inventory-card__sku {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-4);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.inventory-card__name {
  position: absolute;
  bottom: 26px;
  left: var(--space-4);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

.inventory-card__body {
  padding: var(--space-5);
}

.inventory-card__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.inventory-card__meta-item label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: block;
  margin-bottom: 2px;
}

.inventory-card__meta-item span {
  font-size: 13px;
  font-weight: 400;
}

.inventory-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: var(--space-3);
  border-top: 1px solid var(--outline);
}

.inventory-card__actions {
  display: flex;
  gap: 6px;
}

.inventory-card__action-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  color: var(--on-surface-variant);
  transition: all var(--duration-fast);
  font-size: 16px;
}

.inventory-card__action-btn:hover {
  background: var(--primary-muted);
  color: var(--primary);
  border-color: rgba(201, 168, 76, 0.2);
}

/* ============================================
   Kitty Manager
   ============================================ */
.kitty-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  margin-top: var(--space-8);
}

.kitty-detail-card {
  padding: var(--space-6);
  border-radius: var(--radius-xl);
}

.kitty-detail-card__title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin-bottom: var(--space-5);
}

.kitty-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
  transition: all var(--duration-fast);
}

.kitty-item:hover {
  background: var(--surface-container);
  border-color: var(--outline-hover);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1200px) {
  .stats-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .kitty-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar--open { transform: translateX(0); }
  .main { margin-left: 0; }
  .header { padding: 0 var(--space-5); }
  .main { padding-left: var(--space-5); padding-right: var(--space-5); }
}



/* ---------- Material Symbols Override ---------- */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

/* ---------- Notification Dot ---------- */
.notification-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--surface);
}

/* ---------- Inline Edit ---------- */
.editable-price {
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--radius-xs);
  transition: background var(--duration-fast);
}

.editable-price:hover {
  background: var(--primary-muted);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-6);
}

.tab {
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  color: var(--on-surface-variant);
  transition: all var(--duration-fast);
}

.tab:hover {
  color: var(--on-surface);
  background: var(--surface-container-low);
}

.tab--active {
  color: var(--on-primary);
  background: var(--primary);
}

/* ---------- WhatsApp green accent ---------- */
.wa-green { color: #25d366; }
.wa-bg { background: rgba(37, 211, 102, 0.08); }

/* ---------- Shopify accent ---------- */
.shopify-green { color: #96bf48; }

/* ---------- Cash flow section ---------- */
.cashflow-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gutter);
}

@media (max-width: 1200px) {
  .cashflow-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Activity Item ---------- */
.activity-item {
  display: flex;
  gap: var(--space-3);
  padding: 10px 0;
}

.activity-item + .activity-item {
  border-top: 1px solid var(--outline);
}

.activity-item__avatar {
  position: relative;
  flex-shrink: 0;
}

.activity-status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  border: 2px solid var(--surface-container);
}

/* ---------- Cashflow Summary Cards ---------- */
.cashflow-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ---------- Mobile Menu Toggle ---------- */
.mobile-menu-toggle {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--on-surface-variant);
}

@media (max-width: 1024px) {
  .mobile-menu-toggle { display: flex; }
}

/* ---------- Kitty Gift Item ---------- */
.gift-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 0;
}

.gift-item + .gift-item {
  border-top: 1px solid var(--outline);
}

.gift-item__thumb {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

/* ---------- Empty State ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12) var(--space-10);
  text-align: center;
  gap: var(--space-4);
}

.empty-state__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

/* ---------- Shopify Link Section ---------- */
.shopify-connect {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.shopify-connect__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: rgba(150, 191, 72, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Filters Row ---------- */
.filters-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.filter-select {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
}

.filter-select label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  white-space: nowrap;
}

.filter-select select {
  background: transparent;
  border: none;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
}

/* ---------- Table User Cell ---------- */
.table-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-user__info {
  display: flex;
  flex-direction: column;
}

.table-user__name {
  font-weight: 500;
  font-size: 13px;
}

.table-user__id {
  font-size: 11px;
  color: var(--on-surface-variant);
}

/* ---------- Gift Cell ---------- */
.gift-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gift-cell .material-symbols-outlined {
  color: var(--primary);
  font-size: 16px;
}

/* ---------- Action Dots ---------- */
.action-dots {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-surface-variant);
  transition: all var(--duration-fast);
}

.action-dots:hover {
  background: var(--surface-container);
  color: var(--on-surface);
}

/* ---------- Loading Shimmer ---------- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(90deg,
    rgba(0,0,0,0.02) 25%,
    rgba(0,0,0,0.05) 50%,
    rgba(0,0,0,0.02) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

/* ---------- WhatsApp Loading Spinner ---------- */
.wa-loading-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(37, 211, 102, 0.12);
  border-top-color: #25d366;
  border-radius: var(--radius-full);
  animation: waSpin 0.8s linear infinite;
}

@keyframes waSpin {
  to { transform: rotate(360deg); }
}

/* ---------- Live Price Pulse ---------- */
.price-live-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: var(--radius-full);
  display: inline-block;
  animation: pricePulse 2s ease-in-out infinite;
  margin-right: 4px;
}

@keyframes pricePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------- Price Source Label ---------- */
.price-source-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--emerald-dim);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--emerald);
}

/* ============================================
   Login Screen
   ============================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  transition: opacity 0.4s var(--ease-out), visibility 0.4s;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.login-card {
  width: 100%;
  max-width: 360px;
  padding: 24px 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--outline-strong);
  box-shadow: var(--shadow-xl);
  animation: loginAppear 0.5s var(--ease-out);
}

@keyframes loginAppear {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card__header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.login-logo {
  margin-bottom: var(--space-2);
}

.login-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--on-surface);
}

.login-subtitle {
  font-size: 12px;
  color: var(--on-surface-variant);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Role Selector */
.role-selector {
  display: flex;
  gap: var(--space-3);
  margin-bottom: 0;
}

.role-option {
  flex: 1;
  cursor: pointer;
}

.role-option input {
  display: none;
}

.role-box {
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all var(--duration-normal) var(--ease-in-out);
  color: var(--on-surface-variant);
}

.role-box span {
  font-size: 12px;
  font-weight: 500;
}

.role-box .material-symbols-outlined {
  font-size: 22px;
}

.role-option input:checked + .role-box {
  background: #f7ead0;
  border-color: rgba(201, 168, 76, 0.72);
  color: #6d5216;
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.18);
}

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 0;
}

.login-remember input {
  accent-color: var(--gold-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.login-remember label {
  font-size: 13px;
  color: var(--on-surface-variant);
  cursor: pointer;
  user-select: none;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 12px;
  font-weight: 500;
  color: var(--on-surface-variant);
  padding-left: 2px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--on-surface-variant);
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  padding: 9px 12px 9px 38px;
  color: var(--on-surface);
  font-family: inherit;
  font-size: 14px;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.input-with-icon input:focus {
  outline: none;
  border-color: rgba(201, 168, 76, 0.4);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.06);
}

.login-card__footer {
  margin-top: var(--space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.login-card .btn--large {
  min-height: 42px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.login-card__footer p {
  font-size: 13px;
  color: var(--on-surface-variant);
}

.contact-modal {
  width: min(100%, 420px);
  text-align: center;
}

#contactModal {
  z-index: 10001;
}

.contact-modal__body {
  padding: 8px 0 4px;
}

.contact-modal__body p {
  color: var(--on-surface-variant);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 22px;
}

.contact-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-action {
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
}

.contact-action--whatsapp {
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
}

.fab-menu {
  position: fixed;
  right: calc(24px + env(safe-area-inset-right));
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 350;
  width: min(280px, calc(100vw - 32px));
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.fab-menu.fab-menu--open {
  display: flex;
}

.fab-menu__button {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-container-low);
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  color: var(--on-surface);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.fab-menu__button:hover {
  background: var(--secondary-container);
}

.fab-menu__button .material-symbols-outlined {
  color: var(--primary);
  font-size: 18px;
}

.btn-text {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.btn-text:hover {
  background: var(--primary-muted);
}

.gold-text {
  color: var(--primary);
}

/* ---------- Toast Notification ---------- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s var(--ease-out);
  pointer-events: none;
  background: var(--surface-container-highest);
  border: 1px solid var(--outline);
  color: var(--on-surface);
  box-shadow: var(--shadow-lg);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Jeweler's Safe PIN Pad (Secret Vault)
   ============================================ */
.jewelers-safe-pinpad {
  width: 320px;
  background: linear-gradient(145deg, #2a2d34, #1a1c23);
  border-radius: 8px;
  padding: 30px;
  border: 4px solid #4a4d55;
  box-shadow: 
    inset 0 0 20px rgba(0,0,0,0.8),
    0 20px 50px rgba(0,0,0,0.9),
    0 0 0 2px #111;
  font-family: 'Courier New', Courier, monospace;
  position: relative;
  overflow: hidden;
}

.jewelers-safe-pinpad::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg opacity="0.05" xmlns="http://www.w3.org/2000/svg" width="100" height="100"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23n)"/></svg>');
  pointer-events: none;
}

.safe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #111;
  box-shadow: 0 2px 0 #3a3d45;
}

.safe-title {
  color: #a0a5b5;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 2px;
  text-shadow: 0 -1px 1px #000;
}

.safe-screws {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #8a8d95 0%, #4a4d55 100%);
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.2), 0 1px 2px rgba(0,0,0,0.8);
  position: relative;
}

.safe-screws::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 2px;
  right: 2px;
  height: 2px;
  background: #111;
  transform: rotate(45deg);
}

.safe-display-container {
  background: #0a0a0c;
  border: 3px solid #111;
  border-radius: 4px;
  padding: 15px;
  text-align: center;
  margin-bottom: 30px;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.8), 0 1px 0 rgba(255,255,255,0.1);
  position: relative;
}

.safe-display-container::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}

.safe-display {
  color: #ff3333;
  font-size: 32px;
  letter-spacing: 12px;
  margin-right: -12px;
  text-shadow: 0 0 10px rgba(255,51,51,0.5);
  height: 38px;
}

.safe-status {
  font-size: 9px;
  color: #6a6d75;
  margin-top: 8px;
  letter-spacing: 1px;
}

.safe-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  padding: 0 10px;
}

.safe-key {
  background: linear-gradient(145deg, #d4d6dc, #9ca0ab);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  margin: 0 auto;
  font-family: inherit;
  font-size: 20px;
  font-weight: bold;
  color: #1a1c23;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
  box-shadow: 
    0 4px 6px rgba(0,0,0,0.6),
    inset 0 -4px 6px rgba(0,0,0,0.2),
    inset 0 2px 4px rgba(255,255,255,0.8);
  cursor: pointer;
  transition: all 0.1s;
  position: relative;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.safe-key:active {
  transform: translateY(4px);
  box-shadow: 
    0 0 2px rgba(0,0,0,0.8),
    inset 0 -1px 2px rgba(0,0,0,0.2),
    inset 0 1px 2px rgba(255,255,255,0.8);
}

.safe-key.action-clr {
  background: linear-gradient(145deg, #ffcc00, #b28f00);
  font-size: 14px;
}

.safe-key.action-esc {
  background: linear-gradient(145deg, #ff6b6b, #c92a2a);
  font-size: 14px;
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}

/* ============================================
   Black Market Vault Theme overrides
   ============================================ */
.black-market-theme {
  background-color: #000000 !important;
  color: #ffcc00 !important;
}

.black-market-theme .tab {
  border: 1px solid rgba(255,204,0,0.2);
  margin-right: 4px;
}
.black-market-theme .tab--active {
  background-color: rgba(255,204,0,0.1);
  border-color: #ffcc00;
  color: #ffcc00;
  box-shadow: 0 0 10px rgba(255,204,0,0.2);
}

.black-market-theme .btn {
  background-color: #d90429 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: bold;
}
.black-market-theme .btn:hover {
  background-color: #ef233c !important;
  box-shadow: 0 0 15px rgba(239,35,60,0.4);
}

.black-market-theme .data-table th {
  background: #0a0a0a !important;
  color: #ffcc00 !important;
  border-bottom: 2px solid #d90429 !important;
}
.black-market-theme .data-table td {
  border-bottom: 1px solid rgba(255,204,0,0.1) !important;
  color: #fff !important;
}
.black-market-theme .data-table tr:hover td {
  background: rgba(255,204,0,0.05) !important;
}

/* Global Search Dropdown Styling Fixes */
#globalSearchResults {
    background: var(--surface) !important;
    border: 1px solid var(--outline-strong) !important;
    color: var(--on-surface) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.22) !important;
    contain: layout paint !important;
}

#globalSearchResults .global-search-section {
    color: var(--primary) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    margin: 8px 4px 4px !important;
    text-transform: uppercase !important;
}

#globalSearchResults .global-search-result {
    padding: 8px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    color: var(--on-surface) !important;
}

#globalSearchResults .global-search-result:hover {
    background: var(--surface-container-low) !important;
}

#globalSearchResults .global-search-muted {
    color: var(--on-surface-variant) !important;
}

body[data-theme="dark"] #globalSearchResults {
    background: #111111 !important;
    border-color: #555555 !important;
    color: #eeeeee !important;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.72) !important;
}

body[data-theme="dark"] #globalSearchResults .global-search-result:hover {
    background: #222222 !important;
}


/* ============================================
   MOBILE RESPONSIVE OVERHAUL (max-width: 768px)
   ============================================ */



/* Pincode Mobile Overrides */



/* ============================================
   ELEGANT PINPAD OVERHAUL (Light Mode / Glass)
   ============================================ */
.elegant-pinpad {
  width: 340px;
  max-width: 95%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  animation: slideUpFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
  0% { opacity: 0; transform: translateY(40px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.elegant-pinpad__header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.elegant-pinpad__title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.elegant-display-container {
  width: 100%;
  background: var(--surface-container-high);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.elegant-display {
  font-family: 'DM Serif Display', serif;
  font-size: 32px;
  color: var(--text-primary);
  letter-spacing: 8px;
  height: 40px;
  line-height: 40px;
}

.elegant-status {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.elegant-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
  padding: 0 10px;
}

.elegant-key {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface-container-low);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  margin: 0 auto;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.elegant-key:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.08);
}

.elegant-key:active {
  transform: translateY(2px) scale(0.92);
  background: var(--surface-container-high);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.elegant-key.action-clr {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-dark);
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.2);
}

.elegant-key.action-esc {
  font-size: 14px;
  font-weight: 600;
  color: var(--rose);
  background: rgba(239, 35, 60, 0.05);
  border-color: rgba(239, 35, 60, 0.1);
}




/* ============================================
   MINIMALIST PINPAD (As requested by mockup)
   ============================================ */
#vaultPinOverlay[style*="display: flex"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.minimal-pinpad {
  width: 100%;
  height: 100%;
  max-width: 420px;
  background: #fbfbfb;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  position: relative;
}

.minimal-pinpad__header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  position: absolute;
  top: 0;
  left: 0;
}

.minimal-btn-icon {
  background: none;
  border: none;
  color: #000;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimal-btn-text {
  background: none;
  border: none;
  color: #000;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 2px;
  cursor: pointer;
  padding: 8px;
}

.minimal-display-container {
  margin-top: 20vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 8vh;
}

.minimal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  color: #444;
  margin-bottom: 32px;
}

.pin-circles {
  display: flex;
  gap: 24px;
}

.pin-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: transparent;
  transition: all 0.2s;
}

.pin-circle.filled {
  background: #000;
  border-color: #000;
}

.minimal-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px 40px;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.minimal-keypad .elegant-key {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  width: 64px;
  height: 64px;
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 300;
  color: #000;
  border-radius: 50%;
}

.minimal-keypad .elegant-key:active {
  background: rgba(0,0,0,0.05) !important;
  transform: scale(0.95);
}

.minimal-keypad .action-clr {
  color: #000 !important;
  background: transparent !important;
}

body.black-market-theme,
body.black-market-theme[data-theme] {
  background: #000000 !important;
  color: #ffcc00 !important;
  color-scheme: dark;
}

body.black-market-theme #page-secret-vault,
body.black-market-theme #page-secret-vault * {
  color-scheme: dark;
}

body.black-market-theme {
  overflow-x: hidden !important;
}

body.black-market-theme .main {
  width: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin-left: 0 !important;
  padding: 0 !important;
  background: #000000 !important;
  overflow-x: hidden !important;
}

body.black-market-theme .page-section:not(#page-secret-vault) {
  display: none !important;
}

#vaultPinOverlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100svh !important;
  height: 100lvh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  padding: 0 !important;
  background: #fbfbfb !important;
  color: #000000 !important;
  border: 0 !important;
  z-index: 999999 !important;
  overflow: hidden !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.pin-pad-active {
  overflow: hidden !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
}

#vaultPinOverlay[style*="display: flex"],
#vaultPinOverlay[style*="display:flex"] {
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

#vaultPinOverlay .minimal-pinpad {
  width: 100vw !important;
  width: 100dvw !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100svh !important;
  height: 100lvh !important;
  height: 100dvh !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)) !important;
  background: #fbfbfb !important;
  color: #000000 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

#vaultPinOverlay .minimal-pinpad__header {
  position: absolute !important;
  top: max(12px, env(safe-area-inset-top)) !important;
  left: max(12px, env(safe-area-inset-left)) !important;
  right: max(12px, env(safe-area-inset-right)) !important;
  width: auto !important;
  padding: 0 !important;
  z-index: 2 !important;
}

#vaultPinOverlay .minimal-display-container {
  margin: 20vh 0 8vh !important;
  margin: 20dvh 0 8dvh !important;
}

#vaultPinOverlay .minimal-keypad {
  width: min(100%, 320px) !important;
  max-width: 320px !important;
  gap: clamp(16px, 4vh, 28px) clamp(22px, 8vw, 44px) !important;
  pointer-events: auto !important;
}

#vaultPinOverlay .elegant-key,
#vaultPinOverlay .minimal-btn-icon,
#vaultPinOverlay .minimal-btn-text {
  pointer-events: auto !important;
  touch-action: manipulation !important;
  -webkit-tap-highlight-color: transparent !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

#vaultPinOverlay .elegant-key {
  width: 68px !important;
  height: 68px !important;
  min-width: 68px !important;
  min-height: 68px !important;
}

#vaultPinOverlay .minimal-status {
  margin-top: 18px !important;
  min-height: 16px !important;
  font-family: 'Outfit', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 1.8px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-transform: uppercase !important;
}

#vaultPinOverlay,
#vaultPinOverlay[data-theme="light"] {
  background: #fbfbfb !important;
  color: #000000 !important;
}

#vaultPinOverlay .minimal-pinpad,
#vaultPinOverlay[data-theme="light"] .minimal-pinpad {
  background: #fbfbfb !important;
  color: #000000 !important;
}

#vaultPinOverlay .minimal-title,
#vaultPinOverlay .minimal-btn-icon,
#vaultPinOverlay .minimal-btn-text,
#vaultPinOverlay .elegant-key {
  color: #000000 !important;
}

#vaultPinOverlay .pin-circle {
  border-color: #c8c8c8 !important;
}

#vaultPinOverlay .pin-circle.filled {
  background: #000000 !important;
  border-color: #000000 !important;
}

#vaultPinOverlay[data-theme="dark"] {
  background: #050505 !important;
  color: #eeeeee !important;
}

#vaultPinOverlay[data-theme="dark"] .minimal-pinpad {
  background: #050505 !important;
  color: #eeeeee !important;
}

#vaultPinOverlay[data-theme="dark"] .minimal-title,
#vaultPinOverlay[data-theme="dark"] .minimal-btn-icon,
#vaultPinOverlay[data-theme="dark"] .minimal-btn-text,
#vaultPinOverlay[data-theme="dark"] .elegant-key {
  color: #eeeeee !important;
}

#vaultPinOverlay[data-theme="dark"] .pin-circle {
  border-color: #555555 !important;
}

#vaultPinOverlay[data-theme="dark"] .pin-circle.filled {
  background: #d0d0d0 !important;
  border-color: #d0d0d0 !important;
}

#vaultPinOverlay[data-theme="dark"] .minimal-keypad .elegant-key:active {
  background: rgba(255, 255, 255, 0.08) !important;
}

@media (max-height: 640px) {
  #vaultPinOverlay .minimal-display-container {
    margin: 16vh 0 4vh !important;
    margin: 16dvh 0 4dvh !important;
  }

  #vaultPinOverlay .minimal-keypad {
    gap: 16px 36px !important;
    max-width: 300px !important;
  }

  #vaultPinOverlay .elegant-key {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
  }
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 40px;
  right: 32px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
}

.text-metric-lg {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}


/* ============================================
   PRINT MEDIA QUERIES (INVOICE GENERATION)
   ============================================ */

/* Screen Preview for Print Container */
.print-container {
  background: #ffffff;
  color: #111111;
  width: 100%;
  max-width: 21cm;
  min-height: 29.7cm;
  margin: 0 auto;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  font-family: Arial, sans-serif;
}
.print-container h1, .print-container h2, .print-container h3, .print-container p {
  color: #111111;
}

@media print {
  /* Hide absolutely everything else */
  body * {
    visibility: hidden;
  }
  
  body {
    background: #fff;
    margin: 0;
    padding: 0;
  }

  /* Make the print container and its children visible */
  .print-container, .print-container * {
    visibility: visible;
  }
  .print-container {
    display: block !important;
  }

  /* Position the print container at the top left of the page */
  .print-container {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 21cm; /* A4 Width */
    margin: 0 auto;
    padding: 20px;
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    min-height: auto;
    font-family: 'Inter', sans-serif;
  }

  /* Typography */
  .print-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #000;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .print-brand h1 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin: 0 0 5px 0;
    color: #000;
  }
  
  .print-brand p {
    margin: 0;
    font-size: 12px;
    color: #333;
  }

  .print-meta h2 {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 10px 0;
    text-align: right;
  }

  .print-meta p {
    margin: 2px 0;
    font-size: 12px;
    text-align: right;
  }

  .print-customer {
    margin-bottom: 30px;
  }
  
  .print-customer p {
    margin: 2px 0;
    font-size: 12px;
  }

  .print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
  }

  .print-table th {
    background-color: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
    color: #000;
    font-size: 12px;
    padding: 10px;
    text-align: left;
    border: 1px solid #000;
  }

  .print-table td {
    padding: 10px;
    font-size: 12px;
    border: 1px solid #000;
  }

  .print-summary-container {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
  }

  .print-notes-section {
    width: 50%;
    font-size: 12px;
  }

  .print-totals-section {
    width: 40%;
  }

  .print-totals-table {
    width: 100%;
    border-collapse: collapse;
  }

  .print-totals-table td {
    padding: 8px 10px;
    border: 1px solid #000;
    font-size: 12px;
  }

  .print-grand-total td {
    font-weight: bold;
    font-size: 14px;
    background-color: #f5f5f5 !important;
    -webkit-print-color-adjust: exact;
  }

  /* Hide print container on screen */
  
}

/* Fallback hiding for screen if browser ignores inner media query */



/* Drag and Drop Customizer */
.drag-block {
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--outline-strong);
  border-radius: var(--radius);
  cursor: grab;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.drag-block:active { cursor: grabbing; }
.drag-block .material-symbols-outlined { font-size: 16px; }

.drop-zone {
  flex: 1;
  border: 2px dashed #ccc;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  gap: 8px;
  position: relative;
  background: #fafafa;
}
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-muted);
}
.drop-zone-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  pointer-events: none;
}

/* ============================================
   Secure Vault Terminal Overhaul
   ============================================ */
#page-secret-vault.vault-terminal {
  display: none;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px;
  background: #000000;
  color: #ffcc00;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  overflow-x: hidden;
  color-scheme: dark;
}

#page-secret-vault.vault-terminal.page-section--active {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.vault-terminal,
.vault-terminal * {
  box-sizing: border-box;
}

.vault-terminal__header {
  padding-bottom: 16px;
  margin-bottom: 28px;
  border-bottom: 1px solid #ef233c;
}

.vault-terminal__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.vault-terminal__identity {
  min-width: 0;
}

.vault-terminal__title {
  margin: 0;
  color: #ef233c;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 28px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.vault-terminal__subtitle {
  margin: 6px 0 0;
  color: rgba(255, 204, 0, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.vault-terminal__panic {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 0;
  border-radius: 4px;
  background: #ef233c;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  touch-action: manipulation;
}

.vault-terminal__panic:hover {
  background: #ff4055;
  box-shadow: 0 0 15px rgba(239, 35, 60, 0.42);
}

.vault-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 204, 0, 0.3);
  background: transparent;
}

.vault-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid rgba(255, 204, 0, 0.2);
  border-radius: 4px;
  background: transparent;
  color: rgba(255, 204, 0, 0.58);
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
}

.vault-tab.tab--active,
.vault-tab[aria-selected="true"] {
  background: rgba(255, 204, 0, 0.1);
  color: #ffcc00;
  border-color: #ffcc00;
  box-shadow: 0 0 10px rgba(255, 204, 0, 0.2);
}

.vault-content {
  width: 100%;
  min-width: 0;
  color: #ffcc00;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  overflow-x: hidden;
}

.vault-state {
  padding: 40px 0;
  color: rgba(255, 204, 0, 0.56);
  text-align: center;
}

.vault-state--error {
  color: #ff3333;
  text-align: left;
}

.vault-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  width: 100%;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 204, 0, 0.3);
  background: rgba(0, 0, 0, 0.52);
  color: #ffcc00;
}

.vault-metric {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.vault-metric__label {
  color: rgba(255, 204, 0, 0.7);
  font-size: 12px;
  line-height: 1.2;
}

.vault-metric__value {
  color: #33ff33;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.vault-metric__value--alert,
.vault-cell--accent {
  color: #ef233c !important;
}

.vault-cell--positive {
  color: #33ff33 !important;
}

.vault-cell--negative {
  color: #ff3333 !important;
}

.vault-cell--muted {
  color: #777777 !important;
}

.vault-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.vault-table {
  width: 100%;
  text-align: left;
  table-layout: auto;
  white-space: normal;
}

.vault-table th {
  background: #0a0a0a !important;
  color: #ffcc00 !important;
  border-bottom: 2px solid #d90429 !important;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.vault-table td {
  min-width: 0;
  border-bottom: 1px solid rgba(255, 204, 0, 0.1) !important;
  color: #ffffff !important;
  font-family: inherit;
  overflow-wrap: anywhere;
}

.vault-table tr:hover td {
  background: rgba(255, 204, 0, 0.05) !important;
}

.vault-mobile-records {
  display: none;
}

.vault-record {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 204, 0, 0.28);
  background: #020200;
}

.vault-record__field {
  display: grid;
  grid-template-columns: minmax(84px, 30%) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 204, 0, 0.16);
}

.vault-record__field:last-child {
  border-bottom: 0;
}

.vault-record__label {
  color: rgba(255, 204, 0, 0.72);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vault-record__value {
  min-width: 0;
  color: #f5f5f5;
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.vault-pin-overlay .placeholder {
  visibility: hidden;
  pointer-events: none;
}

.vault-pin-overlay .action-clr .material-symbols-outlined {
  font-size: 24px;
  opacity: 0.82;
}

.vault-pin-overlay .pin-circle.pin-success {
  background: #10b981 !important;
  border-color: #10b981 !important;
}

.vault-pin-overlay .pin-circle.pin-error {
  background: #ef233c !important;
  border-color: #ef233c !important;
}

/* Hide normal layout elements when vault is active */
body.black-market-theme .header,
body.black-market-theme .sidebar,
body.black-market-theme .fab {
  display: none !important;
}

/* SECURE EDIT MODAL */
.secure-modal-box {
  background-color: #050505;
  border: 1px solid #d90429;
  box-shadow: 0 0 20px rgba(217,4,41,0.2), inset 0 0 10px rgba(217,4,41,0.1);
  border-radius: 4px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: monospace;
}
.secure-modal-header {
  background-color: #d90429;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  letter-spacing: 0.1em;
}
.secure-modal-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.secure-modal-body {
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.secure-modal-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(217,4,41,0.3);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.secure-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.secure-form-group label {
  color: #ffcc00;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.secure-input {
  background-color: rgba(255,204,0,0.05);
  border: 1px solid rgba(255,204,0,0.2);
  color: #fff;
  padding: 10px 12px;
  border-radius: 2px;
  font-family: monospace;
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
}
.secure-input:focus {
  border-color: #ffcc00;
  box-shadow: 0 0 8px rgba(255,204,0,0.2);
}


/* VAULT FAB */
.vault-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #050505;
  border: 1px solid #d90429;
  box-shadow: 0 0 15px rgba(217, 4, 41, 0.4), inset 0 0 10px rgba(217, 4, 41, 0.2);
  color: #ffcc00;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999999;
  transition: all 0.2s ease;
}
.vault-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(217, 4, 41, 0.6), inset 0 0 15px rgba(217, 4, 41, 0.3);
  color: #d90429;
}
.vault-fab:active {
  transform: scale(0.95);
}
