:root {
    --torevya-auth-navy: #071d3c;
    --torevya-auth-blue: #126fc1;
    --torevya-auth-cyan: #2fc5df;
    --torevya-auth-indigo: #3438f3;
    --torevya-auth-text: #0d1b35;
    --torevya-auth-muted: #64748b;
    --torevya-auth-border: #e4eaf2;
}

.torevya-login-page {
    position: relative;
    left: 50%;
    width: min(1180px, calc(100vw - 40px));
    margin: 18px 0;
    color: var(--torevya-auth-text);
    font-family: "Instrument Sans", "Fira Sans", Arial, sans-serif;
    transform: translateX(-50%);
    isolation: isolate;
}

.torevya-login-page *,
.torevya-login-page *::before,
.torevya-login-page *::after {
    box-sizing: border-box;
}

.torevya-login-card {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    min-height: 720px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(20, 53, 94, 0.1);
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(4, 25, 60, 0.16);
}

.torevya-login-visual {
    position: relative;
    display: flex;
    min-width: 0;
    overflow: hidden;
    padding: 48px 50px 36px;
    color: #fff;
    background:
        linear-gradient(145deg, rgba(6, 29, 66, 0.98), rgba(20, 94, 176, 0.96)),
        #0a3e78;
    flex-direction: column;
}

.torevya-login-visual::before {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: "";
    opacity: 0.45;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.torevya-login-visual__orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

.torevya-login-visual__orb--one {
    top: -160px;
    right: -120px;
    width: 390px;
    height: 390px;
    background: rgba(52, 56, 243, 0.36);
}

.torevya-login-visual__orb--two {
    bottom: 20px;
    left: -190px;
    width: 390px;
    height: 390px;
    background: rgba(47, 197, 223, 0.18);
}

.torevya-login-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: fit-content;
    color: #fff;
    text-decoration: none;
    align-items: center;
    gap: 12px;
}

.torevya-login-brand:hover {
    color: #fff;
}

.torevya-login-brand__mark {
    display: grid;
    width: 48px;
    height: 48px;
    font-family: Georgia, serif;
    font-size: 29px;
    font-weight: 800;
    font-style: italic;
    color: #0b65ac;
    background: #fff;
    border-radius: 12px;
    place-items: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
}

.torevya-login-brand > span:last-child {
    display: flex;
    flex-direction: column;
}

.torevya-login-brand strong {
    font-size: 25px;
    line-height: 1;
    letter-spacing: 0.075em;
}

.torevya-login-brand small {
    margin-top: 5px;
    font-size: 10px;
    font-weight: 600;
    color: #9ceaf7;
    letter-spacing: 0.035em;
}

.torevya-login-visual__content {
    position: relative;
    z-index: 2;
    max-width: 520px;
    margin-top: 52px;
}

.torevya-login-eyebrow {
    display: inline-flex;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 750;
    color: #a9f2fb;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.torevya-login-eyebrow svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-visual h1 {
    max-width: 520px;
    margin: 22px 0 16px;
    font-size: clamp(34px, 3.1vw, 51px);
    line-height: 1.08;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.035em;
}

.torevya-login-visual__content > p {
    max-width: 500px;
    margin: 0;
    font-size: 16px;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.75);
}

.torevya-login-benefits {
    display: flex;
    margin: 27px 0 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
    gap: 10px;
}

.torevya-login-benefits li {
    display: inline-flex;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 650;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    align-items: center;
    gap: 7px;
}

.torevya-login-benefits li span {
    display: grid;
    width: 22px;
    height: 22px;
    color: #72e2f2;
    background: rgba(47, 197, 223, 0.13);
    border-radius: 7px;
    place-items: center;
}

.torevya-login-benefits svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-illustration {
    position: relative;
    z-index: 1;
    display: block;
    width: min(560px, 100%);
    height: auto;
    margin: auto auto -22px;
    filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.2));
}

.torevya-login-visual__footer {
    position: relative;
    z-index: 2;
    margin: 14px 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.56);
}

.torevya-login-form-panel {
    position: relative;
    min-width: 0;
    padding: 34px clamp(32px, 4vw, 62px) 42px;
    background:
        radial-gradient(circle at 100% 0%, rgba(47, 197, 223, 0.1), transparent 28%),
        #fff;
}

