/* ==========================================================================
   DASHBOARD DESIGN SYSTEM & ELEVATED FINANCIAL TOKENS
   Codified under DESIGN_STANDARDS.md: Stripe multi-layer elevation,
   Linear segmented tabs, and Digits Swiss financial density.
   ========================================================================== */

:root {
  --primary-color: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --secondary-navy: #061b31;
  --sidebar-bg: #071626;
  --sidebar-border: #13263b;
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --success-green: #10b981;
  --success-dark: #047857;
  --success-bg: #ecfdf5;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-elevated: 0 12px 28px -4px rgba(0, 0, 0, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  --shadow-float: 0 20px 35px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 14px;
  --transition-smooth: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --tabular-nums: tabular-nums;
}

/* Wrapper and Sidebar Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
}

.sidebar {
  width: 260px;
  background: linear-gradient(180deg, #071626 0%, #061524 100%);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 200;
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 2px 0 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

/* Top Loan Officer Profile Header */
.sidebar-lo-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--sidebar-border);
  background: rgba(15, 23, 42, 0.5);
  position: relative;
}

.btn-sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.compact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
  flex-shrink: 0;
}

.compact-manager-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.compact-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  letter-spacing: -0.01em;
}

.compact-title {
  font-size: 0.725rem;
  color: #94a3b8;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1.25rem 0.75rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
  position: relative;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.22) 0%, rgba(2, 132, 199, 0.08) 100%);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.28);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.12);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: #38bdf8;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.badge-count {
  position: absolute;
  right: 0.75rem;
  background-color: #0284c7;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.4);
}

/* Bottom Company Compliance Footer (Super Small Text) */
.sidebar-company-footer {
  margin-top: auto;
  padding: 0.875rem 1.25rem;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(15, 23, 42, 0.35);
}

.company-footer-label {
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.company-footer-name {
  font-size: 11px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-footer-nmls {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 500;
}

/* Main Area */
.main-content {
  flex: 1;
  margin-left: 260px;
  background-color: #f8fafc;
  padding: 2rem;
  min-height: 100vh;
  min-width: 0;
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hamburger button — hidden on desktop, shown on mobile */
.btn-hamburger {
  display: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.btn-hamburger:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

/* Mobile nav drawer backdrop overlay */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 22, 38, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

body.mobile-drawer-open {
  overflow: hidden !important;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  margin: -2rem -2rem 1.75rem -2rem;
  position: sticky;
  top: 0;
  z-index: 150;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.header-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.header-view-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #061b31;
  margin: 0;
}

.header-lo-desk-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 4px 11px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.header-lo-desk-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-greeting {
  font-size: 0.875rem;
}

.greeting-pre {
  color: var(--text-muted);
}

.greeting-user {
  color: #0f172a;
  font-weight: 700;
}

.header-divider {
  width: 1px;
  height: 24px;
  background-color: #e2e8f0;
}

.btn-primary-outline.btn-logout {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  padding: 0.45rem 1.15rem;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-primary-outline.btn-logout:hover {
  background-color: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

/* ==========================================================================
   PHASE 2 MODERNIZATION: STICKY SCENARIO STRIP & MASTER-DETAIL WORKSPACE
   ========================================================================== */

/* Sticky Scenario Strip */
.scenario-parameter-strip {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  position: relative;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
}

.strip-purpose-toggle {
  display: flex;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  gap: 2px;
  flex-shrink: 0;
}

.btn-purpose-pill {
  border: none;
  background: transparent;
  padding: 6px 14px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-purpose-pill.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(50, 50, 93, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.strip-divider {
  width: 1px;
  height: 32px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.strip-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  flex-wrap: wrap;
}

.strip-param-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.strip-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: #64748b;
}

.strip-input-wrap {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 8px;
  height: 36px;
  transition: all 0.15s ease;
}

.strip-input-wrap:focus-within {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.strip-currency, .strip-suffix {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
}

.strip-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  width: 90px;
  padding: 0 4px;
}

.strip-dual-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.strip-input.pct {
  width: 40px;
  text-align: right;
}

.strip-select {
  height: 36px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.strip-select:focus {
  border-color: #0284c7;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.12);
}

.strip-input-wrap.zip-wrap {
  position: relative;
  width: 140px;
}

.strip-input.zip {
  width: 55px;
}

.strip-loc-hint {
  font-size: 0.7rem;
  font-weight: 600;
  color: #0284c7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.strip-advanced-toggle {
  margin-left: auto;
}

.btn-advanced-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  color: #475569;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-advanced-filters:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.strip-action {
  margin-left: 4px;
}

.btn-reprice-scenario {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 18px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
}

.btn-reprice-scenario:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.35);
}

/* Advanced Filters Dropdown Panel */
.advanced-filters-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12);
  z-index: 200;
}

.advanced-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  align-items: flex-end;
}

.adv-filter-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adv-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   MASTER-DETAIL TWO-COLUMN WORKSPACE (70% TABLE / 30% STICKY ADVISOR CONSOLE)
   ========================================================================== */

.workspace-master-detail {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 4rem;
}

@media (max-width: 1100px) {
  .workspace-master-detail {
    grid-template-columns: 1fr;
  }
}

.matrix-workspace-col {
  min-width: 0;
}

/* Controls Bar */
.matrix-controls-bar {
  margin-bottom: 1.25rem;
}

.matrix-pills-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Linear Segmented Term Tabs */
.term-tabs {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  gap: 3px;
  overflow-x: auto;
  max-width: 100%;
}

.term-tabs .tab-pill {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: none;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  outline: none;
}

.term-tabs .tab-pill:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

.term-tabs .tab-pill.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(50, 50, 93, 0.08), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.matrix-extra-toggles {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
}

.matrix-extra-toggles .control-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  font-size: 0.8125rem;
  user-select: none;
}

.matrix-extra-toggles .control-checkbox input[type="checkbox"] {
  accent-color: #0284c7;
  cursor: pointer;
  width: 15px;
  height: 15px;
}

.matrix-sort-select {
  height: 34px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.matrix-sort-select:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Pricing Matrix Table - Digits Swiss Financial Density */
.pricing-matrix-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.pricing-matrix-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.pricing-matrix-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.pricing-matrix-table th {
  padding: 0.875rem 1.15rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border: none;
}

.pricing-matrix-table tbody tr.matrix-data-row {
  border-bottom: 1px solid #f1f5f9;
  transition: all 0.15s ease;
  cursor: pointer;
  position: relative;
}

.pricing-matrix-table tbody tr.matrix-data-row:hover {
  background-color: #f8fafc;
}

.pricing-matrix-table tbody tr.matrix-data-row.active-selection {
  background-color: #f0f9ff;
  border-left: 3px solid #0284c7;
}

.pricing-matrix-table td {
  padding: 0.95rem 1.15rem;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

/* Program Column */
.matrix-program-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.matrix-program-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.program-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 4px;
}

.badge-conv {
  background: #dbeafe;
  color: #1e40af;
}

.badge-fha {
  background: #dcfce7;
  color: #166534;
}

.badge-va {
  background: #fef3c7;
  color: #92400e;
}

.badge-jumbo {
  background: #f3e8ff;
  color: #6b21a8;
}

/* Financial Values Styling - Digits Swiss Density */
.matrix-rate-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #061b31;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.matrix-apr-sub {
  font-size: 0.725rem;
  color: #64748b;
  font-weight: 500;
  display: block;
  font-variant-numeric: tabular-nums;
}

.matrix-cost-val {
  font-weight: 600;
  color: #334155;
  font-variant-numeric: tabular-nums;
}

.matrix-cost-val.credit {
  color: #059669;
  font-weight: 700;
}

.matrix-payment-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #061b31;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.matrix-payment-sub {
  font-size: 0.7rem;
  color: #64748b;
  display: block;
}

