/**
 * Classic Workspace Design System Implementation
 * SDM Wholesale SMM Reseller Platform (sdmpanel-v2)
 * 
 * References:
 * - Linear (hierarchy, quiet navigation, tabular KPI tiles)
 * - Atlassian (8pt spacing system, typography scale, structured forms)
 * - IBM Carbon (dense, high-contrast tables, bulk actions, clear alignment)
 * - Adobe Spectrum (accessible states, visible focus, status pills with dual indicators)
 */

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

:root {
  /* ==========================================================================
     1. BRAVEPANEL DESIGN SYSTEM TOKENS
     ========================================================================== */
  --color-bg-canvas: #ffffff;
  --color-surface: #ffffff;
  --color-surface-subdued: #e9ecef;
  --color-surface-hover: #f1f5f9;
  --color-surface-selected: #e0f2fe;

  /* Typography Colors (BravePanel High-Contrast) */
  --color-text-primary: #000000;
  --color-text-secondary: #495057;
  --color-text-muted: #6c757d;
  --color-text-disabled: #94a3b8;
  --color-text-inverse: #ffffff;

  /* Borders & Dividers */
  --color-border-subtle: #e2e8f0;
  --color-border-interactive: #cbd5e1;
  --color-border-hover: #0099ff;
  --color-border-focus: #0099ff;

  /* Primary Interactive Actions (Brave Blue) */
  --color-action-primary: #0099ff;
  --color-action-primary-hover: #007eff;
  --color-action-primary-active: #0075ff;
  --color-action-primary-subtle: #e0f2fe;
  --color-action-primary-focus: rgba(0, 153, 255, 0.25);
  --color-action-subtle-hover: #f1f5f9;

  /* Semantic Feedback Tokens */
  --color-success-text: #065F46;
  --color-success-surface: #ECFDF5;
  --color-success-border: #A7F3D0;

  --color-warning-text: #92400E;
  --color-warning-surface: #FFFBEB;
  --color-warning-border: #FDE68A;

  --color-danger-text: #991B1B;
  --color-danger-surface: #FEF2F2;
  --color-danger-border: #FECACA;

  --color-info-text: #007eff;
  --color-info-surface: #EFF6FF;
  --color-info-border: #BFDBFE;

  /* ==========================================================================
     2. TYPOGRAPHY & NUMERICS (Source Sans Pro Standard)
     ========================================================================== */
  --font-sans: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  --text-xs: 0.75rem;     /* 12px */
  --text-sm: 0.8125rem;   /* 13px */
  --text-base: 0.875rem;  /* 14px */
  --text-md: 0.9375rem;   /* 15px */
  --text-lg: 1.125rem;    /* 18px */
  --text-xl: 1.375rem;    /* 22px */
  --text-2xl: 1.5rem;     /* 24px */

  /* ==========================================================================
     3. SPACING & RADII (Atlassian / Linear Standards)
     ========================================================================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  --radius-control: 6px;
  --radius-card: 8px;
  --radius-panel: 10px;
  --radius-full: 9999px;

  /* Restrained Shadows (Reserved for elevation/overlays) */
  --shadow-none: none;
  --shadow-card: 0 1px 2px 0 rgba(23, 32, 51, 0.04);
  --shadow-dropdown: 0 4px 16px -2px rgba(23, 32, 51, 0.08), 0 2px 6px -1px rgba(23, 32, 51, 0.04);
  --shadow-modal: 0 12px 32px -4px rgba(23, 32, 51, 0.12), 0 4px 12px -2px rgba(23, 32, 51, 0.08);

  --focus-ring: 0 0 0 3px var(--color-action-primary-focus);
}

/* ==========================================================================
   4. BASE APPLICATION STYLES & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text-primary);
  background-color: var(--color-bg-canvas);
  background-image: none !important; /* Strip decorative neon gradients */
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 600;
  line-height: 1.33;
  letter-spacing: -0.015em;
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
h4 { font-size: var(--text-md); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-secondary);
}

a {
  color: var(--color-action-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-action-primary-hover);
}

/* Accessible Keyboard Focus Visible Rule across all controls */
:focus-visible {
  outline: 2px solid var(--color-border-focus) !important;
  outline-offset: 2px !important;
}

/* ==========================================================================
   5. NAVIGATION & LAYOUT (Linear Quiet Hierarchy)
   ========================================================================== */

/* Main Wrapper & Layout Flow */
.container-all {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--color-bg-canvas);
  transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 992px) {
  .container-all.menuopen {
    margin-left: 260px;
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .container-all.menuclose {
    margin-left: 0;
    transition: margin-left 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .container-left-menu.navclose {
    transform: translateX(-260px) !important;
  }
  .container-left-menu.navopen {
    transform: translateX(0) !important;
  }
}

/* Sidebar Navigation */
.container-left-menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 260px;
  z-index: 1040;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-surface) !important;
  border-right: 1px solid var(--color-border-subtle) !important;
  display: flex;
  flex-direction: column;
  box-shadow: none !important;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), left 0.25s ease;
}

@media (max-width: 991.98px) {
  .container-all {
    margin-left: 0 !important;
  }
  .container-left-menu.navclose {
    left: -260px !important;
    transform: translateX(-100%) !important;
  }
  .container-left-menu.navopen {
    left: 0 !important;
    transform: translateX(0) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7) !important;
  }
}

/* Brand Section */
.container-logo {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  min-height: 64px;
}

.container-logo img {
  max-height: 32px;
  max-width: 160px;
  object-fit: contain;
}

.brand-title-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title-text i {
  color: var(--color-action-primary);
}

/* Quiet User Profile Strip in Sidebar */
.sidbaravatar {
  display: block;
  width: 48px;
  height: 48px;
  margin: 16px auto 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border-subtle);
  background-size: cover;
  background-position: center;
  box-shadow: none !important;
}

.sidebar-blnce-wrap {
  text-align: center;
  padding: 4px 16px 14px;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 8px;
}

.sidebar-blnce-title {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  margin: 0 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-blnce-txt {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-primary);
  font-family: var(--font-mono);
  margin: 0;
}

/* Sidebar Menu Items */
#main-menu-navigation {
  padding: 8px 12px 24px;
  list-style: none;
  flex: 1;
}

#main-menu-navigation .nav-item {
  list-style: none;
  margin: 2px 0;
}

#main-menu-navigation .nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 14px;
  color: #94a3b8;
  font-size: 0.90rem;
  font-weight: 600;
  border-radius: var(--radius-control);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

