/* ═══════════════════════════════════════════════════════════════
   TechBugs Billing System — Premium Cyberpunk SaaS Design v2.0
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

/* ═══ ROOT VARIABLES — TechBugs Executive Charcoal & Crimson Theme ═══ */
:root {
  --bg: #09090b;
  --bg-elevated: #0d0d0f;
  --surface: #141416;
  --surface-2: #18181b;
  --surface-3: #222227;
  --border: #262629;
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-hover: #3f3f46;

  --text: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-tertiary: #71717a;
  --text-ghost: #52525b;

  --accent: #dc2626;
  --accent-bright: #ef4444;
  --accent-hover: #b91c1c;
  --accent-deep: #991b1b;
  --accent-soft: rgba(220, 38, 38, 0.1);
  --accent-medium: rgba(220, 38, 38, 0.18);
  --accent-glow: rgba(220, 38, 38, 0.15);
  --accent-glow-strong: rgba(220, 38, 38, 0.25);

  --accent-selected: #2E1412;
  --accent-selected-text: #EF3B2D;
  --accent-selected-border: rgba(239, 59, 45, 0.35);

  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.12);
  --purple: #a855f7;
  --purple-soft: rgba(168, 85, 247, 0.12);
  --red-soft: rgba(220, 38, 38, 0.1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 0 16px rgba(220, 38, 38, 0.15);
  --shadow-accent: 0 4px 14px rgba(220, 38, 38, 0.25);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration: 250ms;
  --duration-slow: 400ms;

  --sidebar-width: 260px;

  /* Legacy & Semantic Compatibility Tokens */
  --primary-red: #dc2626;
  --error: #ef4444;
  --error-light: rgba(220, 38, 38, 0.1);
  --success: var(--green);
  --success-light: var(--green-soft);
  --warning: var(--amber);
  --gray-50: #141416;
  --gray-100: #18181b;
  --gray-500: var(--text-tertiary);
  --gray-600: var(--text-secondary);
}

/* ═══ LIGHT MODE — Clean, Modern, High-Contrast Red & White ═══ */
.light-mode,
html.light-mode {
  --bg: #f5f6fb;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --border: #e2e8f0;
  --border-subtle: #edf2f7;
  --border-hover: #cbd5e1;

  --text: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-ghost: #94a3b8;

  --accent: #dc2626;
  --accent-bright: #ef4444;
  --accent-hover: #b91c1c;
  --accent-deep: #991b1b;
  --accent-soft: rgba(220, 38, 38, 0.08);
  --accent-medium: rgba(220, 38, 38, 0.14);
  --accent-glow: rgba(220, 38, 38, 0.15);
  --accent-glow-strong: rgba(220, 38, 38, 0.22);

  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.1);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.1);
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.1);
  --purple: #9333ea;
  --purple-soft: rgba(147, 51, 234, 0.1);
  --red-soft: rgba(220, 38, 38, 0.08);

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-500: #64748b;
  --gray-600: #475569;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.09);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 16px rgba(220, 38, 38, 0.1);
  --shadow-accent: 0 4px 14px rgba(220, 38, 38, 0.18);
}

/* ═══ BASE ═══ */
html {
  scroll-behavior: smooth;
  overflow-y: scroll;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, .brand-name, .page-title, .stat-value,
.btn-primary, .btn-secondary, .quick-create-btn {
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: -0.01em;
}

/* ── Scrollbar (Greyscale) ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
}
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.18) var(--bg); }

.light-mode ::-webkit-scrollbar-track { background: #f0f0f4; }
.light-mode ::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.18); }
.light-mode ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.35); }
.light-mode * { scrollbar-color: rgba(0, 0, 0, 0.2) #f0f0f4; }

::selection { background: var(--accent); color: white; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */

.app-container {
  display: flex;
  min-height: 100vh;
}

/* ═══ MOBILE BACKDROP ═══ */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Sidebar Close Button */
.sidebar-close-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.sidebar-close-btn:hover {
  background: var(--accent);
  color: #FFFFFF;
  border-color: var(--accent);
}

/* ═══ SIDEBAR ═══ */
.sidebar {
  width: var(--sidebar-width);
  background: #0A0A0B !important;
  border-right: 1px solid #262629 !important;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: transform var(--duration) var(--ease-out);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.5);
}

.logo-section {
  padding: 0 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  border-bottom: none !important;
  position: relative;
  z-index: 1;
  background: #0A0A0B;
  height: 68px;
  width: 100%;
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
}

/* When close button is present (mobile), position it cleanly on the side */
.logo-section .sidebar-close-btn {
  position: absolute;
  right: 14px;
  top: 17px;
  z-index: 2;
}

.logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 0 8px rgba(239, 59, 45, 0.45));
  transition: all var(--duration);
  flex-shrink: 0;
  display: block;
}

.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px rgba(239, 59, 45, 0.65));
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #FFFFFF;
  line-height: 1;
  white-space: nowrap;
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  display: inline-block;
}

/* ═══ NAVIGATION (Matching D:\TechBugs CRM) ═══ */
.nav-menu {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  margin: 4px 12px;
  color: #A1A1AA !important;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #FFFFFF;
  border-color: transparent;
  transform: none;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 15px;
  color: #A1A1AA;
  transition: color 0.2s ease;
}

.nav-item:hover i {
  color: #FFFFFF;
  transform: none;
  filter: none;
}

.nav-item.active {
  background: #2E1412 !important;
  color: #EF3B2D !important;
  font-weight: 600 !important;
  border: 1px solid rgba(239, 59, 45, 0.3) !important;
  box-shadow: 0 0 12px rgba(239, 59, 45, 0.15) !important;
}

.nav-item.active i {
  color: #EF3B2D !important;
  filter: none;
}

/* ═══ SIDEBAR FOOTER ═══ */
.sidebar-footer {
  padding: 12px 14px;
  border-top: none !important;
  position: relative;
  z-index: 1;
  background: #0A0A0B;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #141416;
  border: 1px solid #262629;
  transition: all var(--duration-fast);
}

.user-info:hover {
  background: #1c1c1f;
  border-color: rgba(239, 59, 45, 0.3);
  box-shadow: none;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: #2E1412;
  border: 1px solid rgba(239, 59, 45, 0.35);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(239, 59, 45, 0.2);
}