.btn-matrix-expand {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0284c7;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-matrix-expand:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.25);
}

/* Expandable Drawer Row */
.matrix-drawer-row {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.matrix-drawer-content {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.drawer-metric-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
}

.drawer-metric-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.35rem;
}

.drawer-metric-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  padding: 3px 0;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.drawer-metric-row.total {
  font-weight: 700;
  color: #061b31;
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 4px;
}

.matrix-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: #64748b;
}

/* ==========================================================================
   RIGHT 30% STICKY ADVISOR & SELECTION DESK
   ========================================================================== */

.advisor-console-sticky {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  position: sticky;
  top: 1.5rem;
  box-shadow: 0 4px 6px -1px rgba(50, 50, 93, 0.05), 0 10px 20px -2px rgba(50, 50, 93, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.console-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0284c7;
}

.console-rate-headline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 4px;
}

.console-rate-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #061b31;
  margin: 0;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.console-term-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 9px;
  border-radius: 6px;
}

.console-payment-box {
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  border-radius: 10px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.console-pay-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: #475569;
  font-variant-numeric: tabular-nums;
}

.console-pay-row.primary {
  font-weight: 700;
  color: #061b31;
}

.console-pay-divider {
  height: 1px;
  background: #a7f3d0;
  margin: 4px 0;
}

.console-pay-row.total {
  font-weight: 800;
  font-size: 0.9375rem;
  color: #061b31;
}

.console-pay-row .highlight {
  color: #059669;
  font-size: 1.25rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.console-specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.console-spec-item {
  display: flex;
  flex-direction: column;
}

.spec-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.spec-val {
  font-weight: 700;
  font-size: 0.9375rem;
  color: #061b31;
  font-variant-numeric: tabular-nums;
}

.console-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-console-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-console-pdf:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.btn-console-apply {
  padding: 11px;
  background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  text-align: center;
}

.btn-console-apply:hover {
  background: linear-gradient(180deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 4px 8px rgba(2, 132, 199, 0.35);
  transform: translateY(-1px);
}

.console-lo-dock {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 1.15rem;
  border-top: 1px solid #e2e8f0;
}

.lo-dock-avatar-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #0284c7;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(2, 132, 199, 0.2);
}

.lo-dock-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lo-dock-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  line-height: 1.25;
}

.lo-dock-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #061b31;
  margin: 0;
}

.lo-dock-nmls {
  font-size: 0.75rem;
  color: #64748b;
}