#main-menu-navigation .nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  color: #64748b;
  transition: color 0.15s ease, transform 0.15s ease;
}

#main-menu-navigation .nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

#main-menu-navigation .nav-link:hover i {
  color: #38bdf8;
  transform: scale(1.1);
}

#main-menu-navigation .nav-link.active {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95) 0%, rgba(29, 78, 216, 1) 100%) !important;
  font-weight: 700 !important;
  border: 1px solid rgba(147, 197, 253, 0.45) !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 16px rgba(29, 78, 216, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.25) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-1px);
}

#main-menu-navigation .nav-link.active i {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8)) !important;
}

.submenu-header {
  font-size: 0.70rem !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #64748b !important;
  padding: 16px 14px 6px !important;
  margin-top: 10px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.submenu-header.first-header {
  margin-top: 0 !important;
  border-top: none !important;
  padding-top: 8px !important;
}

.submenu-header i {
  font-size: 0.82rem !important;
  filter: drop-shadow(0 0 6px currentColor);
}

/* ==========================================================================
   6. TOP HEADER & WORKSPACE TOOLBAR
   ========================================================================== */
.btn-3d-glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(12px) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.3) !important;
  border-radius: 8px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.btn-3d-glass:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -2px 0 rgba(0, 0, 0, 0.3) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
}
.btn-3d-glass:active {
  transform: translateY(1px) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
}

.header.top {
  background: var(--color-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--color-border-subtle) !important;
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
}

.header-title-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.header-toggler {
  background: transparent;
  border: 1px solid transparent;
  color: var(--color-text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius-control);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.header-toggler:hover {
  background: var(--color-surface-subdued);
  color: var(--color-text-primary);
}

/* Header Action Buttons */
.dark-light-btn, .expand-icon, .palette-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-control);
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  color: var(--color-text-secondary) !important;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.dark-light-btn:hover, .expand-icon:hover, .palette-btn:hover {
  background: var(--color-surface-subdued) !important;
  color: var(--color-text-primary) !important;
  border-color: var(--color-border-interactive) !important;
}

.header-currency-tag {
  background: var(--color-surface-subdued);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-control);
  padding: 5px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-currency-tag i {
  color: var(--color-action-primary);
}

/* Quiet Balance Pill in Header */
.header-balance-pill {
  background: var(--color-surface-subdued);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-weight: 600;
  font-size: var(--text-base);
  font-family: var(--font-mono);
  color: var(--color-text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.header-balance-pill i {
  color: var(--color-action-primary);
}

.header-balance-pill:hover {
  background: var(--color-surface-selected);
  border-color: var(--color-action-primary);
  color: var(--color-action-primary);
}

.user-avatar-top {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background-size: cover;
  background-position: center;
  border: 1px solid var(--color-border-subtle);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.user-avatar-top:hover {
  border-color: var(--color-action-primary);
}

/* User Profile Dropdown */
#userDropdownMenu {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-dropdown) !important;
  padding: 6px 0 !important;
}

.user-dropdown-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 4px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.user-dropdown-item:hover {
  background: var(--color-surface-subdued);
  color: var(--color-text-primary);
}

/* ==========================================================================
   7. MAIN CONTENT WRAPPER & CONTAINER
   ========================================================================== */
.app-content, .container, .content-wrapper, main {
  padding: var(--space-6) var(--space-6);
  flex: 1;
}

@media (max-width: 768px) {
  .app-content, .container, .content-wrapper, main {
    padding: var(--space-4) var(--space-4);
  }
}

/* ==========================================================================
   8. CARD & PANEL SYSTEM (Linear Practical Density)
   ========================================================================== */
.glass-card, .card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: var(--space-6);
  margin-bottom: var(--space-6);
  transition: border-color 0.15s ease;
}

.glass-card:hover, .card:hover {
  border-color: var(--color-border-interactive) !important;
}

.glass-header, .card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-subtle) !important;
  background: transparent !important;
}

.glass-header h2, .glass-header h3, .card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.glass-header h2 i, .glass-header h3 i {
  color: var(--color-action-primary);
  font-size: 1rem;
}

/* ==========================================================================
   9. METRIC KPI TILES (Linear High-Density Pattern)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.stat-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-4);
  margin-bottom: 0 !important;
  border-radius: var(--radius-card);
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  box-shadow: var(--shadow-card) !important;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-control);
  background: var(--color-surface-subdued) !important;
  border: 1px solid var(--color-border-subtle) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: var(--color-action-primary) !important;
  flex-shrink: 0;
}

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

.stat-info .stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-info .stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

/* ==========================================================================
   10. BUTTON SYSTEM (Adobe Spectrum & Linear Accessible States)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--text-base);
  padding: 8px 16px;
  height: 38px;
  border-radius: var(--radius-control);
  cursor: pointer;
  border: 1px solid transparent;
  outline: none;
  transition: all 0.15s ease;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

/* Primary Button (Quiet Blue) */
.btn-primary {
  background: var(--color-action-primary) !important;
  color: var(--color-text-inverse) !important;
  border-color: var(--color-action-primary) !important;
  box-shadow: none !important;
}

.btn-primary:hover {
  background: var(--color-action-primary-hover) !important;
  border-color: var(--color-action-primary-hover) !important;
  color: var(--color-text-inverse) !important;
  transform: none !important;
}

.btn-primary:active {
  background: var(--color-action-primary-active) !important;
}

.btn-primary:focus-visible {
  box-shadow: var(--focus-ring) !important;
}

/* Secondary / Default Button */
.btn-secondary, .btn-glass, .btn-outline {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-interactive) !important;
  color: var(--color-text-primary) !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.btn-secondary:hover, .btn-glass:hover, .btn-outline:hover {
  background: var(--color-surface-subdued) !important;
  border-color: var(--color-border-hover) !important;
  color: var(--color-text-primary) !important;
  transform: none !important;
}

.btn-secondary:active, .btn-glass:active {
  background: #E2E8F0 !important;
}

/* Success Button */
.btn-success {
  background: #10b981 !important;
  color: #ffffff !important;
  border: 1px solid #059669 !important;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.2) !important;
  font-weight: 600;
}

.btn-success:hover {
  background: #059669 !important;
  color: #ffffff !important;
  border-color: #047857 !important;
}

.btn-success i,
.btn-success * {
  color: #ffffff !important;
}

/* Danger / Destructive Button */
.btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border: 1px solid #b91c1c !important;
  box-shadow: 0 1px 2px rgba(220, 38, 38, 0.2) !important;
  font-weight: 600;
}

