﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

:root {
    --nav-h: 72px;
    --foot-h: 64px;
    --primary: #2a7de1;
    --primary-dark: #1b5fbf;
}

html {
    height: 100%;
}

/* ========== FIXED NAVBAR / FOOTER LAYOUT ========== */
body {
    background: #f0f4f8;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: var(--nav-h);
    padding-bottom: var(--foot-h);
    overflow-x: hidden;
}

/* ---------- FIXED NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-h);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    border-bottom: 1px solid #e9edf2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: #1a3b5d;
}

    .logo i {
        color: var(--primary);
        font-size: clamp(1.4rem, 3vw, 1.9rem);
    }

.nav-links {
    display: flex;
    gap: clamp(0.8rem, 2vw, 2rem);
    align-items: center;
    font-weight: 500;
}

    .nav-links a {
        text-decoration: none;
        color: #2c3e50;
        font-size: clamp(0.85rem, 1.5vw, 1rem);
        transition: color 0.2s;
    }

        .nav-links a:hover {
            color: var(--primary);
        }

    .nav-links .btn-nav {
        background: var(--primary);
        color: white !important;
        padding: 0.5rem 1.4rem;
        border-radius: 30px;
        font-weight: 600;
        font-size: clamp(0.8rem, 1.4vw, 0.9rem);
        box-shadow: 0 4px 12px rgba(42,125,225,0.3);
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

        .nav-links .btn-nav:hover {
            background: var(--primary-dark);
        }

/* ---------- MAIN SCROLLABLE AREA ---------- */
.main-content {
    flex: 1;
    display: flex;
    align-items: stretch;
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1519494026892-80bbd2d6fd0d?q=80&w=2053&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

    .main-content::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(10, 30, 50, 0.5);
        z-index: 1;
        pointer-events: none;
    }