.lo-dock-email {
  font-size: 0.75rem;
  color: #0284c7;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}

.lo-dock-phone {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 500;
}

.btn-console-message {
  padding: 8px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #334155;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-console-message:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ==========================================================================
   SLIDE-UP BOTTOM COMPARISON TRAY
   ========================================================================== */

.docked-compare-tray {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  background: #0f172a;
  color: #ffffff;
  padding: 0.875rem 2rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  border-top: 1px solid #334155;
  animation: slideUpTray 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUpTray {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.tray-content-wrap {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.tray-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tray-badge-count {
  font-size: 0.8125rem;
  font-weight: 700;
  background: #2563eb;
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 9999px;
}

.tray-items-preview {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tray-chip {
  background: #1e293b;
  border: 1px solid #334155;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-chip-del {
  cursor: pointer;
  color: #94a3b8;
  font-weight: 700;
}

.tray-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-tray-clear {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-tray-clear:hover {
  color: #ffffff;
}

.btn-tray-compare {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-tray-compare:hover {
  background: #1d4ed8;
}

/* Calculator Dashboard tweaks */
.section-divider-title {
  margin-bottom: 1rem;
}

.section-divider-title h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.section-divider-title p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard-calc {
  padding: 1.5rem;
  margin-bottom: 2rem;
}

/* Compare option check in rate card */
.compare-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  transition: var(--transition-smooth);
}

.compare-checkbox-label:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-color);
}

/* ==========================================================================
   INSTITUTIONAL SCENARIO COMPARISON & DELTA MATRIX VIEW
   ========================================================================== */

.compare-desk-container {
  padding: 2rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: var(--border-radius-lg, 16px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.compare-desk-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.compare-header-info {
  flex: 1;
  min-width: 320px;
}

.compare-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 3px 10px;
  border-radius: 9999px;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.compare-header-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0284c7;
  animation: pulseDot 2s infinite;
}

.compare-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
}

.compare-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
  line-height: 1.5;
  max-width: 820px;
}

.compare-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-compare-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.btn-compare-action.secondary {
  background: #f8fafc;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-compare-action.secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-compare-action.danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-compare-action.danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Active Scenario Parameter Context Strip */
.compare-scenario-summary-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  color: #475569;
}

.summary-param-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #334155;
}

.summary-param-pill strong {
  color: #0f172a;
  font-weight: 700;
}

/* Empty State / Preset Desk */
.compare-preset-desk {
  padding: 3rem 1.5rem;
  text-align: center;
  background: #fafafa;
  border: 1.5px dashed #cbd5e1;
  border-radius: 14px;
  margin-bottom: 1.5rem;
}

.preset-desk-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.preset-desk-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.preset-desk-desc {
  font-size: 0.875rem;
  color: #64748b;
  max-width: 580px;
  margin: 0 auto 1.75rem;
  line-height: 1.5;
}

.compare-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  max-width: 960px;
  margin: 0 auto 1.5rem;
  text-align: left;
}

.compare-preset-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.compare-preset-card:hover {
  border-color: #0284c7;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.15);
}

.preset-card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  background: #f0f9ff;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.5rem;
  width: fit-content;
}

.preset-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}

.preset-card-body {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.btn-load-preset {
  font-size: 0.78125rem;
  font-weight: 600;
  color: #0284c7;
  background: #e0f2fe;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-load-preset:hover {
  background: #0284c7;
  color: #ffffff;
}

.preset-desk-back {
  font-size: 0.8125rem;
  color: #64748b;
}

.preset-desk-back a {
  color: #0284c7;
  font-weight: 600;
  text-decoration: none;
}

.preset-desk-back a:hover {
  text-decoration: underline;
}

/* SIDE-BY-SIDE DELTA MATRIX GRID */
.compare-delta-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.delta-matrix-col {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  position: relative;
}

.delta-matrix-col:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

.delta-matrix-col.is-baseline {
  border-color: #0284c7;
  box-shadow: 0 0 0 1px #0284c7, 0 12px 24px -6px rgba(2, 132, 199, 0.15);
}

/* Col Header */
.delta-col-header {
  padding: 1.25rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
}

.delta-matrix-col.is-baseline .delta-col-header {
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border-bottom-color: #bae6fd;
}

.col-baseline-badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge-baseline {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: #0284c7;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.btn-set-baseline {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  background: #ffffff;
  color: #475569;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-set-baseline:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-remove-delta-col {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.btn-remove-delta-col:hover {
  color: #ef4444;
}

.col-program-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0.35rem;
}

