:root {
    --primary: #1e3c72;
    --secondary: #2a5298;
    --dark: #0f172a;
    --light-bg: #f8fafc;
    --accent: #2563eb;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    height: 100%;
}

body {
    background-color: #f1f5f9;
    background-image: radial-gradient(at 0% 0%, hsla(215, 60%, 15%, 0.06) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(215, 60%, 30%, 0.06) 0, transparent 50%);
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2.5vh, 30px) 15px;
    overflow-x: hidden;
    overflow-y: auto;
    transition: background-color 0.25s ease;
}

/* CENTERED WRAPPER (Equal Top & Bottom Balance) */
.login-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1050px;
    margin: auto;
    gap: clamp(12px, 2vh, 22px);
}

/* MAIN BOX - FLUID AUTO-SCALING */
.container {
    background: #fff;
    border-radius: clamp(18px, 2.5vw, 26px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: clamp(800px, 66vw, 1020px);
    max-width: 100%;
    height: clamp(520px, 72vh, 670px);
    min-height: 480px;
    max-height: 82vh;
    display: flex;
    padding: 0;
    margin: 0;
    transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

/* FORM AREA (Left Side) */
.form-container {
    width: 50%;
    padding: clamp(25px, 4vh, 45px) clamp(25px, 3.5vw, 45px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    z-index: 10;
    transition: background 0.25s ease;
}

form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
    justify-content: center;
}

h1 {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
    font-size: clamp(1.6rem, 2.4vh, 2.2rem);
}

.subtitle {
    font-size: clamp(0.8rem, 1.2vh, 0.95rem);
    margin-bottom: clamp(12px, 2.2vh, 25px);
    color: #64748b;
}

/* INPUT STYLING */
.input-field {
    width: 100%;
    position: relative;
    margin-bottom: clamp(10px, 1.8vh, 16px);
}

.input-field i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: clamp(0.85rem, 1.2vh, 1rem);
}

.input-field input {
    width: 100%;
    padding: clamp(10px, 1.6vh, 14px) 15px clamp(10px, 1.6vh, 14px) 44px;
    background: #f1f5f9;
    border: 2px solid transparent;
    border-radius: 12px;
    outline: none;
    font-size: clamp(0.85rem, 1.2vh, 0.95rem);
    transition: 0.3s;
}

.input-field input:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.12);
}

.forgot-pass {
    align-self: flex-end;
    font-size: clamp(0.75rem, 1.1vh, 0.85rem);
    color: var(--primary);
    text-decoration: none;
    margin-bottom: clamp(12px, 2vh, 20px);
    font-weight: 500;
}

.forgot-pass:hover {
    text-decoration: underline;
}

/* BUTTON */
.btn-grad {
    width: 100%;
    padding: clamp(10px, 1.6vh, 15px) 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    font-size: clamp(0.88rem, 1.3vh, 1rem);
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.btn-grad:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(30, 60, 114, 0.35);
}

/* OVERLAY (Right Side) */
.overlay-container {
    width: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3.5vh, 40px);
    color: #fff;
}

.overlay-panel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: clamp(20px, 3.5vh, 35px) clamp(15px, 2.5vw, 30px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    width: 100%;
}

.glass-card h2 {
    font-size: clamp(1.25rem, 2.2vh, 1.6rem);
    font-weight: 700;
    margin-bottom: 8px;
}

.glass-card p {
    font-size: clamp(0.78rem, 1.2vh, 0.9rem);
    opacity: 0.9;
    margin-bottom: clamp(10px, 1.8vh, 18px);
    line-height: 1.45;
}

.side-logo {
    width: clamp(55px, 8vh, 85px);
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.2));
    margin-bottom: clamp(10px, 1.8vh, 20px) !important;
}

.feature-pills {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: clamp(10px, 1.8vh, 18px);
    flex-wrap: wrap;
}

.feature-pills span {
    font-size: clamp(0.68rem, 1vh, 0.78rem);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* DEVELOPER FOOTER HIGHLIGHT */
.dev-footer {
    margin: 0;
    padding: 0;
}

.dev-pill {
    background: #fff;
    padding: clamp(6px, 1vh, 10px) clamp(15px, 1.8vw, 25px);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 6px 15px -3px rgba(0, 0, 0, 0.08);
    font-size: clamp(0.78rem, 1.1vh, 0.88rem);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}

.crafted-by {
    font-size: clamp(0.72rem, 1vh, 0.8rem);
    color: #64748b;
}

.company-name {
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.company-name:hover {
    color: var(--secondary);
}

.pro-tag {
    background: var(--dark);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 5px;
}

.divider {
    width: 1px;
    height: 16px;
    background: #e2e8f0;
}

.dev-phone {
    font-size: clamp(0.75rem, 1.1vh, 0.85rem);
    color: #475569;
    text-decoration: none;
    font-weight: 600;
}

.dev-phone:hover {
    color: var(--primary);
}

/* SOCIALS */
.social-text {
    margin: clamp(8px, 1.5vh, 14px) 0 clamp(6px, 1vh, 10px) 0;
    color: #94a3b8;
    font-size: clamp(0.72rem, 1vh, 0.8rem);
    display: flex;
    align-items: center;
    width: 100%;
}

.social-text::before,
.social-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
    margin: 0 10px;
}

.social-links {
    display: flex;
    gap: 6px;
}

.social-links a {
    display: inline-flex;
    width: clamp(32px, 4.5vh, 38px);
    height: clamp(32px, 4.5vh, 38px);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    color: #64748b;
    font-size: clamp(0.78rem, 1.1vh, 0.9rem);
    transition: 0.3s;
}

.social-links a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* THEME TOGGLE LOGIN BUTTON */
.theme-toggle-login-btn {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    color: #334155;
    border-color: rgba(0, 0, 0, 0.1) !important;
    font-size: 12px;
    transition: all 0.2s ease;
}

.theme-toggle-login-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
        justify-content: flex-start;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .container {
        flex-direction: column;
        width: 100%;
        height: auto;
        min-height: auto;
        max-height: none;
        margin-top: 40px;
    }

    .form-container,
    .overlay-container {
        width: 100%;
        padding: 30px 20px;
    }

    .overlay-container {
        display: none;
    }

    .dev-pill {
        flex-direction: column;
        border-radius: 18px;
        padding: 15px 20px;
        text-align: center;
        gap: 8px;
    }

    .divider {
        display: none;
    }
}

#loginAlert {
    position: fixed;
    top: 20px;
    z-index: 1000;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}