/* ============================================================
   Pure Gold Shop — World Class Luxury Stylesheet (V2.0)
   Experience: Glassmorphism, Premium Gold Accents, Smooth UX
   ============================================================ */

:root {
  /* Premium HSL-Tailored Palette */
  --gold-primary:  hsl(45, 68%, 50%);  /* Rich Balanced Gold */
  --gold-glimmer:  hsl(45, 80%, 65%);  /* Glowing Accent Gold */
  --gold-dark:     hsl(45, 60%, 32%);  /* Deep Bronze Gold */
  --bg-deep:       hsl(230, 20%, 6%);   /* Premium Deep Charcoal Blue */
  --bg-card:       rgba(15, 17, 26, 0.72); /* Sophisticated Dark Glass */
  --bg-sidebar:    rgba(8, 10, 15, 0.95);  /* Solid Structured Sidebar */
  --accent-line:   rgba(212, 175, 55, 0.12); /* Delicate Gold Border */
  --accent-glow:   rgba(212, 175, 55, 0.25); /* Warm Golden Halo */
  
  /* Text & Typography */
  --text-main:     hsl(45, 15%, 95%);   /* Crisp warm white */
  --text-muted:    hsl(45, 10%, 75%);   /* Classy silver-gold text */
  --text-dim:      hsl(45, 8%, 55%);    /* Subdued bronze text */
  
  /* Indicators */
  --status-success: hsl(145, 50%, 50%);
  --status-error:   hsl(5, 65%, 60%);
  --status-info:    hsl(210, 65%, 60%);
  
  /* Premium Radii & Shadows */
  --radius-lg:     18px;
  --radius-md:     12px;
  --radius-sm:     8px;
  --shadow-lux:    0 20px 50px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(212, 175, 55, 0.1);
  --shadow-inner:  inset 0 1px 2px rgba(255, 255, 255, 0.03), inset 0 -1px 1px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --ease:          cubic-bezier(0.16, 1, 0.3, 1); /* Elegant iOS-style fluid ease */

  /* ── Shorthand aliases used by app.js templates ── */
  --gold:          hsl(45, 68%, 50%);
  --gold-soft:     rgba(212, 175, 55, 0.06);
  --green:         hsl(145, 50%, 50%);
  --red:           hsl(5, 65%, 60%);
  --line:          rgba(212, 175, 55, 0.12);
  --txt2:          hsl(45, 10%, 75%);
  --txt3:          hsl(45, 8%, 55%);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(140, 109, 31, 0.1) 0%, transparent 60%),
    linear-gradient(rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.94)),
    url('luxury_jewelry_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--accent-line); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ─── LAYOUT ─── */
.app { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--accent-line);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.brand {
  padding: 16px 20px;
  text-align: center;
  border-bottom: 1px solid var(--accent-line);
}

.brand h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-glimmer);
  letter-spacing: 1px;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.brand span {
  font-size: 8px;
  letter-spacing: 4px;
  color: var(--text-dim);
  text-transform: uppercase;
}

/* ─── Sidebar Rates Panel ─── */
.sidebar-rates-panel {
  margin: 10px 12px 14px;
  padding: 10px 12px;
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--accent-line);
  border-radius: 10px;
}
.srp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.srp-header > span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold-glimmer);
  text-transform: uppercase;
}
.srp-unit {
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0;
  text-transform: none;
  font-size: 9px;
}
.srp-update-btn {
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--accent-line);
  color: var(--gold-glimmer);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.srp-update-btn:hover {
  background: rgba(212, 175, 55, 0.22);
}
.srp-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.srp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  padding: 2px 0;
}
.srp-label {
  color: var(--text-dim);
  font-weight: 500;
}
.srp-value {
  color: var(--text-main);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.srp-divider {
  height: 1px;
  background: var(--accent-line);
  margin: 5px 0;
}
.srp-updated {
  margin-top: 8px;
  font-size: 9px;
  color: var(--text-dim);
  text-align: right;
}

.nav {
  flex: 1;
  padding: 10px 8px;
  overflow-y: auto;
}

.nav-group-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 12px 6px;
  font-weight: 600;
}