.col-product-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.col-lender-name {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.col-pricing-strip {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 0.5rem;
}

.col-rate-big {
  font-family: 'Outfit', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.col-apr-sub {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

.col-apr-sub strong {
  color: #334155;
}

.col-strategic-tag {
  display: inline-block;
  font-size: 0.71875rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.col-strategic-tag.neutral {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
}

/* Metric Sections */
.delta-col-section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
}

.delta-col-section:last-of-type {
  border-bottom: none;
}

.delta-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.delta-metric-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.35rem 0;
  font-size: 0.8125rem;
}

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

.metric-val-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  text-align: right;
}

.metric-val {
  font-weight: 700;
  color: #0f172a;
}

.delta-pill {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.delta-pill.baseline-pill {
  background: #e0f2fe;
  color: #0369a1;
}

.delta-pill.savings {
  background: #dcfce7;
  color: #15803d;
}

.delta-pill.increase {
  background: #fef2f2;
  color: #b91c1c;
}

.delta-pill.neutral {
  background: #f1f5f9;
  color: #64748b;
}

/* Total Monthly Outlay Highlight Box */
.delta-outlay-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  margin-top: 0.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delta-matrix-col.is-baseline .delta-outlay-box {
  background: #f0f9ff;
  border-color: #bae6fd;
}

.delta-outlay-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.delta-outlay-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

/* Col Footer Actions */
.delta-col-actions {
  margin-top: auto;
  padding: 1.25rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.btn-delta-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #ffffff;
  color: #0284c7;
  border: 1.5px solid #0284c7;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-delta-select:hover {
  background: #e0f2fe;
}

.btn-delta-apply {
  width: 100%;
  padding: 9px 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.btn-delta-apply:hover {
  background: #0369a1;
}

/* Add Slot Placeholder Card */
.delta-add-slot-col {
  background: #fafafa;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1rem;
  min-height: 420px;
  transition: all 0.25s ease;
}

.delta-add-slot-col:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

.add-slot-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  border: 1.5px dashed #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #64748b;
  transition: all 0.25s ease;
}

.delta-add-slot-col:hover .add-slot-icon-wrap {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: rotate(90deg);
}

.add-slot-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e293b;
}

.add-slot-desc {
  font-size: 0.8125rem;
  color: #64748b;
  max-width: 220px;
  line-height: 1.4;
}

.add-slot-quick-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 220px;
}

.btn-quick-add-prog {
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-quick-add-prog:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

.btn-browse-pricing-desk {
  font-size: 0.75rem;
  color: #0284c7;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

/* Quote History View styling */
.history-container {
  padding: 2rem;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.history-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.history-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.history-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-filter label {
  color: #64748b;
  font-weight: 600;
  font-size: 0.8125rem;
}

.history-select {
  padding: 0.4rem 1.75rem 0.4rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-weight: 600;
}

/* ==========================================================================
   SCENARIO AUDIT LEDGER (REPLACES OLD TIMELINE TRADE DRESS)
   ========================================================================== */

.ledger-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ledger-header-panel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ledger-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  letter-spacing: 0.6px;
  display: block;
}

.ledger-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #061b31;
  margin: 4px 0 2px 0;
}

.ledger-subtitle {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0;
}

.ledger-kpis {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.ledger-kpi-item {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.ledger-kpi-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #061b31;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.ledger-kpi-lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #64748b;
  margin-top: 2px;
}

.ledger-controls-bar {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.ledger-filter-pills {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-pill {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ledger-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #94a3b8;
}

.ledger-pill.active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.ledger-table-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.ledger-table thead {
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
}

.ledger-table th {
  padding: 0.875rem 1.15rem;
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border: none;
}

.ledger-table tbody tr.ledger-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.ledger-table tbody tr.ledger-row:hover {
  background-color: #f8fafc;
}

.ledger-table td {
  padding: 0.95rem 1.15rem;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}

.ledger-time-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ledger-timestamp {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.8125rem;
}

.ledger-id-badge {
  font-family: monospace;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #0284c7;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
}

.ledger-scenario-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ledger-purpose-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
}

.ledger-purpose-badge.badge-purchase {
  background: #dcfce7;
  color: #166534;
}

.ledger-purpose-badge.badge-refinance {
  background: #e0e7ff;
  color: #3730a3;
}

.ledger-amount {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.ledger-program-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ledger-prog-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.875rem;
}

.ledger-pricing-cell {
  display: flex;
  flex-direction: column;
}

.ledger-rate-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: #061b31;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.ledger-payment-cell {
  display: flex;
  flex-direction: column;
}

.ledger-pay-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #061b31;
  font-variant-numeric: tabular-nums;
}

.ledger-actions-cell {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.btn-ledger-load {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0284c7;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ledger-load:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 4px rgba(2, 132, 199, 0.25);
}

.btn-ledger-pdf {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #dc2626;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ledger-pdf:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
}

.empty-history-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: #ffffff;
  border-radius: 12px;
  border: 1px dashed #cbd5e1;
}

.empty-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px auto;
  background: #e0f2fe;
  color: #0284c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-history-state h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.empty-history-state p {
  font-size: 0.875rem;
  color: #64748b;
  max-width: 460px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
}

.btn-hist-more:hover {
  text-decoration: underline;
}

/* Profile View styles */
.profile-tracking-card {
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.tracking-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.tracking-icon {
  font-size: 1.75rem;
}

.tracking-info strong {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.15rem;
}

.tracking-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.email-link {
  color: var(--primary-color);
  font-weight: 600;
}

.status-bold {
  color: var(--badge-green-text);
  font-weight: 700;
}

.profile-info-card {
  padding: 2rem;
}

.info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.info-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
}

.profile-details-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.profile-info-row {
  display: flex;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.85rem;
}

.profile-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-info-row .info-label {
  width: 160px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
}

.profile-info-row .info-value {
  font-weight: 700;
  color: var(--text-main);
  font-size: 0.925rem;
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 500px;
}

.edit-profile-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

/* Contact View styles */
.contact-box {
  padding: 2.25rem;
  max-width: 720px;
}

.contact-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
  margin-bottom: 1.75rem;
}

.contact-card-header .manager-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.manager-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.text-area {
  font-family: inherit;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 2rem;
  margin-top: 0.2rem;
}

.radio-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.btn-submit-message {
  align-self: flex-start;
  padding: 0.8rem 2.25rem;
}

/* Footer position in dashboard context */
.dashboard-footer {
  margin-top: 3rem;
  margin-left: 260px;
}

