/* ==========================================================================
   MyMortgageCost.com - Premium Co-Branded Mortgage Hub Styling
   ========================================================================== */

:root {
    --bg-dark: #0f172a;
    --bg-card-dark: #1e293b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --primary-blue: #2563eb;
    --primary-hover: #1d4ed8;
    --accent-emerald: #059669;
    --emerald-light: #10b981;
    --accent-gold: #f59e0b;
    --accent-cyan: #06b6d4;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --border-light: #e2e8f0;
    --border-dark: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(37, 99, 235, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: #f1f5f9;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.accent-text { color: var(--primary-blue); }
.text-emerald { color: var(--accent-emerald); }
.text-gold { color: var(--accent-gold); }
.mt-2 { margin-top: 1rem; }

/* Dev Switcher Bar */
.dev-banner {
    background: linear-gradient(90deg, #1e1b4b, #312e81);
    color: #e0e7ff;
    padding: 10px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-banner-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dev-badge {
    background: #4f46e5;
    color: white;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.dev-agent-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dev-agent-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #e0e7ff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.dev-agent-btn:hover, .dev-agent-btn.active {
    background: #38bdf8;
    color: #0f172a;
    font-weight: 700;
    border-color: #38bdf8;
}

.dev-close-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
}

.dev-close-btn:hover {
    background: #ef4444;
    color: white;
}

.dev-url-preview code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: #38bdf8;
}

/* Header */
.main-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary-blue), #1d4ed8);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    display: block;
    line-height: 1.2;
}

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

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-blue);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-emerald {
    background: linear-gradient(135deg, var(--accent-emerald), #047857);
    color: white;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-emerald:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-light);
    color: var(--text-dark);
}

.btn-outline:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.05);
}

.btn-outline-light,
.dark-theme .btn-outline,
.signup-form-card .btn-outline,
.modal-card .btn-outline,
.dark-section .btn-outline {
    border-color: rgba(255, 255, 255, 0.25);
    color: #f8fafc !important;
    background: rgba(255, 255, 255, 0.05);
}

.btn-outline-light:hover,
.dark-theme .btn-outline:hover,
.signup-form-card .btn-outline:hover,
.modal-card .btn-outline:hover,
.dark-section .btn-outline:hover {
    border-color: #10b981;
    color: white !important;
    background: rgba(16, 185, 129, 0.2);
}

.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* Hero / Co-Branding Card */
.hero-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    padding: 48px 0 64px 0;
    color: white;
}

.cobrand-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.cobrand-header {
    text-align: center;
    margin-bottom: 24px;
}

