/* CSS Variables and Global Customizations */
:root {
  --primary-color: #026fcf;
  --primary-hover: #0159a7;
  --primary-light: #eff6ff;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --accent-color: #026fcf;
  
  --shadow-sm: 0 1px 3px rgba(50, 50, 93, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(50, 50, 93, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 13px 27px -5px rgba(50, 50, 93, 0.15), 0 8px 16px -8px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 24px 48px -12px rgba(50, 50, 93, 0.22), 0 12px 24px -8px rgba(0, 0, 0, 0.12);
  
  --badge-gold-bg: #fef9c3;
  --badge-gold-text: #713f12;
  --badge-green-bg: #dcfce7;
  --badge-green-text: #15803d;
  
  --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-sm: 6px;
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 2rem;
}

/* Demo Banner Styling */
.demo-banner {
  background-color: #fef3c7; /* Light yellow warning background */
  color: #92400e; /* Dark amber text */
  padding: 0.5rem 1rem;
  text-align: center;
  font-size: 0.825rem;
  font-weight: 500;
  border-bottom: 1px solid #fde68a;
  position: relative;
  z-index: 101;
  font-family: 'Inter', sans-serif;
}

/* Dynamic Portal Loading & Skeleton Shimmer System */
@keyframes loShimmerPulse {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.lo-skeleton {
  display: inline-block;
  vertical-align: middle;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
  background-size: 300% 100%;
  animation: loShimmerPulse 1.6s ease-in-out infinite;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
  pointer-events: none;
  line-height: 1;
}

.lo-skeleton-circle {
  border-radius: 50% !important;
}

.lo-skeleton-pill {
  border-radius: 9999px !important;
}

/* Once portal data is verified and applied, smooth reveal */
.portal-ready .lo-skeleton {
  background: transparent !important;
  animation: none !important;
  color: inherit !important;
  pointer-events: auto !important;
  user-select: auto !important;
}

/* Header Styling */
.app-header {
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  padding: 0.875rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-container {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.brand-avatar-box {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #026fcf, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 2px #0284c7, 0 2px 5px rgba(50, 50, 93, 0.1);
}

.brand-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text-col {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-primary-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #061b31;
  letter-spacing: -0.02em;
}

.brand-portal-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #e0f2fe;
  color: #0284c7;
  border: 1px solid #bae6fd;
  padding: 2px 8px;
  border-radius: 9999px;
}

.brand-sub-compliance {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 2px;
}

.header-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 9999px;
}

.rating-val {
  font-weight: 700;
  color: #061b31;
}

.rating-stars {
  color: #f59e0b;
  letter-spacing: 1px;
  font-size: 0.75rem;
}

.rating-count {
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.rating-count:hover {
  color: #0284c7;
}

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

.btn-signin-portal {
  background-color: #ffffff;
  color: #0284c7;
  border: 1.5px solid #cbd5e1;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Outfit', sans-serif;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.05);
}

.btn-signin-portal:hover {
  background-color: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-signin-portal:active {
  transform: translateY(0);
}

/* Container */
.container {
  max-width: 1220px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

/* Hero & Loan Officer Desk Header */
.landing-hero-desk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.25rem;
  margin-bottom: 2.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2rem 2.25rem;
  box-shadow: 0 13px 27px -5px rgba(50, 50, 93, 0.08), 0 8px 16px -8px rgba(0, 0, 0, 0.04), 0 -1px 2px 0 rgba(0, 0, 0, 0.02);
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.landing-hero-desk::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0284c7 0%, #38bdf8 50%, #10b981 100%);
}

.hero-desk-content {
  flex: 1;
  min-width: 320px;
}

.hero-desk-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 4px 12px;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

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

.hero-desk-content .page-title {
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  color: #061b31;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.hero-desk-content .page-subtitle {
  text-align: left;
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.55;
  max-width: 620px;
}

.hero-lo-spotlight-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.6rem;
  box-shadow: 0 10px 25px -5px rgba(50, 50, 93, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
  min-width: 330px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.hero-lo-spotlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px -5px rgba(50, 50, 93, 0.12), 0 6px 14px -2px rgba(0, 0, 0, 0.06);
}

.spotlight-avatar-box {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #026fcf, #0284c7);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2.5px solid #ffffff;
  box-shadow: 0 0 0 2px #0284c7, 0 3px 8px rgba(50, 50, 93, 0.15);
  overflow: hidden;
  flex-shrink: 0;
}

.spotlight-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spotlight-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.spotlight-name {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #061b31;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.spotlight-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0284c7;
  line-height: 1.35;
  word-break: break-word;
}

.spotlight-contact-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #475569;
  margin-top: 4px;
}

.spotlight-link {
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.spotlight-link:hover {
  color: #0284c7;
  text-decoration: underline;
}

.spotlight-divider {
  color: #cbd5e1;
}

.spotlight-compliance {
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 4px;
}

.spotlight-rating-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 9999px;
  margin-top: 4px;
  width: fit-content;
}

.spotlight-stars {
  color: #f59e0b;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.spotlight-rating-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}

.spotlight-rating-text {
  font-size: 0.6875rem;
  color: #64748b;
  font-weight: 500;
}

.modal-sheet-grabber {
  display: none;
}

.page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #061b31;
  margin-bottom: 0.5rem;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Calculator Card */
.calculator-card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 13px 27px -5px rgba(50, 50, 93, 0.07), 0 8px 16px -8px rgba(0, 0, 0, 0.04), 0 -1px 2px 0 rgba(0, 0, 0, 0.02);
  padding: 2rem 2.25rem;
  margin-bottom: 2.25rem;
}

.purpose-selector {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.75rem;
}

.purpose-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.purpose-buttons {
  display: inline-flex;
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  width: fit-content;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

.btn-purpose {
  border: none;
  background: transparent;
  padding: 0.55rem 1.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-purpose:hover:not(.active) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.5);
}

.btn-purpose.active {
  background-color: #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);
}

/* Form Grid */
.calc-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.35rem 1.5rem;
  align-items: end;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  position: relative;
}

.field-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.form-control {
  width: 100%;
  padding: 0.7rem 0.95rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.form-control:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control.dropdown {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.25rem;
  cursor: pointer;
}

/* Input wrappers for prefix/suffix */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper.prefix .form-control {
  padding-left: 1.85rem;
}

.input-prefix {
  position: absolute;
  left: 0.75rem;
  color: #64748b;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}

.input-wrapper.suffix .form-control {
  padding-right: 1.85rem;
}

.input-suffix {
  position: absolute;
  right: 0.75rem;
  color: #64748b;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}

/* Dual Input for Down Payment */
.dual-input-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background-color: #ffffff;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.dual-input-wrapper:focus-within {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.dual-input-wrapper .form-control {
  border: none;
  border-radius: 0;
  padding: 0.7rem 0.5rem;
  box-shadow: none;
}

.dual-input-wrapper .dollar-part {
  border-right: 1.5px solid #cbd5e1;
}

.dual-input-wrapper .dollar-part .form-control {
  padding-left: 1.75rem;
}

.dual-input-wrapper .percent-part .form-control {
  padding-right: 1.6rem;
  text-align: center;
}

/* ZIP Specific elements */
.zip-group .form-control {
  padding-right: 8.5rem;
}

.location-badge {
  position: absolute;
  right: 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #0284c7;
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  pointer-events: none;
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Refinance LTV badge */
.ltv-badge {
  position: absolute;
  right: 0.5rem;
  bottom: -1.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #065f46;
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 0.1rem 0.5rem;
  border-radius: 4px;
}

/* Toggle Switch styling */
.toggle-group {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  height: 2.75rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
}

input:checked + .slider {
  background-color: #0284c7;
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Advanced Filters Wrapper: on desktop it flows seamlessly within the grid */
.calc-advanced-filters {
  display: contents;
}

/* More Filters button: hidden on desktop by default */
.btn-more-filters {
  display: none;
}

/* Mobile Rates Cards Container: hidden on desktop */
.mobile-rates-cards-container {
  display: none;
}

/* Update Button container */
.btn-update-group {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
}

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

.btn-update {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

/* Filter controls bar */
.results-controls {
  margin-bottom: 1.5rem;
}

.term-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
}

.term-tabs::-webkit-scrollbar {
  height: 4px;
}

.term-tabs::-webkit-scrollbar-thumb {
  background-color: var(--border-color);
  border-radius: 2px;
}

.tab-pill, .structure-pill {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  margin: 0;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  user-select: none;
  transition: var(--transition-smooth);
}

.tab-pill:hover, .structure-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background-color: var(--primary-light);
}

.tab-pill.active, .structure-pill.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.sub-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.quote-info {
  font-size: 0.85rem;
}

.quote-id-label {
  color: var(--text-muted);
  font-weight: 500;
}

.quote-id {
  font-weight: 700;
  color: var(--text-main);
  margin-left: 0.25rem;
}

.checkbox-options {
  display: flex;
  gap: 1.5rem;
}

.control-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
}

.control-checkbox input {
  display: none;
}

.checkbox-custom {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  background-color: var(--card-bg);
  transition: var(--transition-smooth);
}

.control-checkbox input:checked + .checkbox-custom {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.control-checkbox input:checked + .checkbox-custom::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.sort-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.sort-selector label {
  color: var(--text-muted);
}

.sort-selector select {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 0.4rem 1.5rem 0.4rem 0.6rem;
  background-color: var(--card-bg);
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 0.8rem;
}

/* ==========================================================================
   Financial Pricing Matrix Capital Markets Desk (Public Landing)
   ========================================================================== */
.pricing-matrix-desk-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 45px -10px rgba(50, 50, 93, 0.10), 0 10px 20px -5px rgba(0, 0, 0, 0.05), 0 -1px 2px 0 rgba(0, 0, 0, 0.02);
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.matrix-desk-header {
  padding: 1.75rem 2rem 1.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.matrix-desk-info {
  margin-bottom: 1.25rem;
}

.matrix-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

.matrix-status-badge .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

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

.matrix-desk-subtitle {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.matrix-desk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.matrix-term-pills {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.matrix-pill {
  border: none;
  background: transparent;
  padding: 7px 16px;
  border-radius: 7px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.matrix-pill:hover:not(.active) {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.matrix-pill.active {
  background: #061b31;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(6, 27, 49, 0.22);
}

/* Sectionized Scenario Telemetry Strip */
.matrix-scenario-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 18px;
  margin-bottom: 1.25rem;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.04);
}

.matrix-scenario-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: #64748b;
}

.scenario-bar-icon {
  color: #0284c7;
  flex-shrink: 0;
}

.scenario-bar-label {
  font-weight: 600;
  color: #64748b;
}

.scenario-bar-val {
  color: #061b31;
  font-weight: 700;
}

.scenario-bar-val.quote-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.04em;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #bae6fd;
}

.matrix-scenario-sep {
  width: 1px;
  height: 18px;
  background: #cbd5e1;
}

.matrix-scenario-item.live-feed-item {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #059669;
}

.matrix-scenario-item.live-feed-item .live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

/* Matrix Controls */
.matrix-controls-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.matrix-chk-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

.matrix-chk-pill:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.matrix-chk-pill input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0284c7;
  cursor: pointer;
  border-radius: 4px;
  margin: 0;
}

.matrix-controls-sep {
  width: 1px;
  height: 22px;
  background: #cbd5e1;
}

.matrix-sort-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #475569;
}

.matrix-sort-select {
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
  transition: all 0.15s ease;
}

.matrix-sort-select:hover {
  border-color: #94a3b8;
}

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

/* Matrix Table */
.matrix-table-wrap {
  background: #ffffff;
  overflow-x: auto;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

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

.pricing-matrix-table thead th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem 1.25rem;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.pricing-matrix-table thead th.col-actions {
  text-align: right;
  padding-right: 1.75rem;
  min-width: 220px;
}

.matrix-data-row {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.15s ease;
}

.matrix-data-row:hover {
  background-color: #f8fafc;
}

.matrix-data-row td {
  padding: 1.15rem 1.25rem;
  vertical-align: middle;
}

.matrix-data-row td.col-actions {
  text-align: right;
  padding-right: 1.75rem;
  min-width: 220px;
}

/* Program Column Layout */
.prog-cell-layout {
  display: flex;
  align-items: center;
  gap: 12px;
}

.program-badge {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
  white-space: nowrap;
}

.badge-conv {
  background: #e0e7ff;
  color: #3730a3;
  border: 1px solid #c7d2fe;
}

.badge-fha {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-va {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-jumbo, .badge-nonqm {
  background: #f3e8ff;
  color: #6b21a8;
  border: 1px solid #e9d5ff;
}

.badge-usda {
  background: #ccfbf1;
  color: #115e59;
  border: 1px solid #99f6e4;
}

.col-prog-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: #061b31;
  font-size: 0.95rem;
  line-height: 1.3;
}

.col-prog-sub {
  font-size: 0.75rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

/* Rate Column Layout */
.rate-cell-layout {
  display: flex;
  flex-direction: column;
}

.matrix-rate-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #061b31;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.matrix-apr-sub {
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  display: block;
  margin-top: 3px;
}

/* Points / Discount Column */
.points-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}

.points-pill.cost {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.points-pill.credit {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.points-pill.par {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Monthly P&I Column */
.pi-cell-layout {
  display: flex;
  flex-direction: column;
}

.matrix-payment-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #061b31;
  line-height: 1.1;
}

.matrix-payment-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
  margin-top: 3px;
}

/* Total Outlay Column */
.outlay-badge-box {
  display: inline-flex;
  flex-direction: column;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 5px 12px;
  border-radius: 8px;
}

.matrix-outlay-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
  color: #15803d;
  line-height: 1.1;
}

.matrix-outlay-sub {
  font-size: 0.6875rem;
  color: #166534;
  font-weight: 700;
  margin-top: 1px;
}

/* Action Buttons */
.matrix-actions-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
  width: 100%;
}

.btn-desk-details {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

.btn-desk-details:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #061b31;
}

.btn-desk-details svg {
  transition: transform 0.2s ease;
}

.btn-desk-details.expanded svg {
  transform: rotate(180deg);
}

.btn-desk-review {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: none;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  outline: none;
}

.btn-desk-review:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.38);
}

/* Expandable Drawer Row */
.matrix-drawer-row {
  background: #f8fafc;
  border-bottom: 2px solid #e2e8f0;
}

.matrix-drawer-row.hidden {
  display: none;
}

.matrix-drawer-inner {
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.35rem;
}

.drawer-panel-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.drawer-panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #061b31;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.45rem;
}

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

.drawer-row-item.total {
  font-weight: 800;
  font-size: 0.9375rem;
  color: #061b31;
  border-top: 1.5px dashed #cbd5e1;
  margin-top: 8px;
  padding-top: 8px;
}

.btn-drawer-lock-cta {
  width: 100%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.28);
}

.btn-drawer-lock-cta:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.38);
}