/* ==========================================================================
   COMPREHENSIVE MOBILE & TABLET RESPONSIVE SYSTEM (<= 992px & <= 640px)
   ========================================================================== */

@media (max-width: 992px) {
  /* 1. Header & Hamburger */
  .btn-hamburger {
    display: inline-flex !important;
  }

  .btn-sidebar-close {
    display: flex !important;
  }

  /* 2. Slide-In Sidebar Drawer */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    z-index: 1200 !important;
    transform: translateX(-100%) !important;
    box-shadow: none !important;
  }

  .sidebar.open {
    transform: translateX(0) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45) !important;
  }

  /* 3. Main Content Offset & Layout */
  .main-content {
    margin-left: 0 !important;
    padding: 1.25rem 1rem !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .dashboard-header {
    margin: -1.25rem -1rem 1.25rem -1rem !important;
    padding: 0.85rem 1rem !important;
    gap: 0.5rem !important;
  }

  .dashboard-footer {
    margin-left: 0 !important;
    padding: 1.5rem 1rem !important;
  }

  /* 4. Scenario Parameter Strip (Home View) */
  .scenario-parameter-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 1rem !important;
  }

  .strip-purpose-toggle {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .btn-purpose-pill {
    width: 100% !important;
    text-align: center !important;
  }

  .strip-divider {
    display: none !important;
  }

  .strip-form {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }

  .strip-param-item {
    width: 100% !important;
  }

  .strip-input-wrap {
    width: 100% !important;
  }

  .strip-input {
    width: 100% !important;
  }

  /* 5. Master-Detail Workspace (Home View) */
  .workspace-master-detail {
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    margin-bottom: 2.5rem !important;
  }

  .matrix-pills-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .term-tabs {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    display: flex !important;
    padding: 4px !important;
  }

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

  .term-tabs .tab-pill {
    flex-shrink: 0 !important;
  }

  .matrix-extra-toggles {
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
  }

  /* 6. Compare View */
  .compare-desk-container {
    padding: 1rem !important;
  }
  
  .compare-desk-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
  }

  .compare-header-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .btn-compare-action {
    flex: 1 1 calc(50% - 0.5rem) !important;
    justify-content: center !important;
    padding: 8px 10px !important;
    font-size: 0.78rem !important;
  }

  .compare-delta-matrix {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* 7. Quote History / Scenario Audit Ledger View */
  .ledger-header-panel {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 1.25rem 1rem !important;
  }

  .ledger-kpis {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .ledger-controls-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.85rem 1rem !important;
  }

  .ledger-filter-pills {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    padding-bottom: 2px !important;
  }

  .ledger-table-container {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    border-radius: 10px !important;
  }

  .ledger-table {
    min-width: 650px !important;
  }

  /* 8. Profile View */
  .profile-tracking-card {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 1rem !important;
  }

  .profile-info-card {
    padding: 1.25rem 1rem !important;
  }

  .profile-info-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    padding: 0.65rem 0 !important;
  }

  /* 9. My Leads View (LO Admin Desk) */
  .lo-desk-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 1rem !important;
    padding: 1.25rem 1rem !important;
  }

  .lo-desk-kpi-banner {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .lo-desk-controls-strip {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    padding: 0.85rem 1rem !important;
  }

  .lo-desk-search-wrap {
    width: 100% !important;
  }

  .lo-tab-segmented-control {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  .lead-tab-btn {
    text-align: center !important;
    justify-content: center !important;
  }

  .lead-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem !important;
  }

  .lead-actions-strip {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .lead-contact-btn {
    flex: 1 1 calc(50% - 0.5rem) !important;
    justify-content: center !important;
  }

  /* 10. Margin Controls View (LO Admin Desk) */
  .table-responsive-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    margin-bottom: 1rem !important;
    border-radius: 8px !important;
  }

  .margin-matrix-table {
    min-width: 600px !important;
  }

  .saas-compliance-card {
    padding: 1rem !important;
  }

  #btn-save-margins {
    width: 100% !important;
    padding: 12px !important;
    font-size: 1rem !important;
  }

  /* 11. CRM Webhooks View (LO Admin Desk) */
  .webhook-field-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .webhook-url-input {
    width: 100% !important;
  }

  .webhook-actions-row {
    flex-direction: column !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .webhook-actions-row button {
    width: 100% !important;
  }

  .crm-guide-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .webhook-schema-box {
    overflow-x: auto !important;
    width: 100% !important;
  }

  /* 12. Direct Advisor Desk View */
  .contact-box {
    padding: 1.25rem 1rem !important;
  }

  .contact-lo-hero-card {
    flex-direction: column !important;
    text-align: center !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1.25rem 1rem !important;
  }

  .lo-hero-avatar-wrap {
    margin: 0 auto !important;
  }

  .lo-hero-contacts {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    gap: 0.5rem !important;
  }

  .lo-hero-link {
    justify-content: center !important;
    width: 100% !important;
    padding: 10px 14px !important;
  }

  .radio-group-modern {
    flex-direction: column !important;
    gap: 0.5rem !important;
    width: 100% !important;
  }

  .radio-pill-label {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
  }

  .btn-submit-message {
    width: 100% !important;
    padding: 12px !important;
    font-size: 1rem !important;
  }
}