.btn-danger:hover {
  background: #b91c1c !important;
  color: #ffffff !important;
  border-color: #991b1b !important;
}

.btn-danger i,
.btn-danger * {
  color: #ffffff !important;
}

/* Subtle / Outline Danger Button */
.btn-danger-subtle,
.btn-outline-danger {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fca5a5 !important;
}

.btn-danger-subtle:hover,
.btn-outline-danger:hover {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.btn-danger-subtle i,
.btn-outline-danger i {
  color: #dc2626 !important;
}

/* Button Sizes */
.btn-sm {
  padding: 4px 10px;
  height: 30px;
  font-size: var(--text-xs);
  border-radius: var(--radius-control);
}

.btn-lg {
  padding: 10px 20px;
  height: 44px;
  font-size: var(--text-md);
  border-radius: var(--radius-control);
}

/* Disabled & Loading States */
.btn:disabled, .btn.disabled {
  opacity: 0.55 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.btn.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: sdm-spin 0.6s linear infinite;
}

.btn-secondary.is-loading::after, .btn-glass.is-loading::after {
  border-color: rgba(23, 32, 51, 0.2);
  border-top-color: var(--color-text-primary);
}

@keyframes sdm-spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   11. DATA TABLES (IBM Carbon High-Density Pattern)
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-card);
  background: var(--color-surface);
}

.glass-table, .table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--color-surface);
  margin-bottom: 0;
}

.glass-table th, .table th {
  background: var(--color-surface-subdued) !important;
  padding: 10px 16px;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-secondary) !important;
  font-weight: 600;
  border-bottom: 1px solid var(--color-border-subtle) !important;
  white-space: nowrap;
}

.glass-table td, .table td {
  padding: 12px 16px;
  font-size: var(--text-base);
  border-bottom: 1px solid var(--color-border-subtle) !important;
  color: var(--color-text-primary) !important;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.glass-table tbody tr:hover td, .table tbody tr:hover td {
  background: var(--color-surface-hover) !important;
}

.glass-table tbody tr.is-selected td {
  background: var(--color-surface-selected) !important;
}

/* Numeric & Monospace alignment for table values */
.glass-table td.cell-numeric, .table td.cell-numeric {
  text-align: right;
  font-family: var(--font-mono);
}

.glass-table th.col-numeric, .table th.col-numeric {
  text-align: right;
}

.table-id-tag {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--color-action-primary);
}

/* Empty Table State */
.table-empty-state {
  text-align: center;
  padding: 48px 24px !important;
  color: var(--color-text-secondary);
}

.table-empty-state i {
  font-size: 2.25rem;
  color: var(--color-border-interactive);
  margin-bottom: 12px;
  display: block;
}

.table-empty-title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 4px;
}

.table-empty-desc {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  max-width: 360px;
  margin: 0 auto 16px;
}

/* ==========================================================================
   12. STATUS PILLS & BADGES (Adobe Spectrum Dual-Indicator)
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

/* Pill Bullet for Accessibility (Color-Blind Friendly) */
.badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Completed / Active (Success) */
.badge-completed, .badge-active, .badge-success {
  background: var(--color-success-surface) !important;
  color: var(--color-success-text) !important;
  border: 1px solid var(--color-success-border) !important;
}
.badge-completed::before, .badge-active::before, .badge-success::before {
  background: var(--color-success-text);
}

/* Pending (Warning) */
.badge-pending, .badge-warning {
  background: var(--color-warning-surface) !important;
  color: var(--color-warning-text) !important;
  border: 1px solid var(--color-warning-border) !important;
}
.badge-pending::before, .badge-warning::before {
  background: var(--color-warning-text);
}

/* In Progress / Processing (Info) */
.badge-inprogress, .badge-processing, .badge-info {
  background: var(--color-info-surface) !important;
  color: var(--color-info-text) !important;
  border: 1px solid var(--color-info-border) !important;
}
.badge-inprogress::before, .badge-processing::before, .badge-info::before {
  background: var(--color-info-text);
}

/* Canceled / Refunded / Failed (Danger) */
.badge-canceled, .badge-deactive, .badge-danger, .badge-failed {
  background: var(--color-danger-surface) !important;
  color: var(--color-danger-text) !important;
  border: 1px solid var(--color-danger-border) !important;
}
.badge-canceled::before, .badge-deactive::before, .badge-danger::before, .badge-failed::before {
  background: var(--color-danger-text);
}

/* Partial / Secondary Status */
.badge-partial {
  background: #F5F3FF !important;
  color: #6B21A8 !important;
  border: 1px solid #DDD6FE !important;
}
.badge-partial::before {
  background: #6B21A8;
}

/* ==========================================================================
   13. FORM CONTROLS & INPUTS (Atlassian Persistent Layout)
   ========================================================================== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 6px;
}

.form-label .required-star {
  color: var(--color-danger-text);
  margin-left: 2px;
}

.form-control, select.form-control, textarea.form-control {
  width: 100%;
  height: 38px;
  padding: 8px 12px;
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-interactive) !important;
  border-radius: var(--radius-control) !important;
  color: var(--color-text-primary) !important;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

textarea.form-control {
  height: auto;
  min-height: 80px;
}

.form-control:hover {
  border-color: var(--color-border-hover) !important;
}

.form-control:focus {
  border-color: var(--color-border-focus) !important;
  box-shadow: var(--focus-ring) !important;
  background: var(--color-surface) !important;
}

.form-control:disabled, .form-control[readonly] {
  background: var(--color-surface-subdued) !important;
  color: var(--color-text-disabled) !important;
  cursor: not-allowed;
  border-color: var(--color-border-subtle) !important;
}

/* Form Helper & Error Text */
.form-helper {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 4px;
}

.form-error {
  font-size: var(--text-xs);
  color: var(--color-danger-text);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

select.form-control option {
  background: var(--color-surface);
  color: var(--color-text-primary);
}

/* Filter Tab Chips (IBM Carbon Filter Group) */
.filter-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
  background: var(--color-surface-subdued);
  padding: 4px;
  border-radius: var(--radius-card);
  border: 1px solid var(--color-border-subtle);
  width: fit-content;
}

.filter-tab-btn {
  padding: 5px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-control);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.filter-tab-btn:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.6);
}

.filter-tab-btn.active {
  color: var(--color-action-primary);
  background: var(--color-surface);
  font-weight: 600;
  border-color: var(--color-border-subtle);
  box-shadow: 0 1px 2px rgba(23, 32, 51, 0.05);
}