/* Drawer Tabs & Multi-View Navigation */
.drawer-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-bottom: 1.5px solid #e2e8f0;
  padding: 12px 1.75rem;
  flex-wrap: wrap;
  gap: 12px;
}

.drawer-tabs-nav {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  gap: 4px;
}

button.drawer-tab-btn {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: #64748b;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 36px;
  white-space: nowrap;
}

button.drawer-tab-btn:hover {
  color: #061b31;
  background: rgba(255, 255, 255, 0.6);
}

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

.tab-label-short {
  display: none;
}

.drawer-rate-badge {
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 6px 14px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

.drawer-tab-pane {
  padding: 0;
}

.drawer-tab-pane.hidden {
  display: none !important;
}

/* Panel 1 Total & Advantage Enhancements */
.drawer-total-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.drawer-total-label {
  font-weight: 700;
  font-size: 0.875rem;
  color: #065f46;
  letter-spacing: -0.01em;
}

.drawer-total-val {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: #059669;
  font-variant-numeric: tabular-nums;
}

.drawer-advantage-callout {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 11px 14px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.drawer-advantage-badge {
  display: inline-block;
  background: #10b981;
  color: #ffffff;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.4px;
  width: fit-content;
}

.drawer-advantage-desc {
  font-size: 0.775rem;
  color: #065f46;
  line-height: 1.45;
}

.drawer-advisor-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.advisor-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
  flex-shrink: 0;
}

.btn-drawer-pdf-cta {
  background: #ffffff !important;
  color: #061b31 !important;
  border: 1.5px solid #cbd5e1 !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.8125rem !important;
  padding: 0.7rem 1.25rem !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.06) !important;
  transition: all 0.15s ease !important;
}

