:root {
    /* ── Updated Brand Colors ── */
    --navy-deep: #0B1628;
    --navy-mid: #152340;
    --navy-light: #1E3460;
    --navy-accent: #2A4A80;
    --blue-highlight: #3B6CC7;
    --blue-glow: #4F85E8;

    /* ── Legacy aliases (kept for backward compat) ── */
    --raisin-black: #0B1628;
    --onyx: #152340;
    --battleship-gray: #6B7A99;
    --penn-red: #3B6CC7;        /* swapped: blue replaces red as primary accent */
    --eerie-black: #060D1A;

    /* ── Neutrals ── */
    --white: #ffffff;
    --light-gray: #F4F6FA;
    --medium-gray: #E8ECF4;
    --dark-gray: #CDD4E4;

    /* ── Gray scale ── */
    --gray-100: #F4F6FA;
    --gray-200: #E8ECF4;
    --gray-300: #CDD4E4;
    --gray-400: #A0AABF;
    --gray-500: #6B7A99;
    --gray-600: #4A556E;

    /* ── Semantic ── */
    --success: #22863a;
    --error: #c0392b;
    --warning: #d68910;
    --info: #2471a3;

    /* ── Radii ── */
    --border-radius: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* ── Shadows ── */
    --shadow-sm: 0 1px 3px rgba(11,22,40,0.10), 0 1px 2px rgba(11,22,40,0.08);
    --shadow-md: 0 4px 12px rgba(11,22,40,0.12), 0 1px 4px rgba(11,22,40,0.08);
    --shadow-lg: 0 10px 24px rgba(11,22,40,0.14), 0 4px 8px rgba(11,22,40,0.08);
    --shadow-xl: 0 20px 40px rgba(11,22,40,0.18), 0 8px 16px rgba(11,22,40,0.10);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--white);
    background: linear-gradient(145deg, var(--navy-deep) 0%, var(--navy-mid) 60%, #0D1E3A 100%);
    min-height: 100vh;
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── HEADER ── */
header {
    padding: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(11,22,40,0.10);
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    height: 72px;
}

/* ── LOGO ── */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--navy-deep);
    transition: all 0.3s ease;
}

.logo-img {
    width: 130px;
    height: 90px;
    transition: all 0.3s ease;
    object-fit: contain;
}

.logo-text {
    font-weight: 800;
    background: linear-gradient(135deg, var(--navy-deep), var(--gray-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo:hover .logo-img {
    transform: scale(1.06);
}

.logo:hover .logo-text {
    background: linear-gradient(135deg, var(--blue-highlight), var(--blue-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── NAV LINKS ── */
.nav-links {
    display: flex;
    gap: 0.25rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.25s ease;
    font-size: 15px;
    position: relative;
    padding: 8px 16px;
    border-radius: var(--border-radius);
}

.nav-links a:hover {
    color: var(--navy-deep);
    background: var(--gray-100);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 2px;
    left: 50%;
    background-color: var(--blue-highlight);
    transition: all 0.3s ease;
}

.nav-links a:hover::after {
    width: 60%;
    left: 20%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--navy-deep);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

/* ── FORM CONTAINER ── */
.form-container {
    max-width: 450px;
    margin: 120px auto 40px;
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    color: var(--navy-deep);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Top accent bar — now blue gradient */
.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-highlight), var(--blue-glow), var(--blue-highlight));
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 200% 0; }
    50%       { background-position: -200% 0; }
}

.form-container h2 {
    text-align: center;
    color: var(--navy-deep);
    margin-bottom: 0.5rem;
    font-size: 2rem;
    font-weight: 800;
    font-family: 'Sora', 'Inter', sans-serif;
    letter-spacing: -0.5px;
}

.form-container p {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    font-size: 1rem;
    font-weight: 400;
}

/* ── FORM GROUPS ── */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group.has-icon {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--navy-deep);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* ── INPUTS ── */
.form-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 400;
    color: var(--navy-deep);
    background: var(--white);
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    z-index: 1;
}

.form-group input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
    opacity: 0.85;
}

.form-group input:focus {
    border-color: var(--blue-highlight);
    box-shadow: 0 0 0 3px rgba(59, 108, 199, 0.12);
    background: var(--white);
}

.form-group input:focus + .input-icon {
    color: var(--blue-highlight);
    transform: translateY(-50%) scale(1.1);
}

.form-group input:valid {
    border-color: var(--success);
}

.form-group input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: var(--error);
}