/* Collapsible Navigation Groups */
.nav-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 12px 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  user-select: none;
}
.nav-group-header:hover {
  color: var(--gold-glimmer);
}
.nav-group-header .chevron {
  font-size: 8px;
  transition: transform 0.3s var(--ease);
  color: var(--text-dim);
}
.nav-group-header.open {
  color: var(--gold-glimmer);
}
.nav-group-header.open .chevron {
  transform: rotate(90deg);
}
.nav-sub-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-group-header.open + .nav-sub-items {
  max-height: 380px; /* Dynamic open limit */
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  margin-bottom: 3px;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  transition: all 0.3s var(--ease);
  position: relative;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  transform: translateX(4px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.12) 0%, transparent 100%);
  color: var(--gold-glimmer);
  font-weight: 500;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background: var(--gold-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 10px var(--accent-glow);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  opacity: 0.8;
}

.side-foot {
  padding: 20px 24px;
  border-top: 1px solid var(--accent-line);
}

/* ─── MAIN CONTENT ─── */
.main {
  margin-left: 250px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-x: hidden;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: 64px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(9, 11, 17, 0.94);
  border-bottom: 1px solid var(--accent-line);
  backdrop-filter: blur(18px);
}

.command-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.command-input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font: inherit;
  font-size: 14px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.command-input:focus {
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.command-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: 330px;
  overflow: auto;
  padding: 6px;
  background: rgba(14, 16, 24, 0.98);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.command-results.open { display: block; }

.command-result {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  color: var(--text-main);
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.command-result:hover,
.command-result:focus {
  background: rgba(212, 175, 55, 0.12);
  outline: none;
}

.command-result small,
.command-empty {
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}

.command-empty {
  padding: 12px 10px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.shell-action,
.status-pill {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--accent-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-glimmer);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.shell-action {
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.shell-action:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-1px);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.status-pill strong {
  color: var(--text-main);
  font-size: 10px;
  letter-spacing: 1px;
}

/* ─── TOP RATEBAR ─── */
.ratebar {
  display: flex;
  align-items: center;
  background: rgba(14, 16, 24, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--accent-line);
  padding: 0 24px;
  height: 55px;
  position: sticky;
  top: 0;
  z-index: 50;
}

/* ─── LIVE INDICATOR ─── */
.live-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 15px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 5px 12px;
  border-radius: 20px;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse-green 1.8s infinite;
}
@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}
.live-label {
  font-size: 9px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 1.5px;
}

/* ─── Ticker / Compact display ─── */
.rate-ticker-compact {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #fff;
}
.ticker-gold-item {
  color: rgba(255,255,255,0.7);
}
.ticker-gold-item strong {
  color: var(--gold-glimmer);
}
.ticker-divider {
  width: 1px;
  height: 14px;
  background: var(--accent-line);
}
.ticker-item {
  color: rgba(255,255,255,0.7);
}
.ticker-item strong {
  color: #e2e8f0;
}

/* ─── DROPDOWN WRAPPER ─── */
.rates-dropdown-wrapper {
  position: relative;
}
.rates-dropdown-toggle {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: var(--gold-glimmer);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s var(--ease);
}
.rates-dropdown-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: 0 0 15px rgba(212,175,55,0.1);
}
.rates-dropdown-toggle .chevron-down {
  font-size: 8px;
  transition: transform 0.3s;
  color: var(--gold-glimmer);
}
.rates-dropdown-wrapper.active .rates-dropdown-toggle .chevron-down {
  transform: rotate(180deg);
}

.rates-dropdown-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 320px;
  background: rgba(18, 20, 29, 0.95);
  backdrop-filter: blur(25px);
  border: 1px solid var(--accent-line);
  border-top: 3px solid var(--gold-primary);
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.8);
  padding: 20px;
  display: none;
  z-index: 100;
  animation: dd-slide 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes dd-slide {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.rates-dropdown-wrapper.active .rates-dropdown-content {
  display: block;
}

.dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.dropdown-header span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
}
.dropdown-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-glimmer);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 15px 0 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 4px;
}
.dropdown-section-title:first-of-type {
  margin-top: 0;
}
.dd-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.dd-rate-row:last-child {
  border-bottom: none;
}
.dd-rate-row .label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.dd-rate-row .value {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.rate-edit-btn {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold-primary));
  border: none;
  color: #000;
  padding: 8px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s var(--ease);
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.2);
}

