/* ==========================================================================
   spx-portal.css
   ============================================================================
   Shared design-system stylesheet for SchoolPlex portal surfaces.
   Used by: /central/login, /onboarding, and any future auth/wizard screens.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
@import url('spx-core.css');


/* --------------------------------------------------------------------------
   2. BASE RESET
   -------------------------------------------------------------------------- */
.spx-portal-surface {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}


/* --------------------------------------------------------------------------
   3. TOP HEADER
   -------------------------------------------------------------------------- */
.spx-top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--spx-header-height);
    background: var(--spx-dark-bg);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    z-index: 1050;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.spx-top-header__brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   4. PAGE WRAPPER
   -------------------------------------------------------------------------- */
.spx-page-wrapper {
    min-height: 100vh;
    background: var(--spx-dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--spx-header-height) + 2rem) 2rem 2rem 2rem;
}


/* --------------------------------------------------------------------------
   5. SPLIT CONTAINER
   -------------------------------------------------------------------------- */
.spx-split-container {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: var(--spx-dark-card);
    border-radius: var(--spx-radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.spx-split-container--wide {
    max-width: 1300px;
    min-height: 750px;
    border-radius: var(--spx-radius-2xl);
    background: #fff;
}


/* --------------------------------------------------------------------------
   6. PANES
   -------------------------------------------------------------------------- */
.spx-pane-left {
    flex: 1;
    background: #fff;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.spx-pane-left--spread {
    justify-content: space-between;
    padding: 4rem;
}

.spx-pane-right {
    flex: 1.2;
    background: var(--spx-dark-card);
    padding: 3rem 4rem;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.spx-pane-right--dark {
    background: var(--spx-dark-surface);
    flex: 1.15;
    padding: 4rem;
    overflow-y: auto;
    justify-content: flex-start;
    position: relative;
}


/* --------------------------------------------------------------------------
   7. TYPOGRAPHY HELPERS
   -------------------------------------------------------------------------- */
.spx-brand-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--spx-brand-red);
    margin-bottom: 0.5rem;
}

.spx-section-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--spx-brand-red) !important;
    margin-bottom: 0.25rem;
}

.spx-subtitle {
    color: var(--spx-text-subtle);
    font-size: 0.95rem;
    font-weight: 500;
}

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


/* --------------------------------------------------------------------------
   8. ILLUSTRATION
   -------------------------------------------------------------------------- */
.spx-illustration {
    max-height: 250px;
    width: 100%;
    object-fit: contain;
}

.spx-illustration--lg {
    max-width: 440px;
    margin: 2rem auto;
}


/* --------------------------------------------------------------------------
   9. BUTTONS (Moved to spx-core.css)
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   10. FORM CONTROLS (Dark Pane)
   -------------------------------------------------------------------------- */
.spx-pane-right .spx-form-control,
.spx-pane-right .form-control {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: var(--spx-dark-bg);
    border-radius: var(--spx-radius-sm);
    height: var(--spx-input-height);
    padding: 0 1rem;
    font-weight: 500;
    font-size: 0.95rem;
    width: 100%;
    display: block;
    box-sizing: border-box;
}

.spx-pane-right .spx-form-control:focus,
.spx-pane-right .form-control:focus {
    border-color: var(--spx-brand-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.1);
    color: var(--spx-dark-bg);
    background: #fff;
    outline: none;
}

/* Dark-pane form controls (onboarding uses darker inputs) */
.spx-pane-right--dark .form-control,
.spx-pane-right--dark .form-select {
    background: var(--spx-dark-card);
    border: 1px solid var(--spx-dark-border);
    color: #fff;
    border-radius: var(--spx-radius-md);
    height: 58px;
    padding: 0 1.25rem;
}

.spx-pane-right--dark .form-control:focus,
.spx-pane-right--dark .form-select:focus {
    border-color: var(--spx-brand-red);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.15);
}

.spx-pane-right--dark .input-group-text {
    background: var(--spx-dark-card);
    border: 1px solid var(--spx-dark-border);
    border-left: none;
    color: var(--spx-text-muted);
    border-radius: 0 var(--spx-radius-md) var(--spx-radius-md) 0;
    height: 58px;
    font-weight: 600;
    padding: 0 1.25rem;
}

.spx-pane-right--dark .input-group .form-control {
    border-right: none;
    border-radius: var(--spx-radius-md) 0 0 var(--spx-radius-md);
}

.spx-pane-right--dark .input-group .form-floating {
    flex: 1 1 auto;
    width: 1%;
}

.spx-pane-right--dark .input-group .form-floating .form-control {
    width: 100%;
}


/* --------------------------------------------------------------------------
   11. DARK-PANE TEXT OVERRIDES
   -------------------------------------------------------------------------- */
.spx-pane-right .form-label,
.spx-pane-right--dark .form-label {
    color: var(--spx-text-light);
}

.spx-pane-right h2,
.spx-pane-right h3,
.spx-pane-right h4,
.spx-pane-right h6,
.spx-pane-right--dark h2,
.spx-pane-right--dark h3,
.spx-pane-right--dark h4,
.spx-pane-right--dark h6,
.spx-pane-right .text-dark,
.spx-pane-right--dark .text-dark {
    color: #fff;
}

.spx-pane-right .text-muted,
.spx-pane-right p.text-muted,
.spx-pane-right--dark .text-muted,
.spx-pane-right--dark p.text-muted {
    color: var(--spx-text-muted) !important;
}


/* --------------------------------------------------------------------------
   12. FORM WRAPPER
   -------------------------------------------------------------------------- */
.spx-form-wrapper {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}


/* --------------------------------------------------------------------------
   13. ALERTS (Dark Pane Overrides)
   -------------------------------------------------------------------------- */
