* {
    box-sizing: border-box;
}

:root {
    --page-bg: #06151d;
    --shell-border: rgba(137, 232, 221, 0.1);

    --login-bg: #081b24;
    --login-card: rgba(255, 255, 255, 0.025);

    --brand-top: #0d4144;
    --brand-bottom: #0b2c3a;

    --surface: #233b4f;
    --surface-hover: #29455b;

    --accent: #78ded5;
    --accent-strong: #68d4ca;
    --accent-soft: rgba(120, 222, 213, 0.12);

    --text: #f5f8fa;
    --text-soft: rgba(245, 248, 250, 0.67);
    --text-muted: rgba(245, 248, 250, 0.43);

    --border: rgba(255, 255, 255, 0.085);
    --border-strong: rgba(255, 255, 255, 0.14);

    --danger: #ff7777;
    --danger-soft: rgba(255, 96, 96, 0.08);

    --radius-shell: 30px;
    --radius-card: 24px;
    --radius-field: 14px;
}

html {
    min-height: 100%;
    background: var(--page-bg);
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(77, 190, 184, 0.06),
            transparent 32%
        ),
        var(--page-bg);
    font-family:
        "Segoe UI",
        Tahoma,
        Arial,
        sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 18px;
    place-items: center;
}

.auth-shell {
    display: grid;
    width: min(1180px, 100%);
    min-height: 700px;
    grid-template-columns:
        minmax(0, 0.47fr)
        minmax(0, 0.53fr);
    overflow: hidden;
    border: 1px solid var(--shell-border);
    border-radius: var(--radius-shell);
    background: var(--login-bg);
    box-shadow:
        0 36px 90px rgba(0, 0, 0, 0.31),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

/* ======================================================
   Login side
   ====================================================== */

.auth-login {
    display: grid;
    padding: 46px;
    place-items: center;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.012),
            transparent 60%
        ),
        var(--login-bg);
}

.auth-login__card {
    width: min(430px, 100%);
    padding: 42px 40px 35px;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.036),
            rgba(255, 255, 255, 0.014)
        );
    box-shadow:
        0 24px 65px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.auth-login__header {
    margin-bottom: 31px;
}