.rate-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

/* ─── PAGES ─── */
.page { 
  padding: 15px 20px; 
  display: none; 
  animation: fadeIn 0.4s var(--ease);
}

.page.active { display: block; }

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

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 15px;
}

.page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.page-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── STATS DASHBOARD ─── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  position: relative;
  transition: all 0.4s var(--ease);
  box-shadow: var(--shadow-inner), 0 10px 30px rgba(0, 0, 0, 0.3);
}

.stat::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-primary), transparent 70%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat:hover {
  border-color: rgba(212, 175, 55, 0.35);
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 15px rgba(212, 175, 55, 0.1);
  background: rgba(20, 22, 33, 0.85);
}

.stat .lab {
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
}

.stat .val {
  font-size: 24px;
  font-weight: 800;
  color: var(--gold-glimmer);
  margin: 6px 0 3px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #fff, var(--gold-glimmer));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat .sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── BUTTONS ─── */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  outline: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
  color: #000;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-glimmer), var(--gold-primary));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--gold-glimmer);
  border-color: var(--accent-line);
}

.btn-ghost:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-primary);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.btn-red {
  background: rgba(217, 104, 95, 0.08);
  color: var(--status-error);
  border-color: rgba(217, 104, 95, 0.25);
}

.btn-red:hover {
  background: var(--status-error);
  color: #fff;
  box-shadow: 0 4px 15px rgba(217, 104, 95, 0.3);
}

.btn-sm { padding: 8px 16px; font-size: 12px; }

/* ─── CARDS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-inner), 0 15px 35px rgba(0, 0, 0, 0.35);
  position: relative;
  transition: all 0.3s var(--ease);
}

.card:hover {
  border-color: rgba(212, 175, 55, 0.22);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-glimmer);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--accent-line);
  letter-spacing: 0.5px;
}

/* ─── FORMS ─── */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }

.field label { 
  font-size: 11px; 
  color: var(--text-muted); 
  font-weight: 600; 
  padding-left: 2px;
}

.inp, select.inp {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  width: 100%;
  transition: all 0.3s var(--ease);
}

.inp:focus, select.inp:focus {
  border-color: var(--gold-primary);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
}

.inp[readonly] { 
  background: rgba(255, 255, 255, 0.02); 
  color: var(--gold-glimmer); 
  border-style: dashed;
}

/* ─── TABLES ─── */
.tbl-wrap {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
}

/* Ensure wide tables scroll horizontally instead of squishing columns */
.tbl-wrap table {
  min-width: 100%;
}

/* Specific overrides for smaller tables where scroll is not required */
#page-settings table,
#page-billing table,
.login-box table {
  min-width: auto;
}

th {
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  padding: 8px 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--accent-line);
}

td {
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--accent-line);
  color: var(--text-muted);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
}

.t-gold { color: var(--gold-glimmer); font-weight: 600; }
.t-mono { font-family: 'Inter', monospace; font-variant-numeric: tabular-nums; }

/* ─── MODALS ─── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 500;
}

.overlay.show { display: flex; }

.modal {
  background: #141210;
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
  animation: modalScale 0.3s var(--ease);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--accent-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body { padding: 20px; }

.modal-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--accent-line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ─── TOASTS ─── */
.toast-wrap {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  background: #1A1A1A;
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lux);
  animation: toastSlide 0.4s var(--ease);
  margin-top: 10px;
  line-height: 1.35;
  pointer-events: auto;
}

