/* ==========================================================================
   25schools Auth Pages — Professional Light Theme
   ========================================================================== */

:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --primary-light: #EEF2FF;
    --primary-50: #E0E7FF;
    --text-primary: #111827;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border-color: #D1D5DB;
    --border-light: #E5E7EB;
    --bg-page: #F9FAFB;
    --bg-white: #FFFFFF;
    --error-color: #DC2626;
    --error-bg: #FEF2F2;
    --error-border: #FECACA;
    --success-color: #059669;
    --success-bg: #ECFDF5;
    --success-border: #A7F3D0;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-stack);
    background: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Split-screen wrapper */
.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ---- Left branding panel ---- */
.auth-branding {
    display: none;
    width: 480px;
    min-width: 480px;
    background: linear-gradient(135deg, #4338CA 0%, #3B82F6 100%);
    color: #fff;
    padding: 3rem;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}

.branding-content { position: relative; z-index: 1; }

.branding-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}

.branding-logo-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
}

.branding-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.branding-heading {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.branding-subtext {
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

.branding-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.branding-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.branding-features li i {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* ---- Right form panel ---- */
.auth-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-white);
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 440px;
}

/* Mobile logo */
.mobile-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2rem;
}

.mobile-logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.mobile-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.025em;
}

/* Form header */
.form-header { margin-bottom: 1.75rem; }

.form-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
    letter-spacing: -0.025em;
}

.form-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* ---- Form controls ---- */
.form-floating { position: relative; }

.form-control {
    height: 48px;
    padding: 0.75rem 1rem;
    font-size: 0.925rem;
    color: var(--text-primary);
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    outline: none;
    color: var(--text-primary);
    background-color: var(--bg-white);
}

.form-floating > .form-control {
    height: 52px;
    padding: 1.25rem 1rem 0.5rem;
}

.form-floating > label {
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-size: 0.925rem;
    border: none;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.8) translateY(-0.6rem) translateX(0.1rem);
    color: var(--primary);
    background: var(--bg-white);
    padding: 0.15rem 0.4rem;
    height: auto;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.form-check-input { border-color: var(--border-color); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12); border-color: var(--primary); }
.form-check-label { color: var(--text-secondary); font-size: 0.875rem; }

.password-mask { -webkit-text-security: disc; text-security: disc; }

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 3;
    padding: 4px;
    transition: color 0.15s ease;
}

.password-toggle:hover { color: var(--text-secondary); }

/* ---- Buttons ---- */
.btn-primary-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background-color: var(--primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.btn-primary-custom:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    color: #fff;
    text-decoration: none;
}

.btn-primary-custom:disabled { opacity: 0.6; cursor: not-allowed; }

.loading-spinner { display: none; margin-left: 0.5rem; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Alerts ---- */
.alert {
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.alert-danger {
    background-color: var(--error-bg);
    color: var(--error-color);
    border: 1px solid var(--error-border);
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-color);
    border: 1px solid var(--success-border);
}

.error-message {
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

/* ---- Links ---- */
.auth-links { text-align: center; margin-top: 1.5rem; }

.auth-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.auth-links a:hover { color: var(--primary-hover); text-decoration: underline; }

.form-footer-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-footer-link:hover { color: var(--primary-hover); text-decoration: underline; }

/* ---- Responsive ---- */
@media (min-width: 992px) {
    .auth-branding { display: flex; }
    .mobile-logo { display: none; }
}

@media (max-width: 991.98px) {
    .auth-form-panel {
        padding: 1.5rem;
        align-items: flex-start;
        padding-top: 3rem;
    }
}

@media (max-width: 575.98px) {
    .auth-form-panel { padding: 1rem; padding-top: 2rem; }
    .form-title { font-size: 1.3rem; }
}

/* Signup pages: more room for longer forms */
.auth-form-panel.signup-panel {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.auth-form-panel.signup-panel .auth-form-container {
    max-width: 480px;
}