@media (max-width: 600px) {
  .header-actions {
    gap: 6px !important;
  }

  .orb-engine-text,
  .orb-indicator-text {
    display: none !important;
  }

  .user-greeting {
    display: none !important;
  }

  .header-user-widget {
    padding: 2px !important;
  }

  .btn-logout {
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }

  .strip-form {
    grid-template-columns: 1fr !important;
  }

  .ledger-kpis {
    grid-template-columns: 1fr !important;
  }
}

/* PDF Pill styling */
.pdf-download-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ef4444;
  border-radius: 4px;
  padding: 3px 6px;
  font-size: 10px;
  color: #ef4444;
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  background-color: #fef2f2;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.pdf-download-pill:hover {
  background-color: #ef4444;
  color: #ffffff;
}

.pdf-download-pill svg {
  transition: stroke 0.2s ease-in-out;
}

.pdf-download-pill:hover svg {
  stroke: #ffffff;
}

/* Header Avatar Component */
.header-user-widget {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 9999px;
  transition: background 0.2s ease;
}
.header-user-widget:hover {
  background: rgba(0, 0, 0, 0.04);
}
.header-user-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.header-user-avatar-wrap img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0284c7;
  display: block;
}
.header-avatar-initial {
  display: flex;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  align-items: center;
  justify-content: center;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.3);
  user-select: none;
}
.nav-label {
  white-space: nowrap;
}


/* In-App Toast & Web-Level Notifications */
.dashboard-toast-container,
.app-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.dashboard-toast,
.app-toast {
  pointer-events: auto;
  min-width: 320px;
  max-width: 440px;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.1);
  animation: toastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.dashboard-toast .toast-icon-wrap,
.app-toast .toast-icon-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-top: 1px;
}

.dashboard-toast .toast-body,
.app-toast .toast-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dashboard-toast .toast-title,
.app-toast .toast-title {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.dashboard-toast .toast-message,
.app-toast .toast-message {
  font-size: 13px;
  opacity: 0.92;
  word-break: break-word;
}

.dashboard-toast .toast-close-btn,
.app-toast .toast-close-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 18px;
  line-height: 1;
  border-radius: 4px;
  transition: color 0.15s, background-color 0.15s;
}
.dashboard-toast .toast-close-btn:hover,
.app-toast .toast-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.dashboard-toast.success,
.app-toast.success {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.95), rgba(4, 120, 87, 0.92));
  color: #ffffff;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.dashboard-toast.success .toast-icon-wrap {
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
}

.dashboard-toast.error,
.app-toast.error {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.95), rgba(185, 28, 28, 0.92));
  color: #ffffff;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.dashboard-toast.error .toast-icon-wrap {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.dashboard-toast.warning,
.app-toast.warning {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.95), rgba(180, 83, 9, 0.92));
  color: #ffffff;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.dashboard-toast.warning .toast-icon-wrap {
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
}

.dashboard-toast.info,
.app-toast.info {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.92));
  color: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.dashboard-toast.info .toast-icon-wrap {
  background: rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.dashboard-toast.loading,
.app-toast.loading {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92));
  color: #ffffff;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

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

/* In-App Generic Notification Modal */
.app-notice-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.25s ease;
}
.app-notice-modal {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: popInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.app-notice-modal .modal-orb-container {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-notice-modal h3 {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 10px 0;
}
.app-notice-modal p {
  font-size: 14.5px;
  color: #475569;
  margin: 0 0 24px 0;
  line-height: 1.55;
}
.app-notice-modal .btn-notice-confirm {
  width: 100%;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  background: #026fcf;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.app-notice-modal .btn-notice-confirm:hover {
  background: #015299;
  transform: translateY(-1px);
}
@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
@keyframes popInModal { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: scale(1); } }

/* Button Loading Spinner */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes btnSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   LOAN OFFICER ADMIN DESK SUITE (SWISS FINANCIAL & LINEAR DENSITY)
   ========================================================================== */

.lo-admin-desk-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.25);
  margin-bottom: 25px;
}

/* Desk Header */
.lo-desk-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  gap: 20px;
  flex-wrap: wrap;
}

.lo-desk-title-group {
  flex: 1 1 340px;
}

.lo-desk-badge-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.desk-role-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(2, 111, 207, 0.16);
  color: #38bdf8;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(2, 111, 207, 0.35);
}

.desk-telemetry-badge {
  font-size: 10.5px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.lo-desk-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.lo-desk-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* KPI Stat Strip */
.lo-desk-kpi-banner {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.desk-kpi-pill {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  min-width: 85px;
}

.kpi-micro-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.kpi-micro-val {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-color);
  margin-top: 1px;
}

.kpi-micro-val.accent-blue { color: #38bdf8; }
.kpi-micro-val.accent-green { color: #10b981; }
.kpi-micro-val.text-muted { color: #94a3b8; }

/* Desk Controls Strip */
.lo-desk-controls-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 16px 0;
  gap: 14px;
  flex-wrap: wrap;
}

.lo-desk-search-wrap {
  position: relative;
  flex: 1 1 300px;
  max-width: 440px;
}

.lo-desk-search-wrap .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: var(--text-muted);
  pointer-events: none;
}

.lo-search-input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 12.5px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lo-search-input:focus {
  outline: none;
  border-color: #026fcf;
  box-shadow: 0 0 0 3px rgba(2, 111, 207, 0.2);
}

.lo-tab-segmented-control {
  display: flex;
  background: var(--bg-hover);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  gap: 4px;
}

.lead-tab-btn {
  padding: 7px 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.lead-tab-btn.active {
  background: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tab-count-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--border-color);
  color: var(--text-muted);
}

.tab-count-badge.active {
  background: #0284c7;
  color: #ffffff;
}

/* LO Lead Cards */
.leads-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

.lo-lead-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lo-lead-card:hover {
  border-color: rgba(2, 111, 207, 0.45);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
}

.lead-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.lead-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lead-avatar-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #026fcf, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 111, 207, 0.35);
  flex-shrink: 0;
}

.lead-name-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.lead-client-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0;
}

