:root {
    color-scheme: light;
    --bg: #f5f6f8;
    --panel: #ffffff;
    --text: #17191c;
    --muted: #777c84;
    --line: #e6e8eb;
    --soft: #f7f8f9;
    --dark: #181a1d;
    --error-bg: #fff3f3;
    --error-line: #ffd3d3;
    --error-text: #b42318;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "SF Pro Display",
        "SF Pro Text",
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding:
        max(24px, env(safe-area-inset-top))
        max(24px, env(safe-area-inset-right))
        max(24px, env(safe-area-inset-bottom))
        max(24px, env(safe-area-inset-left));
}

.login-shell {
    width: min(1040px, 100%);
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, 0.92fr);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 26px;
    box-shadow:
        0 28px 80px rgba(22, 26, 31, .10),
        0 2px 8px rgba(22, 26, 31, .04);
}

.login-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 58px;
    background:
        radial-gradient(circle at 20% 10%, rgba(255,255,255,.15), transparent 30%),
        linear-gradient(145deg, #202328 0%, #111315 100%);
    color: #fff;
}

.brand-content {
    position: relative;
    z-index: 2;
    max-width: 440px;
}

.brand-mark {
    position: relative;
    width: 66px;
    height: 66px;
    margin-bottom: 48px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    background: rgba(255,255,255,.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}

.brand-mark-calendar {
    position: absolute;
    inset: 18px 17px 17px;
    border: 2px solid rgba(255,255,255,.92);
    border-radius: 7px;
}

.brand-mark-calendar::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 7px;
    border-top: 2px solid rgba(255,255,255,.92);
}

.brand-mark-line {
    position: absolute;
    z-index: 2;
    top: 15px;
    width: 2px;
    height: 7px;
    border-radius: 2px;
    background: #fff;
}

.brand-mark-line-one {
    left: 25px;
}

.brand-mark-line-two {
    right: 25px;
}

.brand-kicker {
    margin-bottom: 14px;
    color: rgba(255,255,255,.54);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .18em;
}

.brand-content h1 {
    margin: 0;
    font-size: clamp(38px, 4.4vw, 58px);
    line-height: 1.03;
    letter-spacing: -.045em;
    font-weight: 720;
}

.brand-content p {
    max-width: 370px;
    margin: 22px 0 0;
    color: rgba(255,255,255,.58);
    font-size: 16px;
    line-height: 1.65;
}

.brand-decoration {
    position: absolute;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 50%;
}

.decoration-one {
    width: 420px;
    height: 420px;
    top: -215px;
    right: -180px;
}

.decoration-two {
    width: 300px;
    height: 300px;
    right: -120px;
    bottom: -125px;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 56px;
}

.login-card {
    width: min(100%, 360px);
}

.mobile-brand {
    display: none;
}

.login-heading {
    margin-bottom: 30px;
}

.login-eyebrow {
    display: block;
    margin-bottom: 9px;
    color: #9b9fa6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.login-heading h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.035em;
    font-weight: 720;
}

.login-heading p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 11px 12px;
    border: 1px solid var(--error-line);
    border-radius: 10px;
    background: var(--error-bg);
    color: var(--error-text);
    font-size: 13px;
    line-height: 1.45;
}

.login-error-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--error-text);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.login-form {
    display: grid;
    gap: 18px;
}

.field {
    display: grid;
    gap: 8px;
}

.field-label {
    color: #44484e;
    font-size: 13px;
    font-weight: 650;
}

.field-control {
    position: relative;
    display: flex;
    align-items: center;
}

.field-control > svg {
    position: absolute;
    left: 14px;
    z-index: 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #92979f;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.field-control input {
    width: 100%;
    height: 50px;
    padding: 0 45px 0 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    color: var(--text);
    background: var(--soft);
    font-size: 14px;
    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.field-control input::placeholder {
    color: #afb3b9;
}

.field-control input:focus {
    border-color: #b8bcc2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(25, 28, 32, .06);
}

.password-toggle {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8c9198;
    cursor: pointer;
}

.password-toggle:hover {
    background: #eceef0;
    color: #555a61;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle .eye-hide {
    display: none;
}

.password-toggle.is-visible .eye-show {
    display: none;
}

.password-toggle.is-visible .eye-hide {
    display: block;
}

.login-button {
    height: 52px;
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--dark);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background .14s ease;
}

.login-button:hover {
    background: #050606;
    box-shadow: 0 9px 22px rgba(17, 19, 21, .16);
    transform: translateY(-1px);
}

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

.login-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid #eff0f2;
    color: #b0b3b8;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 800px) {
    .login-page {
        padding: 18px;
    }

    .login-shell {
        width: min(440px, 100%);
        min-height: auto;
        display: block;
        border-radius: 22px;
    }

    .login-brand {
        display: none;
    }

    .login-panel {
        padding: 34px 26px 28px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        margin-bottom: 42px;
    }

    .mobile-brand-icon {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 11px;
        background: var(--dark);
        color: #fff;
        font-size: 15px;
        font-weight: 800;
    }

    .mobile-brand strong,
    .mobile-brand span {
        display: block;
    }

    .mobile-brand strong {
        font-size: 13px;
    }

    .mobile-brand span {
        margin-top: 1px;
        color: #969ba2;
        font-size: 11px;
    }

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

@media (max-width: 420px) {
    .login-page {
        display: block;
        padding:
            max(12px, env(safe-area-inset-top))
            max(12px, env(safe-area-inset-right))
            max(12px, env(safe-area-inset-bottom))
            max(12px, env(safe-area-inset-left));
    }

    .login-shell {
        min-height: calc(100svh - 24px);
        display: flex;
        align-items: center;
        border-radius: 18px;
    }

    .login-panel {
        width: 100%;
        padding: 30px 22px;
    }

    .mobile-brand {
        margin-bottom: 36px;
    }
}