.auth-login__product {
    display: none;
    margin-bottom: 14px;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.auth-login__header h1 {
    margin: 0;
    font-size: clamp(28px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.auth-login__header p {
    max-width: 350px;
    margin: 11px 0 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.9;
}

.auth-alert {
    display: flex;
    gap: 11px;
    margin-bottom: 21px;
    padding: 13px 14px;
    border: 1px solid rgba(255, 119, 119, 0.16);
    border-radius: 13px;
    background: var(--danger-soft);
}

.auth-alert > span {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border-radius: 8px;
    color: #ffc0c0;
    background: rgba(255, 119, 119, 0.12);
    font-size: 11px;
    font-weight: 900;
}

.auth-alert strong {
    color: #ffd0d0;
    font-size: 11px;
}

.auth-alert p {
    margin: 3px 0 0;
    color: rgba(255, 220, 220, 0.7);
    font-size: 10px;
    line-height: 1.65;
}

.auth-form {
    display: grid;
    gap: 21px;
}

.auth-field {
    display: grid;
    gap: 9px;
}

.auth-field label {
    color: rgba(245, 248, 250, 0.86);
    font-size: 11px;
    font-weight: 750;
}

.auth-input {
    position: relative;
}

.auth-input input {
    display: block;
    width: 100%;
    min-height: 58px;
    padding: 0 45px 0 78px;
    border: 1px solid rgba(154, 180, 204, 0.17);
    border-radius: var(--radius-field);
    outline: none;
    color: var(--text);
    background: var(--surface);
    font-size: 13px;
    font-weight: 600;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.auth-input input::placeholder {
    color: rgba(245, 248, 250, 0.37);
    font-weight: 500;
}

.auth-input input:hover {
    border-color: rgba(154, 180, 204, 0.28);
    background: var(--surface-hover);
}

.auth-input input:focus {
    border-color: rgba(120, 222, 213, 0.64);
    background: var(--surface-hover);
    box-shadow:
        0 0 0 4px rgba(120, 222, 213, 0.085);
}

.auth-input__icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 17px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    transform: translateY(-50%);
    pointer-events: none;
}

.auth-input__icon--password {
    width: 8px;
    height: 8px;
    right: 22px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow:
        0 0 0 4px rgba(120, 222, 213, 0.08);
}

.password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 10px;
    min-width: 56px;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    color: rgba(245, 248, 250, 0.62);
    background: rgba(255, 255, 255, 0.065);
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        color 160ms ease,
        background-color 160ms ease;
}

.password-toggle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.1);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.auth-field__error {
    color: #ffaaaa;
    font-size: 9.5px;
    line-height: 1.5;
}

.auth-submit {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    margin-top: 5px;
    padding: 0 21px;
    border: 0;
    border-radius: var(--radius-field);
    color: #062329;
    background:
        linear-gradient(
            110deg,
            #86e8df,
            var(--accent-strong)
        );
    box-shadow:
        0 16px 32px rgba(78, 211, 200, 0.15);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.auth-submit:hover {
    filter: brightness(1.035);
    box-shadow:
        0 20px 38px rgba(78, 211, 200, 0.21);
    transform: translateY(-1px);
}

.auth-submit:active {
    transform: translateY(0);
}

.auth-submit:focus-visible {
    outline: 3px solid rgba(120, 222, 213, 0.3);
    outline-offset: 3px;
}

.auth-submit b {
    font-size: 20px;
    font-weight: 500;
}

.auth-support {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 23px;
    padding: 14px 15px;
    border: 1px solid rgba(125, 145, 255, 0.13);
    border-radius: 13px;
    background: rgba(112, 135, 255, 0.05);
}

.auth-support__icon {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    color: #c5ceff;
    background: rgba(112, 135, 255, 0.13);
    font-size: 10px;
    font-weight: 900;
}

.auth-support p {
    margin: 1px 0 0;
    color: rgba(245, 248, 250, 0.61);
    font-size: 10.5px;
    line-height: 1.75;
}

/* ======================================================
   Brand side
   ====================================================== */

.auth-brand {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    padding: 36px 45px 28px;
    background:
        linear-gradient(
            145deg,
            var(--brand-top),
            var(--brand-bottom)
        );
    isolation: isolate;
}

.auth-brand::before {
    position: absolute;
    z-index: -2;
    top: -145px;
    left: -120px;
    width: 410px;
    height: 410px;
    border: 1px solid rgba(120, 222, 213, 0.09);
    border-radius: 50%;
    content: "";
}

.auth-brand::after {
    position: absolute;
    z-index: -2;
    right: -170px;
    bottom: -210px;
    width: 490px;
    height: 490px;
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(80, 101, 206, 0.13),
            transparent 67%
        );
    content: "";
}

.auth-brand__decoration {
    position: absolute;
    z-index: -1;
    top: 0;
    right: 39%;
    width: 1px;
    height: 215px;
    background:
        linear-gradient(
            transparent,
            rgba(120, 222, 213, 0.13),
            transparent
        );
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 21px;
}

.brand-logo {
    display: grid;
    width: 154px;
    height: 154px;
    flex: 0 0 154px;
    padding: 12px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 21px;
    background: #f1f3f4;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.22);
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-signature {
    padding-right: 21px;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-signature span {
    display: block;
    color: var(--accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.brand-signature strong {
    display: block;
    margin-top: 7px;
    color: rgba(245, 248, 250, 0.86);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
}

.brand-signature small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.1px;
}

.brand-hero {
    max-width: 540px;
    margin-top: 46px;
}

.brand-hero__eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
}

.brand-hero h2 {
    max-width: 530px;
    margin: 0;
    color: var(--text);
    font-size: clamp(28px, 3.2vw, 39px);
    font-weight: 850;
    line-height: 1.38;
    letter-spacing: -0.7px;
}

.brand-hero__description {
    max-width: 470px;
    margin: 17px 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.9;
}

.brand-capabilities {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 21px;
    color: rgba(226, 255, 251, 0.82);
    font-size: 9.5px;
    font-weight: 800;
}

.brand-capabilities i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(120, 222, 213, 0.56);
}

.brand-security {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 31px;
    margin-top: 18px;
    padding: 6px 11px;
    border: 1px solid rgba(120, 222, 213, 0.14);
    border-radius: 10px;
    color: rgba(229, 255, 252, 0.76);
    background: rgba(120, 222, 213, 0.055);
    font-size: 9px;
}

.brand-security span {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 6px;
    color: var(--accent);
    background: rgba(120, 222, 213, 0.11);
    font-size: 9px;
}

.brand-security strong {
    font-weight: 800;
}

.brand-benefits {
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 30px;
}

.brand-benefit {
    display: flex;
    min-height: 57px;
    align-items: center;
    gap: 13px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 13px;
    background:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.018)
        );
}