@keyframes toastSlide {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.ok { border-left: 4px solid var(--status-success); }
.toast.err { border-left: 4px solid var(--status-error); }
.toast.info { border-left: 4px solid var(--status-info); }

/* ─── SHOP SPECIFIC ─── */
.tag {
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.tag-21k { background: rgba(201, 162, 39, 0.1); color: var(--gold-glimmer); }
.tag-22k { background: rgba(255, 215, 0, 0.1); color: #FFD700; }
.tag-silver { background: rgba(226, 232, 240, 0.1); color: #e2e8f0; border: 1px solid rgba(226, 232, 240, 0.2); }
.tag-platinum { background: rgba(203, 213, 225, 0.15); color: #94a3b8; border: 1px solid rgba(203, 213, 225, 0.3); }
.tag-palladium { background: rgba(148, 163, 184, 0.1); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.25); }
.badge-success { background: rgba(79, 180, 119, 0.1); color: var(--status-success); }

.cart-item-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 15px;
}

/* ─── MOBILE ─── */
@media (max-width: 992px) {
  .sidebar { transform: translateX(-250px); transition: transform 0.3s var(--ease); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .app-topbar { padding: 10px 72px 10px 14px; align-items: stretch; flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .status-pill { display: none; }
  .page { padding: 25px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 20px; }
  .mobile-toggle { display: flex !important; }
  /* Touch-friendly button sizing — showroom counter par tap karna asaan ho */
  .btn { min-height: 40px; padding: 10px 16px; }
  .btn-sm { min-height: 34px; padding: 7px 12px; }
  .inp, select.inp, textarea.inp { min-height: 40px; font-size: 15px; }
}

.mobile-toggle {
  display: none;
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 200;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gold-primary);
  color: #000;
  border: none;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 10px 30px rgba(201, 162, 39, 0.4);
}


.animate-in {
  animation: modalScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── TOOLBAR ─── */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
}

/* ─── GRID HELPERS ─── */
.grid { display: grid; gap: 12px; }
.g2   { grid-template-columns: repeat(2, 1fr); }
.g3   { grid-template-columns: repeat(3, 1fr); }
.g4   { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .shell-action { flex: 1 1 110px; }
  .toast-wrap { right: 16px; bottom: 16px; }
}

/* ─── MODULE CARDS (Reports grid) ─── */
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-inner);
}

.module-card:hover {
  border-color: var(--accent-glow);
  transform: translateY(-2px);
  background: rgba(30, 28, 24, 0.8);
}

/* ─── CALCBOX ─── */
.calcbox {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  padding: 10px;
}

.checkout-warning {
  margin-top: 10px;
  border: 1px solid rgba(217, 104, 95, 0.35);
  border-radius: 8px;
  background: rgba(217, 104, 95, 0.09);
  color: #fecaca;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  padding: 9px 10px;
}

.checkout-warning.soft {
  border-color: rgba(79, 180, 119, 0.3);
  background: rgba(79, 180, 119, 0.08);
  color: #bbf7d0;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(201, 162, 39, 0.08);
  font-size: 14px;
}

.calc-row:last-child { border-bottom: none; }

.calc-row .lab { color: var(--text-muted); }
.calc-row .val { color: var(--gold-glimmer); font-weight: 600; font-variant-numeric: tabular-nums; }

.calc-row.big .lab { font-size: 15px; color: var(--text-main); font-weight: 600; }
.calc-row.big .val { font-size: 18px; color: var(--gold-glimmer); }

.calc-row .t-red { color: var(--status-error) !important; }
.calc-row .t-green { color: var(--status-success) !important; }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 0;
}

.tab {
  padding: 6px 12px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-bottom: none;
  transition: all 0.2s var(--ease);
}

.tab:hover { color: var(--gold-glimmer); background: rgba(201, 162, 39, 0.05); }

.tab.active {
  color: var(--gold-glimmer);
  background: var(--bg-card);
  border-color: var(--accent-line);
  border-bottom-color: var(--bg-card);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── LOGIN PAGE ─── */
#login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-deep);
  background-image:
    radial-gradient(circle at 30% 20%, rgba(201, 162, 39, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(140, 109, 31, 0.1) 0%, transparent 60%),
    linear-gradient(rgba(10, 10, 10, 0.88), rgba(10, 10, 10, 0.94)),
    url('luxury_jewelry_bg.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 20px;
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: rgba(20, 18, 14, 0.95);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: 50px 40px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 60px rgba(201, 162, 39, 0.05);
  backdrop-filter: blur(20px);
}

.login-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-glimmer);
  text-align: center;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 40px;
}

.login-err {
  color: var(--status-error);
  font-size: 13px;
  text-align: center;
  margin-top: 12px;
  min-height: 20px;
}

/* ─── MODAL CLOSE BUTTON ─── */
.modal-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.2s;
}
.modal-x:hover { color: var(--status-error); }

