/* ==========================================================================
   JEWELLERY ERP - LUXURY MODERN DESIGN SYSTEM
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;

  /* Color Palette */
  --bg-app: #f8fafc;
  --bg-sidebar: #0b0f19;
  --bg-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bg-sidebar-active: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.02) 100%);
  
  --gold-primary: #d4af37;
  --gold-hover: #b8860b;
  --gold-gradient: linear-gradient(135deg, #f59e0b 0%, #d4af37 50%, #b45309 100%);
  --gold-glow: 0 8px 25px rgba(212, 175, 55, 0.25);
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-color: #e2e8f0;
  --border-focus: #4f46e5;
  --card-bg: #ffffff;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);

  --success: #10b981;
  --success-bg: #ecfdf5;
  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warn: #f59e0b;
  --warn-bg: #fffbe6;
  --info: #3b82f6;
  --info-bg: #eff6ff;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 18px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.1), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

/* Base Styles */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  font-family: var(--font-main);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a { color: var(--primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--primary-hover); text-decoration: none; }

.layout { display: flex; min-height: 100vh; position: relative; }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px); z-index: 40; opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  color: #94a3b8;
  position: fixed; top: 0; bottom: 0; left: 0;
  overflow-y: auto; z-index: 50;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar { width: 5px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

.brand {
  padding: 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.brand-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
}

.brand-text { display: flex; flex-direction: column; }
.brand-text .company-name {
  font-family: var(--font-heading);
  font-size: 16px; font-weight: 700; color: #ffffff;
  letter-spacing: -0.01em; line-height: 1.2;
}
.brand-text .tagline {
  font-size: 11px; color: var(--gold-primary);
  font-weight: 500; letter-spacing: 0.03em; margin-top: 2px;
}

.nav { padding: 16px 12px 24px; }
.nav .group {
  padding: 16px 12px 6px;
  font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.08em; color: #64748b;
  text-transform: uppercase;
}
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 3px;
  color: #cbd5e1; font-size: 13.5px; font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  position: relative;
}
.nav a:hover {
  background: var(--bg-sidebar-hover);
  color: #ffffff;
}
.nav a.active {
  background: var(--bg-sidebar-active);
  color: var(--gold-primary);
  font-weight: 600;
  border: 1px solid rgba(212, 175, 55, 0.25);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.nav a.active::before {
  content: ''; position: absolute; left: 0; top: 20%; bottom: 20%;
  width: 3.5px; background: var(--gold-gradient); border-radius: 0 4px 4px 0;
}
.nav .icon { font-size: 16px; width: 20px; text-align: center; }

/* ==========================================================================
   MAIN LAYOUT & TOPBAR
   ========================================================================== */
.main {
  margin-left: 250px; flex: 1;
  display: flex; flex-direction: column; min-width: 0;
}

.topbar {
  height: 66px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 30;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.02);
}

.topbar-left { display: flex; align-items: center; gap: 16px; }

.sidebar-toggle-btn {
  display: none; background: #f1f5f9; border: 1px solid var(--border-color);
  border-radius: var(--radius-sm); padding: 8px; color: var(--text-main);
  cursor: pointer; transition: background 0.2s;
}
.sidebar-toggle-btn:hover { background: #e2e8f0; }

.topbar h1 { font-size: 19px; margin: 0; font-weight: 700; color: var(--text-main); }

.rate-ticker { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.ticker-date { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.rate-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 500;
}
.rate-pill.gold-pill {
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
}
.rate-pill.silver-pill {
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
}
.pulse-dot {
  width: 7px; height: 7px; background-color: #f59e0b; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.topbar-right { display: flex; align-items: center; gap: 18px; }

.user-profile { display: flex; align-items: center; gap: 10px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gold-gradient); color: #fff;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 13px; color: var(--text-main); }
.role-badge {
  font-size: 10px; padding: 1px 7px; background: #e0e7ff; color: #4338ca;
  border-radius: var(--radius-full); width: fit-content; margin-top: 1px;
}

.btn-logout {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  background: #f8fafc; border: 1px solid var(--border-color);
  color: var(--text-muted); font-size: 12.5px; font-weight: 600;
  transition: all 0.2s ease;
}
.btn-logout:hover {
  background: #f1f5f9; color: var(--danger); border-color: #fca5a5;
}

.content { padding: 28px; flex: 1; }

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px; margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--shadow-lg); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 1px solid #f1f5f9;
}
.card-header h2 { font-size: 16px; font-weight: 700; margin: 0; color: var(--text-main); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1 { grid-template-columns: 1fr; }

/* Stat Cards (.stat and .stat-card) */
.stats-grid { display: grid; gap: 18px; }

.stat, .stat-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
}
.stat:hover, .stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.stat.gold, .stat-card.gold-stat {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, #ffffff 0%, #fffdf5 100%);
}
.stat.gold::before, .stat-card.gold-stat::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3.5px;
  background: var(--gold-gradient);
}