.lead-status-pill {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

.lead-status-pill.badge-inquiry {
  background: rgba(2, 111, 207, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 111, 207, 0.3);
}

.lead-status-pill.badge-alert {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.lead-status-pill.badge-proposal {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.lead-timestamp-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}

.lead-dot-sep {
  opacity: 0.5;
}

.btn-lead-archive {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-lead-archive:hover {
  color: var(--text-color);
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.btn-lead-archive.restore:hover {
  color: #10b981;
  border-color: #10b981;
}

/* Parameters Strip */
.lead-parameters-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-param-chip {
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--text-color);
}

.lead-param-chip strong {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 4px;
}

.lead-notes-preview {
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #026fcf;
}

.lead-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lead-contact-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.lead-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 5px 11px;
  border-radius: 6px;
  transition: all 0.15s;
}

.lead-contact-btn.phone {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.lead-contact-btn.phone:hover {
  background: rgba(16, 185, 129, 0.22);
}

.lead-contact-btn.email {
  background: rgba(2, 111, 207, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(2, 111, 207, 0.25);
}

.lead-contact-btn.email:hover {
  background: rgba(2, 111, 207, 0.22);
}

.lead-actions-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-lead-load-scenario {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: linear-gradient(135deg, #026fcf, #038cf5);
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(2, 111, 207, 0.3);
}

.btn-lead-load-scenario:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 111, 207, 0.45);
}

.btn-lead-view-history {
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-lead-view-history:hover {
  color: var(--text-color);
  border-color: var(--text-muted);
}

.empty-leads-state {
  text-align: center;
  padding: 45px 20px;
  color: var(--text-muted);
}

.empty-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px auto;
  color: var(--text-muted);
}

.empty-leads-state h4 {
  margin: 0 0 6px 0;
  color: var(--text-color);
  font-size: 15px;
}

.empty-leads-state p {
  margin: 0;
  font-size: 12.5px;
}

/* ==========================================================================
   MARGIN ADJUSTMENT DESK (SWISS TABLE & OVERRIDES)
   ========================================================================== */

.table-responsive-wrapper {
  overflow-x: auto;
  margin-bottom: 20px;
  width: 100%;
}

.margin-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.margin-matrix-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 10px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.margin-matrix-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.margin-matrix-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.product-id-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.prod-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}

.prod-badge.conv {
  background: rgba(2, 111, 207, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 111, 207, 0.3);
}

.prod-badge.arm {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.prod-badge.gov {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.prod-names {
  display: flex;
  flex-direction: column;
}

.prod-names strong {
  font-size: 13px;
  color: var(--text-color);
  white-space: nowrap;
}

.prod-names span {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.wholesale-base-pill {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  white-space: nowrap;
}

.margin-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.margin-input-wrap .input-affix {
  position: absolute;
  left: 8px;
  font-weight: 700;
  color: #38bdf8;
  pointer-events: none;
  font-size: 12px;
}

.margin-input-wrap .input-suffix {
  position: absolute;
  right: 8px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11px;
  pointer-events: none;
}

.margin-num-input {
  width: 90px;
  padding: 6px 20px 6px 18px !important;
  font-size: 13px !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
}

.override-num-input {
  width: 105px;
  padding: 6px 20px 6px 10px !important;
  font-size: 12.5px !important;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-color);
}

.margin-num-input:focus,
.override-num-input:focus {
  outline: none;
  border-color: #026fcf;
  box-shadow: 0 0 0 2px rgba(2, 111, 207, 0.25);
}

.live-rate-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: inline-block;
  white-space: nowrap;
}

.tar {
  text-align: right;
}

/* SaaS Compliance Card */
.saas-compliance-card {
  margin-top: 24px;
  padding: 18px 22px;
  background: #f0fdf4;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1.5px solid #cbd5e1;
  border-left: 4px solid #026fcf;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.compliance-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0f172a;
  font-size: 14px;
  margin-bottom: 8px;
}

.compliance-text {
  font-size: 12.5px;
  color: #334155;
  line-height: 1.6;
  margin: 0 0 14px 0;
  font-weight: 450;
}

.compliance-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: #0f172a;
  font-weight: 600;
}

.compliance-checkbox {
  margin-top: 2px;
  accent-color: #026fcf;
}

/* ==========================================================================
   WEBHOOK & CRM AUTOMATION DESK
   ========================================================================== */

.webhook-input-group {
  margin-bottom: 24px;
}

.webhook-field-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

.webhook-url-input {
  flex: 1 1 360px;
}

.webhook-actions-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.webhook-test-status {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.webhook-test-status.success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.webhook-test-status.error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.webhook-test-status code {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.crm-integrations-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.crm-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-color);
  margin: 0 0 14px 0;
}

.crm-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.crm-guide-card {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.crm-guide-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-color);
}

.crm-logo-icon {
  font-size: 16px;
}

.crm-guide-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

.crm-guide-card em {
  color: #38bdf8;
  font-style: normal;
  font-weight: 600;
}

.webhook-schema-box {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.schema-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.schema-badge {
  font-size: 10px;
  background: rgba(2, 111, 207, 0.2);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

.schema-code-block {
  margin: 0;
  padding: 16px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: #93c5fd;
  overflow-x: auto;
}

/* ==========================================================================
   CONTACT ADVISOR HERO CARD
   ========================================================================== */

.contact-lo-hero-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 111, 207, 0.2));
  border: 1px solid rgba(2, 111, 207, 0.35);
  border-radius: 14px;
  padding: 24px 26px;
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.lo-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.lo-hero-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.lo-online-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2.5px solid #0f172a;
}