/* ─── PAGE HEAD BUTTONS WRAP FIX ─── */
.page-head > div:last-child {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ─── STATUSES ─── */
.badge-danger   { background: rgba(217, 104, 95, 0.12); color: var(--status-error);   padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-success  { background: rgba(79, 180, 119, 0.12); color: var(--status-success); padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-info     { background: rgba(91, 155, 213, 0.12); color: var(--status-info);    padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.badge-gold     { background: rgba(201, 162, 39, 0.12); color: var(--gold-glimmer);   padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }

/* ─── TABLE ACTIONS ─── */
.tbl-action-btn {
  background: none;
  border: 1px solid var(--accent-line);
  color: var(--text-muted);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s;
}
.tbl-action-btn:hover { border-color: var(--gold-primary); color: var(--gold-glimmer); }

/* ─── NAV GROUP LABEL ─── */
.nav-group-label {
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 12px 12px 6px;
  font-weight: 600;
}

/* ─── COLOR HELPERS ─── */
.t-red   { color: var(--status-error)   !important; }
.t-green { color: var(--status-success) !important; }
.t-gold  { color: var(--gold-glimmer)   !important; font-weight: 600; }
.t-muted { color: var(--text-muted)     !important; }
.t-mono  { font-family: 'Inter', monospace; font-variant-numeric: tabular-nums; }

/* ─── SETTINGS GRID FIX ─── */
#page-settings .grid.g2 {
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
}

@media (max-width: 1100px) {
  #page-settings .grid.g2 { grid-template-columns: 1fr; }
}

/* ─── RESPONSIVE LAYOUT HELPERS ─── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 18px;
  align-items: start;
}

.two-col-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.two-col-layout > *, .pos-layout > *, .grid > * {
  min-width: 0;
}

@media (max-width: 1250px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 950px) {
  .two-col-layout {
    grid-template-columns: 1fr;
  }
}

/* ─── ERROR HIGHLIGHTING ─── */
.inp.inp-error {
  border-color: var(--status-error) !important;
  box-shadow: 0 0 0 4px rgba(217, 104, 95, 0.15) !important;
  background: rgba(217, 104, 95, 0.05) !important;
}

/* ─── QUICK ACTIONS GRID ─── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.quick-action-card {
  background: rgba(212, 175, 55, 0.03);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.quick-action-card:hover {
  background: rgba(212, 175, 55, 0.08);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.1);
}
.quick-action-icon {
  font-size: 24px;
}
.quick-action-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

/* ─── FLEX WRAPPERS FOR BUTTONS ─── */
.input-group-btn {
  display: flex;
  gap: 6px;
  width: 100%;
}
.input-group-btn select, 
.input-group-btn input {
  flex: 1;
}
.input-group-btn .btn-sq {
  width: 38px;
  height: 38px;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* ─── WIDE TABLES (INVENTORY SPECIFIC) ─── */
.tbl-wrap table.tbl-wide {
  min-width: 1100px;
}

/* ─── PAGINATION BAR FOR LAYMAN UX ─── */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-top: -1px; /* Align perfectly with tbl-wrap bottom */
  flex-wrap: wrap;
  gap: 12px;
}

/* Custom rounded corner overrides when pagination bar follows table */
.tbl-wrap:has(+ .pagination-bar) {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.pagination-stats {
  font-size: 13px;
  color: var(--text-muted);
}

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

.pagination-btn {
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid var(--accent-line);
  color: var(--text-main);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s var(--ease);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-glimmer);
  transform: translateY(-1px);
}

.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-limit-select {
  background: rgba(15, 17, 26, 0.9);
  border: 1px solid var(--accent-line);
  color: var(--text-main);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

/* ─── SEARCHABLE SELECT DROPDOWN ─── */
.searchable-select-wrapper {
  position: relative;
  width: 100%;
}
.searchable-select-input {
  width: 100%;
  padding-right: 32px !important;
  cursor: pointer;
}
.searchable-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 9px;
  color: var(--text-muted);
  pointer-events: none;
  transition: transform 0.2s var(--ease);
}
.searchable-select-wrapper.open .searchable-select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--gold-glimmer);
}
.searchable-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(18, 20, 29, 0.98);
  backdrop-filter: blur(15px);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  z-index: 10000;
  display: none;
}
.searchable-select-menu.open {
  display: block;
}
.searchable-select-menu.open-up {
  top: auto;
  bottom: calc(100% + 4px);
}
.searchable-select-option {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s var(--ease);
}
.searchable-select-option:hover,
.searchable-select-option.active {
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-glimmer);
}
.searchable-select-option.selected {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-glimmer);
  font-weight: 600;
}
.searchable-select-option.empty {
  text-align: center;
  color: var(--text-dim);
  cursor: default;
}