.btn-drawer-pdf-cta:hover {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #0284c7 !important;
  transform: translateY(-1px);
}

/* Amortization Schedule Styles */
.amort-container {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.amort-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.amort-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.amort-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: #cbd5e1;
}

.amort-kpi-card.principal::before { background: #0284c7; }
.amort-kpi-card.interest::before { background: #d97706; }
.amort-kpi-card.total::before { background: #475569; }
.amort-kpi-card.payoff::before { background: #16a34a; }

.amort-kpi-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 6px;
}

.amort-kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #061b31;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.amort-kpi-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 4px;
}

.amort-progress-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.35rem;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.amort-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8125rem;
  color: #334155;
  font-weight: 600;
}

.amort-progress-bar-wrap {
  height: 20px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.amort-progress-bar-fill {
  background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%);
  height: 100%;
  border-radius: 9px 0 0 9px;
  transition: width 0.4s ease;
}

.amort-legend {
  display: flex;
  gap: 24px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
}

.amort-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.amort-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.amort-table-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.04);
}

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

.amort-milestone-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.95rem 1.25rem;
  border-bottom: 1.5px solid #e2e8f0;
  white-space: nowrap;
}

.amort-milestone-table td {
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  white-space: nowrap;
}

.amort-milestone-table tbody tr:nth-child(even) td {
  background-color: #fcfcfc;
}