.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-weight: 600; color: #FFFFFF; font-size: 13px; }
.user-role { font-size: 11px; color: #EF3B2D; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════ */

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0 !important;
  max-width: calc(100vw - var(--sidebar-width)) !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.table-container {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* ═══ HEADER (Screenshot Style) ═══ */
.header {
  background: #0A0A0B !important;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: none !important;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: none !important;
}

.light-mode .header {
  background: #ffffff !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

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

.menu-toggle {
  display: none;
  background: #141416;
  border: 1px solid #262629;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--duration-fast);
}

.menu-toggle:hover {
  background: #1f1f23;
  border-color: #3f3f46;
  color: #FFFFFF;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.2;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.header-greeting-sep {
  color: var(--text-muted, #71717a);
  font-size: 14px;
  opacity: 0.55;
  user-select: none;
}

.header-greeting-text {
  font-size: 14px;
  color: var(--text-secondary, #a1a1aa);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

.header-greeting-text .greeting-user,
.header-greeting-text strong,
.header-greeting-text span.greeting-user {
  color: var(--primary, #EF3B2D);
  font-weight: 700;
}

.light-mode .header-greeting-text {
  color: #64748b;
}

.light-mode .header-greeting-sep {
  color: #94a3b8;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  position: relative;
}

/* Header Brand Pill (from D:\TechBugs CRM UpgradeButton.jsx) */
.header-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #141416;
  border: 1px solid #262629;
  border-radius: 9999px;
  height: 48px;
  padding: 0 18px 0 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  user-select: none;
  box-sizing: border-box;
  line-height: 1;
  overflow: hidden;
  text-decoration: none;
}

.header-brand-pill:hover {
  border-color: #EF3B2D;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4), 0 0 8px rgba(239, 59, 45, 0.2);
}

.header-pill-logo {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px rgba(239, 59, 45, 0.4));
  display: block;
  flex-shrink: 0;
  transition: all var(--duration);
}

.header-brand-pill:hover .header-pill-logo {
  filter: drop-shadow(0 0 8px rgba(239, 59, 45, 0.6));
}

.header-pill-text {
  color: #FFFFFF;
  font-weight: 700;
  font-size: 14.5px;
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.header-status-dot {
  height: 9px;
  width: 9px;
  min-width: 9px;
  border-radius: 50%;
  background-color: #10B981;
  box-shadow: 0 0 8px #10B981;
  display: inline-block;
}

/* Circular User Badge (from D:\TechBugs CRM HeaderContainer.jsx) */
.header-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #2E1412;
  border: 1px solid rgba(239, 59, 45, 0.4);
  box-shadow: 0 0 10px rgba(239, 59, 45, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.header-user-avatar:hover {
  border-color: #EF3B2D;
  transform: scale(1.05);
  box-shadow: 0 0 14px rgba(239, 59, 45, 0.4);
}

.header-user-avatar img,
.user-avatar img,
.dropdown-avatar-wrap img,
.profile-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* User Profile Dropdown */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 296px;
  background: #141416;
  border: 1px solid #2e2e34;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.4);
  z-index: 1100;
  padding: 10px;
  display: none;
  flex-direction: column;
  animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.user-profile-dropdown.open {
  display: flex;
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 12px;
}

.dropdown-avatar-wrap {
  width: 50px;
  height: 50px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  overflow: visible !important;
}

.dropdown-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #2E1412;
  border: 1.5px solid rgba(239, 59, 45, 0.45);
  box-shadow: 0 0 10px rgba(239, 59, 45, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-weight: 700;
  font-size: 19px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dropdown-avatar-wrap:hover .dropdown-avatar-circle {
  border-color: #EF3B2D;
  box-shadow: 0 0 14px rgba(239, 59, 45, 0.45);
  transform: scale(1.03);
}

.dropdown-avatar-circle img,
.dropdown-avatar-circle .avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #EF3B2D;
  border: 2px solid #141416;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  cursor: pointer;
  padding: 0;
  z-index: 25 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 0 6px rgba(239, 59, 45, 0.5);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease;
}

.avatar-edit-badge:hover {
  transform: scale(1.2);
  background: #FF4D3D;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.8), 0 0 10px rgba(239, 59, 45, 0.7);
}

.dropdown-user-info {
  overflow: hidden;
  flex: 1;
}

.dropdown-user-name {
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-email {
  color: #A1A1AA;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.dropdown-role-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(239, 59, 45, 0.15);
  color: #EF3B2D;
  border: 1px solid rgba(239, 59, 45, 0.3);
  margin-top: 5px;
}

.profile-dropdown-divider {
  height: 1px;
  background: #27272a;
  margin: 6px 0;
}

.profile-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: #e4e4e7;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.profile-dropdown-item i {
  font-size: 13px;
  width: 18px;
  color: #A1A1AA;
  text-align: center;
  transition: color 0.15s ease;
}

.profile-dropdown-item:hover {
  background: #1f1f24;
  color: #FFFFFF;
}

.profile-dropdown-item:hover i {
  color: #EF3B2D;
}

.profile-dropdown-item.logout {
  color: #f87171;
}

.profile-dropdown-item.logout i {
  color: #f87171;
}

.profile-dropdown-item.logout:hover {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Preset Avatars in Dropdown */
.dropdown-presets-section {
  padding: 10px 8px 8px;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 10px;
  border: 1px solid #232328;
  margin: 6px 0;
}

.dropdown-presets-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 2px;
}

.dropdown-presets-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #A1A1AA;
  display: flex;
  align-items: center;
  gap: 5px;
}

.dropdown-presets-title i {
  color: #EF3B2D;
  font-size: 11px;
}

.dropdown-presets-more {
  font-size: 11px;
  color: #EF3B2D;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s ease;
}

.dropdown-presets-more:hover {
  color: #FF5A4D;
  text-decoration: underline;
}

.dropdown-presets-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  justify-items: center;
  padding: 2px 0;
}

.dropdown-preset-chip {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid #2E2E34;
  background: #18181B;
  padding: 0;
  margin: 0;
  cursor: pointer;
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.dropdown-preset-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.dropdown-preset-chip:hover {
  transform: scale(1.16);
  border-color: #EF3B2D;
  box-shadow: 0 0 12px rgba(239, 59, 45, 0.6);
  z-index: 5;
}

.dropdown-preset-chip.active {
  border-color: #EF3B2D;
  box-shadow: 0 0 12px rgba(239, 59, 45, 0.65);
  transform: scale(1.08);
}

.dropdown-preset-chip.active::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  bottom: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  background: #EF3B2D;
  border: 2px solid #141416;
  border-radius: 50%;
  color: #FFFFFF;
  font-size: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 20;
  box-shadow: 0 0 8px rgba(239, 59, 45, 0.85);
}

/* ═══════════════════════════════════════════════════════════════
   SUPABASE REALTIME SYNC INDICATOR
   ═══════════════════════════════════════════════════════════════ */
.supabase-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: #141417;
  border: 1px solid #28282E;
  border-radius: 9999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  letter-spacing: 0.01em;
}

.supabase-sync-pill:hover {
  background: #1C1C22;
  border-color: #3E3E48;
  color: #FFFFFF;
}

.supabase-sync-pill .sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  flex-shrink: 0;
}

.supabase-sync-pill .sync-dot.synced {
  background: #10B981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.supabase-sync-pill .sync-dot.syncing {
  background: #3B82F6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.7);
  animation: syncPulseDot 1s infinite alternate;
}

.supabase-sync-pill .sync-dot.offline,
.supabase-sync-pill .sync-dot.error {
  background: #F59E0B;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.7);
}

@keyframes syncPulseDot {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}

.light-mode .supabase-sync-pill {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #334155;
}

.light-mode .supabase-sync-pill:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Preset Avatars Grid in Settings Page */
.preset-avatars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.preset-avatar-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #141416;
  border: 1px solid #27272A;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-align: left;
}

.preset-avatar-card:hover {
  border-color: rgba(239, 59, 45, 0.55);
  background: #18181C;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 10px rgba(239, 59, 45, 0.15);
}

.preset-avatar-card.active {
  border-color: #EF3B2D;
  background: rgba(239, 59, 45, 0.08);
  box-shadow: 0 0 14px rgba(239, 59, 45, 0.25);
}

.preset-avatar-card-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: #232326;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.preset-avatar-card:hover .preset-avatar-card-img {
  transform: scale(1.05);
  border-color: #EF3B2D;
}

.preset-avatar-card-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.preset-avatar-card-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-avatar-card-role {
  font-size: 11px;
  color: #A1A1AA;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preset-avatar-card-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  width: fit-content;
  margin-top: 5px;
}

.preset-avatar-card.active .preset-avatar-card-status {
  background: rgba(239, 59, 45, 0.2);
  color: #EF3B2D;
  border: 1px solid rgba(239, 59, 45, 0.4);
}

.preset-avatar-card:not(.active) .preset-avatar-card-status {
  background: #232328;
  color: #71717A;
}

/* Light mode overrides for header & dropdown components */
.light-mode .user-profile-dropdown {
  background: #ffffff;
  border-color: #e4e4e7;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
}

.light-mode .dropdown-user-name {
  color: #0f172a;
}

.light-mode .dropdown-user-email {
  color: #64748b;
}

.light-mode .profile-dropdown-divider {
  background: #f1f5f9;
}

.light-mode .profile-dropdown-item {
  color: #334155;
}

.light-mode .profile-dropdown-item:hover {
  background: #f8fafc;
  color: #0f172a;
}

.light-mode .header-user-avatar {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.light-mode .dropdown-presets-section {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.light-mode .dropdown-preset-chip {
  background: #ffffff;
  border-color: #cbd5e1;
}

.light-mode .preset-avatar-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

.light-mode .preset-avatar-card:hover {
  background: #f8fafc;
  border-color: rgba(220, 38, 38, 0.4);
}

.light-mode .preset-avatar-card.active {
  background: #fef2f2;
  border-color: #dc2626;
}

.light-mode .preset-avatar-card-name {
  color: #0f172a;
}

.light-mode .preset-avatar-card-role {
  color: #64748b;
}

.light-mode .preset-avatar-card:not(.active) .preset-avatar-card-status {
  background: #e2e8f0;
  color: #475569;
}

/* ═══ SEARCH BOX (Clean & Professional) ═══ */
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #101012;
  border: 1px solid #262629;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--radius-sm);
  width: 240px;
  transition: all var(--duration);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.search-box i {
  color: var(--text-tertiary);
  font-size: 13px;
  transition: color var(--duration-fast);
}

.search-box:focus-within i {
  color: var(--text);
}

.search-box input {
  border: none;
  background: none;
  outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--text);
  font-family: inherit;
}

.search-box input::placeholder { color: var(--text-ghost); }

/* ═══ HEADER BUTTONS ═══ */
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #141416;
  border: 1px solid #262629;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  position: relative;
}

.icon-btn:hover {
  border-color: #3f3f46;
  color: #FFFFFF;
  background: #1c1c1f;
  transform: translateY(-1px);
}

.theme-toggle { cursor: pointer; }

/* ═══ BUTTONS (Styled after www.techbugs.online) ═══ */
.btn-primary,
.quick-create-btn {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  padding: 0 20px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  position: relative !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25) !important;
  letter-spacing: -0.01em !important;
  text-decoration: none !important;
}

.btn-primary:hover,
.quick-create-btn:hover {
  background: #b91c1c !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.35) !important;
}

.btn-primary:active,
.quick-create-btn:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2) !important;
}

