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

:root {
    color-scheme: dark;
    font-family: 'Inter', system-ui, sans-serif;
    --blue: #1766b1;
    --teal: #16aaa5;
    --ink: #07111d;
    --card: rgba(12, 25, 40, 0.86);
    --line: rgba(145, 196, 220, 0.15);
    --text: #eef8fb;
    --muted: #8da5b5;
}

body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 14% 18%, rgba(15, 94, 165, 0.18), transparent 34%),
        radial-gradient(circle at 85% 78%, rgba(20, 166, 160, 0.14), transparent 32%),
        var(--ink);
    color: var(--text);
}

.login-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(80, 166, 195, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(80, 166, 195, 0.035) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.login-glow {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(130px);
    pointer-events: none;
}

.login-glow-blue {
    left: -220px;
    top: -180px;
    background: rgba(23, 102, 177, 0.24);
}

.login-glow-teal {
    right: -220px;
    bottom: -180px;
    background: rgba(22, 170, 165, 0.2);
}

.login-shell {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
    align-items: center;
    gap: clamp(48px, 8vw, 110px);
    padding: 56px 0;
}

.brand-panel {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-logo {
    width: min(390px, 78%);
    height: auto;
    margin: 0 0 46px -8px;
    filter: drop-shadow(0 12px 30px rgba(6, 174, 175, 0.12));
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 18px;
    color: #5dd4ce;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.brand-copy h1 {
    max-width: 650px;
    font-size: clamp(2.35rem, 5vw, 4.45rem);
    line-height: 1.06;
    letter-spacing: -0.055em;
}

.brand-copy h1 span {
    color: transparent;
    background: linear-gradient(100deg, #4d9be4, #29c1b8);
    background-clip: text;
    -webkit-background-clip: text;
}

.brand-copy p {
    max-width: 580px;
    margin-top: 24px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.75;
}

.brand-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
}

.brand-features span {
    padding: 8px 12px;
    border: 1px solid rgba(64, 178, 186, 0.18);
    border-radius: 999px;
    background: rgba(31, 126, 148, 0.07);
    color: #9bb8c5;
    font-size: 0.7rem;
    font-weight: 600;
}

.brand-features span::before {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    margin-right: 7px;
    border-radius: 50%;
    background: #27b8b2;
    box-shadow: 0 0 7px rgba(39, 184, 178, 0.7);
    vertical-align: middle;
}

.login-card {
    position: relative;
    padding: clamp(30px, 4vw, 44px);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(18, 36, 55, 0.93), var(--card));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(24px);
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, #288cd0, #22b4ac, transparent);
}

.mobile-brand {
    display: none;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    color: #6fc9c5;
    font-size: 0.68rem;
    font-weight: 650;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.secure-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #26c2b8;
    box-shadow: 0 0 10px rgba(38, 194, 184, 0.7);
}

.login-heading h2 {
    font-size: 1.72rem;
    letter-spacing: -0.035em;
}

.login-heading p {
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 22px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.25);
    border-radius: 11px;
    background: rgba(248, 113, 113, 0.08);
    color: #fda4af;
    font-size: 0.78rem;
    line-height: 1.45;
}

.login-error svg {
    flex: 0 0 auto;
}

.login-form {
    display: flex;
    flex-direction: column;
    margin-top: 28px;
}

.login-form label {
    margin: 0 0 8px 2px;
    color: #b8c8d2;
    font-size: 0.76rem;
    font-weight: 600;
}

.input-wrap {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 52px;
    margin-bottom: 20px;
    padding: 0 15px;
    border: 1px solid rgba(148, 181, 201, 0.16);
    border-radius: 12px;
    background: rgba(5, 15, 25, 0.52);
    color: #637c8d;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-wrap:focus-within {
    border-color: rgba(38, 182, 178, 0.58);
    background: rgba(6, 19, 31, 0.7);
    box-shadow: 0 0 0 3px rgba(38, 182, 178, 0.09);
    color: #42c6c0;
}

.input-wrap input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: 500 0.9rem 'Inter', sans-serif;
}

.input-wrap input::placeholder {
    color: #557080;
}

.password-toggle {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #66808f;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    outline: 0;
    background: rgba(255, 255, 255, 0.045);
    color: #95acb9;
}

.login-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(110deg, #176ab6, #17a9a4);
    color: white;
    font: 700 0.87rem 'Inter', sans-serif;
    box-shadow: 0 12px 25px rgba(9, 115, 149, 0.22);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow: 0 15px 30px rgba(9, 134, 155, 0.3);
}

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

.login-support {
    margin-top: 24px;
    color: #617b8b;
    font-size: 0.69rem;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 860px) {
    .login-shell {
        width: min(460px, calc(100% - 32px));
        grid-template-columns: 1fr;
        padding: 32px 0;
    }

    .brand-panel {
        display: none;
    }

    .mobile-brand {
        display: block;
        margin-bottom: 28px;
    }

    .mobile-brand img {
        display: block;
        width: 210px;
        max-width: 70%;
        height: auto;
        margin: 0 auto;
    }
}

@media (max-width: 420px) {
    .login-shell {
        width: min(100% - 22px, 420px);
        padding: 18px 0;
    }

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