.stat-header { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.stat .label, .stat-label {
  font-size: 11.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; display: block;
}

.stat-icon-wrapper {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.gold-bg { background: #fef3c7; color: #b45309; }
.blue-bg { background: #e0e7ff; color: #4338ca; }
.green-bg { background: #d1fae5; color: #047857; }
.red-bg { background: #fee2e2; color: #b91c1c; }
.silver-bg { background: #f1f5f9; color: #334155; }
.purple-bg { background: #f3e8ff; color: #6b21a8; }
.orange-bg { background: #ffedd5; color: #c2410c; }

.stat .value, .stat-value {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 800; color: var(--text-main);
  margin-top: 6px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; line-height: 1.2;
}
.stat .value small, .stat-value small { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.stat.gold .value, .gold-text { color: #b45309; }
.green-text { color: #059669; }
.red-text { color: #dc2626; }
.silver-text { color: #475569; }

.stat-footer { margin-top: 8px; font-size: 12px; }
.stat-sub { color: var(--text-muted); }
.stat-tag {
  display: inline-block; padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 11px; font-weight: 600;
}
.stat-tag.primary { background: #e0e7ff; color: #4338ca; }

/* Quick Actions & Type Nav Pills */
.billing-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.type-pills {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  background: #ffffff; padding: 6px; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); box-shadow: var(--shadow-sm);
}
.pill-btn {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; color: var(--text-muted);
  transition: all 0.2s ease; border: 1px solid transparent;
}
.pill-btn:hover { color: var(--text-main); background: #f8fafc; text-decoration: none; }
.pill-btn.active {
  background: var(--primary-gradient); color: #ffffff;
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

.filter-card { padding: 18px 20px; }
.filter-form-group {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
}
.filter-form-group .field-item { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.filter-form-group .field-item.field-search { flex: 2; min-width: 220px; }
.filter-form-group .field-item.field-btn { flex: 0; align-self: flex-end; min-width: auto; }
.filter-form-group input { height: 42px; }

.quick-actions-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}

.action-btn {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 14px; background: #f8fafc; border: 1px solid var(--border-color);
  border-radius: var(--radius-md); transition: all 0.2s ease;
  color: var(--text-main); text-decoration: none;
}
.action-btn:hover {
  background: #ffffff; border-color: var(--primary);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
  text-decoration: none;
}
.action-btn.action-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff; border: none;
}
.action-btn.action-primary .action-desc { color: #c7d2fe; }
.action-btn.action-gold {
  background: var(--gold-gradient);
  color: #ffffff; border: none;
}
.action-btn.action-gold .action-desc { color: #fef3c7; }

.action-icon { font-size: 20px; margin-bottom: 6px; }
.action-title { font-weight: 700; font-size: 13.5px; line-height: 1.2; }
.action-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-wrap {
  overflow-x: auto; border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

table.data {
  width: 100%; border-collapse: collapse; background: #ffffff;
  font-size: 13px; text-align: left;
}

table.data th {
  background: #f8fafc; padding: 12px 14px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

table.data td {
  padding: 12px 14px; border-bottom: 1px solid #f1f5f9;
  color: var(--text-main); font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: #f8fafc; }

table.data td.num, table.data th.num { text-align: right; }
table.data tfoot td { font-weight: 700; background: #f8fafc; border-top: 2px solid var(--border-color); }

.inv-link { font-weight: 700; color: var(--primary); }
.inv-link:hover { text-decoration: underline; }

.font-bold { font-weight: 700; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.py-4 { padding-top: 16px; padding-bottom: 16px; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius-md);
  border: 1px solid var(--border-color); background: #ffffff;
  color: var(--text-main); cursor: pointer; font-size: 13px; font-weight: 600;
  font-family: inherit; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm); outline: none;
}

.btn:hover {
  background: #f8fafc; border-color: #cbd5e1;
  transform: translateY(-1px); text-decoration: none;
  box-shadow: var(--shadow-md);
}

.btn.primary {
  background: var(--primary-gradient);
  border-color: transparent; color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn.gold {
  background: var(--gold-gradient);
  border-color: transparent; color: #ffffff;
  box-shadow: var(--gold-glow);
}
.btn.gold:hover {
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: transparent; color: #ffffff;
}

.btn.outline {
  background: transparent; border-color: var(--border-color); color: var(--text-main);
}
.btn.outline:hover { background: #f1f5f9; }

.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }

label.f, label {
  display: block; font-size: 12px; font-weight: 600;
  color: #475569; margin-bottom: 6px; text-transform: uppercase;
  letter-spacing: 0.03em;
}

input, select, textarea {
  width: 100%; height: 42px; padding: 8px 14px;
  border: 1px solid var(--border-color); border-radius: var(--radius-md);
  font-size: 13.5px; font-family: inherit; background: #ffffff;
  color: var(--text-main); transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

textarea { height: auto; min-height: 90px; padding: 10px 14px; resize: vertical; }

input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* ==========================================================================
   BADGES & ALERTS
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 11.5px; font-weight: 700; line-height: 1;
}

.badge.green { background: #d1fae5; color: #047857; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.orange { background: #ffedd5; color: #c2410c; }
.badge.blue { background: #e0e7ff; color: #4338ca; }
.badge.purple { background: #f3e8ff; color: #6b21a8; }
.badge.grey { background: #f1f5f9; color: #475569; }

.alert {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: var(--radius-md);
  margin-bottom: 20px; font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
}
.alert-icon { font-size: 16px; }
.alert.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.alert.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert.info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }

/* Utility Classes */
.text-right { text-align: right; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt { margin-top: 16px; }
.mb { margin-bottom: 20px; }
.nowrap { white-space: nowrap; }

/* ==========================================================================
   LUXURY LOGIN PAGE
   ========================================================================== */
.login-body {
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #0b0f19 100%);
  min-height: 100vh; font-family: var(--font-main);
  overflow-x: hidden;
}

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative;
}

.login-backdrop-glow {
  position: absolute; width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0) 70%);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  pointer-events: none; border-radius: 50%;
}

.login-card {
  width: 100%; max-width: 420px;
  background: rgba(17, 24, 39, 0.75);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px; padding: 36px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  position: relative; z-index: 10; color: #ffffff;
}

.login-header { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 60px; height: 60px; border-radius: 16px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; box-shadow: var(--gold-glow);
}
.login-header h2 {
  font-family: var(--font-heading);
  font-size: 24px; font-weight: 700; color: #ffffff; margin: 0 0 6px;
}
.login-header .sub { font-size: 13px; color: #94a3b8; margin: 0; }

.login-alert { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.4); color: #fca5a5; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { color: #cbd5e1; font-size: 12px; margin-bottom: 8px; }

.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon .field-icon {
  position: absolute; left: 14px; font-size: 16px; pointer-events: none; opacity: 0.7;
}
.input-with-icon input {
  padding-left: 44px; background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15); color: #ffffff; height: 46px;
  border-radius: var(--radius-md);
}
.input-with-icon input::placeholder { color: #64748b; }
.input-with-icon input:focus {
  background: rgba(255, 255, 255, 0.1); border-color: var(--gold-primary);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}

.btn-login-submit {
  width: 100%; height: 48px; font-size: 14px; font-weight: 700;
  background: var(--gold-gradient); color: #ffffff; border: none;
  border-radius: var(--radius-md); cursor: pointer;
  box-shadow: var(--gold-glow); margin-top: 10px;
  transition: all 0.2s ease;
}
.btn-login-submit:hover {
  transform: translateY(-2px); opacity: 0.95;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
}

.login-footer-hint {
  text-align: center; margin-top: 20px; font-size: 12px; color: #64748b;
}
.login-footer-hint strong { color: #cbd5e1; }

/* ==========================================================================
   INVOICE SHEET PRINT STYLING
   ========================================================================== */
.invoice-sheet {
  background: #ffffff; max-width: 900px; margin: 0 auto;
  padding: 32px; border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
}
.inv-head { display: flex; justify-content: space-between; border-bottom: 2px solid #0f172a; padding-bottom: 16px; }
.inv-head .shop { font-size: 22px; font-weight: 800; font-family: var(--font-heading); }
.inv-title { text-align: right; }
.inv-title h3 { margin: 0; font-size: 18px; letter-spacing: 1px; color: var(--gold-primary); }

.items-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.items-table th, .items-table td { border: 1px solid #cbd5e1; padding: 8px 10px; font-size: 12px; }
.items-table th { background: #f1f5f9; font-weight: 700; }

.totals { display: flex; justify-content: flex-end; margin-top: 18px; }
.totals table { border-collapse: collapse; }
.totals td { padding: 6px 12px; font-size: 13px; }
.totals td.lbl { text-align: right; color: var(--text-muted); }
.totals tr.grand td { font-weight: 800; font-size: 16px; border-top: 2px solid #0f172a; }

.words { margin-top: 12px; font-size: 12.5px; font-style: italic; color: var(--text-muted); }
.sign { margin-top: 50px; display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }

@media print {
  .sidebar, .topbar, .no-print, .sidebar-overlay { display: none !important; }
  .main { margin-left: 0 !important; }
  .content { padding: 0 !important; }
  .invoice-sheet { border: none; max-width: none; padding: 0; box-shadow: none; }
  body { background: #ffffff !important; }
}

/* ==========================================================================
   FIRM / COMPANY PANEL - LUXURY GOLD THEME
   ========================================================================== */
.firm-panel-wrapper {
  max-width: 1480px;
  margin: 0 auto;
}

.firm-banner {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.firm-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.firm-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.firm-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.firm-banner-titles h2 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0 0 3px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.firm-banner-titles .sub {
  font-size: 12px;
  color: #dc2626;
  font-weight: 600;
  margin: 0;
}

.firm-banner-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.firm-tab-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.firm-tab-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-decoration: none;
}

.firm-tab-link:hover {
  color: var(--text-main);
  background: #ffffff;
}

.firm-tab-link.active {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

.firm-switch-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.firm-switch-select-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 280px;
}

.firm-switch-select-wrap label {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--text-main);
  margin: 0;
  white-space: nowrap;
}

.firm-switch-select-wrap select {
  max-width: 380px;
  height: 38px;
  font-size: 13px;
  font-weight: 600;
  border-color: #cbd5e1;
}

.firm-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 360px;
  gap: 22px;
  align-items: start;
}

.firm-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.firm-card:hover {
  box-shadow: var(--shadow-lg);
}

.firm-card-header {
  padding: 15px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdfe 100%);
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.firm-card-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: #e2e8f0;
}

.firm-card.accent-gold .firm-card-header::before {
  background: var(--gold-gradient);
}
.firm-card.accent-blue .firm-card-header::before {
  background: var(--primary-gradient);
}
.firm-card.accent-emerald .firm-card-header::before {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.firm-card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-size: 14.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0f172a;
  margin: 0;
}

.firm-card-title .icon {
  font-size: 17px;
}

.firm-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.firm-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.firm-field-row {
  display: grid;
  gap: 12px;
}

.firm-field-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.firm-field-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.firm-field-row.cols-custom-city {
  grid-template-columns: 1fr 100px 1.2fr;
}

.firm-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.firm-label .req {
  color: #dc2626;
  font-weight: 800;
  margin-left: 3px;
}

.firm-label .hint-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: none;
  color: #b45309;
  background: #fef3c7;
  padding: 1px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid #fde68a;
}

.firm-input, .firm-select, .firm-textarea {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.2s ease;
}

.firm-input:focus, .firm-select:focus, .firm-textarea:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #ffffff;
}

.firm-textarea {
  height: auto;
  min-height: 72px;
  resize: vertical;
}

/* Financial year 3-part widget */
.financial-date-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.financial-date-group select,
.financial-date-group input {
  height: 40px;
  text-align: center;
  font-weight: 700;
}

/* Cash balance with CR/DR */
.cash-balance-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cr-dr-toggle {
  display: inline-flex;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 40px;
  background: #f1f5f9;
}

.cr-dr-toggle label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: #64748b;
  margin: 0;
  transition: all 0.2s ease;
  user-select: none;
}

.cr-dr-toggle input[type="radio"] {
  display: none;
}

.cr-dr-toggle input[type="radio"]:checked + label {
  background: var(--gold-gradient);
  color: #ffffff;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}

/* Sub-groups (accordion/boxed) */
.firm-subgroup {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 4px;
}

.firm-subgroup-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Logo & Media Upload Boxes */
.firm-media-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.firm-upload-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.firm-upload-card:hover {
  background: #ffffff;
  border-color: #d4af37;
  border-style: solid;
  box-shadow: var(--shadow-sm);
}

.firm-upload-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #334155;
  margin-bottom: 10px;
  width: 100%;
  text-align: center;
}

.firm-upload-preview-box {
  width: 100%;
  height: 95px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 10px;
  position: relative;
}

.firm-upload-preview-box img {
  max-width: 90%;
  max-height: 85px;
  object-fit: contain;
}

.firm-upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
}

.firm-upload-placeholder svg {
  width: 32px;
  height: 32px;
  opacity: 0.7;
}

.firm-upload-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-upload-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
  transition: all 0.2s ease;
}

.btn-upload-file:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
}

.btn-remove-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid #fecaca;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove-upload:hover {
  background: #fca5a5;
}

/* Save Bottom Bar */
.firm-footer-bar {
  margin-top: 24px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
  flex-wrap: wrap;
  gap: 14px;
}

.firm-footer-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
}

.firm-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-firm-save {
  padding: 11px 28px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--gold-gradient);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--gold-glow);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
}

.btn-firm-save:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.45);
}

/* Modal Styling for Help Guide and Invoice Preview */
.firm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.firm-modal-overlay.open {
  display: flex;
}

.firm-modal-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  position: relative;
}

.firm-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.firm-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.firm-modal-close {
  background: #f1f5f9;
  border: none;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: all 0.2s ease;
}

.firm-modal-close:hover {
  background: #fee2e2;
  color: #dc2626;
}

.firm-modal-body {
  padding: 24px;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .firm-grid-layout {
    grid-template-columns: 1fr 1fr;
  }
  .firm-card.media-card {
    grid-column: 1 / -1;
  }
  .firm-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  
  .main { margin-left: 0; }
  .sidebar-toggle-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .topbar .rate-ticker { display: none; }
  .content { padding: 16px; }
  
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }

  .firm-grid-layout {
    grid-template-columns: 1fr;
  }
  .firm-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .firm-banner-right {
    width: 100%;
    justify-content: space-between;
  }
  .firm-field-row.cols-2,
  .firm-field-row.cols-3,
  .firm-field-row.cols-custom-city {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================

   SETTINGS & CONTROL PANEL - ONLINE MUNIM STYLE
   ========================================================================== */
.ctrl-panel-wrapper {
  max-width: 1540px;
  margin: 0 auto;
}

.ctrl-top-strip {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.ctrl-top-strip::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.ctrl-top-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ctrl-top-title .icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.ctrl-top-title h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.ctrl-top-strip .req-notice {
  font-size: 12px;
  color: #dc2626;
  font-weight: 700;
}

/* Horizontal Tabs Bar matching screenshot */
.ctrl-tabs-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow-x: auto;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.ctrl-tab-item {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.ctrl-tab-item:hover {
  background: #ffffff;
  color: #0f172a;
}

.ctrl-tab-item.active {
  background: #fde047;
  color: #854d0e;
  border-color: #facc15;
  box-shadow: 0 2px 6px rgba(250, 204, 21, 0.35);
}

/* 2-Column Daily Rates Layout */
.ctrl-rates-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr 70px;
  gap: 20px;
  align-items: start;
}

.ctrl-rates-layout.no-dock {
  grid-template-columns: 1fr 1.25fr;
}

.rates-entry-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.rates-card-header {
  padding: 14px 18px;
  background: #fffdf5;
  border-bottom: 1px solid #fef3c7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rates-card-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rates-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

/* Action Buttons */
.btn-led-rates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-led-rates:hover {
  background: #bae6fd;
  color: #0284c7;
  transform: translateY(-1px);
}

.btn-mcx-rates {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-mcx-rates:hover {
  background: #fde68a;
  transform: translateY(-1px);
}

/* Live Auto-Karat Calculator Breakdown Card */
.live-karats-box {
  background: linear-gradient(135deg, #fffdf5 0%, #fef3c7 100%);
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.live-karats-header {
  font-size: 11.5px;
  font-weight: 800;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.live-karats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.live-karat-pill {
  background: #ffffff;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}

.live-karat-pill .k-label {
  font-size: 10px;
  font-weight: 800;
  color: #78350f;
  display: flex;
  justify-content: space-between;
}

.live-karat-pill .k-price {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 2px;
}

/* Today's Rates Table */
.today-rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.today-rates-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 12px;
  border-bottom: 2px solid #e2e8f0;
  text-align: left;
}

.today-rates-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: #0f172a;
}

.today-rates-table tr:hover td {
  background: #fffdf5;
}

.today-rates-table td.num {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.btn-del-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #dc2626;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  transition: all 0.15s ease;
}

.btn-del-circle:hover {
  background: #dc2626;
  color: #ffffff;
}

/* Vertical Module Shortcut Dock matching screenshot */
.ctrl-side-dock {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: #ffffff;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
  color: #475569;
  text-decoration: none;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  text-align: center;
  line-height: 1.1;
}

.dock-item .dock-icon {
  font-size: 14px;
  margin-bottom: 2px;
}

.dock-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dock-item.active {
  background: #fde047;
  color: #854d0e;
}

/* LED Rate Display Fullscreen Page */
.led-display-body {
  background: radial-gradient(circle at 50% 30%, #1e293b 0%, #030712 100%);
  color: #ffffff;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  font-family: var(--font-heading);
}

.led-display-container {
  max-width: 1300px;
  margin: 0 auto;
}

.led-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
  padding-bottom: 18px;
  margin-bottom: 28px;
}

.led-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.led-board-card {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.5), inset 0 0 15px rgba(212, 175, 55, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.led-board-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: var(--gold-gradient);
}

.led-board-card .metal-tag {
  font-size: 13px;
  color: #d4af37;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.led-board-card .karat-title {
  font-size: 32px;
  font-weight: 900;
  color: #ffffff;
  margin: 4px 0 12px;
}

.led-board-card .price-val {
  font-size: 40px;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 20px rgba(253, 224, 71, 0.4);
  font-variant-numeric: tabular-nums;
}

.led-board-card .price-sub {
  font-size: 14px;
  color: #94a3b8;
  margin-top: 6px;
}

/* ==========================================================================
   UNIVERSAL TOPBAR & GLOBAL SEARCH
   ========================================================================== */
.topbar-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 24px;
  gap: 16px;
  border-bottom: 1px solid #f1f5f9;
}

.topbar-ticker-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11.5px;
  font-weight: 700;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  color: #334155;
  white-space: nowrap;
}

.ticker-item.gold {
  background: #fffdf5;
  border-color: rgba(212, 175, 55, 0.4);
  color: #b45309;
}

.ticker-item.mcx {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

/* Universal Global Search Bar matching screenshot */
.global-search-container {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.global-search-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-full);
  background: #ffffff;
  padding: 2px 4px 2px 14px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.global-search-input-wrap:focus-within {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.global-search-input {
  flex: 1;
  border: none;
  height: 34px;
  font-size: 12.5px;
  outline: none;
  background: transparent;
  padding: 0 6px;
}

.global-search-btn {
  background: var(--gold-gradient);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.global-search-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--gold-glow);
}

.search-popup-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}

.search-popup-results.show {
  display: block;
}

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.search-result-item:hover {
  background: #fffdf5;
}

/* Horizontal Main Menu Bar matching screenshot */
.topbar-nav-row {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 18px;
  background: #ffffff;
  overflow: visible;
  flex-wrap: wrap;
  position: relative;
  z-index: 95;
}

.top-nav-item {
  position: relative;
}

.top-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  user-select: none;
}

.top-nav-btn:hover,
.top-nav-item.is-open .top-nav-btn {
  background: #f8fafc;
  color: #0f172a;
}

.top-nav-btn.active,
.top-nav-item.is-open .top-nav-btn.active {
  color: #b45309;
  font-weight: 800;
  background: #fffdf5;
  box-shadow: inset 0 -2px 0 #d4af37;
}

/* Dropdown styling with tap/click toggle + hover support */
.top-nav-dropdown {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: #ffffff;
  border: 1px solid rgba(203, 213, 225, 0.9);
  border-radius: 8px;
  box-shadow: 0 14px 35px -4px rgba(15, 23, 42, 0.18), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
  min-width: 220px;
  padding: 6px;
  display: none;
  z-index: 150;
  animation: navDropdownFade 0.15s ease-out;
}

@keyframes navDropdownFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.top-nav-item:hover .top-nav-dropdown,
.top-nav-item.is-open .top-nav-dropdown {
  display: block;
}

/* Right align dropdown for items close to right edge */
.top-nav-item:nth-last-child(-n+4) .top-nav-dropdown {
  left: auto;
  right: 0;
}

.top-nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.top-nav-dropdown a:hover {
  background: #fffbeb;
  color: #b45309;
  transform: translateX(2px);
}

/* ==========================================================================
   HOME PAGE - CUSTOMER QUICK SEARCH & REGISTRATION BAR
   ========================================================================== */
.home-customer-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.cust-grid-row {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  align-items: center;
}

/* Row 1, Row 2, Row 4: Unified 4-Column Responsive Grid */
.cust-grid-row.r1,
.cust-grid-row.r2,
.cust-grid-row.r4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Row 3: 5 columns (Address is wider, Biometric buttons fit snugly) */
.cust-grid-row.r3 {
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr auto;
}

.cust-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.cust-input-wrap .field-ico {
  position: absolute;
  left: 10px;
  font-size: 13px;
  color: #94a3b8;
  pointer-events: none;
  z-index: 2;
}

.cust-field-in {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 10px 6px 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  background: #ffffff;
  color: #0f172a;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.cust-field-in:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.cust-field-select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  box-sizing: border-box;
}

.cust-field-select:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

/* Composite Input Groups (Salutation + First Name, Relation + Father Name) */
.cust-combo-group {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}

.cust-combo-group .cust-combo-select {
  flex: 0 0 74px;
  width: 74px;
  height: 36px;
  padding: 6px 6px;
  border: 1px solid #cbd5e1;
  border-right: none;
  border-radius: 6px 0 0 6px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  outline: none;
  box-sizing: border-box;
}

.cust-combo-group .cust-combo-select:focus {
  border-color: #f59e0b;
  background: #fff;
}

.cust-combo-group .cust-input-wrap {
  flex: 1;
  min-width: 0;
}

.cust-combo-group .cust-input-wrap .cust-field-in {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* State & Branch Tag Group */
.cust-state-branch-group {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.cust-branch-tag {
  height: 36px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e0e7ff;
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #3730a3;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Gender radio buttons */
.gender-radio-group {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
  box-sizing: border-box;
}

.gender-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  cursor: pointer;
  white-space: nowrap;
}

/* Biometric Finger Scan & Photo Icons */
.cust-bio-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}

/* Save Customer Direct Button */
.btn-cust-save-direct {
  width: 100%;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border-radius: 6px;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-cust-save-direct:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

/* Row 5: Universal Customer Search & Action Bar */
.cust-search-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.cust-search-box-wrap {
  flex: 1;
  min-width: 320px;
  display: flex;
  align-items: center;
  position: relative;
}

.cust-search-main-input {
  width: 100%;
  height: 42px;
  padding: 8px 14px 8px 38px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
}

.cust-search-main-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.cust-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-cust-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: all 0.2s ease;
}

.btn-action-sell {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.3);
}

.btn-action-loan {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(244, 63, 94, 0.3);
}

.btn-action-udhaar {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.btn-action-home {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

/* ==========================================================================
   TO-DO LIST STRIP
   ========================================================================== */
.todo-strip {
  background: #fffdf5;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-md);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 13px;
  color: #b45309;
}

/* ==========================================================================
   SHOWCASE BANNER: "आज का भाव" (TODAY'S RATES SHOWCASE)
   ========================================================================== */
.aaj-ka-bhav-card {
  background: #ffffff;
  border: 2px solid #b45309;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.aaj-ka-bhav-header {
  background: #b45309;
  color: #ffffff;
  text-align: center;
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.aaj-ka-bhav-table {
  width: 100%;
  border-collapse: collapse;
}

.aaj-ka-bhav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  border-bottom: 1px dashed #cbd5e1;
  transition: background 0.15s ease;
}

.aaj-ka-bhav-row:last-child {
  border-bottom: none;
}

.aaj-ka-bhav-row:hover {
  background: #fffdf5;
}

.aaj-ka-bhav-label {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.aaj-ka-bhav-rate {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.aaj-ka-bhav-unit {
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
}

/* Home Split Layout with Right Dock */
.home-split-layout {
  display: grid;
  grid-template-columns: 1fr 68px;
  gap: 16px;
  align-items: start;
}

.home-main-col {
  min-width: 0;
}

/* Customer Card Container */
.home-cust-card-layout {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: 14px;
  align-items: stretch;
}

.home-cust-form-col {
  min-width: 0;
}

.home-cust-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: space-between;
}

.btn-stack-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 10px 8px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 13.5px;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-stack-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-stack-action.home {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}
.btn-stack-action.home:hover {
  background: #bae6fd;
}

.btn-stack-action.sell {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}
.btn-stack-action.sell:hover {
  background: #bbf7d0;
}

.btn-stack-action.loan {
  background: #ffe4e6;
  color: #e11d48;
  border-color: #fecdd3;
}
.btn-stack-action.loan:hover {
  background: #fecdd3;
}

.btn-stack-action.udhaar {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}
.btn-stack-action.udhaar:hover {
  background: #fde68a;
}

/* Finger Scan & Upload button helpers */
.btn-finger-scan {
  height: 36px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.btn-finger-scan:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.cust-photo-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.cust-icon-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
}
.cust-icon-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* Customer Search Dropdown Results */
.cust-search-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #94a3b8;
  border-radius: 8px;
  box-shadow: 0 10px 25px -4px rgba(0,0,0,0.18);
  max-height: 280px;
  overflow-y: auto;
  z-index: 120;
  display: none;
}

.cust-search-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
}

.cust-search-dropdown-item:last-child {
  border-bottom: none;
}

.cust-search-dropdown-item:hover,
.cust-search-dropdown-item.active {
  background: #fef3c7;
}

.cust-search-dropdown-item .cust-name-line {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
}

.cust-search-dropdown-item .cust-meta-line {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.cust-search-dropdown-item .cust-balance-badge {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

/* Customer Selection Status Banner */
.customer-active-status-bar {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 8px 14px;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.customer-active-status-bar .cust-status-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #1e3a8a;
  font-weight: 600;
}

.customer-active-status-bar .cust-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* To-Do List Strip */
.todo-strip {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.todo-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #b45309;
}

.todo-badge-count {
  font-weight: 800;
  color: #b45309;
  letter-spacing: 1px;
}

.btn-todo-add {
  background: #10b981;
  color: #ffffff;
  border: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
}

.btn-todo-active-toggle {
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  border-radius: 4px;
  padding: 4px 14px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-todo-active-toggle:hover {
  background: #bae6fd;
}

.todo-interactive-drawer {
  background: #ffffff;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: -10px;
  margin-bottom: 16px;
  display: none;
  box-shadow: var(--shadow-sm);
}

.todo-task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.todo-task-item:last-child {
  border-bottom: none;
}

.todo-task-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-weight: 600;
  color: #1e293b;
}

/* "आज का भाव" Showcase Banner */
.aaj-ka-bhav-card {
  background: #ffffff;
  border: 2px solid #a16207;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(161, 98, 7, 0.12);
  margin-bottom: 24px;
  position: relative;
}

.reminder-tab-vertical {
  position: absolute;
  left: 0;
  bottom: 60px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-radius: 0 4px 4px 0;
  box-shadow: 2px 0 6px rgba(0,0,0,0.15);
  z-index: 5;
}

.aaj-ka-bhav-header {
  background: #996515;
  color: #ffffff;
  text-align: center;
  padding: 14px 20px;
  font-family: 'Outfit', sans-serif;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.aaj-ka-bhav-table {
  width: 100%;
  border-collapse: collapse;
}

.aaj-ka-bhav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 44px;
  border-bottom: 1px dashed #cbd5e1;
  transition: background 0.15s ease;
}

.aaj-ka-bhav-row:last-child {
  border-bottom: none;
}

.aaj-ka-bhav-row:hover {
  background: #fffdf5;
}

.aaj-ka-bhav-label {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: 0.02em;
}

.aaj-ka-bhav-rate {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.aaj-ka-bhav-unit {
  font-size: 16px;
  font-weight: 700;
  color: #475569;
}

/* Right Vertical Module Dock */
.right-vertical-dock {
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: sticky;
  top: 90px;
}

.dock-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7px 3px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  text-decoration: none;
  color: #475569;
  transition: all 0.2s ease;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.dock-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

.dock-btn .dock-icon {
  font-size: 16px;
  margin-bottom: 3px;
  line-height: 1;
}

.dock-btn .dock-text {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: inherit;
}

/* Quick Gold Calculator Modal */
.calc-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.calc-modal-content {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: fadeIn 0.2s ease;
}

.calc-header {
  background: var(--gold-gradient);
  color: #ffffff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
}

.calc-body {
  padding: 20px;
}

/* Responsive adjustments */
@media (max-width: 1300px) {
  .home-cust-card-layout {
    grid-template-columns: 1fr;
  }
  .home-cust-actions-stack {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
  }
  .btn-stack-action {
    flex-direction: row;
    height: 42px;
    padding: 8px 12px;
  }
}

@media (max-width: 1150px) {
  .home-split-layout {
    grid-template-columns: 1fr;
  }
  .right-vertical-dock {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: static;
    margin-bottom: 20px;
  }
}

@media (max-width: 960px) {
  .cust-grid-row.r1,
  .cust-grid-row.r2,
  .cust-grid-row.r4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cust-grid-row.r3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cust-grid-row.r3 .cust-addr-wrap {
    grid-column: 1 / -1;
  }
  .cust-grid-row.r3 .cust-bio-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .cust-search-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .cust-search-action-bar button {
    width: 100%;
  }
  .aaj-ka-bhav-row {
    padding: 12px 20px;
  }
  .aaj-ka-bhav-label {
    font-size: 20px;
  }
  .aaj-ka-bhav-rate {
    font-size: 22px;
  }
}

@media (max-width: 640px) {
  .cust-grid-row.r1,
  .cust-grid-row.r2,
  .cust-grid-row.r3,
  .cust-grid-row.r4 {
    grid-template-columns: 1fr;
  }
  .cust-grid-row.r3 .cust-addr-wrap {
    grid-column: auto;
  }
  .cust-grid-row.r3 .cust-bio-actions {
    grid-column: auto;
  }
  .home-cust-actions-stack {
    grid-template-columns: repeat(2, 1fr);
  }
  .btn-stack-action:last-child {
    grid-column: 1 / -1;
  }
  .home-customer-panel {
    padding: 12px;
  }
  .right-vertical-dock {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ==========================================================================
   ONLINE MUNIM STOCK PAGE - SUB-NAV & ENTRY MATRIX
   ========================================================================== */

/* Third line: Stock Sub-Tabs Navigation */
.stock-subnav-bar {
  background: #fef9c3;
  border-top: 1px solid #fef08a;
  border-bottom: 1.5px solid #fde047;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: visible;
  flex-wrap: wrap;
  position: relative;
  z-index: 30;
}

.stock-subnav-dropdown-wrap {
  position: relative;
  display: inline-flex;
}

.stock-subnav-item {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  background: transparent;
  border: none;
  user-select: none;
}

.stock-subnav-item:hover,
.stock-subnav-item.active,
.stock-subnav-dropdown-wrap.is-open .stock-subnav-item {
  background: #fde047;
  color: #854d0e;
}

.stock-subnav-dropdown-menu {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 230px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px -4px rgba(0,0,0,0.18), 0 2px 6px -1px rgba(0,0,0,0.06);
  z-index: 60;
  display: none;
  padding: 4px 0;
  animation: navDropdownFade 0.15s ease-out;
}

.stock-subnav-dropdown-wrap:hover .stock-subnav-dropdown-menu,
.stock-subnav-dropdown-wrap.is-open .stock-subnav-dropdown-menu {
  display: block;
}

.stock-subnav-dropdown-wrap:nth-last-child(-n+2) .stock-subnav-dropdown-menu {
  left: auto;
  right: 0;
}

.stock-subnav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  border-bottom: 1px solid #f8fafc;
  transition: all 0.12s ease;
}

.stock-subnav-dropdown-menu a:last-child {
  border-bottom: none;
}

.stock-subnav-dropdown-menu a:hover,
.stock-subnav-dropdown-menu a.active {
  background: #fef3c7;
  color: #b45309;
}

/* Reusable Stock Form Grids */
.stock-form-grid-4 {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.stock-bullion-grid {
  display: grid;
  grid-template-columns: 140px 120px 150px 150px 140px 1fr;
  gap: 10px;
  align-items: flex-end;
}

/* Stock Reports KPI Grid */
.stock-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stock-kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.stock-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
}

.stock-kpi-card .kpi-label {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.stock-kpi-card .kpi-val {
  font-size: 22px;
  font-weight: 900;
  font-family: var(--font-heading);
  color: #0f172a;
}

/* Stock Sub-header Banner with Mode Toggles */
.stock-subheader-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 14px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.stock-page-title {
  color: #b45309;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stock-mode-toggles {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-mode-stock {
  padding: 5px 14px;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-mode-wholesale {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #bae6fd;
}
.btn-mode-wholesale:hover {
  background: #bae6fd;
}

.btn-mode-retail {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-mode-retail.active {
  background: #22c55e;
  color: #ffffff;
  border-color: #16a34a;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.3);
}

.btn-mode-help {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Stock Entry Card Form */
.stock-entry-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

/* Top Header Fields Grid */
.stock-header-grid {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.stock-header-grid.row-1 {
  grid-template-columns: 160px 80px 180px 160px 1.5fr 140px 90px 45px 70px;
  align-items: center;
}

.stock-header-grid.row-2 {
  grid-template-columns: 200px 180px 180px 1fr;
  align-items: center;
}

.stock-field-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stock-field-lbl {
  font-size: 9.5px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stock-input-sm {
  height: 30px;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: #ffffff;
  color: #0f172a;
  width: 100%;
}

.stock-input-sm:focus {
  border-color: #f59e0b;
  outline: none;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

/* Date 3-in-1 inline box */
.tri-date-group {
  display: flex;
  align-items: center;
  gap: 2px;
}

.tri-date-group input {
  height: 30px;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
}

/* Stock Matrix Table matching the screenshot */
.stock-matrix-wrap {
  overflow-x: auto;
  border: 1.5px solid #cbd5e1;
  border-radius: 6px;
  margin: 12px 0;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #f59e0b #f1f5f9;
}

.stock-matrix-wrap::-webkit-scrollbar {
  height: 8px;
}
.stock-matrix-wrap::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.stock-matrix-wrap::-webkit-scrollbar-thumb {
  background: #f59e0b;
  border-radius: 4px;
}


.stock-matrix-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1080px;
}

.stock-matrix-table th {
  background: #fef08a;
  color: #854d0e;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 6px 3px;
  text-align: center;
  border: 1px solid #fde047;
  white-space: nowrap;
}

.stock-matrix-table td {
  padding: 3px 2px;
  border: 1px solid #e2e8f0;
  vertical-align: middle;
}

.matrix-in {
  width: 100%;
  height: 27px;
  padding: 2px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  color: #0f172a;
}

.matrix-in.readonly {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
}

.matrix-in.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.matrix-unit-wrap {
  display: flex;
  align-items: center;
  gap: 2px;
}

.matrix-unit-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #64748b;
  padding: 0 3px;
}

.matrix-unit-select {
  height: 28px;
  padding: 2px 3px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  outline: none;
  min-width: 44px;
}

.matrix-unit-select:focus {
  border-color: #f59e0b;
  background: #ffffff;
}

.matrix-metal-val-box {
  width: 100px;
  height: 28px;
  padding: 3px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  background: #f8fafc;
  text-align: right;
}

/* Auxiliary details row in matrix */
.matrix-row-aux td {
  background: #fafaf9;
}

/* Bottom Action Buttons Bar */
.stock-actions-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}

.btn-stock-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.btn-stock-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-stock-add {
  background: #dcfce7;
  color: #15803d;
  border-color: #86efac;
}
.btn-stock-add:hover {
  background: #bbf7d0;
}

.btn-stock-existing {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}
.btn-stock-existing:hover {
  background: #bae6fd;
}

.btn-stock-cash {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde047;
}
.btn-stock-cash:hover {
  background: #fde047;
}

.btn-stock-hallmark {
  background: #e0e7ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.btn-stock-hallmark:hover {
  background: #c7d2fe;
}

.btn-stock-help {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE STYLES (MOBILE, TABLET & DESKTOP)
   ========================================================================== */

/* 1. Large Tablets & Medium Laptops (<= 1200px) */
@media (max-width: 1200px) {
  .stock-header-grid.row-1 {
    grid-template-columns: repeat(4, 1fr);
  }
  .stock-header-grid.row-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-bullion-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 2. Tablets & Small Laptops (<= 960px) */
@media (max-width: 960px) {
  .topbar-main-row {
    padding: 8px 16px;
    gap: 12px;
  }
  .global-search-container {
    max-width: 400px;
  }
  .stock-header-grid.row-1 {
    grid-template-columns: repeat(3, 1fr);
  }
  .stock-header-grid.row-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-form-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-bullion-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stock-subnav-bar {
    padding: 6px 12px;
    gap: 6px;
  }
  .stock-subnav-item {
    font-size: 10.5px;
    padding: 5px 10px;
  }
}

/* 3. Small Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .topbar-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
  }

  /* Two-row mobile header: Row 1 = Toggles & Profile; Row 2 = Full Search */
  .topbar-main-row {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
  }
  .topbar-main-row > div:first-child {
    order: 1;
  }
  .topbar-main-row > div:last-child {
    order: 2;
    gap: 8px;
  }
  .global-search-container {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
  }
  .topbar-ticker-group .ticker-item.mcx {
    display: none; /* Hide secondary MCX tickers on mobile to keep header clean */
  }
  .ticker-item.gold {
    font-size: 10.5px;
    padding: 3px 8px;
  }
  .user-profile .user-info {
    display: none; /* Keep clean circular avatar on mobile */
  }
  .btn-logout span {
    display: none; /* Icon-only exit button on mobile */
  }
  .btn-logout {
    padding: 6px 8px;
  }

  /* Top Navigation Bar */
  .topbar-nav-row {
    padding: 4px 10px;
    gap: 2px;
  }
  .top-nav-btn {
    padding: 6px 9px;
    font-size: 11px;
  }
  .top-nav-dropdown {
    min-width: 200px;
    max-width: 92vw;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    z-index: 200;
  }

  /* Stock Subnav & Banner */
  .stock-subnav-bar {
    padding: 6px 10px;
    gap: 4px;
  }
  .stock-subnav-item {
    font-size: 10px;
    padding: 5px 8px;
  }
  .stock-subnav-dropdown-menu {
    min-width: 200px;
    max-width: 92vw;
    z-index: 100;
  }
  .stock-subheader-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .stock-mode-toggles {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  /* Stock Form Fields */
  .stock-entry-card {
    padding: 12px 10px;
  }
  .stock-header-grid.row-1 {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .stock-header-grid.row-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .tri-date-group {
    width: 100%;
  }
  .tri-date-group input {
    flex: 1;
    min-width: 0;
  }

  /* Stock Actions Buttons Bar */
  .stock-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .btn-stock-action {
    width: 100%;
    justify-content: center;
    padding: 9px 8px;
    font-size: 11px;
  }
  .btn-stock-add {
    grid-column: 1 / -1;
    padding: 11px;
    font-size: 13px;
  }

  /* Register Table Header Form */
  .card-header.flex-between {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .card-header.flex-between > div:last-child {
    width: 100%;
    flex-wrap: wrap;
  }
  .card-header form {
    width: 100%;
    flex-wrap: wrap;
  }
  .card-header form input[name="q"] {
    width: 100% !important;
  }
}

/* 4. Small Mobile Phones (<= 480px) */
@media (max-width: 480px) {
  .stock-header-grid.row-1 {
    grid-template-columns: 1fr;
  }
  .stock-header-grid.row-2 {
    grid-template-columns: 1fr;
  }
  .stock-form-grid-4 {
    grid-template-columns: 1fr;
  }
  .stock-bullion-grid {
    grid-template-columns: 1fr;
  }
  .stock-actions-bar {
    grid-template-columns: 1fr;
  }
  .btn-stock-action {
    grid-column: auto !important;
    min-height: 40px;
  }
  .stock-page-title {
    font-size: 13px;
  }
  .btn-mode-stock {
    font-size: 10.5px;
    padding: 4px 8px;
  }
  .top-nav-btn {
    padding: 5px 7px;
    font-size: 10.5px;
  }
}
