/* 
 * Averon Markets | Institutional Forex & Digital Asset Platform
 * Core Design System & Stylesheet
 */

:root {
  /* Color Palette - Institutional Financial Standard */
  --primary-color: #c99826;
  --primary-hover: #b08218;
  --primary-light: rgba(201, 152, 38, 0.12);
  --primary-glow: rgba(201, 152, 38, 0.25);
  
  --secondary-color: #10b981;
  --secondary-light: rgba(16, 185, 129, 0.12);
  
  --danger-color: #f43f5e;
  --danger-light: rgba(244, 63, 94, 0.12);
  
  --info-color: #38bdf8;
  --info-light: rgba(56, 189, 248, 0.12);

  --dark-bg: #080b11;
  --dark-bg-alt: #0c101a;
  --card-bg: #111724;
  --card-bg-hover: #161e30;
  --input-bg: #0d121c;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-default: rgba(255, 255, 255, 0.14);
  --border-strong: rgba(255, 255, 255, 0.24);
  
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;

  --transition-speed: 0.25s;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Light Mode Institutional Tokens */
.light-mode {
  --primary-color: #b08218;
  --primary-hover: #966c10;
  --primary-light: rgba(176, 130, 24, 0.12);
  --primary-glow: rgba(176, 130, 24, 0.22);

  --secondary-color: #059669;
  --secondary-light: rgba(5, 150, 105, 0.12);

  --danger-color: #e11d48;
  --danger-light: rgba(225, 29, 72, 0.12);

  --info-color: #0284c7;
  --info-light: rgba(2, 132, 199, 0.12);

  --dark-bg: #f8fafc;
  --dark-bg-alt: #f1f5f9;
  --card-bg: #ffffff;
  --card-bg-hover: #f8fafc;
  --input-bg: #ffffff;

  --border-subtle: #e2e8f0;
  --border-default: #cbd5e1;
  --border-strong: #94a3b8;

  --text-color: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;
}

/* Global Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background-color: var(--dark-bg);
  color: var(--text-color);
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--text-muted);
}

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

.text-emerald {
  color: var(--secondary-color) !important;
}

.text-ruby {
  color: var(--danger-color) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.font-tabular {
  font-variant-numeric: tabular-nums;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color var(--transition-speed);
}

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

/* Section Title & Subtitle */
.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  color: var(--text-color);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 650px;
  margin: 0 auto 2.5rem auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(201, 152, 38, 0.25);
  margin-bottom: 1rem;
}

/* Background Utilities */
.bg-darker {
  background-color: var(--dark-bg-alt) !important;
}

.bg-surface {
  background-color: var(--card-bg) !important;
}

/* Regulatory Top Notice Bar */
.top-notice-bar {
  background-color: #04060a;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.45rem 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  transition: background-color var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

.top-notice-bar a {
  color: var(--text-muted);
}

.top-notice-bar a:hover {
  color: var(--primary-color);
}

/* Institutional Sticky Navbar */
.navbar {
  background-color: rgba(8, 11, 17, 0.94);
  backdrop-filter: blur(12px);
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-speed);
  z-index: 1030;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-color) !important;
}

.navbar-brand span {
  color: var(--primary-color);
}

.navbar-brand img {
  height: 38px;
  margin-right: 0.65rem;
  border-radius: 4px;
}

.navbar-nav .nav-link {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition-speed), background-color var(--transition-speed);
}

.navbar-nav .nav-link:hover {
  color: var(--text-color) !important;
  background-color: rgba(255, 255, 255, 0.03);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

.dropdown-menu-dark {
  background-color: var(--card-bg);
  border: 1px solid var(--border-default);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}

.dropdown-item {
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-speed);
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.dropdown-item.active {
  background-color: var(--primary-color);
  color: #000;
  font-weight: 600;
}

/* Buttons */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.25rem;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  transition: all var(--transition-speed) ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #080b11 !important;
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #080b11 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-outline-gold {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-gold:hover {
  background-color: var(--primary-color);
  color: #080b11;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-outline-light {
  border-color: var(--border-default);
  color: var(--text-color);
  background: transparent;
}

.btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: var(--text-color);
  color: var(--text-color);
}

.btn-sm {
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 0.75rem 1.85rem;
  font-size: 0.98rem;
}

/* Theme Toggle Button */
.btn-theme-toggle {
  background: transparent;
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all var(--transition-speed);
}

.btn-theme-toggle:hover {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Institutional Hero Section */
.hero-section {
  position: relative;
  padding: 130px 0 90px;
  background-color: var(--dark-bg);
  background-image: 
    radial-gradient(ellipse at 80% 20%, rgba(201, 152, 38, 0.07) 0%, transparent 50%),
    linear-gradient(to bottom, rgba(8, 11, 17, 0.85), var(--dark-bg));
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  transition: background-color var(--transition-speed), background-image var(--transition-speed);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
}

.hero-headline {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--text-color);
}

@media (max-width: 991px) {
  .hero-headline {
    font-size: 2.35rem;
  }
}

.hero-subhead {
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 620px;
}

/* Institutional Metric Pills */
.metric-pill-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.metric-pill {
  display: flex;
  flex-direction: column;
}

.metric-pill-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-color);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.metric-pill-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  font-weight: 600;
}

/* Hero Carousel Controls & Indicators */
.hero-carousel {
  position: relative;
}

.hero-carousel .carousel-indicators {
  position: absolute;
  bottom: -48px;
  margin-bottom: 0;
  display: flex;
  gap: 10px;
  justify-content: center;
  z-index: 5;
}

.hero-carousel .carousel-indicators button {
  width: 14px;
  height: 5px;
  border-radius: 3px;
  border: none;
  background-color: var(--border-default);
  opacity: 0.5;
  transition: all 0.3s ease;
  margin: 0;
  padding: 0;
}

.hero-carousel .carousel-indicators button.active {
  width: 38px;
  background-color: var(--primary-color);
  opacity: 1;
  box-shadow: 0 0 10px var(--primary-glow);
}

.hero-carousel .hero-control-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(12, 16, 26, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.25s ease;
  opacity: 0.85;
}

.hero-carousel .hero-control-btn:hover {
  background: var(--primary-color);
  color: #080b11;
  border-color: var(--primary-color);
  transform: translateY(-50%) scale(1.08);
  opacity: 1;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.hero-carousel .hero-control-prev {
  left: -28px;
}

.hero-carousel .hero-control-next {
  right: -28px;
}

@media (max-width: 1300px) {
  .hero-carousel .hero-control-prev {
    left: -10px;
  }
  .hero-carousel .hero-control-next {
    right: -10px;
  }
}

@media (max-width: 991px) {
  .hero-carousel .hero-control-btn {
    display: none;
  }
}

.light-mode .hero-carousel .carousel-indicators button {
  background-color: #cbd5e1;
}

.light-mode .hero-carousel .carousel-indicators button.active {
  background-color: var(--primary-color);
}

.light-mode .hero-carousel .hero-control-btn {
  background: rgba(255, 255, 255, 0.92);
  color: #0f172a;
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.light-mode .hero-carousel .hero-control-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* Card Foundations */
.card, .institutional-card, .feature-card, .step-card, .plan-card, .widget-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: transform var(--transition-speed) ease, border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease, background-color var(--transition-speed) ease;
}

.hover-elevate:hover, .feature-card:hover, .plan-card:hover, .step-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Feature & Product Cards */
.feature-card {
  padding: 2rem;
  height: 100%;
}

.feature-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}

/* Step / Process Card */
.step-card {
  padding: 2.25rem 2rem;
  height: 100%;
  position: relative;
}

.step-card-num {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}

/* Investment / Account Tier Cards */
.plan-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.plan-card.featured {
  border-color: var(--primary-color);
}

.plan-card.featured::before {
  content: "MOST POPULAR";
  position: absolute;
  top: 15px;
  right: -35px;
  background-color: var(--primary-color);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 38px;
  transform: rotate(45deg);
}