.cobrand-badge {
    background: rgba(37, 99, 235, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.cobrand-partners {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.partner-box {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: var(--transition);
}

.partner-box:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
}

.avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.partner-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.role-tag {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.realtor-tag { background: #059669; color: white; }
.mlo-tag { background: #2563eb; color: white; }

.partner-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.partner-title {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.partner-sub {
    font-size: 0.8rem;
    color: #cbd5e1;
    font-weight: 600;
    margin-bottom: 10px;
}

.partner-contacts {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    transition: var(--transition);
}

.contact-pill:hover {
    background: #2563eb;
    color: white;
}

.cobrand-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.divider-line {
    width: 2px;
    height: 35px;
    background: rgba(255, 255, 255, 0.15);
}

.divider-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 0.85rem;
    margin: 6px 0;
}

.cobrand-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.cobrand-quote {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-style: italic;
    max-width: 650px;
}

.cobrand-actions {
    display: flex;
    gap: 12px;
}

/* Sections */
.section-block {
    padding: 64px 0;
}

.dark-section {
    background: #0f172a;
    color: white;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 64px 20px;
}

.section-header {
    margin-bottom: 40px;
}

.section-header.center {
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 8px 0;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

.light-text p { color: #94a3b8; }

.section-tag {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.section-tag.alt {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.calc-inputs-card, .calc-results-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.input-group {
    margin-bottom: 20px;
}

.input-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.input-label-row label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.input-display {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary-blue);
    background: rgba(37, 99, 235, 0.08);
    padding: 2px 10px;
    border-radius: var(--radius-sm);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.range-bounds {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.input-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-row-triple {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.select-input, .number-input, .text-input, .textarea-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #f8fafc;
    outline: none;
    transition: var(--transition);
}

.select-input:focus, .number-input:focus, .text-input:focus, .textarea-input:focus {
    border-color: var(--primary-blue);
    background: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.currency-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.currency-symbol {
    position: absolute;
    left: 14px;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-blue);
    pointer-events: none;
}

.currency-input {
    padding-left: 28px !important;
    font-weight: 700;
}

.accordion-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f1f5f9;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-dark);
    margin-top: 12px;
    transition: var(--transition);
}

.accordion-toggle:hover {
    background: #e2e8f0;
}

.advanced-settings-panel {
    display: block;
    margin-top: 16px;
    padding: 16px;
    background: #f8fafc;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
}

.debt-guidelines-panel {
    margin-top: 16px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
}

.guidelines-heading {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.guidelines-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.guidelines-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.guideline-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.guideline-item .item-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.guideline-item p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0;
}

.student-loan-rules-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.loan-rule-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    position: relative;
}

.loan-rule-card h5 {
    font-size: 0.88rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.loan-rule-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0;
}

.rule-badge {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-bottom: 6px;
}

.rule-badge.fha { background: rgba(16, 185, 129, 0.12); color: #047857; }
.rule-badge.conv { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.rule-badge.va { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.rule-badge.usda { background: rgba(147, 51, 234, 0.12); color: #6b21a8; }

.advanced-settings-panel.open {
    display: block;
}

.help-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: block;
}

/* Results Box */
.total-payment-box {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: white;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.total-label {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-amount {
    font-size: 3rem;
    font-weight: 800;
    color: #38bdf8;
    line-height: 1.1;
    margin: 6px 0;
}

.total-amount span {
    font-size: 1.25rem;
    color: #94a3b8;
    font-weight: 500;
}

/* Income, DTI & Max Housing Payment Cards */
.dti-summary-cards {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 12px;
    margin-bottom: 20px;
}

.dti-metric-box {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-align: center;
}

.dti-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    display: block;
}

.dti-val {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin: 2px 0;
    display: block;
}

.dti-val.text-primary { color: var(--primary-blue); }

.highlighted-dti {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.dti-status-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: #10b981;
    color: white;
    text-transform: uppercase;
}

.dti-status-pill.warning {
    background: #f59e0b;
}

.dti-status-pill.danger {
    background: #ef4444;
}

/* Max Housing Payment Cards Grid (Matching cleared2close calculator design!) */
.max-payment-section {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 24px;
}

.max-payment-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.max-payment-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.max-card {
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: var(--transition);
    position: relative;
}

.max-card.card-qualified {
    border-color: #10b981 !important;
    background: rgba(16, 185, 129, 0.03);
}

.max-card.card-warning {
    border-color: #f59e0b !important;
    background: rgba(245, 158, 11, 0.03);
}

.max-card.card-disqualified {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.03);
    opacity: 0.9;
}

.max-card:hover {
    box-shadow: var(--shadow-sm);
}

.qual-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 6px;
}

.qual-badge.green {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.qual-badge.amber {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.qual-badge.red {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.max-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.max-card-name {
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.max-card-dti {
    font-size: 0.72rem;
    font-weight: 800;
    color: #059669;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
}

.max-card-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
    margin-bottom: 4px;
}

.max-card-desc {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Amortization Schedule Card & Table Styles */
.amortization-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

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

.amort-title {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 6px;
}

.amort-toggle-group {
    display: flex;
    background: #e2e8f0;
    padding: 2px;
    border-radius: var(--radius-full);
}

.amort-tab-btn {
    border: none;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.amort-tab-btn.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.amort-table-box {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: white;
}

.amort-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.amort-table th {
    background: #0f172a;
    color: white;
    padding: 8px 10px;
    font-weight: 700;
    font-size: 0.76rem;
    position: sticky;
    top: 0;
}

.amort-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-dark);
}

.amort-table tr:nth-child(even) td {
    background: #f8fafc;
}

.wide-modal {
    max-width: 900px !important;
    width: 92% !important;
}

.full-amort-table-container {
    max-height: 440px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-top: 10px;
}
    color: var(--text-muted);
    line-height: 1.3;
}

/* Breakdown Visual */
.breakdown-bars {
    display: flex;
    height: 14px;
    border-radius: 7px;
    overflow: hidden;
    margin-bottom: 20px;
    background: #e2e8f0;
}

.breakdown-bar-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.segment-pi { background: #2563eb; }
.segment-tax { background: #059669; }
.segment-ins { background: #f59e0b; }
.segment-pmi { background: #dc2626; }
.segment-hoa { background: #8b5cf6; }

.breakdown-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.88rem;
    font-weight: 600;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.legend-name { flex: 1; color: var(--text-dark); }
.legend-val { font-weight: 800; color: var(--text-dark); }

/* Booster */
.payoff-booster-card {
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.booster-header {
    font-weight: 800;
    font-size: 0.88rem;
    margin-bottom: 10px;
}

.extra-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.extra-val {
    font-weight: 800;
    color: var(--accent-emerald);
    min-width: 90px;
}

.savings-alert {
    margin-top: 10px;
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

/* Quiz Wizard */
.quiz-card {
    background: var(--bg-card-dark);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.quiz-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.quiz-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #334155;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-step-dot:hover {
    background: #475569;
    color: white;
    transform: scale(1.1);
}

.quiz-step-dot.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.quiz-step-dot.completed {
    background: var(--accent-emerald);
    color: white;
}

.quiz-step-line {
    width: 60px;
    height: 3px;
    background: #334155;
    transition: var(--transition);
}

.quiz-step-line.active { background: var(--primary-blue); }

.quiz-step-panel {
    display: none;
}

.quiz-step-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.quiz-question {
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 24px;
    color: white;
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.quiz-option-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.quiz-option-card:hover, .quiz-option-card.selected {
    background: rgba(37, 99, 235, 0.2);
    border-color: #3b82f6;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
}

.quiz-option-card.selected {
    border-width: 2px;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
}
    transform: translateY(-3px);
}

.option-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    color: #38bdf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 12px auto;
}

.quiz-option-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: white;
}

.quiz-option-card p {
    font-size: 0.8rem;
    color: #94a3b8;
}

.quiz-results-header {
    text-align: center;
    margin-bottom: 24px;
}

.quiz-results-header i {
    font-size: 3rem;
    margin-bottom: 12px;
}

.quiz-results-header h3 {
    font-size: 1.6rem;
    color: white;
}

.quiz-results-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.matched-loan-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #10b981;
    border-radius: var(--radius-md);
    padding: 20px;
}

.matched-loan-card h4 {
    color: #34d399;
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.matched-loan-card p {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.quiz-results-footer {
    text-align: center;
}

/* Checklist Section */
.checklist-container {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.checklist-tabs {
    display: flex;
    background: #f1f5f9;
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
}

.checklist-tab {
    flex: 1;
    padding: 16px 20px;
    background: transparent;
    border: none;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.checklist-tab:hover { color: var(--primary-blue); }
.checklist-tab.active {
    background: white;
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

.checklist-panel {
    display: none;
    padding: 32px;
}

.checklist-panel.active { display: block; }

.checklist-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checklist-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.checklist-item:hover {
    background: white;
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-sm);
}

.checklist-item input[type="checkbox"] {
    display: none;
}

.custom-check {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.checklist-item input[type="checkbox"]:checked + .custom-check {
    background: var(--accent-emerald);
    border-color: var(--accent-emerald);
    color: white;
}

.item-text strong {
    font-size: 0.95rem;
    color: var(--text-dark);
    display: block;
}

.item-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.checklist-footer {
    padding: 20px 32px;
    background: #f8fafc;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.checklist-progress-box {
    flex: 1;
    max-width: 450px;
}

.progress-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: block;
}

.progress-bar-bg {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-emerald), var(--emerald-light));
    transition: width 0.3s ease;
}

/* Loan Types Grid */
.loan-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.loan-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.loan-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.loan-card.highlighted {
    border: 2px solid var(--accent-emerald);
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.15);
}

.loan-card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-conventional, .loan-card-badge.conventional { background: #e0e7ff; color: #3730a3; }
.loan-card-badge.fha { background: #d1fae5; color: #065f46; }
.loan-card-badge.va { background: #fee2e2; color: #991b1b; }
.loan-card-badge.usda { background: #fef3c7; color: #92400e; }

.loan-card h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.loan-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.loan-features {
    list-style: none;
    margin-bottom: 24px;
    flex: 1;
}

.loan-features li {
    font-size: 0.85rem;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.loan-features li i {
    margin-top: 3px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

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

.modal-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 540px;
    padding: 32px;
    position: relative;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: var(--transition);
}

.modal-close:hover { background: #e2e8f0; color: var(--text-dark); }

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-cobrand-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}

.mini-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-blue);
}

.mini-plus {
    font-weight: 800;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.modal-header h3 {
    font-size: 1.35rem;
    font-weight: 800;
}

.modal-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}

/* Toast */
.sync-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #0f172a;
    color: white;
    border: 1px solid #10b981;
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    max-width: 420px;
}

.sync-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon i { font-size: 1.6rem; }
.toast-content h4 { font-size: 0.95rem; font-weight: 800; }
.toast-content p { font-size: 0.78rem; color: #94a3b8; }

/* Live Daily Rate Feed Banner & Rate Badges */
.rate-feed-banner {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    margin-bottom: 24px;
}

.rate-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: white;
    font-size: 0.88rem;
}

.rate-pulse-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlow 1.8s infinite;
}

@keyframes pulseGlow {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.8; }
}

.rate-feed-title {
    font-weight: 800;
    color: #f8fafc;
    font-size: 0.95rem;
}

.rate-source-tag {
    color: #94a3b8;
    font-size: 0.78rem;
    font-style: italic;
}

.rate-date-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    font-weight: 800;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.card-live-rate {
    background: #f1f5f9;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin: 10px 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rate-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.rate-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue);
}

.btn-use-rate {
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-use-rate:hover {
    background: #1d4ed8;
    transform: scale(1.04);
}

/* Full Compliance Footer */
.main-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 48px 0 32px;
    border-top: 1px solid var(--border-dark);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand-box .brand-name {
    font-size: 1.4rem;
}

.footer-tagline {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 4px;
}

.eho-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.eho-icon {
    font-size: 1.8rem;
    color: #38bdf8;
}

.eho-text {
    display: flex;
    flex-direction: column;
}

.eho-text strong {
    font-size: 0.82rem;
    color: white;
    letter-spacing: 0.5px;
}

.eho-text span {
    font-size: 0.72rem;
    color: #94a3b8;
}

.footer-nmls-box {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 0.83rem;
    color: #e2e8f0;
}

.nmls-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nmls-link {
    color: #38bdf8;
    text-decoration: underline;
    font-weight: 600;
}

.nmls-link:hover {
    color: #7dd3fc;
}

.footer-disclaimer-text {
    font-size: 0.76rem;
    line-height: 1.6;
    color: #64748b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 20px;
}

.footer-disclaimer-text strong {
    color: #94a3b8;
}

.footer-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.78rem;
    color: #64748b;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-legal-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal-links a:hover {
    color: #38bdf8;
}

.footer-legal-links .sep {
    color: #334155;
}

/* Partner Portal Registration Styles */
.partner-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.76rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-left: 10px;
}

.signup-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 36px;
    align-items: start;
}

.signup-form-card {
    background: #0f172a;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-lg);
    color: #f8fafc;
}

.signup-form-card .form-group label,
.modal-card .form-group label {
    color: #f8fafc;
    font-weight: 700;
}

.signup-form-card .help-text,
.modal-card .help-text {
    color: #94a3b8;
}

.form-title {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

.slug-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.slug-prefix {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 10px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.slug-input {
    border: none !important;
    background: transparent !important;
    padding-left: 10px !important;
    color: #f8fafc !important;
}

.preview-sticky-box {
    position: sticky;
    top: 90px;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.15);
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
}

.preview-url-box {
    background: #0f172a;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

/* Preview Column Card Styling */
.preview-column .cobrand-card {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: var(--radius-lg);
    padding: 24px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    color: #f8fafc !important;
}

.preview-column .cobrand-partners {
    flex-direction: column !important;
    gap: 16px !important;
}

.preview-column .partner-box {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 14px 16px !important;
    border-radius: var(--radius-md) !important;
}

.preview-column .partner-avatar {
    width: 72px !important;
    height: 72px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #3b82f6 !important;
    flex-shrink: 0 !important;
}

.preview-column .partner-details {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.preview-column .partner-role {
    font-size: 0.68rem !important;
    font-weight: 800 !important;
    color: #38bdf8 !important;
    letter-spacing: 0.5px !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.preview-column .partner-details h3 {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    margin: 0 0 2px 0 !important;
    word-break: break-word !important;
}

.preview-column .partner-sub,
.preview-column .partner-brokerage {
    color: #cbd5e1 !important;
    font-size: 0.8rem !important;
    line-height: 1.35 !important;
    margin: 0 !important;
    word-break: break-word !important;
}

.preview-column .contact-pill {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    padding: 3px 8px !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    margin-top: 6px !important;
}

.url-label {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

.url-display {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 800;
    color: #34d399;
}

.success-icon-box {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

.copy-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.modal-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
    .calculator-grid, .signup-grid { grid-template-columns: 1fr; }
    .cobrand-partners { flex-direction: column; }
    .partner-box { width: 100%; }
    .cobrand-divider { display: none; }
    .checklist-items-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .input-row-triple { grid-template-columns: 1fr; }
    .rate-feed-header { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
    .input-row-dual, .form-row-dual, .quiz-results-cards { grid-template-columns: 1fr; }
    .hero-section { padding: 24px 0; }
    .cobrand-card { padding: 20px; }
    .partner-box { flex-direction: column; text-align: center; }
    .partner-contacts { justify-content: center; }
}