.spx-alert {
    border-radius: var(--spx-radius-sm);
    padding: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.spx-alert--success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
    text-align: center;
}

.spx-alert--danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.spx-alert--danger ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}


/* --------------------------------------------------------------------------
   14. REMEMBER-ME / FORM-FOOTER
   -------------------------------------------------------------------------- */
.spx-form-check {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.spx-form-check__input {
    margin-right: 0.5rem;
    width: 14px;
    height: 14px;
    accent-color: var(--spx-brand-red);
}

.spx-form-check__label {
    color: var(--spx-text-muted);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.spx-form-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
}

.spx-form-footer__link {
    color: var(--spx-text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.spx-form-footer__link:hover {
    color: var(--spx-text-light);
}

.spx-form-footer__separator {
    color: var(--spx-dark-border);
    margin: 0 12px;
}

.spx-form-footer__action {
    border: none;
    background: transparent;
    color: var(--spx-brand-red);
    font-weight: 600;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.spx-form-footer__action:hover {
    opacity: 0.8;
}


/* --------------------------------------------------------------------------
   15. ERROR FEEDBACK
   -------------------------------------------------------------------------- */
.spx-error-feedback {
    display: none;
    font-size: 0.85rem;
    font-weight: 500;
}


/* --------------------------------------------------------------------------
   16. ANIMATION
   -------------------------------------------------------------------------- */
@keyframes spxFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.spx-fade-in {
    animation: spxFadeIn 0.3s ease-in-out;
}


/* --------------------------------------------------------------------------
   17. PROGRESS DOTS
   -------------------------------------------------------------------------- */
.spx-progress-dots {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.spx-progress-dot {
    height: 4px;
    flex: 1;
    background: var(--spx-dark-border);
    border-radius: 100px;
}

.spx-progress-dot--active {
    background: var(--spx-brand-red);
}

.spx-progress-dot--completed {
    background: #10b981;
}


/* --------------------------------------------------------------------------
   18. PILOT BADGE
   -------------------------------------------------------------------------- */
.spx-pilot-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: #fff1f2;
    color: var(--spx-brand-red);
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* --------------------------------------------------------------------------
   19. DARK-PANE CARD OVERRIDES (solution cards, package cards, etc.)
   -------------------------------------------------------------------------- */
.spx-pane-right--dark .solution-selection-card,
.spx-pane-right--dark .package-card,
.spx-pane-right--dark .billing-summary-card,
.spx-pane-right--dark .review-card,
.spx-pane-right--dark .bg-white,
.spx-pane-right--dark .bg-light,
.spx-pane-right--dark .wizard-intro,
.spx-pane-right--dark .wizard-intro-benefit,
.spx-pane-right--dark .review-billing-grid {
    background: var(--spx-dark-card) !important;
    border-color: var(--spx-dark-border) !important;
    color: #fff !important;
}

.spx-pane-right--dark .solution-selection-card:hover,
.spx-pane-right--dark .package-card:hover {
    border-color: var(--spx-brand-red) !important;
}

.spx-pane-right--dark .solution-selection-card.selected,
.spx-pane-right--dark .package-card.selected {
    border-color: var(--spx-brand-red) !important;
    background: rgba(225, 29, 72, 0.05) !important;
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15) !important;
}

.spx-pane-right--dark .sol-icon {
    background: var(--spx-dark-border) !important;
    color: var(--spx-brand-red) !important;
}

.spx-pane-right--dark .solution-selection-card.selected .sol-icon {
    background-color: var(--spx-brand-red) !important;
    color: #fff !important;
}

.spx-pane-right--dark .wizard-intro h4,
.spx-pane-right--dark .wizard-intro-benefit strong,
.spx-pane-right--dark .billing-summary-title,
.spx-pane-right--dark .review-card h6 {
    color: var(--spx-text-light) !important;
}

.spx-pane-right--dark .wizard-intro p {
    color: var(--spx-text-muted) !important;
}

.spx-pane-right--dark .wizard-terms {
    background: transparent !important;
    border-color: var(--spx-dark-border) !important;
}

.spx-pane-right--dark .wizard-terms .form-check-label {
    color: var(--spx-text-dimmed) !important;
}


/* --------------------------------------------------------------------------
   20. BRANDING BLOCK (left pane, onboarding)
   -------------------------------------------------------------------------- */
.spx-branding-text h1 {
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    color: var(--spx-text-body);
}

.spx-branding-text p {
    color: var(--spx-text-subtle);
    font-size: 1.15rem;
    max-width: 360px;
    line-height: 1.6;
}

.spx-branding-footer {
    font-size: 1rem;
    color: var(--spx-text-subtle);
}

.spx-branding-footer a {
    color: var(--spx-brand-red);
    font-weight: 700;
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   21. UTILITY CLASSES (Moved to spx-core.css)
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   22. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .spx-split-container {
        flex-direction: column;
    }

    .spx-pane-right {
        order: 1;
        padding: 2.5rem 1.5rem;
    }

    .spx-pane-left {
        order: 2;
        padding: 2.5rem 1.5rem;
        border-top: 1px solid var(--spx-dark-border);
    }

    .spx-pane-left .spx-illustration {
        display: none;
    }

    .spx-pane-left .spx-w-75 {
        width: 100%;
    }

    .spx-branding-text p {
        max-width: 100%;
    }

    .spx-illustration--lg {
        max-width: 300px;
    }

    .spx-page-wrapper {
        padding: calc(var(--spx-header-height) + 1rem) 1rem 1rem;
    }

    .spx-split-container--wide {
        min-height: auto;
    }

    .spx-pane-left--spread {
        padding: 2.5rem;
        text-align: center;
    }

    .spx-pane-right--dark {
        padding: 2.5rem;
    }
}