.plan-card-body {
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.plan-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.plan-subtitle {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.plan-roi {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.plan-roi-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 1.75rem;
}

.plan-divider {
  border-top: 1px solid var(--border-subtle);
  margin: 1.25rem 0;
}

.plan-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  flex-grow: 1;
}

.plan-specs li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.plan-specs li span.value {
  color: var(--text-color);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Institutional Table Styles */
.table-financial {
  width: 100%;
  margin-bottom: 0;
  color: var(--text-color);
  border-collapse: separate;
  border-spacing: 0;
}

.table-financial th {
  background-color: var(--dark-bg-alt);
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-default);
}

.table-financial td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.88rem;
  vertical-align: middle;
}

.table-financial tbody tr {
  transition: background-color var(--transition-speed);
}

.table-financial tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Forms & Inputs */
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control, .form-select {
  background-color: var(--input-bg);
  border: 1px solid var(--border-default);
  color: var(--text-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  font-size: 0.92rem;
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-control:focus, .form-select:focus {
  background-color: var(--input-bg);
  border-color: var(--primary-color);
  color: var(--text-color);
  box-shadow: 0 0 0 2px var(--primary-glow);
  outline: none;
}

.input-group-text {
  background-color: var(--dark-bg-alt);
  border: 1px solid var(--border-default);
  color: var(--text-dim);
  border-radius: var(--radius-sm);
}

/* Accordion */
.accordion-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm) !important;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-button {
  background-color: var(--card-bg);
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 1.15rem 1.35rem;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.accordion-button::after {
  filter: invert(1);
}

.accordion-body {
  padding: 1.25rem 1.35rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
}

/* Modals */
.modal-content {
  background-color: var(--card-bg);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-color);
}

.modal-header {
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.25rem 1.5rem;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-color);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1rem 1.5rem;
}

.btn-close {
  filter: invert(1);
}

/* Dashboard Sidebar & Layout */
.sidebar {
  height: 100vh;
  width: 260px;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--card-bg);
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-speed);
}

.sidebar-brand {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-color);
}

.sidebar-nav {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  flex-grow: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-speed);
  border-left: 3px solid transparent;
}

.sidebar-link i {
  width: 20px;
  text-align: center;
}

.sidebar-link:hover, .sidebar-link.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
  border-left-color: var(--primary-color);
}

.main-content {
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
}

@media (max-width: 991px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.active {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
    padding: 1.25rem;
  }
}

/* Terms Sidebar Navigation */
.terms-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.terms-nav .nav-link {
  color: var(--text-muted);
  padding: 0.65rem 1rem;
  font-size: 0.88rem;
  border-left: 2px solid var(--border-subtle);
  transition: all var(--transition-speed);
}

.terms-nav .nav-link:hover, .terms-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-left-color: var(--primary-color);
  background: var(--primary-light);
}

.terms-section {
  padding-top: 15px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 30px;
}

/* Custody & Settlement Partner Strip */
.partner-strip {
  background-color: #04060a;
  border-top: 1px solid var(--border-subtle);
}

/* Institutional Footer */
.footer {
  background-color: #04060a;
  border-top: 1px solid var(--border-subtle);
  padding: 70px 0 30px;
  margin-top: 70px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-color);
  margin-bottom: 1.25rem;
}

.footer-link {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
  transition: color var(--transition-speed), transform var(--transition-speed);
}

.footer-link:hover {
  color: var(--primary-color);
  transform: translateX(3px);
}