.split-container {
    display: flex;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
    position: relative;
    z-index: 2;
    gap: clamp(1.5rem, 3vw, 2rem);
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- LEFT SIDE ---------- */
.left-content {
    flex: 1 1 380px;
    color: white;
    padding: 1.5rem 1rem;
    max-width: 550px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

    .left-content h1 {
        font-size: clamp(1.9rem, 5vw, 3rem);
        font-weight: 700;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

        .left-content h1 i {
            color: #7fc9ff;
        }

    .left-content p {
        font-size: clamp(0.95rem, 1.6vw, 1.15rem);
        line-height: 1.6;
        margin-bottom: 2rem;
        opacity: 0.95;
    }

.feature-list {
    list-style: none;
}

    .feature-list li {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 1rem;
        font-size: clamp(0.85rem, 1.5vw, 1.05rem);
        background: rgba(255,255,255,0.12);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        padding: 0.7rem 1.2rem;
        border-radius: 60px;
        border: 1px solid rgba(255,255,255,0.2);
        width: fit-content;
        max-width: 100%;
    }

    .feature-list i {
        color: #7fc9ff;
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
        flex-shrink: 0;
    }

/* ---------- RIGHT LOGIN CARD ---------- */
.login-card {
    flex: 0 1 420px;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 32px;
    padding: clamp(1.6rem, 4vw, 2.5rem) clamp(1.2rem, 3vw, 2rem);
    box-shadow: 0 30px 50px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.4);
    width: 100%;
    max-width: 440px;
}

    .login-card h2 {
        font-size: clamp(1.4rem, 3vw, 2rem);
        font-weight: 600;
        color: #1a3b5d;
        margin-bottom: 0.2rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .login-card .subtitle {
        color: #6b7c8e;
        font-size: clamp(0.8rem, 1.4vw, 0.9rem);
        margin-bottom: 1.5rem;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 0.8rem;
    }

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        font-weight: 600;
        font-size: clamp(0.78rem, 1.3vw, 0.85rem);
        color: #1e2f40;
        margin-bottom: 6px;
    }

        .form-group label .req {
            color: #e74c3c;
            margin-left: 2px;
        }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input[type="tel"] {
        width: 100%;
        padding: clamp(11px, 1.8vw, 14px) clamp(14px, 2vw, 18px);
        border: 1.5px solid #dde4ec;
        border-radius: 60px;
        font-size: 16px;
        background: #f9fcff;
        outline: none;
        transition: border 0.2s, box-shadow 0.2s;
        -webkit-appearance: none;
        appearance: none;
    }

    .form-group input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(42,125,225,0.15);
        background: #fff;
    }

.validation-error {
    color: #e74c3c;
    font-size: clamp(0.72rem, 1.2vw, 0.8rem);
    margin-top: 5px;
    display: block;
}

.btn {
    width: 100%;
    min-height: 44px;
    padding: clamp(11px, 1.8vw, 14px);
    border-radius: 60px;
    font-weight: 700;
    font-size: clamp(0.9rem, 1.6vw, 1rem);
    border: none;
    cursor: pointer;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 8px 18px rgba(42,125,225,0.3);
}

    .btn-primary:hover {
        background: linear-gradient(145deg, #1b6ad0, #154ea0);
    }

    .btn-primary:active {
        transform: scale(0.98);
    }

.btn-secondary {
    background: #eef3fa;
    color: #1a3b5d;
    border: 1.5px solid #cddae8;
}

    .btn-secondary:hover {
        background: #e2eaf5;
    }

.alert {
    padding: 12px 18px;
    border-radius: 60px;
    font-size: clamp(0.8rem, 1.4vw, 0.9rem);
    margin-bottom: 20px;
    text-align: center;
    word-wrap: break-word;
}

.alert-danger {
    background: #fdecea;
    color: #b02a37;
    border: 1px solid #f5c2c7;
}

.alert-success {
    background: #e6f7ec;
    color: #1e7d4a;
    border: 1px solid #b9e6c9;
}

.mobile-toggle {
    text-align: right;
    margin-bottom: 8px;
    font-size: clamp(0.78rem, 1.3vw, 0.85rem);
}

    .mobile-toggle a {
        color: var(--primary);
        text-decoration: none;
        font-weight: 600;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        border-bottom: 1px dashed var(--primary);
    }

.otp-section {
    margin-top: 18px;
    border-top: 1px dashed #d0ddee;
    padding-top: 20px;
}

    .otp-section h4 {
        font-size: clamp(0.85rem, 1.4vw, 0.95rem);
        color: #1e2f40;
        margin-bottom: 12px;
        display: flex;
        align-items: center;
        gap: 6px;
    }

        .otp-section h4 i {
            color: var(--primary);
        }

.otp-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .otp-row input {
        flex: 2 1 130px;
        min-width: 0;
        padding: clamp(11px, 1.8vw, 14px) clamp(14px, 2vw, 18px);
        border: 1.5px solid #dde4ec;
        border-radius: 60px;
        font-size: 16px;
        background: #f9fcff;
        outline: none;
    }

        .otp-row input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(42,125,225,0.15);
        }

    .otp-row .btn {
        flex: 1 1 110px;
        min-width: 0;
        padding: clamp(11px, 1.8vw, 14px) 10px;
        font-size: clamp(0.82rem, 1.4vw, 0.9rem);
    }

.demo-info {
    margin-top: 18px;
    font-size: clamp(0.7rem, 1.2vw, 0.8rem);
    color: #7f8c8d;
    text-align: center;
    background: #f1f6fd;
    padding: 8px 12px;
    border-radius: 40px;
    word-wrap: break-word;
}

.hidden {
    display: none !important;
}

/* ---------- FIXED FOOTER ---------- */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--foot-h);
    background: #0e1f2e;
    color: #b0c9e0;
    padding: 0 clamp(1rem, 3vw, 2rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: clamp(0.75rem, 1.3vw, 0.9rem);
    border-top: 1px solid #1f3c55;
}

    .footer .copyright {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

        .footer .copyright i {
            color: var(--primary);
            margin-right: 4px;
        }

    .footer .footer-links {
        display: flex;
        gap: clamp(0.8rem, 2vw, 1.8rem);
        flex-wrap: wrap;
        align-items: center;
    }

        .footer .footer-links a {
            color: #b0c9e0;
            text-decoration: none;
            transition: color 0.2s;
        }

            .footer .footer-links a:hover {
                color: white;
            }

/* ========== RESPONSIVE ========== */

/* Tablet (768px – 1023px) */
@media (max-width: 1023px) {
    :root {
        --nav-h: 64px;
        --foot-h: 60px;
    }

    .split-container {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .left-content {
        text-align: center;
        max-width: 600px;
        padding: 0;
    }

    .feature-list li {
        margin-left: auto;
        margin-right: auto;
    }

    .login-card {
        max-width: 480px;
    }
}

/* Mobile landscape (481px – 767px) */
@media (max-width: 767px) {
    :root {
        --nav-h: auto;
        --foot-h: auto;
    }

    body {
        padding-top: 110px;
        padding-bottom: 90px;
    }

    .navbar {
        height: auto;
        padding: 0.7rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-links {
        gap: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .split-container {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }

    .left-content h1 {
        font-size: clamp(1.6rem, 6vw, 2rem);
    }

    .left-content p {
        font-size: 0.92rem;
        margin-bottom: 1.4rem;
    }

    .feature-list li {
        font-size: 0.85rem;
        padding: 0.55rem 1rem;
    }

    .login-card {
        padding: 1.6rem 1.2rem;
        border-radius: 24px;
        max-width: 100%;
    }

    .otp-row input {
        flex: 1 1 100%;
    }

    .otp-row .btn {
        flex: 1 1 100%;
    }

    .footer {
        height: auto;
        flex-direction: column;
        padding: 0.7rem 1rem;
        text-align: center;
        gap: 0.4rem;
        font-size: 0.75rem;
    }

        .footer .footer-links {
            gap: 1rem;
            justify-content: center;
        }
}

/* Small phones (≤ 480px) */
@media (max-width: 480px) {
    body {
        padding-top: 130px;
        padding-bottom: 100px;
    }

    .navbar {
        padding: 0.6rem 0.8rem;
        gap: 0.4rem;
    }

    .logo {
        font-size: 1.15rem;
    }

        .logo i {
            font-size: 1.4rem;
        }

    .nav-links a {
        font-size: 0.75rem;
    }

    .nav-links .btn-nav {
        padding: 0.3rem 0.75rem;
        font-size: 0.72rem;
    }

    .split-container {
        padding: 1rem 0.8rem;
        gap: 1.2rem;
    }

    .left-content h1 {
        font-size: clamp(1.5rem, 7vw, 1.9rem);
    }

    .left-content p {
        font-size: 0.85rem;
    }

    .feature-list li {
        font-size: 0.78rem;
        padding: 0.5rem 0.85rem;
    }

    .login-card {
        padding: 1.4rem 1rem;
        border-radius: 20px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .btn {
        min-height: 42px;
        padding: 11px;
        font-size: 0.88rem;
    }

    .alert {
        padding: 10px 14px;
        font-size: 0.78rem;
        border-radius: 20px;
    }

    .demo-info {
        font-size: 0.68rem;
        padding: 7px 10px;
    }

    .footer {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

        .footer .footer-links {
            gap: 0.7rem;
        }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
        animation: none !important;
    }
}