/* ==========================================================================
   14. MODALS & OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(23, 32, 51, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content, .modal-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-panel) !important;
  box-shadow: var(--shadow-modal) !important;
  width: 92%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--space-6);
  transform: translateY(12px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  z-index: 10000;
}

.modal-overlay.active .modal-content,
.modal-overlay.active .modal-card {
  transform: translateY(0);
}

/* ==========================================================================
   15. NOTIFICATIONS & ALERTS
   ========================================================================== */
.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-card);
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border: 1px solid transparent;
}

.alert-success {
  background: var(--color-success-surface);
  color: var(--color-success-text);
  border-color: var(--color-success-border);
}

.alert-warning {
  background: var(--color-warning-surface);
  color: var(--color-warning-text);
  border-color: var(--color-warning-border);
}

.alert-danger {
  background: var(--color-danger-surface);
  color: var(--color-danger-text);
  border-color: var(--color-danger-border);
}

.alert-info {
  background: var(--color-info-surface);
  color: var(--color-info-text);
  border-color: var(--color-info-border);
}

/* ==========================================================================
   16. ACCESSIBILITY & REDUCED MOTION (WCAG 2.1 AA)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   17. LEGACY BRAVE ADAPTER TOKENS (Harmonize all views with Classic Workspace)
   ========================================================================== */
.brave-stat-card {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.brave-stat-card:hover {
  border-color: var(--color-border-interactive) !important;
  transform: none !important;
}

.brave-stat-number {
  font-family: var(--font-mono) !important;
  font-size: var(--text-xl) !important;
  font-weight: 700 !important;
  color: var(--color-text-primary) !important;
}

.brave-stat-label {
  font-size: var(--text-xs) !important;
  color: var(--color-text-secondary) !important;
  text-transform: uppercase;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
}

.account-info.wrapper-box {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.marqbtn.anouncbtn {
  background: var(--color-surface-subdued) !important;
  color: var(--color-text-primary) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-control) !important;
  font-size: var(--text-xs) !important;
  font-weight: 600 !important;
  padding: 5px 12px !important;
}

.dhr-marquee {
  color: var(--color-text-primary) !important;
  font-size: var(--text-base) !important;
}

.panelupdtcard {
  background: var(--color-surface) !important;
  border: 1px solid var(--color-border-subtle) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: var(--shadow-card) !important;
  overflow: hidden;
}

.neworderheader {
  background: var(--color-surface) !important;
  border-bottom: 1px solid var(--color-border-subtle) !important;
  padding: 16px 20px !important;
}

.neworderheader h2 {
  font-size: var(--text-lg) !important;
  font-weight: 600 !important;
  color: var(--color-text-primary) !important;
}

.panelupdtheader {
  background: var(--color-surface-subdued) !important;
  border-bottom: 1px solid var(--color-border-subtle) !important;
  padding: 12px 16px !important;
}

.panelupdtheader h3 {
  font-size: var(--text-base) !important;
  font-weight: 600 !important;
  color: var(--color-text-primary) !important;
}

.linkordpastbtn {
  background: var(--color-action-primary) !important;
  color: #FFFFFF !important;
  border-radius: 0 var(--radius-control) var(--radius-control) 0 !important;
  font-size: var(--text-sm) !important;
  font-weight: 600 !important;
  padding: 0 16px !important;
  border: none !important;
  transition: background-color 0.15s ease;
}

.linkordpastbtn:hover {
  background: var(--color-action-primary-hover) !important;
}

/* ==========================================================================
   16. COMPREHENSIVE PHONE & MOBILE OPTIMIZATIONS (< 992px, < 768px, < 480px)
   ========================================================================== */

/* Global Mobile Fixes & Safe Areas */
@media (max-width: 991.98px) {
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .container-all {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Grid Layouts to 1-column on tablets & phones */
  .new-order-split-grid,
  .funds-main-grid,
  .admin-settings-grid,
  .tickets-split-grid,
  .affiliates-grid,
  .account-split-grid,
  .child-panels-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .form-row-2col {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Admin Settings Sidebar Navigation */
  .admin-settings-sidebar {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    margin-bottom: 16px !important;
    padding: 8px !important;
    max-height: none !important;
  }

  .admin-settings-sidebar .tab-nav-btn {
    flex: 1 1 calc(50% - 6px) !important;
    font-size: 0.8rem !important;
    padding: 8px 10px !important;
    justify-content: center !important;
  }

  /* Top Stat Grids */
  .order-stat-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .stat-card, .brave-stat-card {
    padding: 12px 14px !important;
    gap: 10px !important;
  }

  .stat-icon, .brave-stat-icon {
    width: 38px !important;
    height: 38px !important;
    font-size: 1.05rem !important;
  }

  .stat-value, .brave-stat-number {
    font-size: 1.15rem !important;
  }
}

/* Smartphone Portrait (< 768px) */
@media (max-width: 768px) {
  /* Prevent iOS Safari Auto-Zoom on Input Focus */
  input, select, textarea, .form-control {
    font-size: 16px !important;
    border-radius: 8px !important;
    touch-action: manipulation;
  }

  /* Bottom padding on page content to never obscure under Mobile Bottom Dock */
  .app-content, main {
    padding: 14px 12px calc(76px + env(safe-area-inset-bottom, 0px)) 12px !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Compact Header */
  .header.top {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 12px !important;
    background: var(--color-surface) !important;
    border-bottom: 1px solid var(--color-border-subtle) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
  }

  .header-toggler {
    width: 36px !important;
    height: 36px !important;
    font-size: 1.1rem !important;
  }

  .header-title-text {
    font-size: 0.95rem !important;
    max-width: 120px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Hide Desktop-only Header Buttons on Phone */
  .expand-icon,
  .palette-btn,
  #currencyDropdownContainer {
    display: none !important;
  }

  @media (max-width: 575.98px) {
    #btnThemeToggle,
    button[onclick="toggleAnnouncementDrawer()"],
    .expand-icon,
    .palette-btn,
    #currencyDropdownContainer {
      display: none !important;
    }
  }

  .header-balance-pill {
    padding: 4px 8px !important;
    font-size: 0.78rem !important;
    gap: 4px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
  }

  .user-avatar-top {
    width: 32px !important;
    height: 32px !important;
  }

  /* Mobile Bottom App Dock */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
    padding-bottom: env(safe-area-inset-bottom, 0px) !important;
    background: var(--color-surface, #ffffff) !important;
    border-top: 1px solid var(--color-border-subtle, rgba(0,0,0,0.1)) !important;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08) !important;
    z-index: 1045 !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  .mobile-bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 2px !important;
    color: var(--color-text-secondary, #64748b) !important;
    text-decoration: none !important;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    flex: 1 !important;
    height: 100% !important;
    padding: 4px 0 !important;
    transition: all 0.15s ease !important;
    touch-action: manipulation;
  }

  .mobile-bottom-nav-item i {
    font-size: 1.15rem !important;
    transition: transform 0.15s ease !important;
  }

  .mobile-bottom-nav-item:active,
  .mobile-bottom-nav-item.active {
    color: var(--color-action-primary, #1d4ed8) !important;
    font-weight: 700 !important;
  }

  .mobile-bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--color-action-primary, #1d4ed8) !important;
  }

  /* Floating Chat Widget Positioned Above Dock */
  .absupport-main-container {
    bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    right: 14px !important;
    z-index: 1040 !important;
  }

  .abmain-help-box {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.15rem !important;
  }

  .abchat-options {
    right: 0 !important;
    bottom: 52px !important;
    width: 210px !important;
  }

  /* Data Tables Mobile Optimization */
  .table-responsive,
  .glass-table-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px !important;
    margin-bottom: 14px !important;
    scrollbar-width: thin;
  }

  .glass-table, .table {
    min-width: 580px !important;
  }

  .glass-table th, .table th {
    padding: 8px 10px !important;
    font-size: 0.72rem !important;
  }

  .glass-table td, .table td {
    padding: 10px 10px !important;
    font-size: 0.82rem !important;
  }

  /* Swipeable Filter Chip Strip */
  .filter-tabs {
    display: flex !important;
    width: 100% !important;
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 4px !important;
    gap: 6px !important;
    border-radius: 20px !important;
    scrollbar-width: none !important;
    margin-bottom: 14px !important;
  }

  .filter-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .filter-tab-btn {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    padding: 6px 14px !important;
    font-size: 0.8rem !important;
    border-radius: 16px !important;
  }

  /* Cards & Forms Padding */
  .glass-card, .card, .panelupdtcard {
    padding: 14px !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
  }

  .glass-header, .neworderheader, .panelupdtheader {
    padding: 12px 14px !important;
  }

  .neworderheader h2, .panelupdtheader h3 {
    font-size: 1.05rem !important;
  }

  /* Dashboard Action Buttons to Full-Width Stack */
  .dashboard-action-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .dashboard-action-bar .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px !important;
    font-size: 0.95rem !important;
  }

  /* Buttons Minimum Touch Height */
  .btn {
    min-height: 42px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Modals Full-Width on Mobile */
  .modal-card, .modal-content {
    width: 95% !important;
    max-width: 95vw !important;
    max-height: 88vh !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  /* Drawers */
  #announcementDrawer > div,
  #themeSettingsDrawer {
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* User Dropdown Position on Mobile */
  #userDropdownMenu {
    position: fixed !important;
    top: 58px !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: 280px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3) !important;
  }

  /* Compact Footer on Mobile */
  footer {
    padding: 16px 14px calc(76px + env(safe-area-inset-bottom, 0px)) 14px !important;
    font-size: 0.72rem !important;
  }

  /* Cookie Banner above bottom dock */
  #sdmCookieBanner {
    bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
    left: 12px !important;
    width: calc(100% - 24px) !important;
    max-width: calc(100% - 24px) !important;
    box-sizing: border-box !important;
  }
}