.lo-hero-info {
  flex: 1 1 300px;
}

.lo-hero-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #38bdf8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.lo-hero-name {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 4px 0;
}

.lo-hero-credentials {
  font-size: 13.5px;
  color: #e2e8f0;
  font-weight: 500;
  margin: 0 0 12px 0;
}

.lo-hero-contacts {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lo-hero-link {
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition: all 0.15s;
}

.lo-hero-link.phone {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid #10b981;
}

.lo-hero-link.phone:hover {
  background: rgba(16, 185, 129, 0.35);
  color: #ffffff;
}

.lo-hero-link.email {
  background: rgba(2, 111, 207, 0.25);
  color: #bae6fd;
  border: 1px solid #38bdf8;
}

.lo-hero-link.email:hover {
  background: rgba(2, 111, 207, 0.4);
  color: #ffffff;
}

.lo-hero-hours {
  font-size: 12px;
  color: #cbd5e1;
}

/* ==========================================================================
   MANDATORY RATE TABLE REGULATORY FOOTER & DISCLOSURES
   ========================================================================== */

.rate-table-regulatory-footer {
  max-width: 100%;
  margin: 2.25rem 0 2.5rem;
  padding: 1.75rem 2rem;
  background: #ffffff;
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #475569;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.eho-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
  width: 100%;
}

.eho-badge svg {
  color: #0f172a;
}

.regulatory-paragraph {
  margin-bottom: 0.85rem;
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.65;
}

.regulatory-paragraph:last-child {
  margin-bottom: 0;
}

.regulatory-paragraph strong {
  color: #0f172a;
  font-weight: 700;
}

.regulatory-dynamic {
  color: #026fcf;
  font-weight: 600;
}

.regulatory-links-row {
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}

.regulatory-links-row a {
  color: #026fcf;
  text-decoration: none;
  font-weight: 600;
}

.regulatory-links-row a:hover {
  text-decoration: underline;
}

.regulatory-links-row .sep {
  color: var(--border-color, #cbd5e1);
}

/* Modern Radio Pills */
.radio-group-modern {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.radio-pill-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.15s;
}

.radio-pill-label:hover {
  border-color: #026fcf;
}

.radio-pill-label input[type="radio"] {
  accent-color: #026fcf;
  margin: 0;
}

/* ==========================================================================
   THINKING ORBS - ELEVATED AI TRANSITION & STATE SYSTEM
   ========================================================================== */

/* Header AI Rate Engine Live Indicator */
.orb-engine-indicator {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 9999px;
  padding: 4px 12px 4px 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
}

.orb-engine-indicator:hover {
  background: rgba(2, 132, 199, 0.08);
  border-color: rgba(2, 132, 199, 0.45);
  box-shadow: 0 0 16px rgba(2, 132, 199, 0.15);
}

.orb-indicator-canvas-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.orb-indicator-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.orb-engine-status {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.orb-engine-sub {
  font-size: 0.6875rem;
  color: #0284c7;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Dashboard View Transition Screen */
.dashboard-view-transition-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 150;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.dashboard-view-transition-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.view-transition-orb-wrap {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 6px 20px rgba(2, 132, 199, 0.28));
}

.view-transition-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
}

.view-transition-subtitle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #64748b;
  margin: 4px 0 0 0;
}

/* Rate Matrix Shimmer & Calculation State */
.matrix-calculating-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  border-radius: var(--border-radius-lg, 14px);
}

.matrix-calculating-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ==========================================================================
   DASHBOARD AUTH BARRIER & TENANT VERIFICATION SHIELD
/* Zero Data Leakage: Hide all dashboard structure until authenticated-ready */
body:not(.authenticated-ready) .main-content,
body:not(.authenticated-ready) .sidebar,
body:not(.authenticated-ready) .sidebar-nav,
body:not(.authenticated-ready) .dashboard-header {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.dashboard-auth-barrier {
  position: fixed;
  inset: 0;
  background: #071626;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dashboard-auth-barrier.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-barrier-card {
  text-align: center;
  color: #ffffff;
  padding: 40px 32px;
  max-width: 440px;
  width: 90%;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-barrier-orb {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-barrier-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: #f8fafc;
  letter-spacing: -0.01em;
}

.auth-barrier-card p {
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  color: #94a3b8;
  line-height: 1.55;
  margin: 0;
}