.brand-benefit > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 9px;
    color: var(--accent);
    background: rgba(120, 222, 213, 0.085);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.brand-benefit strong {
    display: block;
    color: rgba(245, 248, 250, 0.9);
    font-size: 10px;
    font-weight: 800;
}

.brand-benefit p {
    margin: 3px 0 0;
    color: var(--text-muted);
    font-size: 8.5px;
    line-height: 1.5;
}

.brand-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    color: rgba(245, 248, 250, 0.3);
    font-size: 8px;
}

.brand-footer span {
    font-weight: 900;
    letter-spacing: 1.1px;
}

.brand-footer p {
    margin: 0;
}

/* ======================================================
   Responsive layout
   ====================================================== */

@media (max-width: 1050px) {
    .auth-login {
        padding: 34px;
    }

    .auth-brand {
        padding-inline: 34px;
    }

    .brand-logo {
        width: 135px;
        height: 135px;
        flex-basis: 135px;
    }

    .brand-signature {
        padding-right: 16px;
    }

    .brand-hero h2 {
        font-size: clamp(26px, 3.2vw, 34px);
    }
}

@media (max-width: 900px) {
    .auth-page {
        padding: 14px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-login {
        order: 1;
        padding: 42px 26px;
    }

    .auth-brand {
        order: 2;
        min-height: 660px;
        padding: 34px 30px 27px;
    }

    .auth-login__product {
        display: block;
    }

    .brand-hero {
        margin-top: 40px;
    }
}

@media (max-width: 620px) {
    .auth-page {
        display: block;
        padding: 0;
    }

    .auth-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .auth-login {
        padding: 32px 17px 37px;
    }

    .auth-login__card {
        padding: 31px 22px 27px;
        border-radius: 20px;
    }

    .auth-login__header h1 {
        font-size: 28px;
    }

    .auth-login__header p {
        font-size: 11px;
    }

    .auth-input input {
        min-height: 55px;
    }

    .auth-support p {
        font-size: 10px;
    }

    .auth-brand {
        min-height: auto;
        padding: 29px 21px 25px;
    }

    .brand-header {
        align-items: flex-start;
        gap: 15px;
    }

    .brand-logo {
        width: 112px;
        height: 112px;
        flex-basis: 112px;
        padding: 9px;
        border-radius: 17px;
    }

    .brand-signature {
        padding-right: 14px;
    }

    .brand-signature strong {
        font-size: 9px;
    }

    .brand-signature small {
        font-size: 7px;
    }

    .brand-hero {
        margin-top: 34px;
    }

    .brand-hero__eyebrow {
        font-size: 10px;
    }

    .brand-hero h2 {
        font-size: 27px;
    }

    .brand-hero__description {
        font-size: 11.5px;
    }

    .brand-capabilities {
        gap: 7px;
        font-size: 8.5px;
    }

    .brand-benefits {
        padding-top: 28px;
    }

    .brand-footer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* Premium browser autofill treatment */

.auth-input input:-webkit-autofill,
.auth-input input:-webkit-autofill:hover,
.auth-input input:-webkit-autofill:focus,
.auth-input input:-webkit-autofill:active {
    -webkit-text-fill-color: #f5f8fa;
    caret-color: #f5f8fa;
    -webkit-box-shadow:
        0 0 0 1000px #233b4f inset;
    box-shadow:
        0 0 0 1000px #233b4f inset;
    border-color:
        rgba(154, 180, 204, 0.22);
    transition:
        background-color 9999s ease-out 0s;
}

.auth-input input:-webkit-autofill:focus {
    border-color:
        rgba(120, 222, 213, 0.64);
    -webkit-box-shadow:
        0 0 0 1000px #29455b inset,
        0 0 0 4px rgba(120, 222, 213, 0.085);
    box-shadow:
        0 0 0 1000px #29455b inset,
        0 0 0 4px rgba(120, 222, 213, 0.085);
}
