/* ============================================
   LOGIN MODERN — Clean & Fully Responsive
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background: #0f172a;
    color: #f1f5f9;
}

/* ── PAGE WRAPPER ── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1a3a5c 60%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

/* decorative blobs */
.login-wrapper::before,
.login-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
}

.login-wrapper::before {
    width: 450px;
    height: 450px;
    background: rgba(14, 165, 233, 0.18);
    top: -120px;
    left: -120px;
}

.login-wrapper::after {
    width: 350px;
    height: 350px;
    background: rgba(56, 189, 248, 0.14);
    bottom: -100px;
    right: -100px;
}

/* ── CARD ── */
.login-card {
    display: flex;
    width: 100%;
    max-width: 920px;
    min-height: 580px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    position: relative;
    z-index: 1;
    animation: fadeUp .55s ease both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── LEFT PANEL ── */
.left-panel {
    width: 42%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.5rem;
    position: relative;
    background-color: #0c4a6e;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* dark overlay on top of bg image */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(10, 25, 47, 0.82) 0%, rgba(14, 165, 233, 0.22) 100%);
    z-index: 0;
}

.left-panel>* {
    position: relative;
    z-index: 1;
}

.left-logo {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: .75rem;
    background: rgba(255, 255, 255, 0.12);
    padding: .5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(6px);
}

.left-panel h2 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
    color: #f1f5f9;
    margin-bottom: .65rem;
}

.left-desc {
    font-size: .82rem;
    color: rgba(241, 245, 249, 0.60);
    line-height: 1.6;
}

.left-footer {
    font-size: .72rem;
    color: rgba(241, 245, 249, 0.35);
    line-height: 1.5;
}

/* ── RIGHT PANEL ── */
.right-panel {
    flex: 1;
    background: #1e293b;
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.right-panel h3 {
    font-size: 1.55rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: .3rem;
}

.right-subtitle {
    font-size: .84rem;
    color: rgba(241, 245, 249, 0.50);
    margin-bottom: 1.6rem;
}

/* ── NOTIFICATION ── */
#notification {
    margin-bottom: .5rem;
}

#notification .alert {
    border-radius: .6rem;
    font-size: .82rem;
    padding: .6rem 1rem;
    border: none;
    margin-bottom: .5rem;
}

.alert-danger {
    background: rgba(239, 68, 68, .15);
    color: #fca5a5;
}

.alert-warning {
    background: rgba(245, 158, 11, .15);
    color: #fcd34d;
}

.alert-success {
    background: rgba(34, 197, 94, .15);
    color: #86efac;
}

.alert-info {
    background: rgba(14, 165, 233, .15);
    color: #7dd3fc;
}

/* ── GATEKEEPER ── */
.gatekeeper-box {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: .7rem;
    padding: .9rem 1rem;
    cursor: pointer;
    transition: border-color .25s, background .25s;
    user-select: none;
    margin-bottom: 1rem;
}

.gatekeeper-box:hover:not(.verified) {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.07);
}

.gatekeeper-box.verified {
    border-color: #22c55e;
    background: rgba(34, 197, 94, 0.07);
    cursor: default;
}

.gatekeeper-icon {
    font-size: 1.2rem;
    color: rgba(241, 245, 249, .55);
    transition: color .3s;
}

.gatekeeper-box.verified .gatekeeper-icon {
    color: #22c55e;
}

.gatekeeper-text {
    font-size: .85rem;
    color: rgba(241, 245, 249, .7);
}

.gatekeeper-box.verified .gatekeeper-text {
    color: #22c55e;
}

.gate-sub {
    font-size: .7rem;
    color: rgba(241, 245, 249, .3);
    margin-top: .1rem;
}

/* ── FORM GROUP ── */
.field-group {
    margin-bottom: 1rem;
    position: relative;
}

.field-icon {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(241, 245, 249, .4);
    font-size: .84rem;
    pointer-events: none;
}

.login-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: .65rem;
    padding: .8rem 1rem .8rem 2.6rem;
    color: #f1f5f9;
    font-family: 'Poppins', sans-serif;
    font-size: .88rem;
    outline: none;
    transition: border-color .25s, background .25s, box-shadow .25s;
}

.login-input::placeholder {
    color: rgba(241, 245, 249, .35);
}

.login-input:focus {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.06);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
}

/* password eye toggle */
.pw-wrapper {
    position: relative;
}

.pw-wrapper .login-input {
    padding-right: 2.8rem;
}