/* Small Smartphone Breakpoint (< 480px) */
@media (max-width: 480px) {
  .order-stat-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .stat-card, .brave-stat-card {
    padding: 10px 10px !important;
  }

  .stat-icon, .brave-stat-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.95rem !important;
  }

  .stat-value, .brave-stat-number {
    font-size: 1rem !important;
  }

  .stat-label, .brave-stat-label {
    font-size: 0.65rem !important;
  }

  .funds-steps-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .admin-settings-sidebar .tab-nav-btn {
    flex: 1 1 100% !important;
  }
}

/* Desktop Only: Ensure Bottom Dock is completely hidden */
@media (min-width: 769px) {
  .mobile-bottom-nav {
    display: none !important;
  }
  .d-md-none {
    display: none !important;
  }
}

/* ==========================================================================
   CLASSIC WORKSPACE / WHITE THEME UNIVERSAL CONTRAST ENGINE
   Forces dark, crisp typography across all pages, components, and modals
   ========================================================================== */
[data-theme="classic_workspace"],
.theme-classic-workspace,
body.theme-classic-workspace,
html[data-theme="classic_workspace"] body {
  background-color: #F7F8FA !important;
  color: #0f172a !important;
}

/* Headings & Major Labels */
[data-theme="classic_workspace"] h1, [data-theme="classic_workspace"] h2, [data-theme="classic_workspace"] h3,
[data-theme="classic_workspace"] h4, [data-theme="classic_workspace"] h5, [data-theme="classic_workspace"] h6,
.theme-classic-workspace h1, .theme-classic-workspace h2, .theme-classic-workspace h3,
.theme-classic-workspace h4, .theme-classic-workspace h5, .theme-classic-workspace h6 {
  color: #0f172a !important;
}

/* Glass Cards & Containers */
[data-theme="classic_workspace"] .glass-card,
[data-theme="classic_workspace"] .card,
[data-theme="classic_workspace"] .panelupdtcard,
[data-theme="classic_workspace"] .modal-card,
[data-theme="classic_workspace"] .modal-content,
.theme-classic-workspace .glass-card,
.theme-classic-workspace .card,
.theme-classic-workspace .panelupdtcard,
.theme-classic-workspace .modal-card,
.theme-classic-workspace .modal-content {
  background: #FFFFFF !important;
  color: #0f172a !important;
  border-color: #E2E8F0 !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
}

[data-theme="classic_workspace"] .glass-header,
[data-theme="classic_workspace"] .card-header,
[data-theme="classic_workspace"] .panelupdtheader,
.theme-classic-workspace .glass-header,
.theme-classic-workspace .card-header,
.theme-classic-workspace .panelupdtheader {
  border-bottom-color: #E2E8F0 !important;
  color: #0f172a !important;
}