/* ── INPUT ICONS ── */
.input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1rem;
    transition: all 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

/* ── PASSWORD CONTAINER ── */
.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-container input {
    padding-right: 3.5rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: var(--blue-highlight);
    background: rgba(59, 108, 199, 0.08);
}

.password-toggle:focus {
    outline: 2px solid var(--blue-highlight);
    outline-offset: 2px;
}

/* ── ERROR TEXT ── */
.error-text {
    display: none;
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.5rem;
    font-weight: 500;
    padding-left: 0.5rem;
}

.form-group.error .error-text {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

.form-group.error input {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}

.form-group.error .input-icon {
    color: var(--error);
}

.form-group.success input {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(34, 134, 58, 0.10);
}

.form-group.success .input-icon {
    color: var(--success);
}

/* ── ALERT MESSAGES ── */
.error-message,
.security-warning,
.success-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: var(--border-radius);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-message {
    background-color: #fdecea;
    color: #922b21;
    border: 1px solid #f5c0bb;
}

.success-message {
    background-color: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

.security-warning {
    background-color: #fef9e7;
    color: #9a7d0a;
    border: 1px solid #f9e79f;
}

.error-message i,
.success-message i,
.security-warning i {
    font-size: 16px;
    flex-shrink: 0;
}

/* ── BUTTONS ── */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: var(--border-radius-xl);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    font-family: 'DM Sans', 'Inter', sans-serif;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-highlight), var(--navy-light));
    color: var(--white);
    box-shadow: 0 8px 24px rgba(59, 108, 199, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-glow), var(--blue-highlight));
    box-shadow: 0 12px 32px rgba(79, 133, 232, 0.45);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.form-container .btn {
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
}

.form-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.btn.loading { color: transparent; }

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -0.75rem;
    margin-left: -0.75rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── SIGN UP / FORGOT / BACK LINKS ── */
.signup-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.signup-link p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin: 0;
}

.signup-link a,
.forgot-password-link a,
.back-to-login a,
.resend-link {
    color: var(--blue-highlight);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
}

.signup-link a:hover,
.forgot-password-link a:hover,
.back-to-login a:hover,
.resend-link:hover {
    color: var(--blue-glow);
    text-decoration: underline;
}

.forgot-password-link {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 20px;
}

.forgot-password-link a { font-size: 14px; }

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.resend-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    margin-top: 15px;
}

/* ── OTP INPUT ── */
.otp-input {
    text-align: center;
    font-size: 24px;
    letter-spacing: 10px;
    font-weight: 700;
    color: var(--navy-deep);
}

/* ── COUNTDOWN ── */
.countdown-timer {
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    margin-top: 15px;
}

.countdown-timer.warning {
    color: var(--error);
    font-weight: 600;
}

/* ── FORM SUBTITLE ── */
.form-subtitle {
    color: var(--gray-500);
    margin-bottom: 25px;
    font-size: 14px;
    text-align: center;
}

/* ── STEP INDICATOR ── */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-400);
    transition: color 0.3s ease;
}

.step.active { color: var(--blue-highlight); }

.step-number {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: var(--blue-highlight);
    box-shadow: 0 0 0 4px rgba(59, 108, 199, 0.18);
}

.step.completed .step-number {
    background: var(--success);
}

/* ── HERO (kept for pages that use it) ── */
.hero {
    padding: 150px 0 100px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 800;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

/* ── STATS (kept for pages that use it) ── */
.stats {
    padding: 80px 0;
    text-align: center;
    color: var(--navy-deep);
    background: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    padding: 2rem 1rem;
    background: var(--navy-deep);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.3s ease;
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: var(--navy-light);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--blue-glow);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.85;
    font-weight: 500;
}

