* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #111827;
}

body {
    min-height: 100vh;
    overflow: hidden;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
    background:
        radial-gradient(circle at 15% 15%, rgba(147, 51, 234, 0.32), transparent 32%),
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.28), transparent 30%),
        radial-gradient(circle at 55% 92%, rgba(16, 185, 129, 0.18), transparent 28%),
        #020617;
}

/* LEFT VISUAL PANEL */

.login-visual-panel {
    position: relative;
    overflow: hidden;
    padding: 56px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    isolation: isolate;
}

.login-visual-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.86)),
        radial-gradient(circle at 40% 36%, rgba(255, 255, 255, 0.12), transparent 28%);
    z-index: 1;
}

.login-visual-panel::after {
    content: "";
    position: absolute;
    inset: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 34px;
    z-index: 3;
    pointer-events: none;
}

.cell-image-frame {
    position: absolute;
    width: min(760px, 86%);
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 47%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 2;
    filter:
        drop-shadow(0 36px 72px rgba(0, 0, 0, 0.56))
        drop-shadow(0 0 54px rgba(168, 85, 247, 0.18));
    animation: cellFloat 8s ease-in-out infinite;
}

.cell-image-frame::before {
    content: "";
    position: absolute;
    inset: -12%;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(168, 85, 247, 0.18), transparent 58%),
        radial-gradient(circle at 65% 42%, rgba(37, 99, 235, 0.14), transparent 34%);
    z-index: -1;
    animation: softPulse 5s ease-in-out infinite;
}

.cell-login-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.9;
    transform: rotate(-5deg) scale(1.08);
    mix-blend-mode: screen;
}

.visual-text {
    position: relative;
    z-index: 5;
    max-width: 620px;
    padding: 28px;
    border-radius: 26px;
    background: rgba(15, 23, 42, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(18px);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
}

.visual-kicker {
    width: fit-content;
    margin-bottom: 12px;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(147, 197, 253, 0.26);
    color: #bfdbfe;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.visual-text h1 {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: clamp(2rem, 4.5vw, 4.6rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
    font-weight: 920;
}

.visual-text p {
    margin: 0;
    max-width: 560px;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.65;
    font-weight: 520;
}

/* ANIMATED ORBS */

.cell-orb {
    position: absolute;
    border-radius: 50%;
    z-index: 0;
    opacity: 0.62;
    filter: blur(1px);
}

.cell-orb-one {
    width: 190px;
    height: 190px;
    left: 8%;
    top: 11%;
    background: radial-gradient(circle, rgba(216, 180, 254, 0.28), transparent 68%);
    animation: driftOne 11s ease-in-out infinite;
}

.cell-orb-two {
    width: 130px;
    height: 130px;
    right: 16%;
    top: 18%;
    background: radial-gradient(circle, rgba(147, 197, 253, 0.26), transparent 66%);
    animation: driftTwo 9s ease-in-out infinite;
}

.cell-orb-three {
    width: 110px;
    height: 110px;
    right: 22%;
    bottom: 16%;
    background: radial-gradient(circle, rgba(110, 231, 183, 0.18), transparent 68%);
    animation: driftThree 10s ease-in-out infinite;
}

/* RIGHT FORM PANEL */

.login-form-panel {
    position: relative;
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.login-form-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 30px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    animation: cardEnter 0.65s ease both;
}

.login-brand {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    font-weight: 950;
    letter-spacing: -0.04em;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.login-brand h2 {
    margin: 0 0 4px 0;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.login-brand p {
    margin: 0;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 600;
}

.login-alert {
    margin-bottom: 14px;
    padding: 11px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 750;
}

.login-alert-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.login-alert-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 850;
}

.login-input-wrap {
    position: relative;
    min-height: 48px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    display: flex;
    align-items: center;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.login-input-wrap:focus-within {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.11);
    transform: translateY(-1px);
}

.login-input-icon {
    flex: 0 0 42px;
    text-align: center;
    font-size: 0.94rem;
}

.login-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 46px;
    border: none;
    background: transparent;
    outline: none;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 650;
}

.login-input-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 520;
}

.toggle-password {
    flex: 0 0 auto;
    margin-right: 8px;
    padding: 6px 9px;
    border: none;
    border-radius: 10px;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.toggle-password:hover {
    background: #c7d2fe;
}

.login-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
}

.remember-label input {
    accent-color: #2563eb;
}

.login-version {
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 750;
}

.login-button {
    margin-top: 4px;
    height: 50px;
    border: none;
    border-radius: 16px;
    background:
        linear-gradient(135deg, #2563eb, #7c3aed);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 0.95rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 44px rgba(37, 99, 235, 0.32);
    filter: brightness(1.03);
}

.login-button:active {
    transform: translateY(0);
}

.login-button-arrow {
    font-size: 1.15rem;
    transition: transform 0.18s ease;
}

.login-button:hover .login-button-arrow {
    transform: translateX(4px);
}

.login-footer-note {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
    color: #94a3b8;
    text-align: center;
    font-size: 0.74rem;
    font-weight: 650;
}

/* ANIMATIONS */

@keyframes cellFloat {
    0%,
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-49%, -53%) rotate(2deg) scale(1.035);
    }
}

@keyframes softPulse {
    0%,
    100% {
        opacity: 0.7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}

@keyframes driftOne {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(28px, 20px);
    }
}

@keyframes driftTwo {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-24px, 26px);
    }
}

@keyframes driftThree {
    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(18px, -22px);
    }
}

@keyframes cardEnter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

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

/* RESPONSIVE */

@media (max-width: 1040px) {
    body {
        overflow: auto;
    }

    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual-panel {
        min-height: 420px;
        padding: 34px;
    }

    .cell-image-frame {
        width: min(520px, 78%);
        top: 46%;
    }

    .visual-text {
        max-width: 560px;
    }

    .login-form-panel {
        min-height: 560px;
        padding: 28px;
    }
}

@media (max-width: 560px) {
    .login-visual-panel {
        min-height: 360px;
        padding: 22px;
    }

    .login-visual-panel::after {
        inset: 14px;
        border-radius: 24px;
    }

    .visual-text {
        padding: 20px;
        border-radius: 22px;
    }

    .visual-text h1 {
        font-size: 2.1rem;
    }

    .visual-text p {
        font-size: 0.88rem;
    }

    .login-form-panel {
        padding: 18px;
    }

    .login-card {
        padding: 22px;
        border-radius: 24px;
    }

    .login-meta-row {
        align-items: flex-start;
        flex-direction: column;
    }
}