/* Universal Inline White-Text Overrides */
[data-theme="classic_workspace"] .glass-card [style*="color: #fff"],
[data-theme="classic_workspace"] .glass-card [style*="color:#fff"],
[data-theme="classic_workspace"] .glass-card [style*="color: #ffffff"],
[data-theme="classic_workspace"] .glass-card [style*="color:#ffffff"],
[data-theme="classic_workspace"] .glass-card [style*="color: #FFF"],
[data-theme="classic_workspace"] .glass-card [style*="color:#FFF"],
[data-theme="classic_workspace"] .glass-card [style*="color: #FFFFFF"],
[data-theme="classic_workspace"] .glass-card [style*="color:#FFFFFF"],
[data-theme="classic_workspace"] .glass-card [style*="color: #f8fafc"],
[data-theme="classic_workspace"] .glass-card [style*="color:#f8fafc"],
[data-theme="classic_workspace"] .glass-card [style*="color: #f1f5f9"],
[data-theme="classic_workspace"] .glass-card [style*="color:#f1f5f9"],
[data-theme="classic_workspace"] .glass-card [style*="color: #e2e8f0"],
[data-theme="classic_workspace"] .glass-card [style*="color:#e2e8f0"],
[data-theme="classic_workspace"] .glass-card [style*="color: #cbd5e1"],
[data-theme="classic_workspace"] .glass-card [style*="color:#cbd5e1"],
[data-theme="classic_workspace"] .glass-card [style*="color: rgb(255, 255, 255)"],
[data-theme="classic_workspace"] .glass-card [style*="color:rgb(255,255,255)"],
[data-theme="classic_workspace"] .glass-card [style*="color: var(--text-main)"],
[data-theme="classic_workspace"] .glass-card [style*="color:var(--text-main)"],
.theme-classic-workspace .glass-card [style*="color: #fff"],
.theme-classic-workspace .glass-card [style*="color:#fff"],
.theme-classic-workspace .glass-card [style*="color: #ffffff"],
.theme-classic-workspace .glass-card [style*="color:#ffffff"],
.theme-classic-workspace .glass-card [style*="color: #FFF"],
.theme-classic-workspace .glass-card [style*="color:#FFF"],
.theme-classic-workspace .glass-card [style*="color: #FFFFFF"],
.theme-classic-workspace .glass-card [style*="color:#FFFFFF"],
.theme-classic-workspace .glass-card [style*="color: #f8fafc"],
.theme-classic-workspace .glass-card [style*="color:#f8fafc"],
.theme-classic-workspace .glass-card [style*="color: #f1f5f9"],
.theme-classic-workspace .glass-card [style*="color:#f1f5f9"],
.theme-classic-workspace .glass-card [style*="color: #e2e8f0"],
.theme-classic-workspace .glass-card [style*="color:#e2e8f0"],
.theme-classic-workspace .glass-card [style*="color: #cbd5e1"],
.theme-classic-workspace .glass-card [style*="color:#cbd5e1"],
.theme-classic-workspace .glass-card [style*="color: rgb(255, 255, 255)"],
.theme-classic-workspace .glass-card [style*="color:rgb(255,255,255)"],
.theme-classic-workspace .glass-card [style*="color: var(--text-main)"],
.theme-classic-workspace .glass-card [style*="color:var(--text-main)"],
[data-theme="classic_workspace"] .modal-card [style*="color: #fff"],
[data-theme="classic_workspace"] .modal-card [style*="color:#fff"],
[data-theme="classic_workspace"] .modal-card [style*="color: #ffffff"],
[data-theme="classic_workspace"] .modal-card [style*="color:#ffffff"],
.theme-classic-workspace .modal-card [style*="color: #fff"],
.theme-classic-workspace .modal-card [style*="color:#fff"],
.theme-classic-workspace .modal-card [style*="color: #ffffff"],
.theme-classic-workspace .modal-card [style*="color:#ffffff"] {
  color: #0f172a !important;
}

/* Secondary / Muted Text Legibility */
[data-theme="classic_workspace"] [style*="color: var(--text-dim)"],
[data-theme="classic_workspace"] [style*="color:var(--text-dim)"],
[data-theme="classic_workspace"] [style*="color: var(--text-muted)"],
[data-theme="classic_workspace"] [style*="color:var(--text-muted)"],
[data-theme="classic_workspace"] [style*="color: #94a3b8"],
[data-theme="classic_workspace"] [style*="color:#94a3b8"],
[data-theme="classic_workspace"] [style*="color: #64748b"],
[data-theme="classic_workspace"] [style*="color:#64748b"],
.theme-classic-workspace [style*="color: var(--text-dim)"],
.theme-classic-workspace [style*="color:var(--text-dim)"],
.theme-classic-workspace [style*="color: var(--text-muted)"],
.theme-classic-workspace [style*="color:var(--text-muted)"],
.theme-classic-workspace [style*="color: #94a3b8"],
.theme-classic-workspace [style*="color:#94a3b8"],
.theme-classic-workspace [style*="color: #64748b"],
.theme-classic-workspace [style*="color:#64748b"] {
  color: #475569 !important;
}

/* Data Tables */
[data-theme="classic_workspace"] .glass-table,
[data-theme="classic_workspace"] .table,
.theme-classic-workspace .glass-table,
.theme-classic-workspace .table {
  background: #FFFFFF !important;
  color: #0f172a !important;
}

[data-theme="classic_workspace"] .glass-table th,
[data-theme="classic_workspace"] .table th,
.theme-classic-workspace .glass-table th,
.theme-classic-workspace .table th {
  background: #F1F5F9 !important;
  color: #1E293B !important;
  font-weight: 700 !important;
  border-bottom: 2px solid #CBD5E1 !important;
}