/* ── Secondary Button & Export Button (techbugs.online style) ── */
.btn-secondary,
.export-btn {
  background: #17171a !important;
  color: #f4f4f5 !important;
  padding: 0 16px !important;
  height: 38px !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  font-family: 'Space Grotesk', 'Inter', -apple-system, sans-serif !important;
  border: 1px solid #262629 !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

.btn-secondary:hover,
.export-btn:hover {
  background: #222227 !important;
  border-color: #3f3f46 !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

.export-btn.purge-btn {
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.export-btn.purge-btn:hover {
  background: rgba(239, 68, 68, 0.16) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #ef4444 !important;
  transform: translateY(-1px) !important;
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */

.dashboard-content {
  padding: 12px 32px 28px !important;
  flex: 1;
}

/* ── Dashboard Greeting ── */
.greeting-section {
  margin-bottom: 28px;
  animation: fadeInUp 0.6s var(--ease-out) both;
}

.greeting-section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.greeting-section h2 span {
  color: var(--accent-bright);
}

.greeting-section p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ═══ STATS GRID (Matching D:\TechBugs CRM) ═══ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: #141416 !important;
  border: 1px solid #262629 !important;
  padding: 20px;
  border-radius: var(--radius);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--duration) var(--ease-out);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45) !important;
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

.stat-card:hover {
  border-color: rgba(239, 59, 45, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  background: #1c1c20;
  border: 1px solid #262629;
  color: #EF3B2D;
}

.stat-icon.pending {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.stat-icon.info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.stat-icon.red { background: rgba(220, 38, 38, 0.1); color: #ef4444; border-color: rgba(220, 38, 38, 0.25); }
.stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.purple {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: #c084fc;
}

.stat-info { min-width: 0; }

.stat-info h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Inter', sans-serif;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-change { font-size: 12px; font-weight: 500; }
.stat-change.positive { color: #10b981; }
.stat-change.negative { color: #f59e0b; }

/* ═══ CONTENT GRID ═══ */
.content-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

/* ═══ CARDS ═══ */
.card {
  background: #141416;
  border: 1px solid #262629;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  transition: all var(--duration);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.25s;
}

.card:hover {
  border-color: rgba(239, 59, 45, 0.3);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

.card-header {
  padding: 16px 20px;
  background: #141416;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.view-all {
  color: #EF3B2D;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--duration-fast), color var(--duration-fast);
}

.view-all:hover {
  gap: 8px;
  color: #FA6B5B;
}

/* ═══ DASHBOARD TABLE ═══ */
.invoice-table table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-table th,
.invoice-table td {
  padding: 12px 20px;
  text-align: left;
}

.invoice-table th {
  font-size: 11.5px;
  font-weight: 600;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #141416;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Inter', sans-serif;
}

.invoice-table tbody tr {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all var(--duration-fast);
}

.invoice-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

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

.invoice-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.invoice-table td {
  font-size: 13px;
  color: var(--text-secondary);
}

.invoice-table td strong {
  color: #FFFFFF;
  font-weight: 700;
}

/* ═══ STATUS BADGES ═══ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap !important;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.paid {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.status-badge.paid::before { background: #4ade80; box-shadow: 0 0 8px #4ade80; }

.status-badge.pending {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.status-badge.pending::before { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

.status-badge.overdue {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.28);
  color: #ef4444;
}
.status-badge.overdue::before { background: #ef4444; }

.status-badge.draft {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #c4c4d4;
}
.status-badge.draft::before { background: #9494a8; }

.status-badge.converted,
.status-converted {
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #60a5fa;
}
.status-badge.converted::before { background: #60a5fa; box-shadow: 0 0 8px #60a5fa; }

.status-badge.new {
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.35);
  color: #38bdf8;
}
.status-badge.new::before { background: #38bdf8; box-shadow: 0 0 8px #38bdf8; }

.status-badge.contacted {
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #c084fc;
}
.status-badge.contacted::before { background: #c084fc; box-shadow: 0 0 8px #c084fc; }

.status-badge.qualified {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}
.status-badge.qualified::before { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

.status-badge.proposal {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
}
.status-badge.proposal::before { background: #818cf8; box-shadow: 0 0 8px #818cf8; }

.status-badge.lost {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #f87171;
}
.status-badge.lost::before { background: #f87171; }

/* ═══ QUICK ACTIONS ═══ */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 20px;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px 12px;
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease-out);
  text-align: center;
}

.action-btn:hover {
  background: #18181b;
  color: #ffffff;
  border-color: rgba(239, 59, 45, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.action-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all var(--duration) var(--ease-out);
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #ef4444;
}

.action-icon.estimate { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.25); color: #fbbf24; }
.action-icon.quotation { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.25); color: #c084fc; }
.action-icon.customer { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.action-icon.product { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.25); color: #4ade80; }
.action-icon.report { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.25); color: #ef4444; }

.action-btn:hover .action-icon {
  background: #27272a;
  border-color: #3f3f46;
  color: white;
  transform: scale(1.05);
}

.action-btn span {
  font-weight: 700;
  font-size: 12px;
  font-family: 'Space Grotesk', sans-serif;
}

/* ═══ ACTIVITY FEED ═══ */
.activity-list { padding: 18px; }

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.activity-item:last-child { border-bottom: none; padding-bottom: 0; }
.activity-item:first-child { padding-top: 0; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.activity-icon.paid { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }
.activity-icon.invoice { background: rgba(220, 38, 38, 0.1); border: 1px solid rgba(220, 38, 38, 0.25); color: #ef4444; }
.activity-icon.estimate { background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(59, 130, 246, 0.3); color: #60a5fa; }
.activity-icon.green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.activity-icon.red { background: rgba(220, 38, 38, 0.1); color: #ef4444; }
.activity-icon.blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.activity-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.activity-content strong { color: #FFFFFF; font-weight: 600; }

.activity-time {
  font-size: 11px;
  color: #ef4444;
  font-weight: 600;
  margin-top: 3px;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════ */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: #141416;
  border: 1px solid #262629;
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 500px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.8);
  animation: modalIn var(--duration-slow) var(--ease-out);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Clean top accent border */
.modal-content::before {
  display: none;
}

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

.modal-header {
  padding: 24px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  width: 100%;
  letter-spacing: -0.01em;
}

.close-btn {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: #18181b;
  border: 1px solid var(--border);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.close-btn:hover {
  background: #27272a;
  color: white;
  border-color: #3f3f46;
  box-shadow: none;
}

.modal-body {
  padding: 4px 24px 24px;
  text-align: left;
}

/* ── Custom Confirmation Modal ── */
.custom-confirm-overlay {
  z-index: 10000 !important;
}

.confirm-modal-box {
  max-width: 480px !important;
  width: 92% !important;
  padding: 0 !important;
  text-align: center;
}

.confirm-modal-body {
  padding: 28px 26px 24px;
}

.confirm-icon-wrap {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: all var(--duration-fast);
}

.confirm-icon-wrap.danger {
  background: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.25);
  box-shadow: none;
}

.confirm-icon-wrap.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: none;
}

.confirm-icon-wrap.info {
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  box-shadow: none;
}

.confirm-modal-title {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  font-family: 'Space Grotesk', sans-serif;
}

.confirm-modal-message {
  font-size: 13.5px;
  color: #a1a1aa;
  line-height: 1.55;
  margin-bottom: 24px;
}

.confirm-modal-message strong {
  color: #FFFFFF;
  font-weight: 600;
}

.confirm-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.confirm-cancel-btn {
  flex: 0 0 120px;
  padding: 11px 16px;
  background: #18181b;
  color: #e4e4e7;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap !important;
  transition: all var(--duration-fast);
  text-align: center;
}

.confirm-cancel-btn:hover {
  background: #24242a;
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.25);
}

.confirm-accept-btn {
  flex: 1;
  min-width: 190px;
  padding: 11px 22px !important;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap !important;
  transition: all var(--duration-fast);
  text-align: center;
}

.confirm-accept-btn span {
  white-space: nowrap !important;
}


/* ── Quick Create Options ── */
.quick-create-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.create-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease-out);
  text-align: center;
}

.create-option i {
  font-size: 24px;
  color: #ef4444;
  transition: all var(--duration-fast);
}

.create-option span {
  font-size: 12px;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
}

.create-option:hover {
  background: #18181b;
  color: white;
  border-color: rgba(239, 59, 45, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.create-option:hover i {
  color: #ef4444;
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: 'Inter', sans-serif;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #18181b;
  border: 1px solid #2e2e34;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: #FFFFFF;
  font-size: 14px;
  font-family: inherit;
  transition: all var(--duration);
  outline: none;
}

select option {
  background-color: #1f1f24;
  color: #FFFFFF;
  padding: 8px 12px;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
  border-color: #44444c;
  background: #1f1f23;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: #18181b;
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 59, 45, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: #5c5c6e; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* ── Items Section ── */
.items-section {
  margin: 22px 0;
  padding: 18px;
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.items-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: -0.01em;
}

.items-header {
  display: grid;
  grid-template-columns: 1.5fr 1.8fr 0.6fr 0.8fr 0.9fr 1fr 40px;
  gap: 8px;
  padding: 10px 14px;
  background: #18181b;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
}

.items-header span {
  font-size: 10px;
  font-weight: 700;
  color: #a5a5b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.item-row {
  display: grid;
  grid-template-columns: 1.5fr 1.8fr 0.6fr 0.8fr 0.9fr 1fr 40px;
  gap: 8px;
  margin-bottom: 10px;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
}

.item-row input,
.item-row select,
.item-row textarea {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  color: #FFFFFF;
  font-size: 13px;
  outline: none;
  transition: border-color var(--duration-fast);
}

.item-row input:focus,
.item-row select:focus,
.item-row textarea:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 59, 45, 0.2);
}

.item-row .remove-item {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #ef4444;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
  box-sizing: border-box;
  justify-self: center;
  flex-shrink: 0;
}

.item-row .remove-item:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

/* ── Custom Select / Dropdown (Greyscale) ── */
.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-wrapper.disabled {
  opacity: 0.55;
  pointer-events: none;
  cursor: not-allowed;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 13px;
  background: #18181b;
  border: 1px solid #2e2e34;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #FFFFFF;
  cursor: pointer;
  transition: all var(--duration-fast);
  user-select: none;
  min-height: 40px;
  box-sizing: border-box;
}

.custom-select-trigger:hover {
  border-color: #44444c;
  background: #1f1f24;
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #ef4444;
  background: #1c1c21;
  box-shadow: 0 0 0 2px rgba(239, 59, 45, 0.2);
}

.custom-select-trigger .trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.custom-select-trigger .trigger-text.placeholder {
  color: #71717a;
}

.custom-select-trigger .trigger-arrow {
  font-size: 11px;
  color: #888899;
  transition: transform var(--duration-fast);
  margin-left: 8px;
}

.custom-select-wrapper.open .trigger-arrow {
  transform: rotate(180deg);
  color: #FFFFFF;
}

.custom-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #1f1f24;
  border: 1px solid #36363d;
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 1050;
  display: none;
  flex-direction: column;
  overflow: hidden;
  padding: 4px 0;
}

.custom-select-wrapper.open .custom-select-menu {
  display: flex;
}

.custom-select-search {
  padding: 8px 10px;
  border-bottom: 1px solid #2a2a30;
  background: #18181b;
}

.custom-select-search input {
  width: 100%;
  padding: 7px 10px;
  background: #24242a;
  border: 1px solid #36363d;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12px;
  outline: none;
  box-sizing: border-box;
}

.custom-select-search input:focus {
  border-color: #ef4444;
}

.custom-select-options {
  overflow-y: auto;
  max-height: 200px;
  padding: 2px 0;
}

.custom-select-option {
  padding: 9px 14px;
  font-size: 13.5px;
  color: #e4e4e7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--duration-fast);
}

.custom-select-option:hover {
  background: #2a2a32;
  color: #fff;
}

.custom-select-option.selected {
  background: #2E1412;
  color: #EF3B2D;
  border-left: 3px solid #EF3B2D;
  font-weight: 600;
}

.custom-select-option.selected:hover {
  background: #361a17;
  color: #ffffff;
}

.custom-select-option .opt-phone {
  font-size: 11px;
  color: #71717a;
}

.custom-select-option:hover .opt-phone {
  color: #a1a1aa;
}

.custom-select-footer {
  border-top: 1px solid #2a2a30;
  padding: 6px 8px;
  background: #18181b;
}

.custom-select-add-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  background: #24242a;
  border: 1px dashed #3f3f48;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-family: 'Space Grotesk', sans-serif;
}

.custom-select-add-btn:hover {
  background: #2c2c34;
  color: white;
  border-color: #ef4444;
}

.chart-header .custom-select-wrapper,
.filter-group .custom-select-wrapper,
.audit-filter-group .custom-select-wrapper {
  min-width: 140px;
  width: auto;
  flex: 0 0 auto;
}

.add-item-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  background: rgba(220, 38, 38, 0.08);
  color: #ef4444;
  border: 1px dashed rgba(220, 38, 38, 0.3);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  width: 100%;
  transition: all var(--duration-fast);
  font-family: 'Space Grotesk', sans-serif;
}

.add-item-btn:hover {
  background: rgba(220, 38, 38, 0.15);
  border-color: #ef4444;
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ── Totals ── */
.totals-section {
  margin-left: auto;
  width: 280px;
  padding: 18px;
  background: #18181b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: none;
}

.totals-row:last-child { border-bottom: none; }
.totals-row span:first-child { font-size: 13px; color: var(--text-secondary); }

.totals-row.total {
  padding-top: 12px;
  margin-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
}

.totals-row.total span {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: none;
}

.discount-input { display: flex; align-items: center; gap: 6px; }

.discount-input input {
  width: 48px;
  padding: 5px 7px;
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: right;
  color: var(--text);
  outline: none;
}

.discount-input input:focus { border-color: var(--accent-bright); }

/* ── Form Actions ── */
.form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: none;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE HERO BANNERS — Atmospheric Black & Crimson Velvet
   ═══════════════════════════════════════════════════════════════ */

.page-hero,
.customers-header,
.invoices-header,
.audit-header,
.estimate-header,
.quotation-header,
.products-header,
.reports-header,
.settings-header {
  background: #141416;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  color: white;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.page-hero::before,
.customers-header::before,
.invoices-header::before,
.audit-header::before,
.estimate-header::before,
.quotation-header::before,
.products-header::before,
.reports-header::before,
.settings-header::before,
.page-hero::after,
.customers-header::after,
.quotation-header::after {
  display: none;
}

.page-hero h2,
.customers-header h2,
.invoices-header h2,
.audit-header h2,
.estimate-header h2,
.quotation-header h2,
.products-header h2,
.reports-header h2,
.settings-header h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.page-hero p,
.customers-header p,
.invoices-header p,
.audit-header p,
.estimate-header p,
.quotation-header p,
.products-header p,
.reports-header p,
.settings-header p {
  font-size: 13px;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
  line-height: 1.6;
}

/* ═══ QUOTATION BADGE ═══ */
.quotation-badge {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(220, 38, 38, 0.12);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  margin-top: 12px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(220, 38, 38, 0.28);
  color: #ef4444;
}

/* ═══ CONVERT BUTTON (Estimates page) ═══ */
.convert-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

.convert-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
}

/* ═══════════════════════════════════════════════════════════════
   CUSTOMERS PAGE — Sleek Standardized Cards
   ═══════════════════════════════════════════════════════════════ */

.customers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.customer-card {
  background: #141416;
  border: 1px solid #242428;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all var(--duration) var(--ease-out);
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 124px;
  animation: fadeInUp 0.35s var(--ease-out) both;
}

.customer-card:nth-child(odd) { animation-delay: 0.03s; }
.customer-card:nth-child(even) { animation-delay: 0.06s; }

.customer-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 59, 45, 0.4);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.customer-card-header {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}

.customer-avatar {
  width: 30px;
  height: 30px;
  background: #1c1c20;
  border: 1px solid #2e2e34;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

.customer-header-text {
  min-width: 0;
  flex: 1;
}

.customer-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.customer-email {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.customer-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.customer-action-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  border: 1px solid #2e2e34;
  border-radius: 5px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10.5px;
  transition: all var(--duration-fast);
}

.customer-action-btn:hover {
  background: #27272a;
  border-color: #3f3f46;
  color: #FFFFFF;
}

.customer-action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

.customer-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.customer-info-line {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 17px;
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow: hidden;
}

.customer-info-line .info-icon {
  width: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-size: 10.5px;
  flex-shrink: 0;
}

.customer-info-line .info-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.customer-info-line .info-text.phone {
  font-variant-numeric: tabular-nums;
  flex: none;
}

.customer-info-line .gstin-badge {
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  color: var(--text-secondary);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.customer-compact-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 7px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.customer-stat-pill {
  font-size: 11px;
  color: #3B82F6;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.09);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 2px 7px;
  border-radius: 5px;
  transition: all 0.2s ease;
}

.customer-stat-pill:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.35);
}

.customer-stat-amount {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.customer-stat-amount strong {
  font-size: 12.5px;
  color: #10B981;
  font-weight: 700;
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCTS PAGE
   ═══════════════════════════════════════════════════════════════ */

.products-table-container {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.2s;
}

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

.products-table th,
.products-table td {
  padding: 14px 20px;
  text-align: left;
}

.products-table th {
  background: #18181b;
  font-size: 11px;
  font-weight: 700;
  color: #a5a5b8;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'Inter', sans-serif;
}

.products-table tbody tr {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: all var(--duration-fast);
}

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

.products-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.015);
}

.products-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
  box-shadow: none;
}

.product-name { font-weight: 700; color: #FFFFFF; }

.product-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  color: #ef4444;
}

.product-price { font-weight: 700; color: #FFFFFF; }
.product-actions { display: flex; gap: 6px; }

.product-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #18181b;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
}

.product-action-btn:hover {
  background: #27272a;
  border-color: #3f3f46;
  color: white;
  box-shadow: none;
}

.product-action-btn.delete:hover {
  background: #dc2626;
  border-color: #dc2626;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state i {
  font-size: 56px;
  color: rgba(220, 38, 38, 0.25);
  margin-bottom: 20px;
  display: block;
}

.empty-state h3 {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   REPORTS PAGE
   ═══════════════════════════════════════════════════════════════ */

.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.report-card {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  transition: all var(--duration) var(--ease-out);
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.report-card:nth-child(1) { animation-delay: 0.05s; }
.report-card:nth-child(2) { animation-delay: 0.1s; }
.report-card:nth-child(3) { animation-delay: 0.15s; }
.report-card:nth-child(4) { animation-delay: 0.2s; }

.report-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 59, 45, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.report-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  margin-bottom: 16px;
  background: #18181b;
  border: 1px solid var(--border);
  box-shadow: none;
}

.report-card-icon.blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.25); color: #60a5fa; }
.report-card-icon.green { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.25); color: #4ade80; }
.report-card-icon.purple { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.25); color: #c084fc; }
.report-card-icon.red { background: rgba(220, 38, 38, 0.12); border-color: rgba(220, 38, 38, 0.25); color: #ef4444; }

.report-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.report-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Summary Cards ── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  transition: all var(--duration) var(--ease-out);
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.summary-card:nth-child(1) { animation-delay: 0.05s; }
.summary-card:nth-child(2) { animation-delay: 0.1s; }
.summary-card:nth-child(3) { animation-delay: 0.15s; }
.summary-card:nth-child(4) { animation-delay: 0.2s; }

.summary-card:hover {
  transform: translateY(-2px);
  border-color: rgba(239, 59, 45, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6);
}

.summary-card-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #ef4444;
}

.summary-card-value {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 4px;
  font-family: 'Space Grotesk', sans-serif;
}

.summary-card-label {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Chart Container ── */
.chart-container {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.25s;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.chart-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.chart-placeholder {
  height: 280px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 14px;
  gap: 8px;
}

.chart-placeholder i {
  font-size: 32px;
  color: #ef4444;
  opacity: 0.7;
}

/* ── Transactions ── */
.recent-transactions {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.3s;
}

.transaction-list { padding: 0; }

.transaction-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-fast);
}

.transaction-item:hover { background: rgba(255, 255, 255, 0.03); }
.transaction-item:last-child { border-bottom: none; }

.transaction-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.transaction-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.transaction-icon.income { background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.3); color: #4ade80; }
.transaction-icon.expense { background: rgba(220, 38, 38, 0.12); border: 1px solid rgba(220, 38, 38, 0.25); color: #ef4444; }

.transaction-details h4 {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 2px;
}

.transaction-details p {
  font-size: 11px;
  color: var(--text-tertiary);
}

.transaction-amount { font-weight: 700; font-size: 14px; color: var(--text); }
.transaction-amount.positive { color: #4ade80; }
.transaction-amount.negative { color: #ef4444; }

/* ═══════════════════════════════════════════════════════════════
   SETTINGS PAGE
   ═══════════════════════════════════════════════════════════════ */

.settings-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.settings-nav {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  height: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.1s;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  cursor: pointer;
  transition: all var(--duration-fast);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}

.settings-nav-item:hover {
  background: #18181b;
  border-color: transparent;
  color: #FFFFFF;
}

.settings-nav-item.active {
  background: #2E1412;
  color: #EF3B2D;
  border: 1px solid rgba(239, 59, 45, 0.35);
  box-shadow: none;
}

.settings-content {
  background: #141416;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  animation: fadeInUp 0.5s var(--ease-out) both;
  animation-delay: 0.15s;
}

.settings-section { margin-bottom: 28px; }
.settings-section:last-child { margin-bottom: 0; }

.settings-section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
  letter-spacing: -0.01em;
}

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

.settings-form .form-group { margin-bottom: 0; }
.settings-form .full-width { grid-column: 1 / -1; }

/* ── Logo Upload ── */
.logo-upload {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px;
  background: #141416;
  border-radius: var(--radius);
  border: 2px dashed #262629;
  transition: border-color var(--duration);
}

.logo-upload:hover { border-color: #3f3f46; }

.logo-preview {
  width: 104px;
  height: 104px;
  background: #18181b;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}

.logo-preview img { max-width: 90px; max-height: 90px; object-fit: contain; }

.logo-upload-info h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.logo-upload-info p {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

/* ── Color Picker ── */
.color-picker { display: flex; gap: 10px; }

.color-option {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all var(--duration-fast);
}

.color-option:hover { transform: scale(1.15); }
.color-option.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

/* ── Toggle Switches ── */
.toggle-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #18181b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: background var(--duration-fast);
}

.toggle-switch:hover { background: #222227; }
.toggle-switch:last-child { margin-bottom: 0; }

.toggle-label { display: flex; flex-direction: column; }
.toggle-label span:first-child { font-weight: 700; color: var(--text); font-size: 13px; }
.toggle-label span:last-child { font-size: 12px; color: var(--text-tertiary); }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #27272a;
  transition: 0.25s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
  background-color: var(--accent);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.25);
}

.toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

/* ── Danger Zone ── */
.danger-zone {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 20px;
}

.danger-zone h4 {
  color: #ef4444;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.danger-zone p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.danger-btn {
  background: #dc2626;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 13px;
  font-family: 'Space Grotesk', sans-serif;
  cursor: pointer;
  transition: all var(--duration);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.danger-btn:hover {
  background: #b91c1c;
  box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* ── Animation Utility Classes ── */
.animate-in {
  animation: fadeInUp 0.5s var(--ease-out) both;
}

.animate-fade {
  animation: fadeIn 0.4s var(--ease-out) both;
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE COMPONENT OVERRIDES
   ═══════════════════════════════════════════════════════════════ */

.light-mode body,
html.light-mode body {
  background-color: var(--bg);
  background-image: 
    radial-gradient(circle at 50% -10%, rgba(229, 9, 20, 0.04) 0%, transparent 45%),
    radial-gradient(circle at 100% 30%, rgba(0, 0, 0, 0.015) 0%, transparent 45%);
  color: var(--text);
}

.light-mode .sidebar,
html.light-mode .sidebar {
  background: #ffffff;
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
}

.light-mode .logo-section,
html.light-mode .logo-section {
  background: #ffffff !important;
}

.light-mode .sidebar::before,
html.light-mode .sidebar::before {
  display: none;
}

.light-mode .brand-name,
html.light-mode .brand-name {
  color: #0f172a;
}

.light-mode .nav-item,
html.light-mode .nav-item {
  color: #475569;
}

.light-mode .nav-item:hover,
html.light-mode .nav-item:hover {
  background: rgba(220, 38, 38, 0.05);
  border-color: rgba(220, 38, 38, 0.15);
  color: var(--accent);
}

.light-mode .nav-item.active,
html.light-mode .nav-item.active {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: none !important;
}

.light-mode .sidebar-footer,
html.light-mode .sidebar-footer {
  background: #ffffff;
  border-top-color: var(--border);
}

.light-mode .user-info,
html.light-mode .user-info {
  background: #f8fafc;
  border-color: var(--border);
}

.light-mode .user-name,
html.light-mode .user-name {
  color: #0f172a;
}

.light-mode .header,
html.light-mode .header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: none !important;
  box-shadow: none !important;
}

.light-mode .page-title,
html.light-mode .page-title {
  color: #0f172a;
}

.light-mode .menu-toggle,
html.light-mode .menu-toggle {
  background: #ffffff;
  border-color: var(--border);
  color: #475569;
}

.light-mode .menu-toggle:hover,
html.light-mode .menu-toggle:hover {
  background: rgba(229, 9, 20, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.light-mode .search-box,
html.light-mode .search-box {
  background: #f8fafc;
  border-color: var(--border);
}

.light-mode .search-box:focus-within,
html.light-mode .search-box:focus-within {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.light-mode .search-box input,
html.light-mode .search-box input {
  color: #0f172a;
}

.light-mode .search-box input::placeholder,
html.light-mode .search-box input::placeholder {
  color: #94a3b8;
}

.light-mode .icon-btn,
html.light-mode .icon-btn {
  background: #ffffff;
  border-color: var(--border);
  color: #475569;
}

.light-mode .icon-btn:hover,
html.light-mode .icon-btn:hover {
  background: rgba(229, 9, 20, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.light-mode .btn-secondary,
html.light-mode .btn-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: #334155;
}

.light-mode .btn-secondary:hover,
html.light-mode .btn-secondary:hover {
  background: rgba(229, 9, 20, 0.06);
  border-color: var(--accent);
  color: var(--accent);
}

.light-mode .greeting-section h2,
html.light-mode .greeting-section h2 {
  color: #0f172a;
}

.light-mode .greeting-section p,
html.light-mode .greeting-section p {
  color: #64748b;
}

.light-mode .stat-card,
html.light-mode .stat-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-mode .stat-card:hover,
html.light-mode .stat-card:hover {
  border-color: rgba(229, 9, 20, 0.4);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(229, 9, 20, 0.08);
}

.light-mode .stat-value,
html.light-mode .stat-value {
  color: #0f172a;
}

.light-mode .stat-info h3,
html.light-mode .stat-info h3 {
  color: #64748b;
}

.light-mode .card,
html.light-mode .card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-mode .card:hover,
html.light-mode .card:hover {
  border-color: rgba(229, 9, 20, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 0 20px rgba(229, 9, 20, 0.06);
}

.light-mode .card-header,
html.light-mode .card-header {
  background: #ffffff;
  border-bottom-color: var(--border);
}

.light-mode .card-header h2,
html.light-mode .card-header h2 {
  color: #0f172a;
}

.light-mode .invoice-table th,
html.light-mode .invoice-table th {
  background: #f8fafc;
  color: #475569;
  border-bottom-color: var(--border);
}

.light-mode .invoice-table tbody tr,
html.light-mode .invoice-table tbody tr {
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.light-mode .invoice-table tbody tr:nth-child(even),
html.light-mode .invoice-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.light-mode .invoice-table tbody tr:hover,
html.light-mode .invoice-table tbody tr:hover {
  background: rgba(229, 9, 20, 0.04);
}

.light-mode .invoice-table td,
html.light-mode .invoice-table td {
  color: #0f172a;
}

.light-mode .invoice-table td strong,
html.light-mode .invoice-table td strong {
  color: #0f172a;
}

.light-mode .action-btn,
html.light-mode .action-btn {
  background: #ffffff;
  border-color: var(--border);
  color: #475569;
}

.light-mode .activity-item,
html.light-mode .activity-item {
  border-bottom: 1px solid #f1f5f9;
}

.light-mode .activity-content p,
html.light-mode .activity-content p {
  color: #475569;
}

.light-mode .activity-content strong,
html.light-mode .activity-content strong {
  color: #0f172a;
}

.light-mode .modal,
html.light-mode .modal {
  background: rgba(15, 23, 42, 0.45);
}

.light-mode .modal-content,
html.light-mode .modal-content {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.light-mode .modal-header h2,
html.light-mode .modal-header h2 {
  color: #0f172a;
}

.light-mode .close-btn,
html.light-mode .close-btn {
  background: #f8fafc;
  border-color: var(--border);
  color: #475569;
}

.light-mode .confirm-modal-box,
html.light-mode .confirm-modal-box {
  background: #ffffff !important;
  border-color: rgba(229, 9, 20, 0.25) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15) !important;
}

.light-mode .confirm-modal-title,
html.light-mode .confirm-modal-title {
  color: #0f172a !important;
}

.light-mode .confirm-modal-message,
html.light-mode .confirm-modal-message {
  color: #475569 !important;
}

.light-mode .confirm-modal-message strong,
html.light-mode .confirm-modal-message strong {
  color: #0f172a !important;
}

.light-mode .confirm-cancel-btn,
html.light-mode .confirm-cancel-btn {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}

.light-mode .confirm-cancel-btn:hover,
html.light-mode .confirm-cancel-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}


.light-mode .create-option,
html.light-mode .create-option {
  background: #ffffff;
  border-color: var(--border);
  color: #475569;
}

.light-mode .create-option:hover,
html.light-mode .create-option:hover {
  background: #f8fafc;
  border-color: rgba(220, 38, 38, 0.4);
  color: var(--accent);
}

.light-mode .form-group label,
html.light-mode .form-group label {
  color: #475569;
}

.light-mode .form-group input,
.light-mode .form-group select,
.light-mode .form-group textarea,
html.light-mode .form-group input,
html.light-mode .form-group select,
html.light-mode .form-group textarea {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.light-mode .form-group input:focus,
.light-mode .form-group select:focus,
.light-mode .form-group textarea:focus,
html.light-mode .form-group input:focus,
html.light-mode .form-group select:focus,
html.light-mode .form-group textarea:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.15);
}

.light-mode .form-group input::placeholder,
.light-mode .form-group textarea::placeholder,
html.light-mode .form-group input::placeholder,
html.light-mode .form-group textarea::placeholder {
  color: #94a3b8;
}

.light-mode .items-section,
html.light-mode .items-section {
  background: #f8fafc;
  border-color: var(--border);
}

.light-mode .items-section h3,
html.light-mode .items-section h3 {
  color: #0f172a;
}

.light-mode .items-header,
html.light-mode .items-header {
  background: #ffffff;
  border-color: var(--border);
}

.light-mode .items-header span,
html.light-mode .items-header span {
  color: #64748b;
}

.light-mode .customer-card,
.light-mode .product-card,
.light-mode .report-card,
html.light-mode .customer-card,
html.light-mode .product-card,
html.light-mode .report-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light-mode .customer-card:hover,
.light-mode .product-card:hover,
.light-mode .report-card:hover,
html.light-mode .customer-card:hover,
html.light-mode .product-card:hover,
html.light-mode .report-card:hover {
  border-color: rgba(229, 9, 20, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.light-mode .customer-card h3,
.light-mode .product-card h3,
.light-mode .report-card h3,
html.light-mode .customer-card h3,
html.light-mode .product-card h3,
html.light-mode .report-card h3 {
  color: #0f172a;
}

.light-mode .customer-card p,
.light-mode .product-card p,
.light-mode .report-card p,
html.light-mode .customer-card p,
html.light-mode .product-card p,
html.light-mode .report-card p {
  color: #475569;
}

.light-mode .settings-card,
.light-mode .settings-nav,
html.light-mode .settings-card,
html.light-mode .settings-nav {
  background: #ffffff;
  border-color: var(--border);
}

.light-mode .settings-nav-item,
html.light-mode .settings-nav-item {
  color: #475569;
}

.light-mode .settings-nav-item.active,
html.light-mode .settings-nav-item.active {
  background: rgba(229, 9, 20, 0.08);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .summary-cards { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Mobile Sidebar Drawer */
  .sidebar {
    transform: translateX(-100%);
    z-index: 1000;
    box-shadow: 4px 0 35px rgba(0, 0, 0, 0.85);
    width: 280px;
    max-width: 82vw;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: inline-flex;
  }
  .sidebar-brand {
    justify-content: space-between;
    padding: 16px 14px;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    min-width: 0;
  }

  /* Header on Mobile */
  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
  }
  .header {
    padding: 0 14px;
    height: 60px;
  }
  .header-left {
    gap: 10px;
    min-width: 0;
  }
  .page-title {
    font-size: 17px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .search-box {
    display: none;
  }
  .header-right {
    gap: 8px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  .quick-create-btn {
    height: 36px;
    padding: 0 12px;
    font-size: 12px;
    gap: 6px;
  }

  /* Dashboard & Layout */
  .dashboard-content {
    padding: 14px 12px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  .stat-card {
    padding: 16px;
  }
  .stat-value {
    font-size: 22px;
  }
  .content-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 14px;
  }
  .action-btn {
    padding: 16px 10px;
  }
  .quick-create-options {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Tables Mobile Touch Scroll */
  .table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
  }
  .invoices-table,
  .invoice-table table {
    min-width: 680px;
  }
  .table-footer {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    text-align: center;
    padding: 12px 16px;
  }

  /* Modals Mobile Sizing */
  .modal {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 12px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-header {
    padding: 18px 16px 14px;
  }
  .modal-body {
    padding: 4px 16px 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* Items Section in Modals */
  .items-section {
    padding: 12px;
  }
  .items-header {
    display: none;
  }
  .item-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
  }
  .light-mode .item-row {
    background: #f8fafc;
    border-color: var(--border);
  }
  .item-row input,
  .item-row select {
    width: 100%;
    min-height: 40px;
    font-size: 15px;
  }

  .totals-section {
    width: 100%;
    margin-left: 0;
  }
  .customers-grid,
  .products-grid,
  .summary-cards,
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 10px;
  }
  .page-title {
    max-width: 100px;
    font-size: 15px;
  }
  .quick-create-btn {
    padding: 0 9px;
    font-size: 11px;
  }
  .greeting-section h2 {
    font-size: 20px;
  }
  .greeting-section p {
    font-size: 13px;
  }
  .actions-grid {
    grid-template-columns: 1fr;
  }
  .card-header {
    padding: 14px 16px;
  }
}

/* ═══ PRINT ═══ */
@media print {
  .sidebar, .header, .quick-actions, .activity-card,
  .page-hero, .customers-header, .estimate-header,
  .quotation-header, .products-header, .reports-header,
  .settings-header { display: none; }
  .main-content { margin-left: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   RBAC & TEAM MANAGEMENT STYLES
   ═══════════════════════════════════════════════════════════════ */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

.role-badge.admin {
  background: rgba(220, 38, 38, 0.12);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.role-badge.staff {
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.role-badge.viewer {
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.light-mode .role-badge.admin {
  background: rgba(229, 9, 20, 0.1);
  color: #b91c1c;
  border-color: rgba(229, 9, 20, 0.3);
}
.light-mode .role-badge.staff {
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-color: rgba(37, 99, 235, 0.25);
}
.light-mode .role-badge.viewer {
  background: rgba(22, 163, 74, 0.1);
  color: #15803d;
  border-color: rgba(22, 163, 74, 0.25);
}

.team-members-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.team-members-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}

.team-members-table td {
  padding: 14px;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.team-members-table tr:hover td {
  background: rgba(229, 9, 20, 0.03);
}

.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.status-tag.active {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-tag.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ═══════════════════════════════════════════════════════════════
   AUDIT TRAIL & COMPLIANCE LOG STYLES
   ═══════════════════════════════════════════════════════════════ */

.audit-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #141416;
  border: 1px solid #262629;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.audit-search-wrap {
  flex: 1;
  min-width: 260px;
  max-width: 380px;
  width: auto;
}

.audit-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}

.audit-filter-group .custom-select-wrapper {
  min-width: 140px;
  width: auto;
  flex: 0 0 auto;
}

.audit-filter-select {
  height: 38px;
  background: #101012;
  border: 1px solid #2A2A2E;
  color: #FFFFFF;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audit-filter-select:focus {
  border-color: #EF3B2D;
  box-shadow: 0 0 0 2px rgba(239, 59, 45, 0.2);
}

/* Action Badges */
.audit-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.audit-badge.create {
  background: rgba(16, 185, 129, 0.12);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.audit-badge.update {
  background: rgba(59, 130, 246, 0.12);
  color: #3B82F6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.audit-badge.delete {
  background: rgba(239, 68, 68, 0.14);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.audit-badge.status_change {
  background: rgba(245, 158, 11, 0.12);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.audit-badge.payment {
  background: rgba(16, 185, 129, 0.18);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.audit-badge.login,
.audit-badge.logout {
  background: rgba(168, 85, 247, 0.12);
  color: #C084FC;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.audit-badge.profile {
  background: rgba(239, 59, 45, 0.12);
  color: #EF3B2D;
  border: 1px solid rgba(239, 59, 45, 0.3);
}

.audit-badge.settings {
  background: rgba(6, 182, 212, 0.12);
  color: #22D3EE;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.audit-badge.export,
.audit-badge.data {
  background: rgba(20, 184, 166, 0.12);
  color: #2DD4BF;
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.audit-badge.security {
  background: rgba(244, 63, 94, 0.12);
  color: #FB7185;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

/* Severity Pills */
.audit-severity-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.audit-severity-pill.success {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

.audit-severity-pill.info {
  background: rgba(59, 130, 246, 0.15);
  color: #60A5FA;
}

.audit-severity-pill.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
}

.audit-severity-pill.danger {
  background: rgba(239, 68, 68, 0.18);
  color: #F87171;
}

/* Entity Tag */
.audit-entity-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: #FFFFFF;
}

.audit-entity-tag .id-badge {
  background: #1C1C20;
  border: 1px solid #2E2E34;
  color: #EF3B2D;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-family: monospace;
  font-weight: 700;
}

/* Actor Cell */
.audit-actor-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.audit-actor-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(239, 59, 45, 0.35);
  background: #232328;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #EF3B2D;
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
}

.audit-actor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.audit-actor-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.audit-actor-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
}

.audit-actor-email {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

/* Action Tags in Dashboard Timeline */
.audit-action-tag {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.audit-action-tag.create { background: rgba(16, 185, 129, 0.15); color: #10B981; }
.audit-action-tag.update { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.audit-action-tag.delete { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.audit-action-tag.payment { background: rgba(16, 185, 129, 0.2); color: #34D399; }
.audit-action-tag.status_change { background: rgba(245, 158, 11, 0.15); color: #F59E0B; }
.audit-action-tag.login,
.audit-action-tag.logout { background: rgba(168, 85, 247, 0.15); color: #C084FC; }
.audit-action-tag.settings { background: rgba(6, 182, 212, 0.15); color: #22D3EE; }
.audit-action-tag.profile { background: rgba(239, 59, 45, 0.15); color: #EF3B2D; }
.audit-action-tag.export,
.audit-action-tag.data { background: rgba(20, 184, 166, 0.15); color: #2DD4BF; }
.audit-action-tag.security { background: rgba(244, 63, 94, 0.15); color: #FB7185; }

/* Inspect Button */
.audit-inspect-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #1C1C20;
  border: 1px solid #2B2B30;
  color: #A1A1AA;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.audit-inspect-btn:hover {
  background: rgba(239, 59, 45, 0.15);
  border-color: #EF3B2D;
  color: #EF3B2D;
  transform: scale(1.08);
}

/* Modal details */
.audit-diff-card {
  background: #0E0E10;
  border: 1px solid #222226;
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

.audit-json-box {
  background: #0A0A0C;
  border: 1px solid #202024;
  border-radius: 8px;
  padding: 12px;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 11.5px;
  color: #E4E4E7;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-danger-outline:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: #EF4444;
  color: #F87171;
}

/* Light mode overrides */
.light-mode .audit-filter-bar {
  background: #ffffff;
  border-color: var(--border);
}

.light-mode .audit-filter-select {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.light-mode .audit-actor-name {
  color: #0f172a;
}

.light-mode .audit-entity-tag {
  color: #0f172a;
}

.light-mode .audit-entity-tag .id-badge {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #dc2626;
}

.light-mode .audit-inspect-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

.light-mode .audit-diff-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.light-mode .audit-json-box {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}

.light-mode .btn-danger-outline {
  border-color: #fca5a5;
  color: #dc2626;
}

.light-mode .btn-danger-outline:hover {
  background: #fef2f2;
}



/* ═══ COMPREHENSIVE LIGHT MODE POLISH (ANTI-GLARE SAAS — NO DIVIDER LINES) ═══ */
.light-mode,
html.light-mode,
html.light-mode body {
  background: #ECEFF3 !important; /* Soft, restful slate-grey canvas (eliminates eye glare) */
  color: #1E293B !important;
}

.light-mode .main-content,
html.light-mode .main-content,
.light-mode .dashboard-content,
html.light-mode .dashboard-content {
  background: #ECEFF3 !important;
  color: #1E293B !important;
}

/* Header — Seamless without divider lines like dark mode (Request 3) */
.light-mode .header,
html.light-mode .header {
  background: #ECEFF3 !important; /* Matches page canvas seamlessly */
  border-bottom: none !important; /* No divider line below header */
  box-shadow: none !important;
}

/* Sidebar — Soft neutral tone without divider lines */
.light-mode .sidebar,
html.light-mode .sidebar {
  background: #F4F6F9 !important;
  border-right: 1px solid #DCE1E8 !important;
  box-shadow: none !important;
}

.light-mode .logo-section,
html.light-mode .logo-section {
  background: #F4F6F9 !important;
  border-bottom: none !important; /* No divider lines */
}

.light-mode .sidebar-footer,
html.light-mode .sidebar-footer {
  background: #F4F6F9 !important;
  border-top: none !important; /* No divider lines */
}

/* Sidebar Nav Items & Hover Fix (Request 2) */
.light-mode .nav-item,
html.light-mode .nav-item {
  color: #475569 !important;
  background: transparent !important;
}

.light-mode .nav-item i,
html.light-mode .nav-item i {
  color: #64748B !important;
}

.light-mode .nav-item:hover,
html.light-mode .nav-item:hover {
  background: #FEE2E2 !important; /* Soft red hover tint */
  color: #DC2626 !important; /* Crimson text, NOT white */
  border-color: rgba(220, 38, 38, 0.25) !important;
}

.light-mode .nav-item:hover i,
html.light-mode .nav-item:hover i {
  color: #DC2626 !important; /* Crimson icon, NOT white (Request 2 fixed) */
}

.light-mode .nav-item.active,
html.light-mode .nav-item.active {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.light-mode .nav-item.active i,
html.light-mode .nav-item.active i {
  color: #DC2626 !important;
}

/* Stat Cards */
.light-mode .stat-card,
html.light-mode .stat-card {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
  color: #1E293B !important;
}

.light-mode .stat-card:hover,
html.light-mode .stat-card:hover {
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.07) !important;
}

.light-mode .stat-icon,
html.light-mode .stat-icon {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #DC2626 !important;
}

.light-mode .stat-icon.pending,
html.light-mode .stat-icon.pending {
  background: #FEF3C7 !important;
  border-color: #FDE68A !important;
  color: #D97706 !important;
}

.light-mode .stat-icon.success,
html.light-mode .stat-icon.success {
  background: #DCFCE7 !important;
  border-color: #BBF7D0 !important;
  color: #16A34A !important;
}

.light-mode .stat-icon.info,
html.light-mode .stat-icon.info {
  background: #DBEAFE !important;
  border-color: #BFDBFE !important;
  color: #2563EB !important;
}

.light-mode .stat-value,
html.light-mode .stat-value {
  color: #0F172A !important;
}

.light-mode .stat-info h3,
html.light-mode .stat-info h3 {
  color: #64748B !important;
}

/* General Cards & Recent Invoices */
.light-mode .card,
html.light-mode .card {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .card:hover,
html.light-mode .card:hover {
  border-color: rgba(220, 38, 38, 0.3) !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06) !important;
}

.light-mode .card-header,
html.light-mode .card-header {
  background: #FFFFFF !important;
  border-bottom: 1px solid #EEF1F5 !important;
}

.light-mode .card-header h2,
html.light-mode .card-header h2 {
  color: #0F172A !important;
}

/* Tables (Recent Invoices, Products, Invoices, Audit Trail) */
.light-mode .invoice-table th,
.light-mode .products-table th,
.light-mode .invoices-table th,
.light-mode .audit-table th,
html.light-mode .invoice-table th,
html.light-mode .products-table th,
html.light-mode .invoices-table th,
html.light-mode .audit-table th {
  background: #F4F6F9 !important;
  color: #475569 !important;
  border-bottom: 1px solid #DCE1E8 !important;
}

.light-mode .invoice-table td,
.light-mode .products-table td,
.light-mode .invoices-table td,
.light-mode .audit-table td,
html.light-mode .invoice-table td,
html.light-mode .products-table td,
html.light-mode .invoices-table td,
html.light-mode .audit-table td {
  color: #1E293B !important;
  border-bottom: 1px solid #EEF1F5 !important;
}

.light-mode .invoice-table td strong,
.light-mode .products-table td strong,
.light-mode .invoices-table td strong,
html.light-mode .invoice-table td strong,
html.light-mode .products-table td strong,
html.light-mode .invoices-table td strong {
  color: #0F172A !important;
}

.light-mode .invoice-table tbody tr,
.light-mode .products-table tbody tr,
.light-mode .invoices-table tbody tr,
.light-mode .audit-table tbody tr,
html.light-mode .invoice-table tbody tr,
html.light-mode .products-table tbody tr,
html.light-mode .invoices-table tbody tr,
html.light-mode .audit-table tbody tr {
  background: #FFFFFF !important;
}

.light-mode .invoice-table tbody tr:nth-child(even),
.light-mode .products-table tbody tr:nth-child(even),
.light-mode .invoices-table tbody tr:nth-child(even),
.light-mode .audit-table tbody tr:nth-child(even),
html.light-mode .invoice-table tbody tr:nth-child(even),
html.light-mode .products-table tbody tr:nth-child(even),
html.light-mode .invoices-table tbody tr:nth-child(even),
html.light-mode .audit-table tbody tr:nth-child(even) {
  background: #F9FAFC !important;
}

.light-mode .invoice-table tbody tr:hover,
.light-mode .products-table tbody tr:hover,
.light-mode .invoices-table tbody tr:hover,
.light-mode .audit-table tbody tr:hover,
html.light-mode .invoice-table tbody tr:hover,
html.light-mode .products-table tbody tr:hover,
html.light-mode .invoices-table tbody tr:hover,
html.light-mode .audit-table tbody tr:hover {
  background: #EEF2F6 !important;
}

.light-mode .view-all,
html.light-mode .view-all {
  color: #DC2626 !important;
  font-weight: 600 !important;
}

/* Quick Action Buttons */
.light-mode .action-btn,
html.light-mode .action-btn {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  color: #1E293B !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
}

.light-mode .action-btn:hover,
html.light-mode .action-btn:hover {
  background: #F9FAFC !important;
  border-color: rgba(220, 38, 38, 0.4) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06) !important;
}

.light-mode .action-btn span,
html.light-mode .action-btn span {
  color: #1E293B !important;
}

/* Page Hero Banners */
.light-mode .page-hero,
.light-mode .customers-header,
.light-mode .invoices-header,
.light-mode .audit-header,
.light-mode .estimate-header,
.light-mode .quotation-header,
.light-mode .products-header,
.light-mode .reports-header,
.light-mode .settings-header,
html.light-mode .page-hero,
html.light-mode .customers-header,
html.light-mode .invoices-header,
html.light-mode .audit-header,
html.light-mode .estimate-header,
html.light-mode .quotation-header,
html.light-mode .products-header,
html.light-mode .reports-header,
html.light-mode .settings-header {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  color: #1E293B !important;
}

.light-mode .page-hero h2,
.light-mode .customers-header h2,
.light-mode .invoices-header h2,
.light-mode .audit-header h2,
.light-mode .audit-banner-title,
.light-mode .estimate-header h2,
.light-mode .quotation-header h2,
.light-mode .products-header h2,
.light-mode .reports-header h2,
.light-mode .settings-header h2,
html.light-mode .page-hero h2,
html.light-mode .customers-header h2,
html.light-mode .invoices-header h2,
html.light-mode .audit-header h2,
html.light-mode .audit-banner-title,
html.light-mode .estimate-header h2,
html.light-mode .quotation-header h2,
html.light-mode .products-header h2,
html.light-mode .reports-header h2,
html.light-mode .settings-header h2 {
  color: #0F172A !important;
}

.light-mode .page-hero p,
.light-mode .customers-header p,
.light-mode .invoices-header p,
.light-mode .audit-header p,
.light-mode .estimate-header p,
.light-mode .quotation-header p,
.light-mode .products-header p,
.light-mode .reports-header p,
.light-mode .settings-header p,
html.light-mode .page-hero p,
html.light-mode .customers-header p,
html.light-mode .invoices-header p,
html.light-mode .audit-header p,
html.light-mode .estimate-header p,
html.light-mode .quotation-header p,
html.light-mode .products-header p,
html.light-mode .reports-header p,
html.light-mode .settings-header p {
  color: #64748B !important;
}

/* Products Page Container Fix (Image 4 Fix) */
.light-mode .products-table-container,
html.light-mode .products-table-container {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .product-name,
html.light-mode .product-name {
  color: #0F172A !important;
}

/* Reports Page Fix (Image 3 Fix) */
.light-mode .chart-container,
html.light-mode .chart-container {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .chart-header h3,
html.light-mode .chart-header h3 {
  color: #0F172A !important;
}

.light-mode .chart-placeholder,
html.light-mode .chart-placeholder {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #64748B !important;
}

.light-mode .recent-transactions,
html.light-mode .recent-transactions {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .transaction-item,
html.light-mode .transaction-item {
  background: #FFFFFF !important;
  border-bottom: 1px solid #EEF1F5 !important;
  color: #0F172A !important;
}

.light-mode .transaction-item:hover,
html.light-mode .transaction-item:hover {
  background: #F8FAFC !important;
}

.light-mode .transaction-name,
html.light-mode .transaction-name {
  color: #0F172A !important;
}

.light-mode .transaction-date,
html.light-mode .transaction-date {
  color: #64748B !important;
}

/* Settings Page Fix (Image 2 Fix) */
.light-mode .settings-content,
html.light-mode .settings-content {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
  color: #0F172A !important;
}

.light-mode .settings-nav,
html.light-mode .settings-nav {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .settings-section h3,
html.light-mode .settings-section h3 {
  color: #0F172A !important;
}

.light-mode .settings-nav-item,
html.light-mode .settings-nav-item {
  color: #475569 !important;
}

.light-mode .settings-nav-item:hover,
html.light-mode .settings-nav-item:hover {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
}

.light-mode .settings-nav-item.active,
html.light-mode .settings-nav-item.active {
  background: #FEE2E2 !important;
  color: #DC2626 !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
}

.light-mode .form-group input,
.light-mode .form-group select,
.light-mode .form-group textarea,
html.light-mode .form-group input,
html.light-mode .form-group select,
html.light-mode .form-group textarea {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

.light-mode .form-group label,
html.light-mode .form-group label {
  color: #475569 !important;
}

.light-mode .logo-upload,
html.light-mode .logo-upload {
  background: #F8FAFC !important;
  border: 1px solid #DCE1E8 !important;
}

/* Audit Trail Page Fix (Image 1 Fix) */
.light-mode .audit-filter-bar,
html.light-mode .audit-filter-bar {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .audit-filter-select,
html.light-mode .audit-filter-select {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

.light-mode .audit-filter-select:focus,
html.light-mode .audit-filter-select:focus {
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15) !important;
}

.light-mode .audit-actor-name,
html.light-mode .audit-actor-name {
  color: #0F172A !important;
}

.light-mode .audit-entity-tag,
html.light-mode .audit-entity-tag {
  color: #0F172A !important;
}

.light-mode .audit-entity-tag .id-badge,
html.light-mode .audit-entity-tag .id-badge {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #DC2626 !important;
}

.light-mode .audit-inspect-btn,
html.light-mode .audit-inspect-btn {
  background: #F8FAFC !important;
  border: 1px solid #DCE1E8 !important;
  color: #475569 !important;
}

.light-mode .audit-inspect-btn:hover,
html.light-mode .audit-inspect-btn:hover {
  background: #FEE2E2 !important;
  border-color: #DC2626 !important;
  color: #DC2626 !important;
}

.light-mode .page-size-select,
html.light-mode .page-size-select,
.light-mode .custom-select-trigger,
html.light-mode .custom-select-trigger {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

/* Invoices & Estimates Filters Bar Fix */
.light-mode .filters-bar,
.light-mode .invoices-card,
html.light-mode .filters-bar,
html.light-mode .invoices-card {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
}

.light-mode .filter-group label,
html.light-mode .filter-group label {
  color: #64748B !important;
}

.light-mode .filter-group select,
.light-mode .filter-group input,
html.light-mode .filter-group select,
html.light-mode .filter-group input {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #0F172A !important;
}

/* Sleek Standardized Customer Cards in Light Mode */
.light-mode .customer-card,
html.light-mode .customer-card {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
}

.light-mode .customer-card:hover,
html.light-mode .customer-card:hover {
  border-color: rgba(220, 38, 38, 0.35) !important;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.07) !important;
}

.light-mode .customer-name,
html.light-mode .customer-name {
  color: #0F172A !important;
}

.light-mode .customer-email,
html.light-mode .customer-email {
  color: #64748B !important;
}

.light-mode .customer-avatar,
html.light-mode .customer-avatar {
  background: #FEE2E2 !important;
  border-color: #FECACA !important;
  color: #DC2626 !important;
}

.light-mode .customer-action-btn,
html.light-mode .customer-action-btn {
  background: #F8FAFC !important;
  border-color: #DCE1E8 !important;
  color: #475569 !important;
}

.light-mode .customer-action-btn:hover,
html.light-mode .customer-action-btn:hover {
  background: #EEF2F6 !important;
  color: #0F172A !important;
}

.light-mode .customer-info-line,
html.light-mode .customer-info-line {
  color: #475569 !important;
}

.light-mode .customer-info-line .info-icon,
html.light-mode .customer-info-line .info-icon {
  color: #DC2626 !important;
}

.light-mode .customer-info-line .gstin-badge,
html.light-mode .customer-info-line .gstin-badge {
  background: #EEF2F6 !important;
  color: #334155 !important;
}

.light-mode .customer-compact-footer,
html.light-mode .customer-compact-footer {
  border-top-color: #EEF1F5 !important;
}

.light-mode .customer-stat-pill,
html.light-mode .customer-stat-pill {
  background: #EFF6FF !important;
  border-color: #DBEAFE !important;
  color: #2563EB !important;
}

.light-mode .customer-stat-amount,
html.light-mode .customer-stat-amount {
  color: #64748B !important;
}

.light-mode .customer-stat-amount strong,
html.light-mode .customer-stat-amount strong {
  color: #059669 !important;
}

/* Controls & Buttons in Light Mode */
.light-mode .supabase-sync-pill,
html.light-mode .supabase-sync-pill {
  background: #FFFFFF !important;
  border-color: #DCE1E8 !important;
  color: #334155 !important;
}

.light-mode .supabase-sync-pill:hover,
html.light-mode .supabase-sync-pill:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

.light-mode .theme-toggle,
html.light-mode .theme-toggle {
  background: #FFFFFF !important;
  border-color: #DCE1E8 !important;
  color: #1E293B !important;
}

.light-mode .theme-toggle:hover,
html.light-mode .theme-toggle:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

.light-mode .export-btn,
.light-mode .btn-secondary,
html.light-mode .export-btn,
html.light-mode .btn-secondary {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #334155 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.light-mode .export-btn:hover,
.light-mode .btn-secondary:hover,
html.light-mode .export-btn:hover,
html.light-mode .btn-secondary:hover {
  background: #F8FAFC !important;
  border-color: #94A3B8 !important;
  color: #0F172A !important;
  transform: translateY(-1px) !important;
}

.light-mode .export-btn.purge-btn,
html.light-mode .export-btn.purge-btn {
  color: #DC2626 !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
  background: #FEF2F2 !important;
}

.light-mode .export-btn.purge-btn:hover,
html.light-mode .export-btn.purge-btn:hover {
  background: #FEE2E2 !important;
  border-color: rgba(220, 38, 38, 0.6) !important;
  color: #B91C1C !important;
  transform: translateY(-1px) !important;
}

.light-mode .search-box,
html.light-mode .search-box {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
}

.light-mode .search-box input,
html.light-mode .search-box input {
  color: #0F172A !important;
}

.light-mode .search-box i,
html.light-mode .search-box i {
  color: #94A3B8 !important;
}

.light-mode .search-box:focus-within,
html.light-mode .search-box:focus-within {
  background: #FFFFFF !important;
  border-color: #DC2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

/* Audit Trail Modal & Search Polish */
.audit-modal-info-card {
  background: #141417;
  border: 1px solid #25252A;
}

.light-mode .audit-modal-info-card,
html.light-mode .audit-modal-info-card {
  background: #F8FAFC !important;
  border-color: #E2E8F0 !important;
}

.light-mode .audit-modal-info-card strong,
html.light-mode .audit-modal-info-card strong,
.light-mode .audit-modal-info-card div,
html.light-mode .audit-modal-info-card div {
  color: #1E293B !important;
}

/* ==========================================================================
   LIGHT MODE POLISH & BUG FIXES (User Feedback)
   ========================================================================== */

/* 1. Audit Trail Banner Title (Request 1: Black in Light Mode) */
.audit-banner-title {
  color: #FFFFFF;
}

.light-mode .audit-banner-title,
html.light-mode .audit-banner-title {
  color: #000000 !important;
}

/* 2. Audit Trail Table Row Text Colors */
.audit-row-date {
  color: #FFFFFF;
}

.audit-row-summary {
  color: #FFFFFF;
}

.audit-row-details {
  color: var(--text-secondary);
}

.light-mode .audit-row-date,
html.light-mode .audit-row-date,
.light-mode .audit-row-summary,
html.light-mode .audit-row-summary {
  color: #0F172A !important;
}

.light-mode .audit-row-details,
html.light-mode .audit-row-details {
  color: #475569 !important;
}

/* 3. Settings Toggle Switches (Banking & UPI, Notifications) */
.light-mode .toggle-switch,
html.light-mode .toggle-switch {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.light-mode .toggle-switch:hover,
html.light-mode .toggle-switch:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
}

.light-mode .toggle-label span:first-child,
html.light-mode .toggle-label span:first-child {
  color: #0F172A !important;
}

.light-mode .toggle-label span:last-child,
html.light-mode .toggle-label span:last-child {
  color: #64748B !important;
}

.light-mode .toggle-slider,
html.light-mode .toggle-slider {
  background-color: #CBD5E1 !important;
}

.light-mode .toggle input:checked + .toggle-slider,
html.light-mode .toggle input:checked + .toggle-slider {
  background-color: #DC2626 !important;
}

.light-mode .toggle-slider:before,
html.light-mode .toggle-slider:before {
  background-color: #FFFFFF !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2) !important;
}

/* 4. Settings Logo Preview in Theme & Branding */
.light-mode .logo-preview,
html.light-mode .logo-preview {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* 5. Products Table Price & Action Buttons */
.light-mode .product-price,
html.light-mode .product-price {
  color: #0F172A !important;
  font-weight: 700 !important;
}

.light-mode .product-action-btn,
html.light-mode .product-action-btn {
  background: #FFFFFF !important;
  border: 1px solid #DCE1E8 !important;
  color: #475569 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.light-mode .product-action-btn:hover,
html.light-mode .product-action-btn:hover {
  background: #F8FAFC !important;
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
}

.light-mode .product-action-btn.delete:hover,
html.light-mode .product-action-btn.delete:hover {
  background: #FEE2E2 !important;
  border-color: #DC2626 !important;
  color: #DC2626 !important;
}

/* 6. Profile Photo Camera Button Border */
.profile-camera-btn {
  border: 2px solid #141416;
}

.light-mode .profile-camera-btn,
html.light-mode .profile-camera-btn {
  border-color: #FFFFFF !important;
}

/* 7. Lead Stage Badges in Light Mode */
.light-mode .status-badge.new,
html.light-mode .status-badge.new {
  background: rgba(14, 165, 233, 0.12) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  color: #0284c7 !important;
}
.light-mode .status-badge.contacted,
html.light-mode .status-badge.contacted {
  background: rgba(168, 85, 247, 0.12) !important;
  border-color: rgba(168, 85, 247, 0.3) !important;
  color: #7e22ce !important;
}
.light-mode .status-badge.qualified,
html.light-mode .status-badge.qualified {
  background: rgba(217, 119, 6, 0.12) !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
  color: #b45309 !important;
}
.light-mode .status-badge.proposal,
html.light-mode .status-badge.proposal {
  background: rgba(79, 70, 229, 0.12) !important;
  border-color: rgba(79, 70, 229, 0.3) !important;
  color: #4338ca !important;
}
.light-mode .status-badge.lost,
html.light-mode .status-badge.lost {
  background: rgba(220, 38, 38, 0.1) !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
  color: #dc2626 !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOCKED TOP-RIGHT HEADER ELEMENTS (STANDARDIZED SIZES & POSITION)
   ═══════════════════════════════════════════════════════════════ */

.header {
  height: 72px !important;
  min-height: 72px !important;
  max-height: 72px !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

.header-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  margin-left: auto !important;
  flex-shrink: 0 !important;
  height: 38px !important;
}

/* 1. Supabase Sync Pill - Locked Dimensions (Shows full text without truncation) */
.header-right .supabase-sync-pill {
  width: 156px !important;
  min-width: 156px !important;
  max-width: 156px !important;
  height: 38px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  border-radius: 9999px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  flex-shrink: 0 !important;
  white-space: nowrap !important;
  cursor: pointer !important;
}

.header-right .supabase-sync-pill .sync-text {
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

/* 2. Theme Toggle (Light/Dark Mode) - Locked Dimensions */
.header-right .theme-toggle,
.header-right .icon-btn {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  cursor: pointer !important;
}

/* 3. Action / Quick Create Button - Locked Dimensions */
.header-right .quick-create-btn {
  width: 160px !important;
  min-width: 160px !important;
  max-width: 160px !important;
  height: 38px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
}

/* 4. Profile Photo / User Avatar - Locked Dimensions */
.header-right .header-user-avatar {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  margin: 0 !important;
}

.header-right .header-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 50% !important;
  display: block !important;
}

/* ═══════════════════════════════════════════════════════════════
   LOCKED CONVERT BUTTON DIMENSIONS (ACROSS ALL PAGES & TABLES)
   ═══════════════════════════════════════════════════════════════ */

.action-buttons .convert-btn,
.invoices-table .convert-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 32px !important;
  padding: 0 10px !important;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  font-size: 11.5px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  transition: all var(--duration) var(--ease-out) !important;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3) !important;
  flex-shrink: 0 !important;
}

.modal .convert-btn {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  padding: 0 16px !important;
  height: 34px !important;
  font-size: 12.5px !important;
  border-radius: 6px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: linear-gradient(135deg, #22c55e, #16a34a) !important;
  color: #ffffff !important;
}

.convert-btn:hover,
.action-buttons .convert-btn:hover {
  background: #16a34a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.45) !important;
}

.converted-pill,
.action-buttons .converted-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  width: 96px !important;
  min-width: 96px !important;
  max-width: 96px !important;
  height: 32px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  color: #10B981 !important;
  background: rgba(16, 185, 129, 0.12) !important;
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
}

.light-mode .converted-pill,
html.light-mode .converted-pill {
  color: #059669 !important;
  background: rgba(16, 185, 129, 0.14) !important;
  border-color: rgba(16, 185, 129, 0.35) !important;
}

/* Standardized Table Action Buttons Container */
.action-buttons {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  height: 32px !important;
  white-space: nowrap !important;
}

/* Equal Height Table Action Buttons: View, Edit, Delete, Convert */
.action-buttons .action-btn,
.invoices-table .action-btn,
.table-container .action-btn {
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  font-size: 13px !important;
}

.action-buttons .action-btn i,
.invoices-table .action-btn i,
.table-container .action-btn i {
  font-size: 12.5px !important;
  line-height: 1 !important;
  margin: 0 !important;
}

/* Bulletproof Dashboard Quick Actions Protection */
.actions-grid .action-btn {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  min-height: 100px !important;
  max-height: none !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  padding: 20px 12px !important;
  box-sizing: border-box !important;
  line-height: normal !important;
  text-align: center !important;
}

/* ═══ LEADS TABLE & ZERO-SCROLL PIPELINE STYLING ═══ */
.table-container table.leads-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: auto !important;
  border-collapse: collapse !important;
}

.table-container table.leads-table th,
.table-container table.leads-table td {
  padding: 10px 8px !important;
  font-size: 12.5px !important;
}

.stage-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
}

.next-stage-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  height: 24px !important;
  padding: 0 7px !important;
  font-size: 10.5px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  background: rgba(220, 38, 38, 0.12) !important;
  border: 1px solid rgba(220, 38, 38, 0.3) !important;
  color: #f87171 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  white-space: nowrap !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.next-stage-btn:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

.next-stage-btn:active {
  transform: translateY(0);
}

.light-mode .next-stage-btn,
html.light-mode .next-stage-btn {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}

.light-mode .next-stage-btn:hover,
html.light-mode .next-stage-btn:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

/* ═══ PROPOSAL DOCUMENT CHOICE BUTTONS & CARDS ═══ */
.proposal-choice-btn {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  height: 96px !important;
  padding: 14px 12px !important;
  border-radius: 10px !important;
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  user-select: none !important;
  text-decoration: none !important;
}

.proposal-choice-btn i {
  font-size: 24px !important;
  margin-bottom: 2px !important;
}

.proposal-choice-btn .btn-title {
  font-size: 13.5px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.proposal-choice-btn .btn-desc {
  font-size: 11px !important;
  line-height: 1.2 !important;
  font-weight: 400 !important;
  opacity: 0.85 !important;
}

.proposal-choice-btn.quotation-btn {
  background: #141416 !important;
  color: var(--text) !important;
  border: 1px solid #27272a !important;
}

.proposal-choice-btn.quotation-btn i {
  color: #EF3B2D !important;
}

.proposal-choice-btn.quotation-btn:hover {
  transform: translateY(-2px) !important;
  border-color: #EF3B2D !important;
  box-shadow: 0 6px 20px rgba(239, 59, 45, 0.25) !important;
}

.light-mode .proposal-choice-btn.quotation-btn,
html.light-mode .proposal-choice-btn.quotation-btn {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #1E293B !important;
}

.light-mode .proposal-choice-btn.quotation-btn:hover,
html.light-mode .proposal-choice-btn.quotation-btn:hover {
  border-color: #EF3B2D !important;
  box-shadow: 0 6px 18px rgba(239, 59, 45, 0.2) !important;
}

.proposal-choice-btn.estimate-btn {
  background: #141416 !important;
  color: var(--text) !important;
  border: 1px solid #27272a !important;
}

.proposal-choice-btn.estimate-btn i {
  color: #3B82F6 !important;
}

.proposal-choice-btn.estimate-btn:hover {
  transform: translateY(-2px) !important;
  border-color: #3B82F6 !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.2) !important;
}

.light-mode .proposal-choice-btn.estimate-btn,
html.light-mode .proposal-choice-btn.estimate-btn {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  color: #1E293B !important;
}

.light-mode .proposal-choice-btn.estimate-btn:hover,
html.light-mode .proposal-choice-btn.estimate-btn:hover {
  border-color: #3B82F6 !important;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.15) !important;
}

.doc-choice-card {
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) !important;
  border: 1px solid #27272a !important;
  background: #141416 !important;
  user-select: none !important;
}

.doc-choice-card:hover {
  transform: translateY(-2px) !important;
  border-color: #3f3f46 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.doc-choice-card.active-quotation {
  background: rgba(239, 59, 45, 0.12) !important;
  border: 2px solid #EF3B2D !important;
  box-shadow: 0 0 16px rgba(239, 59, 45, 0.25) !important;
}

.doc-choice-card.active-estimate {
  background: rgba(59, 130, 246, 0.12) !important;
  border: 2px solid #3B82F6 !important;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.25) !important;
}

.light-mode .doc-choice-card,
html.light-mode .doc-choice-card {
  background: #FFFFFF !important;
  border: 1px solid #CBD5E1 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05) !important;
}

.light-mode .doc-choice-card:hover,
html.light-mode .doc-choice-card:hover {
  border-color: #94A3B8 !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08) !important;
}

.light-mode .doc-choice-card.active-quotation,
html.light-mode .doc-choice-card.active-quotation {
  background: #FFF5F5 !important;
  border: 2px solid #EF3B2D !important;
  box-shadow: 0 0 14px rgba(239, 59, 45, 0.15) !important;
}

.light-mode .doc-choice-card.active-estimate,
html.light-mode .doc-choice-card.active-estimate {
  background: #EFF6FF !important;
  border: 2px solid #3B82F6 !important;
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.15) !important;
}