.pw-toggle {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(241, 245, 249, .4);
    cursor: pointer;
    font-size: .9rem;
    padding: 0;
    transition: color .2s;
}

.pw-toggle:hover {
    color: #38bdf8;
}

/* ── PASSWORD STRENGTH ── */
.strength-wrap {
    margin-top: -.25rem;
    margin-bottom: .85rem;
}

.strength-bar-bg {
    height: 3px;
    background: rgba(255, 255, 255, .08);
    border-radius: 2px;
    margin-bottom: .25rem;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    width: 0%;
    transition: width .4s, background .4s;
}

.strength-label {
    font-size: .71rem;
    color: rgba(241, 245, 249, .45);
}

/* ── REMEMBER ROW ── */
.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.remember-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .81rem;
    color: rgba(241, 245, 249, .55);
    cursor: pointer;
}

.remember-label input[type="checkbox"] {
    accent-color: #0ea5e9;
    width: 15px;
    height: 15px;
}

.forgot-link {
    font-size: .81rem;
    color: rgba(241, 245, 249, .5);
    text-decoration: none;
    transition: color .2s;
}

.forgot-link:hover {
    color: #38bdf8;
}

/* ── CAPTCHA ── */
.captcha-box {
    display: flex;
    align-items: center;
    gap: .65rem;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: .65rem;
    padding: .55rem .85rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.captcha-box img,
.captcha-box canvas {
    border-radius: .4rem;
    height: 46px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    background: #fff;
    display: block;
    flex-shrink: 0;
}

.captcha-refresh {
    background: none;
    border: none;
    color: rgba(241, 245, 249, .45);
    cursor: pointer;
    font-size: .9rem;
    padding: .25rem .3rem;
    flex-shrink: 0;
    transition: color .2s, transform .35s;
    line-height: 1;
}

.captcha-refresh:hover {
    color: #38bdf8;
    transform: rotate(180deg);
}

.captcha-input {
    flex: 1;
    min-width: 100px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, .15);
    color: #f1f5f9;
    font-family: 'Poppins', sans-serif;
    font-size: .87rem;
    padding: .3rem .4rem;
    outline: none;
    transition: border-color .2s;
}

.captcha-input::placeholder {
    color: rgba(241, 245, 249, .3);
}

.captcha-input:focus {
    border-bottom-color: #0ea5e9;
}

/* ── SUBMIT BTN ── */
.btn-login {
    width: 100%;
    padding: .85rem 1rem;
    background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .9rem;
    letter-spacing: .4px;
    border: none;
    border-radius: .65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: opacity .25s, transform .15s, box-shadow .25s;
}

.btn-login:hover:not(:disabled) {
    opacity: .91;
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(14, 165, 233, .38);
}

.btn-login:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.btn-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

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

/* ── HONEYPOT ── */
.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
}

/* ── FOOTER COPY ── */
.copy-right {
    margin-top: 1.25rem;
    font-size: .7rem;
    color: rgba(241, 245, 249, .25);
    text-align: center;
}

/* ─────────────────────────────────────────────
   RESPONSIVE BREAKPOINTS
───────────────────────────────────────────── */

/* Tablet landscape & below — hide left panel */
@media (max-width: 900px) {
    .login-card {
        flex-direction: column;
        max-width: 500px;
        min-height: unset;
    }

    .left-panel {
        width: 100%;
        flex-direction: row;
        align-items: center;
        padding: 1.5rem 2rem;
        gap: 1rem;
        min-height: unset;
    }

    .left-panel .left-footer {
        display: none;
    }

    .left-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .left-panel h2 {
        font-size: 1rem;
        margin-bottom: .2rem;
    }

    .left-panel .left-desc {
        display: none;
    }

    .right-panel {
        padding: 2rem 2rem;
    }
}

/* Mobile portrait */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 0;
        align-items: stretch;
    }

    .login-card {
        border-radius: 0;
        min-height: 100vh;
        box-shadow: none;
    }

    .left-panel {
        padding: 1.1rem 1.25rem;
    }

    .left-logo {
        width: 44px;
        height: 44px;
    }

    .left-panel h2 {
        font-size: .9rem;
    }

    .right-panel {
        padding: 1.5rem 1.25rem 2rem;
    }

    .right-panel h3 {
        font-size: 1.3rem;
    }

    .captcha-box {
        flex-wrap: wrap;
    }

    .captcha-input {
        width: 100%;
        min-width: unset;
    }
}