[data-theme="classic_workspace"] .glass-table td,
[data-theme="classic_workspace"] .table td,
.theme-classic-workspace .glass-table td,
.theme-classic-workspace .table td {
  color: #0f172a !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

[data-theme="classic_workspace"] .glass-table td strong,
[data-theme="classic_workspace"] .table td strong,
[data-theme="classic_workspace"] .glass-table td div,
[data-theme="classic_workspace"] .table td div,
.theme-classic-workspace .glass-table td strong,
.theme-classic-workspace .table td strong,
.theme-classic-workspace .glass-table td div,
.theme-classic-workspace .table td div {
  color: #0f172a !important;
}

/* Form Controls & Inputs */
[data-theme="classic_workspace"] .form-control,
[data-theme="classic_workspace"] select.form-control,
[data-theme="classic_workspace"] textarea.form-control,
[data-theme="classic_workspace"] .form-select,
.theme-classic-workspace .form-control,
.theme-classic-workspace select.form-control,
.theme-classic-workspace textarea.form-control,
.theme-classic-workspace .form-select {
  background: #FFFFFF !important;
  color: #0f172a !important;
  border: 1px solid #CBD5E1 !important;
}

[data-theme="classic_workspace"] label,
[data-theme="classic_workspace"] .form-label,
.theme-classic-workspace label,
.theme-classic-workspace .form-label {
  color: #1e293b !important;
  font-weight: 600 !important;
}

/* Sidebar & Navigation */
[data-theme="classic_workspace"] .container-left-menu,
.theme-classic-workspace .container-left-menu {
  background: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
}

[data-theme="classic_workspace"] .header-top,
.theme-classic-workspace .header-top {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

[data-theme="classic_workspace"] .left-menu-link,
.theme-classic-workspace .left-menu-link {
  color: #334155 !important;
}

[data-theme="classic_workspace"] .left-menu-link:hover,
.theme-classic-workspace .left-menu-link:hover {
  color: #1d4ed8 !important;
  background: #F1F5F9 !important;
}

[data-theme="classic_workspace"] .left-menu-link.active,
.theme-classic-workspace .left-menu-link.active {
  color: #1d4ed8 !important;
  background: #EFF6FF !important;
}

/* Dropdown Menus */
[data-theme="classic_workspace"] #userDropdownMenu,
[data-theme="classic_workspace"] #exportMenu,
[data-theme="classic_workspace"] .dropdown-menu,
.theme-classic-workspace #userDropdownMenu,
.theme-classic-workspace #exportMenu,
.theme-classic-workspace .dropdown-menu {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12) !important;
  color: #0f172a !important;
}

[data-theme="classic_workspace"] #userDropdownMenu a,
[data-theme="classic_workspace"] #exportMenu a,
[data-theme="classic_workspace"] .dropdown-menu a,
.theme-classic-workspace #userDropdownMenu a,
.theme-classic-workspace #exportMenu a,
.theme-classic-workspace .dropdown-menu a {
  color: #1e293b !important;
}

[data-theme="classic_workspace"] #userDropdownMenu a:hover,
[data-theme="classic_workspace"] #exportMenu a:hover,
[data-theme="classic_workspace"] .dropdown-menu a:hover,
.theme-classic-workspace #userDropdownMenu a:hover,
.theme-classic-workspace #exportMenu a:hover,
.theme-classic-workspace .dropdown-menu a:hover {
  background: #F1F5F9 !important;
  color: #0f172a !important;
}

/* Filled Action Buttons maintain clean white text */
[data-theme="classic_workspace"] .btn-primary,
[data-theme="classic_workspace"] .btn-danger,
[data-theme="classic_workspace"] .btn-success,
[data-theme="classic_workspace"] .btn-primary *,
[data-theme="classic_workspace"] .btn-danger *,
[data-theme="classic_workspace"] .btn-success *,
.theme-classic-workspace .btn-primary,
.theme-classic-workspace .btn-danger,
.theme-classic-workspace .btn-success,
.theme-classic-workspace .btn-primary *,
.theme-classic-workspace .btn-danger *,
.theme-classic-workspace .btn-success * {
  color: #FFFFFF !important;
}

/* Code & Pre */
[data-theme="classic_workspace"] code,
[data-theme="classic_workspace"] pre,
.theme-classic-workspace code,
.theme-classic-workspace pre {
  background: #F1F5F9 !important;
  color: #0f172a !important;
  border: 1px solid #E2E8F0 !important;
}

/* ==========================================================================
   BRAVEPANEL CORE DESIGN SYSTEM & COMPONENT ENHANCEMENTS
   ========================================================================== */

/* Font enforcement */
body, [data-theme="classic_workspace"] body, .theme-classic-workspace body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: #495057 !important;
  background-color: #ffffff !important;
}

/* Headings in Brave Deep Black */
h1, h2, h3, h4, h5, h6,
.header-title-text, .card-title,
[data-theme="classic_workspace"] h1, [data-theme="classic_workspace"] h2,
[data-theme="classic_workspace"] h3, [data-theme="classic_workspace"] h4 {
  color: #000000 !important;
  font-family: 'Source Sans Pro', sans-serif !important;
}