.torevya-login-form-panel__top {
    display: flex;
    min-height: 36px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.torevya-login-back,
.torevya-login-secure {
    display: inline-flex;
    font-size: 12px;
    font-weight: 650;
    align-items: center;
    gap: 7px;
}

.torevya-login-back {
    color: #456079;
    text-decoration: none;
    transition: color 180ms ease;
}

.torevya-login-back:hover {
    color: var(--torevya-auth-blue);
}

.torevya-login-back svg,
.torevya-login-secure svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-secure {
    color: #178a77;
}

.torevya-login-form-wrap {
    width: 100%;
    max-width: 440px;
    margin: 63px auto 0;
}

.torevya-login-heading > span {
    display: inline-block;
    margin-bottom: 9px;
    font-size: 12px;
    font-weight: 800;
    color: var(--torevya-auth-blue);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.torevya-login-heading h2 {
    margin: 0;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.12;
    font-weight: 800;
    color: var(--torevya-auth-text);
    letter-spacing: -0.035em;
}

.torevya-login-heading p {
    margin: 13px 0 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--torevya-auth-muted);
}

.torevya-login-status {
    margin-top: 22px;
}

.torevya-login-passkey {
    margin-top: 24px;
}

.torevya-login-form {
    display: flex;
    margin-top: 25px;
    flex-direction: column;
    gap: 21px;
}

.torevya-login-page label {
    color: #26364c;
    font-size: 13px;
    font-weight: 700;
}

.torevya-login-page input[type="email"],
.torevya-login-page input[type="password"],
.torevya-login-page input[type="text"] {
    min-height: 51px;
    color: var(--torevya-auth-text);
    background: #f8fafc;
    border-color: var(--torevya-auth-border);
    border-radius: 13px;
}

.torevya-login-page input:focus {
    background: #fff;
    border-color: rgba(18, 111, 193, 0.62);
    box-shadow: 0 0 0 4px rgba(18, 111, 193, 0.1);
}

.torevya-login-password {
    position: relative;
}

.torevya-login-forgot {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    font-size: 12px;
    font-weight: 700;
    color: var(--torevya-auth-blue);
}

.torevya-login-options {
    display: flex;
    margin-top: -2px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.torevya-login-options > span {
    display: inline-flex;
    font-size: 11px;
    color: #8290a3;
    align-items: center;
    gap: 5px;
}

.torevya-login-options > span svg {
    width: 15px;
    height: 15px;
    color: #1ba288;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-submit {
    display: inline-flex !important;
    min-height: 52px !important;
    padding: 0 22px !important;
    font-weight: 750 !important;
    color: #fff !important;
    background: linear-gradient(90deg, #165fba, #137fcb) !important;
    border: 0 !important;
    border-radius: 13px !important;
    box-shadow: 0 14px 28px rgba(18, 111, 193, 0.22) !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    transition: transform 180ms ease, box-shadow 180ms ease !important;
}

.torevya-login-submit:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 17px 34px rgba(18, 111, 193, 0.3) !important;
}

.torevya-login-submit svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-register {
    margin-top: 25px;
    padding-top: 22px;
    font-size: 13px;
    color: var(--torevya-auth-muted);
    text-align: center;
    border-top: 1px solid var(--torevya-auth-border);
}

.torevya-login-register a {
    margin-left: 4px;
    font-weight: 750;
    color: var(--torevya-auth-blue);
}

.torevya-login-help {
    display: flex;
    margin-top: 24px;
    padding: 14px 16px;
    background: #f6f9fc;
    border: 1px solid #e7edf4;
    border-radius: 13px;
    align-items: center;
    gap: 11px;
}

.torevya-login-help > span {
    display: grid;
    width: 35px;
    height: 35px;
    color: var(--torevya-auth-blue);
    background: #e9f4fc;
    border-radius: 10px;
    place-items: center;
    flex: 0 0 auto;
}

.torevya-login-help svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.torevya-login-help div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.torevya-login-help strong {
    font-size: 11px;
    color: #33445b;
}

.torevya-login-help a {
    overflow: hidden;
    font-size: 12px;
    font-weight: 700;
    color: var(--torevya-auth-blue);
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .torevya-login-page {
        width: min(720px, calc(100vw - 32px));
        margin: 16px 0;
    }

    .torevya-login-card {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 24px;
    }

    .torevya-login-visual {
        min-height: 405px;
        padding: 35px 38px 26px;
    }

    .torevya-login-visual__content {
        max-width: 460px;
        margin-top: 33px;
    }

    .torevya-login-visual h1 {
        max-width: 500px;
        font-size: 36px;
    }

    .torevya-login-illustration {
        position: absolute;
        right: -45px;
        bottom: -28px;
        width: 390px;
        opacity: 0.52;
    }

    .torevya-login-visual__footer {
        display: none;
    }

    .torevya-login-form-panel {
        padding: 30px 40px 44px;
    }

    .torevya-login-form-wrap {
        margin-top: 43px;
    }
}

@media (max-width: 640px) {
    .torevya-login-page {
        width: calc(100vw - 20px);
        margin: 10px 0;
    }

    .torevya-login-card {
        border-radius: 19px;
    }

    .torevya-login-visual {
        min-height: 345px;
        padding: 27px 24px 25px;
    }

    .torevya-login-brand__mark {
        width: 42px;
        height: 42px;
        font-size: 25px;
        border-radius: 10px;
    }

    .torevya-login-brand strong {
        font-size: 21px;
    }

    .torevya-login-visual__content {
        margin-top: 29px;
    }

    .torevya-login-eyebrow {
        padding: 7px 10px;
        font-size: 10px;
    }

    .torevya-login-visual h1 {
        margin-top: 17px;
        font-size: 29px;
    }

    .torevya-login-visual__content > p {
        font-size: 13px;
        line-height: 1.65;
    }

    .torevya-login-benefits {
        gap: 7px;
    }

    .torevya-login-benefits li {
        padding: 7px 9px;
        font-size: 10px;
    }

    .torevya-login-illustration {
        right: -90px;
        width: 340px;
        opacity: 0.3;
    }

    .torevya-login-form-panel {
        padding: 23px 20px 30px;
    }

    .torevya-login-secure {
        display: none;
    }

    .torevya-login-form-wrap {
        margin-top: 34px;
    }

    .torevya-login-heading h2 {
        font-size: 30px;
    }

    .torevya-login-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .torevya-login-page *,
    .torevya-login-page *::before,
    .torevya-login-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}
