:root {
    --primary: #2563EB; /* Royal Blue */
    --primary2: #1E3A8A; /* Navy */
    --bg: #EEF2FF;
    --card: rgba(255,255,255,0.78);
    --text: #0F172A;
    --muted: #64748B;
    --border: rgba(15,23,42,0.10);
    --shadow: 0 18px 45px rgba(2,6,23,0.12);
    --shadow2: 0 26px 70px rgba(2,6,23,0.18);
    --radius: 28px;
    --radius2: 22px;
    --blur: 18px;
    --danger: #EF4444;
    --success: #22C55E;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(900px 500px at 15% 25%, rgba(37,99,235,0.18), transparent 55%), radial-gradient(700px 500px at 90% 20%, rgba(30,58,138,0.12), transparent 55%), radial-gradient(900px 700px at 50% 100%, rgba(37,99,235,0.10), transparent 55%), var(--bg);
    overflow-x: hidden;
}

/* floating orbs */
.orbs {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.65;
}

.orb {
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, rgba(37,99,235,0.20), transparent 65%);
    animation: floaty 10s ease-in-out infinite;
    filter: blur(0.2px);
}

    .orb:nth-child(2) {
        width: 360px;
        height: 360px;
        left: 70%;
        top: 15%;
        background: radial-gradient(circle at 30% 30%, rgba(30,58,138,0.18), transparent 65%);
        animation-duration: 13s;
    }

    .orb:nth-child(3) {
        width: 240px;
        height: 240px;
        left: 20%;
        top: 78%;
        background: radial-gradient(circle at 30% 30%, rgba(99,102,241,0.16), transparent 65%);
        animation-duration: 12s;
    }

@keyframes floaty {
    0%,100% {
        transform: translate(0,0) scale(1);
    }

    50% {
        transform: translate(18px,-16px) scale(1.05);
    }
}

/* main wrapper */
.wrap {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: grid;
    place-items: center;
    /*padding: 22px;*/
}

.login-shell {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.55);
    border: 1px solid rgba(255,255,255,0.65);
    box-shadow: var(--shadow2);
    overflow: hidden;
    backdrop-filter: blur(var(--blur));
    transform: translateY(14px);
    opacity: 0;
    animation: shellIn 700ms cubic-bezier(.2,.9,.2,1) forwards;
}

@keyframes shellIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* LEFT PANEL */
.left {
    position: relative;
    padding: 44px 34px;
    background: linear-gradient(135deg, rgba(37,99,235,0.85), rgba(99,102,241,0.55));
    display: grid;
    place-items: center;
    overflow: hidden;
}

    /* Big rounded shape like your screenshot */
    .left::before {
        content: "";
        position: absolute;
        width: 130%;
        height: 130%;
        left: -35%;
        top: -10%;
        background: rgba(255,255,255,0.10);
        border-radius: 40%;
        transform: rotate(8deg);
        filter: blur(0.2px);
    }

    .left::after {
        content: "";
        position: absolute;
        inset: -60%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
        transform: rotate(25deg);
        animation: shine 3.2s linear infinite;
        opacity: 0.9;
    }

@keyframes shine {
    0% {
        transform: translateX(-35%) rotate(25deg);
    }

    100% {
        transform: translateX(35%) rotate(25deg);
    }
}

.left-content {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 420px;
}

    .left-content h1 {
        margin: 0;
        font-size: clamp(24px, 2.8vw, 36px);
        font-weight: 900;
        letter-spacing: 0.2px;
    }

    .left-content p {
        margin: 10px 0 0;
        font-size: 14px;
        opacity: 0.9;
        line-height: 1.5;
    }

.brand-box {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 20px;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.22);
    box-shadow: 0 16px 34px rgba(0,0,0,0.14);
    backdrop-filter: blur(12px);
    transform: translateY(10px);
    opacity: 0;
    animation: pop 650ms cubic-bezier(.2,.9,.2,1) forwards;
    animation-delay: 140ms;
}

@keyframes pop {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.brand-logo {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.22), transparent 60%), linear-gradient(135deg, rgba(255,255,255,0.22), rgba(0,0,0,0.10));
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
}

    .brand-logo svg {
        width: 28px;
        height: 28px;
        opacity: 0.95;
    }

.brand-text {
    text-align: left;
    line-height: 1.1;
}

    .brand-text strong {
        display: block;
        font-size: 16px;
        font-weight: 900;
    }

    .brand-text span {
        display: block;
        font-size: 12px;
        opacity: 0.9;
        margin-top: 4px;
    }

/* RIGHT PANEL */
.right {
    padding: 34px 34px 26px;
    background: rgba(255,255,255,0.35);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    position: relative;
}

.top-banner {
    border-radius: 0.25rem !important;
    background: linear-gradient(135deg, rgba(185,28,28,0.95), rgba(127,29,29,0.95));
    color: #fff;
    padding: 5px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 14px 30px rgba(185,28,28,0.25);
    overflow: hidden;
    position: relative;
}

    .top-banner::after {
        content: "";
        position: absolute;
        inset: -50%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
        transform: rotate(25deg);
        animation: shine 6.2s linear infinite;
        opacity: 0.7;
    }

    .top-banner .title {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 900;
        font-size: 18px;
        letter-spacing: 0.2px;
    }