/* ── FOOTER ── */
.footer {
    padding: 40px 0 28px;
    background: var(--navy-deep);
    color: var(--white);
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */

/* Tablet — 1024px */
@media (max-width: 1024px) {
    .container { padding: 0 15px; }
    .form-container { max-width: 500px; padding: 2rem; }
    .nav-links { gap: 1.5rem; }
    .logo-img { width: 110px; height: 75px; }
}

/* Mobile — 768px */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        padding: 1rem 0;
        display: none;
        animation: slideDown 0.3s ease-out;
        border-top: 1px solid var(--gray-200);
    }

    .nav-links.active { display: flex; }

    .nav-links a {
        padding: 1rem 2rem;
        border-radius: 0;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-links a:last-child { border-bottom: none; }
    .nav-links a::after { display: none; }

    .nav-links a:hover {
        background: var(--gray-100);
        color: var(--navy-deep);
    }

    .hero { padding: 120px 0 80px; }
    .cta-buttons { flex-direction: column; align-items: center; }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .stat-item { padding: 1.5rem 1rem; }

    .form-container {
        margin: 100px auto 20px;
        padding: 2rem;
        max-width: 95%;
    }

    .form-container h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
    .form-container p { font-size: 0.95rem; margin-bottom: 2rem; }
    .form-group { margin-bottom: 1.25rem; }

    .form-group input {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 1rem;
    }

    .input-icon { left: 0.875rem; font-size: 0.875rem; }
    .password-toggle { right: 0.875rem; }
    .form-group label { font-size: 0.8rem; margin-bottom: 0.4rem; }
    .error-text { font-size: 0.7rem; margin-top: 0.4rem; }

    .error-message,
    .success-message,
    .security-warning { padding: 0.875rem; font-size: 0.8rem; margin-bottom: 1.25rem; }

    .form-container .btn { padding: 0.875rem 2rem; font-size: 0.95rem; }
    .signup-link { margin-top: 1.75rem; padding-top: 1.25rem; }
    .signup-link p { font-size: 0.8rem; }

    .step-indicator { gap: 1rem; padding: 0.75rem 0; margin-bottom: 1.75rem; }
    .step { font-size: 0.75rem; gap: 0.4rem; }
    .step-number { width: 1.75rem; height: 1.75rem; font-size: 0.65rem; }
    .logo-img { width: 100px; height: 65px; }
}

/* Small Mobile — 480px */
@media (max-width: 480px) {
    .container { padding: 0 1rem; }
    .logo-img { width: 90px; height: 55px; }
    .hero { padding: 100px 0 60px; }
    .stats { padding: 60px 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
    .stat-item { padding: 1.5rem 0.5rem; }

    .form-container {
        margin: 100px auto 20px;
        padding: 1.5rem;
        max-width: 98%;
        border-radius: var(--border-radius-lg);
    }

    .form-container h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .form-container p { font-size: 0.9rem; margin-bottom: 1.75rem; }
    .form-group { margin-bottom: 1rem; }

    .form-group input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.95rem;
    }

    .input-icon { left: 0.75rem; font-size: 0.8rem; }
    .password-toggle { right: 0.75rem; font-size: 0.85rem; }
    .password-container input { padding-right: 3rem; }
    .form-group label { font-size: 0.75rem; margin-bottom: 0.35rem; }
    .error-text { font-size: 0.65rem; margin-top: 0.35rem; }

    .error-message,
    .success-message,
    .security-warning { padding: 0.75rem; font-size: 0.75rem; margin-bottom: 1rem; }

    .form-container .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; margin-top: 0.75rem; }
    .signup-link { margin-top: 1.5rem; padding-top: 1rem; }
    .signup-link p { font-size: 0.75rem; }

    .step-indicator {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
        margin-bottom: 1.5rem;
        padding: 0.5rem 0;
    }

    .step { font-size: 0.7rem; }
    .step-number { width: 1.5rem; height: 1.5rem; font-size: 0.6rem; }
}

/* Extra Small — 360px */
@media (max-width: 360px) {
    .form-container { margin: 90px auto 20px; padding: 1.25rem; }
    .form-container h2 { font-size: 1.35rem; }

    .form-group input {
        padding: 0.7rem 0.7rem 0.7rem 2.25rem;
        font-size: 0.9rem;
    }

    .input-icon { left: 0.7rem; font-size: 0.75rem; }
    .password-toggle { right: 0.7rem; font-size: 0.8rem; }
    .form-container .btn { padding: 0.7rem 1.25rem; font-size: 0.85rem; }
    .logo-img { width: 80px; height: 50px; }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .form-container { margin: 80px auto 20px; padding: 1.5rem; }
    .form-container h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
    .form-container p { margin-bottom: 1.5rem; }
    .form-group { margin-bottom: 1rem; }
    .step-indicator { margin-bottom: 1rem; padding: 0.5rem 0; }
    .signup-link { margin-top: 1rem; padding-top: 1rem; }
}