.amort-milestone-table tbody tr:hover td {
  background-color: #f0f9ff;
}

.amort-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

/* Refinance & Cash-Out Styles */
.cashout-container {
  padding: 1.75rem;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
}

.cashout-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.cashout-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cashout-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.cashout-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cashout-prefix {
  position: absolute;
  left: 14px;
  color: #64748b;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}

.cashout-input {
  width: 100%;
  padding: 10px 14px 10px 28px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: #061b31;
  outline: none;
  background: #ffffff;
  transition: all 0.15s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
  font-variant-numeric: tabular-nums;
}

.cashout-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.16);
}

.cashout-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

button.cashout-chip-btn {
  appearance: none;
  -webkit-appearance: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-family: 'Outfit', sans-serif;
  font-size: 0.775rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 32px;
}

button.cashout-chip-btn:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
  color: #0284c7;
}

button.cashout-chip-btn.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28);
}

.cashout-results-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.cashout-pocket-card {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1.5px solid #86efac;
  border-radius: 10px;
  padding: 14px 18px;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.1);
}

.badge-ltv-status {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  letter-spacing: 0.3px;
}

.badge-ltv-status.safe {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-ltv-status.pmi {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* Tab 4: Points & Buy-Down Optimizer */
.buydown-container {
  padding: 1.5rem 1.75rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.buydown-intro-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.buydown-intro-text h4 {
  margin: 0 0 4px 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.buydown-intro-text p {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
}

.buydown-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.buydown-summary-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  padding: 1.25rem 1.4rem;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px -1px rgba(50, 50, 93, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.buydown-summary-card:hover {
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -4px rgba(50, 50, 93, 0.1);
}

.buydown-summary-card.active-selected {
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.buydown-summary-card.featured-card {
  border-color: #38bdf8;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.buydown-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 8px;
  width: fit-content;
}

.buydown-card-badge.credit {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.buydown-card-badge.par {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.buydown-card-badge.buydown {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.buydown-card-rate {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.buydown-card-rate span {
  font-size: 0.825rem;
  font-weight: 600;
  color: #64748b;
}

.buydown-card-pi {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0284c7;
  margin-bottom: 8px;
}

.buydown-card-pts {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 4px;
}

.buydown-card-breakeven {
  font-size: 0.775rem;
  color: #64748b;
  margin-bottom: 12px;
}

.buydown-card-breakeven strong {
  color: #0f172a;
}

.btn-select-tier {
  appearance: none;
  background: #0284c7;
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: all 0.15s ease;
}

.btn-select-tier:hover {
  background: #0369a1;
}

.btn-select-tier.selected {
  background: #166534;
  color: #ffffff;
  cursor: default;
}

/* Ladder Table */
.buydown-ladder-wrap {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 4px 12px -2px rgba(50, 50, 93, 0.04);
}

.buydown-ladder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
  text-align: left;
  min-width: 680px;
}

.buydown-ladder-table th {
  background: #f8fafc;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1.5px solid #e2e8f0;
}

.buydown-ladder-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.buydown-ladder-table tr:hover td {
  background: #f8fafc;
}

.buydown-ladder-table tr.tier-selected td {
  background: #f0f9ff !important;
  font-weight: 600;
}

.buydown-ladder-table tr.tier-par td {
  background: #fafaf9;
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}

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

.tier-badge.buydown {
  background: #e0f2fe;
  color: #0369a1;
}

.tier-badge.par {
  background: #f1f5f9;
  color: #475569;
}

/* Compliance & Legal Notice Bar */
.matrix-compliance-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 12px 1.5rem;
  font-size: 0.775rem;
  color: #64748b;
  line-height: 1.5;
}

.matrix-compliance-notice strong {
  color: #1e293b;
  font-weight: 700;
}

/* Desk Footer Strip */
.matrix-footer-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.5rem;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  font-size: 0.75rem;
  color: #64748b;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-footer-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.matrix-footer-right {
  font-weight: 600;
  color: #475569;
}


/* Inline Promo Card */
.promo-card {
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1.5px dashed var(--primary-color);
  border-radius: var(--border-radius-md);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.promo-details {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.promo-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.promo-info h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

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

.btn-promo-action {
  background-color: var(--primary-color);
  color: white;
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.btn-promo-action:hover {
  background-color: var(--primary-hover);
}

.rates-timestamp {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Inbox alert callout banner */
.inbox-alert-banner {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  box-shadow: var(--shadow-sm);
  margin: 2rem 0;
}

.bell-icon-wrapper {
  background-color: var(--primary-light);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.bell-icon {
  font-size: 1.4rem;
}

.alert-banner-content {
  flex: 1;
}

.alert-banner-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.alert-banner-content p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.btn-alert-subscribe {
  white-space: nowrap;
}

/* Reviews Section */
.reviews-section {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  margin-top: 3rem;
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.reviews-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 2rem;
  gap: 0.5rem;
}

.review-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.review-tab:hover {
  background-color: var(--primary-light);
}

.review-tab.active {
  border-bottom-color: var(--primary-color);
}

.review-source-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.review-score {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.review-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.review-tab.active .review-source-name {
  color: var(--primary-color);
}

/* Testimonials list */
.review-testimonials {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.testimonial-card {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.5rem;
}

.testimonial-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.testimonial-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.testimonial-author {
  font-weight: 700;
  font-size: 0.9rem;
}

.testimonial-source {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.testimonial-body {
  font-size: 0.875rem;
  color: #334155;
  font-style: italic;
}

/* Footer styling */
.app-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  padding: 3rem 1.5rem;
  background-color: var(--card-bg);
}

.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  text-align: center;
}

.disclosure {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

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

.footer-links span {
  color: var(--border-color);
}

/* Modals & Overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 24px 48px -12px rgba(50, 50, 93, 0.22), 0 12px 24px -8px rgba(0, 0, 0, 0.12);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  width: 100%;
  border: 1px solid #e2e8f0;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 1.6rem;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 10;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

/* Modal 1: Subscribe */
.card-alert-box {
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  border-radius: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.modal-header-graphic {
  background: linear-gradient(135deg, #0b1e36 0%, #061b31 100%);
  padding: 2.25rem 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  color: #ffffff;
  border-bottom: 1px solid #1e293b;
}

.modal-header-graphic::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 50%, #0284c7 100%);
}

.modal-bell-glow {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.modal-phone-mockup {
  display: none;
}

.modal-body-content {
  padding: 2rem 2.25rem;
  text-align: center;
}

.modal-body-content h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: #061b31;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.modal-body-content p {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.modal-subscribe-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.btn-sub-preset {
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-sub-preset:hover {
  transform: translateY(-1px);
}

.btn-modal-submit {
  padding: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

.security-note {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 500;
}

/* Modal 2: Personalize Details */
.personalize-box {
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: auto;
}

.personalize-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  max-height: 90vh;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.personalize-left {
  background: linear-gradient(135deg, #0b1e36 0%, #061b31 100%);
  padding: 1.75rem 1.5rem 1.25rem 1.5rem;
  border-right: 1px solid #1e293b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.personalize-left::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #0284c7 0%, #38bdf8 50%, #10b981 100%);
}

.personalize-left-head {
  text-align: center;
  margin-bottom: 1.25rem;
  width: 100%;
}

.personalize-broker-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.personalize-broker-tag .pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

.personalize-left h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  text-align: center;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

#personalize-left-desc {
  font-size: 0.8125rem;
  color: rgba(226, 232, 240, 0.85);
  line-height: 1.45;
  margin-top: 0.25rem;
  display: block;
  text-align: center;
}

.personalize-desk-card {
  width: 100%;
  max-width: 290px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 1.15rem;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.45);
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.desk-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.desk-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.desk-officer-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.desk-officer-info strong {
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
}

.desk-officer-info span {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

.desk-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.desk-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.desk-check {
  color: #10b981;
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1;
  margin-top: 1px;
}

.desk-card-footer {
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.desk-corp-badge {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.reviews-compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.review-compact-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.review-compact-stars .stars {
  color: #fbbf24;
}

.personalize-right {
  padding: 1.25rem 1.6rem 1rem 1.6rem;
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.btn-oauth-google:hover {
  background-color: #f8fafc !important;
  border-color: #94a3b8 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

.btn-oauth-google:active {
  transform: scale(0.99);
}

#auth-mode-toggle:hover,
#auth-forgot-password-link:hover {
  text-decoration: underline !important;
  color: #0369a1 !important;
}

#auth-back-to-summary:hover {
  color: #64748b !important;
  text-decoration: underline !important;
}

.personalize-step-view.hidden,
.personalize-view.hidden {
  display: none !important;
}

.card-alert-box::-webkit-scrollbar,
.personalize-left::-webkit-scrollbar,
.personalize-right::-webkit-scrollbar {
  width: 6px;
}

.card-alert-box::-webkit-scrollbar-track,
.personalize-left::-webkit-scrollbar-track,
.personalize-right::-webkit-scrollbar-track {
  background: transparent;
}

.card-alert-box::-webkit-scrollbar-thumb,
.personalize-right::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4);
  border-radius: 9999px;
}

.personalize-left::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
}

.card-alert-box::-webkit-scrollbar-thumb:hover,
.personalize-right::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.7);
}

.personalize-right h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #061b31;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.details-summary-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(50, 50, 93, 0.04);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-label {
  color: #64748b;
  font-weight: 600;
}

.summary-val {
  font-weight: 700;
  color: #061b31;
}

.summary-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-link {
  background: transparent;
  border: none;
  color: #0284c7;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

.btn-summary-continue {
  padding: 0.75rem 2rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* Personalize Edit Mode */
.personalize-edit-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flex-row {
  display: flex;
  background-color: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.btn-edit-purpose {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.55rem;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.flex-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.input-group-half {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

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

.btn-secondary {
  background-color: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  font-family: 'Outfit', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(50, 50, 93, 0.04);
}

.btn-secondary:hover {
  background-color: #f8fafc;
  border-color: #94a3b8;
  color: #061b31;
}

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

.animate-modal {
  animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Utility Helper */
.hidden {
  display: none !important;
}

/* Responsive Rules */
@media (max-width: 768px) {
  .header-container {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 0.65rem 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.75rem !important;
  }

  .brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    min-width: 0 !important;
    flex: 1 !important;
  }

  .brand-avatar-box {
    width: 36px !important;
    height: 36px !important;
    flex-shrink: 0 !important;
  }

  .brand-text-col {
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .brand-primary-title {
    font-size: 0.875rem !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    line-height: 1.2 !important;
  }

  .brand-portal-badge {
    font-size: 0.55rem !important;
    padding: 1px 5px !important;
    letter-spacing: 0.04em !important;
  }

  .brand-sub-compliance {
    font-size: 0.65rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #64748b !important;
    max-width: 170px !important;
    line-height: 1.2 !important;
    margin-top: 1px !important;
  }

  .header-right-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
  }

  /* Distraction-free mobile navbar: hide verbose rating pill to prevent crowding & wrapping */
  .header-rating {
    display: none !important;
  }

  /* Single-line sleek mobile Sign In button (Never wraps to 2 lines!) */
  .btn-signin-portal {
    white-space: nowrap !important;
    padding: 0.4rem 0.85rem !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    height: 34px !important;
    min-width: 68px !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
  }
  
  .container {
    padding: 0 1rem;
    margin: 0.5rem auto;
  }
  
  /* Streamlined Mobile Hero (IMG_0747) */
  .hero {
    padding: 1rem 0 0.5rem;
  }

  .hero-tagline {
    font-size: 0.7rem;
    padding: 3px 8px;
    margin-bottom: 0.4rem;
  }

  .page-title {
    font-size: 1.45rem !important;
    line-height: 1.25;
    margin-bottom: 0.4rem;
  }

  .page-subtitle {
    font-size: 0.825rem;
    line-height: 1.35;
    margin-bottom: 0.65rem;
  }

  .hero-lo-spotlight-card,
  .hero-spotlight-card {
    margin-top: 0.75rem;
    padding: 0.85rem 1rem;
    min-width: 0;
    width: 100%;
    gap: 0.85rem;
  }

  .spotlight-avatar-box,
  .spotlight-avatar {
    width: 48px;
    height: 48px;
    font-size: 1rem;
  }

  .spotlight-details {
    min-width: 0;
    flex: 1;
    gap: 2px;
  }

  .spotlight-name {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  .spotlight-title {
    font-size: 0.75rem;
    line-height: 1.35;
    word-break: break-word;
    margin-top: 2px;
  }

  .spotlight-contact-row {
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 0.72rem;
    line-height: 1.4;
    margin-top: 3px;
  }

  .spotlight-rating-strip {
    margin-top: 3px;
    padding: 2px 6px;
    gap: 4px;
    font-size: 0.6875rem;
  }

  .spotlight-compliance {
    font-size: 0.65rem;
    line-height: 1.3;
    margin-top: 2px;
  }

  .calculator-card {
    padding: 1rem;
  }
  
  .calc-form-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  /* Mobile Calculator & More Filters Toggle (IMG_0744) */
  .calc-advanced-filters.collapsed {
    display: none !important;
  }
  
  .calc-advanced-filters.expanded {
    display: flex !important;
    flex-direction: column;
    gap: 0.85rem;
    grid-column: 1 / -1;
    animation: fadeIn 0.2s ease-out;
  }
  
  .btn-update-group {
    display: flex !important;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    width: 100%;
  }

  .btn-more-filters {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  }

  .btn-more-filters:hover {
    background: #f1f5f9;
    color: #0f172a;
  }

  .btn-more-filters.active {
    background: #e0f2fe;
    border-color: #38bdf8;
    color: #0284c7;
  }

  .btn-update {
    flex: 1;
    padding: 0.8rem 1rem !important;
  }
  
  .rate-card-content {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.25rem;
  }
  
  .card-action-col {
    justify-content: space-between;
    width: 100%;
  }
  
  .promo-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
  }
  
  .btn-promo-action {
    width: 100%;
  }
  
  .inbox-alert-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  
  .btn-alert-subscribe {
    width: 100%;
  }
  
  .reviews-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Apple HIG Native Mobile Modal Bottom-Sheet (IMG_0751, IMG_0752) */
  .modal-overlay {
    padding: 0 !important;
    align-items: flex-end !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  .personalize-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    margin: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.25) !important;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative !important;
  }

  .card-alert-box {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    margin: 0 !important;
    animation: slideUpSheet 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }

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

  /* Native Apple Sheet Drag Grabber */
  .modal-sheet-grabber {
    display: block !important;
    width: 38px !important;
    height: 4.5px !important;
    background: #cbd5e1 !important;
    border-radius: 9999px !important;
    margin: 10px auto 4px !important;
    flex-shrink: 0 !important;
  }

  /* Close button pinned safely top-right with round tap target - ZERO overlap */
  .personalize-box .modal-close {
    position: absolute !important;
    top: 10px !important;
    right: 14px !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    background: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #475569 !important;
    font-size: 1.35rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 50 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  }

  .personalize-box .modal-close:active {
    background: #e2e8f0 !important;
    color: #0f172a !important;
  }

  /* Completely remove redundant marketing banner on mobile */
  .personalize-left {
    display: none !important;
  }

  .personalize-grid {
    display: flex !important;
    flex-direction: column !important;
    max-height: calc(90vh - 25px) !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* Dedicated smooth scroll container */
  .personalize-right {
    padding: 0.75rem 1.25rem 2rem !important;
    max-height: calc(90vh - 25px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .personalize-step-view h3 {
    font-size: 1.25rem !important;
    margin-top: 0.2rem !important;
    margin-bottom: 0.5rem !important;
    padding-right: 44px !important;
    line-height: 1.3 !important;
  }

  /* iOS Form fields minimum 16px to prevent automatic zooming */
  .personalize-edit-form input,
  .personalize-edit-form select {
    font-size: 16px !important;
  }

  /* High contrast Thumb Zone Action Buttons */
  .summary-actions .btn-summary-continue,
  .personalize-auth-view .btn-primary,
  .personalize-edit-form .btn-primary {
    min-height: 48px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
  }

  .matrix-table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .matrix-toolbar-left, .matrix-toolbar-right {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }
  
  .matrix-drawer-inner {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }
  
  .drawer-tabs-bar {
    padding: 10px 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  
  .drawer-tabs-nav {
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .drawer-tab-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .drawer-rate-badge {
    text-align: center;
  }
  
  .cashout-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .buydown-container {
    padding: 1rem;
  }

  .buydown-summary-cards {
    grid-template-columns: 1fr;
  }
  
  .amort-container {
    padding: 1rem;
  }
  
  .amort-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .pricing-matrix-table {
    min-width: 640px;
  }
  
  /* Mobile Rates Cards: Hide squished desktop table, show mobile cards */
  .matrix-table-wrap {
    display: none !important;
  }

  .mobile-rates-cards-container {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
    width: 100%;
  }

  .mobile-rate-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 2px 6px -1px rgba(50, 50, 93, 0.06), 0 1px 3px -1px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.2s ease;
  }

  .mobile-rate-card.popular-card {
    border: 2px solid #0284c7;
    box-shadow: 0 4px 14px -2px rgba(2, 132, 199, 0.15);
  }

  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
  }

  .mobile-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .mobile-card-product {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #0f172a;
  }

  .mobile-card-sub {
    font-size: 0.72rem;
    color: #64748b;
  }

  .mobile-card-body {
    padding: 12px 14px;
  }

  .mobile-card-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
    text-align: left;
  }

  .mobile-metric-item {
    display: flex;
    flex-direction: column;
  }

  .mobile-metric-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
  }

  .mobile-metric-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #061b31;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
  }

  .mobile-metric-val.rate {
    color: #0284c7;
  }

  .mobile-metric-val.payment {
    color: #059669;
  }

  .mobile-metric-sub {
    font-size: 0.6875rem;
    color: #94a3b8;
    margin-top: 1px;
  }

  .mobile-card-submetrics {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.775rem;
    color: #475569;
    margin-bottom: 12px;
  }

  .mobile-submetric-item strong {
    color: #0f172a;
  }

  .mobile-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .btn-mobile-details {
    appearance: none;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #334155;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 8px 12px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    flex: 1;
    transition: all 0.15s ease;
  }

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

  .btn-mobile-details.active {
    background: #f0f9ff;
    border-color: #0284c7;
    color: #0284c7;
  }

  .btn-mobile-details svg {
    transition: transform 0.2s ease;
  }

  .btn-mobile-save {
    appearance: none;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex: 1.1;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    transition: all 0.15s ease;
  }

  .btn-mobile-save:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  }

  .mobile-card-drawer {
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
    animation: fadeIn 0.2s ease-out;
  }

  .mobile-card-drawer.hidden {
    display: none !important;
  }

  .tab-label-full {
    display: none;
  }

  .tab-label-short {
    display: inline;
  }

  .modal-subscribe-content, .modal-personalize-content {
    width: 95% !important;
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 640px) {
  .amort-kpi-grid {
    grid-template-columns: 1fr;
  }

  .amort-actions-bar {
    flex-direction: column;
  }

  .amort-actions-bar button {
    width: 100%;
  }

  .cashout-chips {
    gap: 6px;
  }

  .cashout-chip-btn {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }
}

/* --- Mandatory Rate Table Regulatory Footer & Disclosures --- */
.rate-table-regulatory-footer {
  max-width: 1200px;
  margin: 1.75rem auto 2.5rem;
  padding: 1.75rem 2rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: #64748b;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.eho-badge {
  display: inline-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);
  width: 100%;
}

.regulatory-paragraph {
  margin-bottom: 0.85rem;
}

.regulatory-paragraph strong {
  color: #1e293b;
}

.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);
  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: #cbd5e1;
}

/* --- TCPA Consent Container --- */
.tcpa-consent-container {
  padding: 5px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-top: 4px;
  margin-bottom: 4px;
  text-align: left;
}

.tcpa-consent-container .checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.tcpa-consent-container input[type="checkbox"] {
  margin-top: 2px;
  width: 14px;
  height: 14px;
  cursor: pointer;
  accent-color: #026fcf;
  flex-shrink: 0;
}

.tcpa-text {
  font-size: 0.65rem; /* ~10.5px */
  color: #475569;
  line-height: 1.3;
}

.tcpa-text strong {
  color: #0f172a;
}

.terms-link-text {
  font-size: 0.65rem; /* ~10.5px */
  color: #64748b;
  margin-top: 3px;
  margin-left: 21px;
  line-height: 1.3;
}

.terms-link-text a {
  color: #026fcf;
  text-decoration: underline;
}

/* --- Gated Content & Lock Overlay for Non-Signed-In Users --- */
.gated-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.gated-content-blurred {
  filter: blur(5px) grayscale(25%);
  pointer-events: none !important;
  user-select: none !important;
  opacity: 0.45;
  transition: filter 0.25s ease, opacity 0.25s ease;
}

.gated-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 25;
  padding: 1.5rem;
}

.gated-lock-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.14), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  border-radius: 14px;
  padding: 2rem 2.25rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
  animation: fadeInGatedCard 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInGatedCard {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gated-lock-icon {
  width: 46px;
  height: 46px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0284c7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.gated-lock-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.01em;
}

.gated-lock-desc {
  font-size: 0.84rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 1.25rem 0;
}

.gated-lock-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-gated-unlock {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-gated-unlock:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.35);
}

.tab-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* 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); } }

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

/* Hero Desk & Matrix Header Live Indicators */
.hero-orb-wrap,
.matrix-orb-icon-wrap {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-orb-header-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 4px 16px rgba(2, 132, 199, 0.25));
}

/* Inline Modal Authentication Feedback Banner */
.auth-inline-feedback {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
  padding: 10px 14px;
  margin-bottom: 12px;
  line-height: 1.45;
  animation: fadeInModal 0.2s ease;
}

.auth-inline-feedback.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

/* Modern Unified OAuth Button & Divider */
.btn-oauth-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #0f172a;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.18s ease;
  box-sizing: border-box;
}

.btn-oauth-google:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateY(-0.5px);
}

.btn-oauth-google:active {
  transform: scale(0.99);
}

.btn-oauth-google svg {
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 10px 0;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 10px;
}