/* Top Announcement Marquee Bar */
.brave-announcement-wrapper {
  width: 100%;
  margin-bottom: 24px;
}
.account-info.wrapper-box {
  background: #ffffff !important;
  border: 1px solid #e9ecef !important;
  border-radius: 12px !important;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px !important;
  padding: 8px 16px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.marqbtn.anouncbtn {
  background: #0099ff !important;
  color: #ffffff !important;
  border-radius: 20px !important;
  padding: 6px 16px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  white-space: nowrap !important;
  box-shadow: 0 4px 10px rgba(0, 153, 255, 0.25) !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}
.marqbtn.anouncbtn:hover {
  background: #007eff !important;
  transform: translateY(-1px);
}
.marqbtn.anouncbtn img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}
.marquee-container {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.dhr-marquee {
  font-size: 14px;
  font-weight: 600;
  color: #495057 !important;
  line-height: 1.5;
}

/* Sidebar Avatar & Balance Card */
.sidbaravatar {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  background-size: cover !important;
  background-position: center !important;
  border: 2.5px solid #0099ff !important;
  margin: 12px auto 8px auto !important;
  box-shadow: 0 4px 10px rgba(0, 153, 255, 0.25) !important;
  flex-shrink: 0 !important;
}
.sidebar-blnce-wrap {
  background: #f8fafc !important;
  border: 1px solid #e9ecef !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  margin: 0 12px 16px 12px !important;
  text-align: center !important;
}
.sidebar-blnce-head .sidebar-blnce-title,
.sidebar-blnce-wrap .sidebar-blnce-title {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: #6c757d !important;
  margin: 0 0 3px 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}
.sidebar-blnce-body .sidebar-blnce-txt,
.sidebar-blnce-wrap .sidebar-blnce-txt {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #000000 !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

/* Sidebar Navigation Items */
.container-left-menu {
  background: #ffffff !important;
  border-right: 1px solid #e9ecef !important;
}
.container-left-menu .nav-link {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 9px 14px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  text-decoration: none !important;
  border-radius: 8px !important;
  margin: 2px 8px !important;
  transition: all 0.15s ease !important;
}
.container-left-menu .nav-link i {
  width: 20px !important;
  text-align: center !important;
  font-size: 15px !important;
  color: #64748b !important;
  transition: color 0.15s ease !important;
}
.container-left-menu .nav-link:hover {
  background: #f1f5f9 !important;
  color: #0099ff !important;
}
.container-left-menu .nav-link:hover i {
  color: #0099ff !important;
}
.container-left-menu .nav-link.active {
  background: #0099ff !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.35) !important;
}
.container-left-menu .nav-link.active i,
.container-left-menu .nav-link.active span {
  color: #ffffff !important;
}

/* Accordion Submenus */
.submenu-user {
  position: relative;
}
.submenu-user .nav-link.submenu {
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
.submenu-user .nav-link.submenu::after {
  content: "\f054";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 10px;
  color: #94a3b8;
  margin-left: auto;
  transition: transform 0.2s ease;
}
.submenu-user.open .nav-link.submenu::after {
  transform: rotate(90deg);
}
.submenu-menu.user-manager {
  list-style: none !important;
  padding: 4px 0 6px 28px !important;
  margin: 0 !important;
}
.submenu-menu.user-manager .dropdown-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-decoration: none !important;
  border-radius: 6px !important;
  transition: all 0.15s ease !important;
  background: transparent !important;
}
.submenu-menu.user-manager .dropdown-item:hover {
  color: #0099ff !important;
  background: #f8fafc !important;
  padding-left: 16px !important;
}
.submenu-menu.user-manager .dropdown-item i {
  font-size: 9px !important;
  color: #94a3b8 !important;
}

/* Primary Button in Brave Royal Blue */
.btn-primary, button.btn-primary, input[type="submit"].btn-primary, .brave-btn-blue {
  background: #0099ff !important;
  border-color: #0099ff !important;
  color: #ffffff !important;
  border-radius: 7px !important;
  font-weight: 600 !important;
  box-shadow: 0 4px 12px rgba(0, 153, 255, 0.25) !important;
  transition: all 0.2s ease !important;
}
.btn-primary:hover, button.btn-primary:hover, .brave-btn-blue:hover {
  background: #007eff !important;
  border-color: #007eff !important;
  box-shadow: 0 6px 16px rgba(0, 153, 255, 0.35) !important;
  transform: translateY(-1px);
}

/* Card Surface & Form Input Refinements */
[data-theme="classic_workspace"] .glass-card,
[data-theme="classic_workspace"] .card,
.theme-classic-workspace .glass-card,
.theme-classic-workspace .card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px !important;
  box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px !important;
}
[data-theme="classic_workspace"] .form-control,
.theme-classic-workspace .form-control {
  border: 1px solid #cbd5e1 !important;
  border-radius: 7px !important;
  background-color: #f8fafc !important;
  color: #000000 !important;
  font-family: inherit !important;
}
[data-theme="classic_workspace"] .form-control:focus,
.theme-classic-workspace .form-control:focus {
  border-color: #0099ff !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.2) !important;
}

/* ==========================================================================
   BRAVEPANEL UNIVERSAL HIGH-CONTRAST TYPOGRAPHY & SURFACE RULES
   ========================================================================== */
.theme-classic-workspace h1,
.theme-classic-workspace h2,
.theme-classic-workspace h3,
.theme-classic-workspace h4,
.theme-classic-workspace h5,
.theme-classic-workspace h6,
.theme-classic-workspace strong,
.theme-classic-workspace th,
[data-theme="classic_workspace"] h1,
[data-theme="classic_workspace"] h2,
[data-theme="classic_workspace"] h3,
[data-theme="classic_workspace"] h4,
[data-theme="classic_workspace"] h5,
[data-theme="classic_workspace"] h6,
[data-theme="classic_workspace"] strong,
[data-theme="classic_workspace"] th {
  color: #000000 !important;
}

.theme-classic-workspace p,
.theme-classic-workspace label,
[data-theme="classic_workspace"] p,
[data-theme="classic_workspace"] label {
  color: #495057 !important;
}

.theme-classic-workspace .glass-table th,
[data-theme="classic_workspace"] .glass-table th,
.theme-classic-workspace table th,
[data-theme="classic_workspace"] table th {
  background: #f8fafc !important;
  color: #000000 !important;
  border-bottom: 2px solid #e2e8f0 !important;
  font-weight: 700 !important;
}

.theme-classic-workspace .glass-table td,
[data-theme="classic_workspace"] .glass-table td,
.theme-classic-workspace table td,
[data-theme="classic_workspace"] table td {
  color: #495057 !important;
  border-bottom: 1px solid #e9ecef !important;
  background: transparent !important;
}

.theme-classic-workspace .glass-table td strong,
[data-theme="classic_workspace"] .glass-table td strong,
.theme-classic-workspace table td strong,
[data-theme="classic_workspace"] table td strong {
  color: #000000 !important;
}

/* Modals & Dialogs in White Theme */
.theme-classic-workspace .modal-content,
[data-theme="classic_workspace"] .modal-content,
.theme-classic-workspace .modal-box,
[data-theme="classic_workspace"] .modal-box {
  background: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.theme-classic-workspace .modal-content h3,
[data-theme="classic_workspace"] .modal-content h3,
.theme-classic-workspace .modal-box h3,
[data-theme="classic_workspace"] .modal-box h3,
.theme-classic-workspace .modal-header,
[data-theme="classic_workspace"] .modal-header {
  color: #000000 !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.theme-classic-workspace .modal-footer,
[data-theme="classic_workspace"] .modal-footer {
  border-top: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
}

/* ==========================================================================
   26. CATALOG SORT BAR & FILTER PILLS
   ========================================================================== */
.catalog-sort-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.2s ease;
}

.catalog-sort-title {
  color: #0f172a;
  font-weight: 700;
  font-size: 0.84rem;
}

.catalog-sort-active-badge {
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  font-weight: 700;
}

.btn-sort-pill {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-sort-pill:hover:not(.active) {
  border-color: #0284c7;
  color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-1px);
}

.btn-sort-pill.active {
  background: #0284c7 !important;
  border-color: #0284c7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35) !important;
}

/* Dark theme overrides for Sort Box */
[data-theme="obsidian_cobalt"] .catalog-sort-box,
[data-theme="dark_luxury"] .catalog-sort-box,
[data-theme="glassmorphism"] .catalog-sort-box,
[data-theme="cyberpunk"] .catalog-sort-box {
  background: rgba(15, 23, 42, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="obsidian_cobalt"] .catalog-sort-title,
[data-theme="dark_luxury"] .catalog-sort-title,
[data-theme="glassmorphism"] .catalog-sort-title,
[data-theme="cyberpunk"] .catalog-sort-title {
  color: #f8fafc !important;
}

[data-theme="obsidian_cobalt"] .btn-sort-pill:not(.active),
[data-theme="dark_luxury"] .btn-sort-pill:not(.active),
[data-theme="glassmorphism"] .btn-sort-pill:not(.active),
[data-theme="cyberpunk"] .btn-sort-pill:not(.active) {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #cbd5e1 !important;
}