.footer-risk-statement {
  background-color: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  margin-top: 2rem;
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Badges */
.badge-gold {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border: 1px solid rgba(201, 152, 38, 0.3);
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: var(--radius-sm);
}

.badge-emerald {
  background-color: var(--secondary-light);
  color: var(--secondary-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: var(--radius-sm);
}

.badge-ruby {
  background-color: var(--danger-light);
  color: var(--danger-color);
  border: 1px solid rgba(244, 63, 94, 0.3);
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: var(--radius-sm);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* ==========================================================================
   COMPREHENSIVE INSTITUTIONAL LIGHT MODE OVERRIDES
   ========================================================================== */

.light-mode body {
  background-color: #f8fafc;
  color: #0f172a;
}

.light-mode h1, 
.light-mode h2, 
.light-mode h3, 
.light-mode h4, 
.light-mode h5, 
.light-mode h6 {
  color: #0f172a;
}

.light-mode .text-white:not(.btn):not(.badge) {
  color: #0f172a !important;
}

.light-mode .border-subtle {
  border-color: #e2e8f0 !important;
}

.light-mode .border-secondary {
  border-color: #cbd5e1 !important;
}

/* Light Top Notice Bar */
.light-mode .top-notice-bar {
  background-color: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  color: #475569;
}

.light-mode .top-notice-bar a {
  color: #334155;
}

.light-mode .top-notice-bar a:hover {
  color: var(--primary-color);
}

/* Light Navbar */
.light-mode .navbar {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 10px rgba(0, 0, 0, 0.05);
}

.light-mode .navbar-brand {
  color: #0f172a !important;
}

.light-mode .navbar-nav .nav-link {
  color: #475569 !important;
}

.light-mode .navbar-nav .nav-link:hover {
  color: #0f172a !important;
  background-color: rgba(0, 0, 0, 0.04);
}

.light-mode .navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  font-weight: 600;
}

/* Light Buttons & Controls */
.light-mode .btn-theme-toggle {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

.light-mode .btn-theme-toggle:hover {
  background-color: #e2e8f0;
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.light-mode .btn-outline-light {
  border-color: #cbd5e1;
  color: #334155;
  background: transparent;
}

.light-mode .btn-outline-light:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

/* Light Institutional Hero Section */
.light-mode .hero-section {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(ellipse at 80% 20%, rgba(176, 130, 24, 0.09) 0%, transparent 60%),
    linear-gradient(to bottom, #edf2f7 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.light-mode .hero-section::before {
  background-image: 
    linear-gradient(to right, rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
}

.light-mode .hero-headline {
  color: #0f172a;
}

.light-mode .hero-subhead {
  color: #475569;
}

.light-mode .metric-pill-bar {
  border-top-color: #e2e8f0;
}

.light-mode .metric-pill-value {
  color: #0f172a;
}

.light-mode .metric-pill-label {
  color: #64748b;
}

/* Light Subpage Headers */
.light-mode header.bg-darker {
  background-color: #f1f5f9 !important;
  border-bottom-color: #e2e8f0 !important;
}

/* Light Cards & Containers */
.light-mode .card, 
.light-mode .institutional-card,
.light-mode .feature-card, 
.light-mode .step-card, 
.light-mode .plan-card, 
.light-mode .widget-card {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.light-mode .hover-elevate:hover,
.light-mode .feature-card:hover,
.light-mode .plan-card:hover,
.light-mode .step-card:hover {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-color);
}

.light-mode .plan-card.featured {
  border-color: var(--primary-color);
}

.light-mode .plan-specs li {
  border-bottom-color: #e2e8f0;
  color: #475569;
}

.light-mode .plan-specs li span.value {
  color: #0f172a;
}

/* Light Tables */
.light-mode .table-financial th {
  background-color: #f1f5f9;
  color: #475569;
  border-bottom-color: #cbd5e1;
}

.light-mode .table-financial td {
  border-bottom-color: #e2e8f0;
  color: #0f172a;
}

.light-mode .table-financial tbody tr:hover {
  background-color: #f8fafc;
}

/* Light Forms & Inputs */
.light-mode .form-label {
  color: #475569;
}

.light-mode .form-control, 
.light-mode .form-select {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

.light-mode .form-control:focus, 
.light-mode .form-select:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  color: #0f172a;
  box-shadow: 0 0 0 2px var(--primary-glow);
}

.light-mode .input-group-text {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* Light Accordions */
.light-mode .accordion-item {
  background-color: #ffffff;
  border-color: #e2e8f0;
}

.light-mode .accordion-button {
  background-color: #ffffff;
  color: #0f172a;
}

.light-mode .accordion-button:not(.collapsed) {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.light-mode .accordion-button::after {
  filter: none;
}

.light-mode .accordion-body {
  border-top-color: #e2e8f0;
  color: #475569;
}

/* Light Modals */
.light-mode .modal-content {
  background-color: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.light-mode .modal-header {
  border-bottom-color: #e2e8f0;
}

.light-mode .modal-footer {
  border-top-color: #e2e8f0;
}

.light-mode .modal-title {
  color: #0f172a;
}

.light-mode .btn-close {
  filter: none;
}

/* Light Dashboard Sidebar */
.light-mode .sidebar {
  background-color: #ffffff;
  border-right-color: #e2e8f0;
}

.light-mode .sidebar-brand {
  border-bottom-color: #e2e8f0;
  color: #0f172a;
}

.light-mode .sidebar-link {
  color: #475569;
}

.light-mode .sidebar-link:hover, 
.light-mode .sidebar-link.active {
  color: var(--primary-color);
  background-color: var(--primary-light);
  border-left-color: var(--primary-color);
}

.light-mode .main-content {
  background-color: #f8fafc;
}

/* Light Terms Page */
.light-mode .terms-section {
  border-bottom-color: #e2e8f0;
}

.light-mode .terms-section h3 {
  color: #0f172a;
}

.light-mode .terms-section p, 
.light-mode .terms-section li {
  color: #475569;
}

.light-mode .terms-nav .nav-link {
  color: #64748b;
  border-left-color: #cbd5e1;
}

.light-mode .terms-nav .nav-link:hover, 
.light-mode .terms-nav .nav-link.active {
  color: var(--primary-color) !important;
  border-left-color: var(--primary-color);
  background: var(--primary-light);
}

/* Light Partner Strip & Footer */
.light-mode .partner-strip {
  background-color: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

.light-mode .footer {
  background-color: #f1f5f9;
  border-top: 1px solid #e2e8f0;
  color: #475569;
}

.light-mode .footer h5 {
  color: #0f172a;
}

.light-mode .footer-link {
  color: #475569;
}

.light-mode .footer-link:hover {
  color: var(--primary-color);
}

.light-mode .footer-risk-statement {
  background-color: #ffffff;
  border-color: #e2e8f0;
  color: #64748b;
}

.light-mode .footer-bottom {
  border-top-color: #e2e8f0;
  color: #64748b;
}

/* Light Badges */
.light-mode .badge-gold {
  background-color: rgba(176, 130, 24, 0.12);
  color: #966c10;
  border-color: rgba(176, 130, 24, 0.3);
}

.light-mode .badge-emerald {
  background-color: rgba(5, 150, 105, 0.12);
  color: #059669;
  border-color: rgba(5, 150, 105, 0.3);
}

.light-mode .badge-ruby {
  background-color: rgba(225, 29, 72, 0.12);
  color: #e11d48;
  border-color: rgba(225, 29, 72, 0.3);
}

/* Light Auth Wrapper */
.light-mode .auth-wrapper {
  background: radial-gradient(ellipse at 50% 20%, rgba(176, 130, 24, 0.08) 0%, transparent 60%), #f8fafc;
}

/* Institutional Image Showcase Styles */
.institutional-img-wrapper {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background-color: var(--dark-surface);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.institutional-img-wrapper:hover {
  transform: translateY(-2px);
  border-color: var(--border-default);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.institutional-img-wrapper img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.institutional-img-wrapper.fixed-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.institutional-img-wrapper.fixed-ratio-16-9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.institutional-img-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(8, 11, 17, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.institutional-img-badge.top-right {
  bottom: auto;
  left: auto;
  top: 1rem;
  right: 1rem;
}

.light-mode .institutional-img-wrapper {
  background-color: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.light-mode .institutional-img-wrapper:hover {
  border-color: #cbd5e1;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12);
}

.light-mode .institutional-img-badge {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}