/* ==========================
   Login Page Design (NXT GEN Clean Blue Theme)
   ========================== */

:root {
    --bg1: #0b182b;
    --bg2: #13294b;
    --accent1: #2196f3;
    /* Blue */
    --accent2: #00bfa6;
    /* Teal */
    --text-light: #f3f6fa;
    --text-muted: #aab3c2;
    --error: #ff6b6b;
}

* {
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    margin: 0;
    background: linear-gradient(135deg, var(--bg2), var(--bg1));
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* --- Main Container --- */
.login-container {
    display: flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    overflow: hidden;
    max-width: 940px;
    width: 90%;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
}

/* --- Left Hero Section --- */
.hero-section {
    flex: 1;
    background: linear-gradient(160deg, rgba(33, 150, 243, 0.12), rgba(0, 191, 166, 0.08));
    padding: 50px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.logo-box {
    text-align: center;
}

/* Bigger & Glowing Logo */
.logo {
    width: 150px;
    /* 🔹 पहले 100px था */
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 18px rgba(33, 150, 243, 0.3)) drop-shadow(0 0 8px rgba(0, 191, 166, 0.4));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 22px rgba(33, 150, 243, 0.5)) drop-shadow(0 0 10px rgba(0, 191, 166, 0.6));
}


.logo-box h1 {
    font-size: 28px;
    font-weight: 600;
    color: #ffffff;
}

.logo-box h1 span {
    color: var(--accent1);
}

.subtitle {
    font-size: 15px;
    color: var(--text-muted);
    margin-top: 6px;
    letter-spacing: 0.3px;
}

.powered {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.powered b {
    color: var(--accent2);
}

/* --- Login Box --- */
.login-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.login-box h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #fff;
}

.role-switch {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.role-btn {
    padding: 10px 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
}

.role-btn.active {
    background: linear-gradient(135deg, var(--accent1), var(--accent2));
    color: #fff;
    box-shadow: 0 0 12px rgba(0, 191, 166, 0.4);
}

.fields {
    width: 100%;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus {
    border-color: var(--accent1);
    box-shadow: 0 0 8px rgba(33, 150, 243, 0.3);
}

.login-btn {
    background: linear-gradient(135deg, var(--accent1), var(--accent2));
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s ease;
    font-size: 15px;
    width: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.clear-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    margin-top: 5px;
    cursor: pointer;
    font-size: 13px;
}

.error-msg {
    color: var(--error);
    margin-top: 10px;
    font-size: 14px;
}

/* ============================
   📱 MOBILE RESPONSIVE FIX
============================ */
@media (max-width: 768px) {
    body {
        padding: 20px;
        align-items: flex-start;
    }

    .login-container {
        flex-direction: column;
        /* 🔥 Left + Right stack vertically */
        width: 100%;
        max-width: 480px;
        border-radius: 14px;
        overflow: hidden;
    }

    .hero-section {
        padding: 30px 20px;
        text-align: center;
        flex: none;
    }

    .logo {
        width: 120px;
        margin-bottom: 20px;
    }

    .logo-box h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 13px;
    }

    .login-box {
        padding: 30px 20px;
        flex: none;
        width: 100%;
    }

    .role-switch {
        flex-direction: column;
        width: 100%;
    }

    .role-btn {
        width: 100%;
        padding: 12px;
    }

    .login-btn {
        font-size: 14px;
        padding: 12px;
    }

    .clear-btn {
        font-size: 12px;
    }

    .powered {
        font-size: 12px;
        margin-top: 25px;
    }
}

.loader {
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #00c6ff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 0.8s linear infinite;
    margin: 15px auto 0 auto;
    display: none;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Full-screen iPhone style blur overlay */
.ios-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.35);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Center white rounded loader box */
.ios-loader-box {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.20);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* iOS style circular spinner */
.ios-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Rotation animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}