/* ─── CHART OF ACCOUNTS (COA) ─── */
.coa-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}
.coa-section-card {
  background: var(--bg-card);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-inner), 0 15px 35px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.coa-section-header {
  background: rgba(255, 255, 255, 0.02);
  padding: 14px 20px;
  border-bottom: 1px solid var(--accent-line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.coa-section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-glimmer);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.coa-section-header .chevron {
  font-size: 10px;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.coa-section-card.collapsed .coa-section-header .chevron {
  transform: rotate(-90deg);
}
.coa-section-content {
  padding: 10px 20px;
}
.coa-section-card.collapsed .coa-section-content {
  display: none;
}
.coa-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.coa-row:last-child {
  border-bottom: none;
}
.coa-name {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
  display: flex;
  flex-direction: column;
}
.coa-subname {
  font-size: 11px;
  color: var(--text-muted);
}
.coa-balances {
  display: flex;
  gap: 20px;
  align-items: center;
}
.coa-bal-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.coa-bal-label {
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.coa-bal-val {
  font-size: 13px;
  font-weight: 600;
}
.coa-bal-val.cash {
  color: var(--text-main);
}
.coa-bal-val.gold {
  color: var(--gold-glimmer);
}
.coa-bal-val.negative {
  color: var(--status-error);
}
.coa-bal-val.positive {
  color: var(--status-success);
}
.coa-total-bar {
  background: rgba(212, 175, 55, 0.03);
  padding: 12px 20px;
  border-top: 1px solid var(--accent-line);
  display: flex;
  justify-content: flex-end;
}

/* ─── CAMERA SCANNER ANIMATIONS ─── */
@keyframes scanLine {
  0%   { top: 10%; }
  50%  { top: 88%; }
  100% { top: 10%; }
}
#cam-scan-line {
  animation: scanLine 2s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(245,200,66,0.8);
}

/* ─── UI quick-wins (added) ─── */
/* Number right-align utility (jewellery tables: weights/amounts) */
.r { text-align: right; }
td.r, th.r { text-align: right; }

/* Reusable empty-state block */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-dim);
}
.empty-state .es-icon { font-size: 34px; opacity: 0.5; margin-bottom: 8px; }
.empty-state .es-title { color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.empty-state .es-sub { font-size: 13px; }

/* Reusable loading skeleton shimmer */
.skeleton {
  background: linear-gradient(90deg,
    rgba(212,175,55,0.04) 25%,
    rgba(212,175,55,0.10) 37%,
    rgba(212,175,55,0.04) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.3s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-row { height: 14px; margin: 8px 0; }
@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ============================================================
   KaratFlow Luxury Light Mode Style Suite
   ============================================================ */
body.light-mode {
  --gold-primary:  hsl(45, 75%, 45%);  /* Rich Balanced Gold */
  --gold-glimmer:  hsl(45, 80%, 40%);  /* Glowing Accent Gold */
  --gold-dark:     hsl(45, 60%, 28%);  /* Deep Bronze Gold */
  --bg-deep:       #f5f6f8;            /* Soft warm white / light gray */
  --bg-card:       #ffffff;            /* Pure White Cards */
  --bg-sidebar:    #ffffff;            /* Pure White Sidebar */
  --accent-line:   rgba(212, 175, 55, 0.22); /* Delicate Gold Border */
  --accent-glow:   rgba(212, 175, 55, 0.08); /* Warm Golden Halo */
  
  /* Text & Typography */
  --text-main:     #1e293b;            /* Slate 800 */
  --text-muted:    #475569;            /* Slate 600 */
  --text-dim:      #64748b;            /* Slate 500 */

  /* Standard Aliases */
  --gold:          hsl(45, 75%, 45%);
  --gold-soft:     rgba(212, 175, 55, 0.06);
  --line:          rgba(212, 175, 55, 0.22);
  --txt2:          #475569;
  --txt3:          #64748b;
}

body.light-mode {
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(140, 109, 31, 0.05) 0%, transparent 60%),
    linear-gradient(rgba(245, 246, 248, 0.95), rgba(245, 246, 248, 0.97));
}

/* Light mode overrides for inputs */
body.light-mode .inp, body.light-mode select.inp {
  background: #ffffff;
  border-color: rgba(212, 175, 55, 0.35);
  color: #1e293b;
}
body.light-mode .inp:focus, body.light-mode select.inp:focus {
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}
body.light-mode .inp[readonly] {
  background: #f8fafc;
  color: var(--gold-glimmer);
}

/* Tables in light mode */
body.light-mode .tbl-wide th {
  background: rgba(212, 175, 55, 0.06);
  color: #1e293b;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
}
body.light-mode .tbl-wide tr {
  border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
body.light-mode .tbl-wide tr:hover {
  background: rgba(212, 175, 55, 0.04);
}

/* Modal and dialogs */
body.light-mode .modal-body {
  background: #ffffff;
  color: #1e293b;
}
body.light-mode #modal {
  background: rgba(0, 0, 0, 0.45);
}
body.light-mode .calcbox {
  background: #f8fafc;
  border-color: rgba(212, 175, 55, 0.25);
}

/* Navigation items in light mode */
body.light-mode .nav-item {
  color: #475569;
}
body.light-mode .nav-item:hover, body.light-mode .nav-item.active {
  background: rgba(212, 175, 55, 0.08);
  color: var(--gold-primary);
}
body.light-mode .nav-group-header {
  color: #1e293b;
}
body.light-mode .nav-group-header:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* Cards & Widgets */
body.light-mode .card, body.light-mode .widget {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04), 0 0 1px rgba(212, 175, 55, 0.15);
}
body.light-mode .quick-btn {
  background: #ffffff;
  color: #1e293b;
  border-color: rgba(212, 175, 55, 0.25);
}
body.light-mode .quick-btn:hover {
  background: rgba(212, 175, 55, 0.05);
}

/* Tabs */
body.light-mode .tab {
  background: #f1f5f9;
  color: #475569;
}
body.light-mode .tab.active {
  background: #ffffff;
  color: var(--gold-primary);
}

body.light-mode .empty {
  color: #64748b;
}
body.light-mode #page-dashboard .stats-grid .card .num {
  color: #0f172a;
}
body.light-mode .sidebar {
  box-shadow: 5px 0 25px rgba(0, 0, 0, 0.03);
}
body.light-mode .ratebar {
  background: #ffffff;
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
body.light-mode .ticker-divider {
  background: rgba(0, 0, 0, 0.15) !important;
}
body.light-mode .search {
  background: #ffffff !important;
  color: #1e293b !important;
}
body.light-mode .nav-sub-items {
  background: rgba(212, 175, 55, 0.02);
  border-left: 1px solid rgba(212, 175, 55, 0.15);
}

/* Responsive Grid layouts for Old Gold and Refinery */
.og-layout {
  grid-template-columns: 420px minmax(300px, 720px);
}
.bullion-layout {
  grid-template-columns: 320px minmax(300px, 720px);
}

@media (max-width: 1280px) {
  .og-layout,
  .bullion-layout {
    grid-template-columns: 1fr;
  }
}