.gear {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    background: rgba(255,255,255,0.18);
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
}

    .gear svg {
        width: 18px;
        height: 18px;
    }

.top-banner small {
    position: relative;
    z-index: 2;
    opacity: 0.9;
    font-weight: 700;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
}

.field {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.80);
    box-shadow: 0 12px 24px rgba(2,6,23,0.06);
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

    .field:focus-within {
        transform: translateY(-2px);
        box-shadow: 0 18px 40px rgba(37,99,235,0.18);
        border-color: rgba(37,99,235,0.35);
    }

    .field input {
        width: 100%;
        border: 0;
        outline: none;
        background: transparent;
        padding: 14px 44px 14px 14px;
        font-size: 14px;
        color: var(--text);
        font-weight: 600;
    }

        .field input::placeholder {
            color: rgba(100,116,139,0.9);
            font-weight: 600;
        }

    .field .icon {
        position: absolute;
        right: 12px;
        display: grid;
        place-items: center;
        opacity: 0.75;
    }

        .field .icon svg {
            width: 18px;
            height: 18px;
        }

    .field .action {
        position: absolute;
        right: 10px;
        width: 34px;
        height: 34px;
        border-radius: 14px;
        border: 1px solid rgba(15,23,42,0.10);
        background: rgba(255,255,255,0.65);
        cursor: pointer;
        display: grid;
        place-items: center;
        transition: transform 180ms ease;
    }

        .field .action:hover {
            transform: translateY(-1px);
        }

        .field .action:active {
            transform: scale(0.96);
        }

/* Captcha row */
.captcha-row {
    display: grid;
    grid-template-columns: 1fr 1fr 46px;
    gap: 12px;
    align-items: center;
}

.captcha-box {
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.80);
    box-shadow: 0 12px 24px rgba(2,6,23,0.06);
    padding: 14px;
    font-weight: 900;
    letter-spacing: 4px;
    text-align: center;
    user-select: none;
    position: relative;
    overflow: hidden;
}

    .captcha-box::after {
        content: "";
        position: absolute;
        inset: -50%;
        background: linear-gradient(90deg, transparent, rgba(37,99,235,0.20), transparent);
        transform: rotate(25deg);
        animation: shine 3.8s linear infinite;
        opacity: 0.6;
    }

.refresh-captcha {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.80);
    box-shadow: 0 12px 24px rgba(2,6,23,0.06);
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: transform 180ms ease;
}

    .refresh-captcha:hover {
        transform: translateY(-2px);
    }

    .refresh-captcha:active {
        transform: scale(0.96);
    }

    .refresh-captcha.spin svg {
        animation: spin 550ms ease;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sign in button */
.btn {
    margin-top: 6px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 0;
    cursor: pointer;
    font-weight: 900;
    font-size: 14px;
    color: #fff;
    background: linear-gradient(135deg, rgba(37,99,235,1), rgba(30,58,138,1));
    box-shadow: 0 18px 44px rgba(37,99,235,0.35);
    position: relative;
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

    .btn::after {
        content: "";
        position: absolute;
        inset: -60%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
        transform: rotate(25deg);
        animation: shine 3.2s linear infinite;
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 26px 60px rgba(37,99,235,0.40);
    }

    .btn:active {
        transform: scale(0.98);
    }

/* Footer */
.footer {
    margin-top: 10px;
    text-align: center;
    color: rgba(100,116,139,0.95);
    font-weight: 600;
    font-size: 13px;
}

/* Shake error */
.shake {
    animation: shake 420ms ease;
}

@keyframes shake {
    0%,100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-10px);
    }

    40% {
        transform: translateX(10px);
    }

    60% {
        transform: translateX(-8px);
    }

    80% {
        transform: translateX(8px);
    }
}

/* Toast */
.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.78);
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: var(--shadow2);
    backdrop-filter: blur(var(--blur));
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
    transform: translateY(14px);
    opacity: 0;
    pointer-events: none;
    transition: all 240ms ease;
    z-index: 999;
}

    .toast.show {
        transform: translateY(0);
        opacity: 1;
    }

    .toast .badge {
        width: 34px;
        height: 34px;
        border-radius: 14px;
        display: grid;
        place-items: center;
        color: #fff;
        font-weight: 900;
        background: linear-gradient(135deg, rgba(37,99,235,1), rgba(30,58,138,1));
        box-shadow: 0 14px 26px rgba(37,99,235,0.25);
    }

    .toast .msg {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
    }

        .toast .msg strong {
            font-size: 13px;
        }

        .toast .msg span {
            font-size: 12px;
            color: rgba(100,116,139,0.95);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

/* Responsive */
@media (max-width: 980px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .left {
        min-height: 260px;
    }

    .right {
        padding: 7px;
        
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }

    .orbs {
        display: none;
    }
}
