:root {
    --primary: #c5295c;
    --primary-dark: #8f183f;
    --accent: #f9a61a;
    --ink: #231820;
    --muted: #776d73;
    --surface: #ffffff;
    --surface-soft: #f8f5f7;
    --line: #e9e1e5;
    --danger: #bb2947;
    --success: #16835f;
    --shadow: 0 28px 80px rgba(57, 19, 36, .15);
    color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-width: 320px;
    min-height: 100dvh;
    color: var(--ink);
    background: var(--surface-soft);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.login-page {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 49%) minmax(430px, 51%);
    overflow: hidden;
}

.login-visual {
    position: relative;
    height: 100%;
    min-height: 0;
    display: flex;
    overflow: hidden;
    color: #fff;
    isolation: isolate;
    background: linear-gradient(150deg, var(--primary-dark), var(--primary));
}

.login-visual__image,
.login-visual__veil {
    position: absolute;
    inset: 0;
}

.login-visual__image {
    z-index: -3;
    background-position: center;
    background-size: cover;
    opacity: .3;
    filter: blur(16px) saturate(.65) contrast(.9);
    transform: scale(1.1);
}

.login-visual__veil {
    z-index: -2;
    background:
        linear-gradient(145deg, rgba(72, 5, 32, .98), rgba(174, 25, 75, .95)),
        radial-gradient(circle at 80% 14%, rgba(249, 166, 26, .2), transparent 28rem);
}

.login-visual::before,
.login-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
}

.login-visual::before {
    width: 420px;
    height: 420px;
    right: -180px;
    top: -160px;
}

.login-visual::after {
    width: 560px;
    height: 560px;
    left: -240px;
    bottom: -320px;
}

.visual-content {
    width: min(760px, 100%);
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: clamp(22px, 4vh, 40px);
    padding: clamp(30px, 4.3vw, 64px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand__mark {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 17px;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 14px 34px rgba(117, 16, 54, .24);
}

.brand__mark svg { width: 100%; height: 100%; }
.brand__mark rect { fill: transparent; stroke: currentColor; stroke-width: 2; }
.brand__mark path { stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand--light .brand__mark { color: var(--primary-dark); background: #fff; }

.brand__copy { display: grid; gap: 2px; }
.brand__copy small { font-size: .74rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; opacity: .75; }
.brand__copy strong { font-size: 1.05rem; letter-spacing: -.01em; }

.visual-message {
    max-width: 650px;
    align-self: center;
}
.eyebrow { display: inline-block; color: var(--primary); font-size: .76rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow--light { color: #ffd98c; }

.visual-message h1 {
    max-width: 620px;
    margin: 14px 0 18px;
    font-size: clamp(2.65rem, 3.75vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -.052em;
}

.visual-message p {
    max-width: 580px;
    margin: 0;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(.95rem, 1.15vw, 1.08rem);
    line-height: 1.58;
}

.visual-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 46px;
    padding: 7px 11px 7px 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    font-size: clamp(.7rem, .85vw, .82rem);
    font-weight: 700;
    backdrop-filter: blur(10px);
}

.visual-feature > span:last-child {
    min-width: 0;
    line-height: 1.25;
}

.visual-feature__icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--primary-dark);
    background: #fff;
}

.visual-feature__icon svg { width: 18px; }

.login-access {
    position: relative;
    height: 100%;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: clamp(28px, 4vw, 64px);
    overflow: auto;
    background:
        radial-gradient(circle at 92% 8%, rgba(197, 41, 92, .12), transparent 23rem),
        radial-gradient(circle at 5% 92%, rgba(249, 166, 26, .1), transparent 20rem),
        linear-gradient(145deg, #fff 0%, #fbf7f9 58%, #f7f0f4 100%);
}

.login-access::before,
.login-access::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(197, 41, 92, .09);
    border-radius: 50%;
}

.login-access::before {
    width: 300px;
    height: 300px;
    top: -180px;
    right: -120px;
}

.login-access::after {
    width: 230px;
    height: 230px;
    left: -145px;
    bottom: -140px;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(510px, 100%);
    padding: clamp(28px, 3vw, 38px);
    overflow: hidden;
    border: 1px solid rgba(117, 76, 94, .12);
    border-radius: 28px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 30px 80px rgba(72, 24, 45, .13), 0 8px 24px rgba(72, 24, 45, .05);
    backdrop-filter: blur(16px);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary), var(--accent));
}

.login-logo {
    width: min(300px, 100%);
    min-height: 104px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    padding: 10px 18px;
    overflow: hidden;
    border: 1px solid #eee4e9;
    border-radius: 20px;
    background: linear-gradient(145deg, #fff, #fdf8fa);
    box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(68, 34, 49, .06);
}

.login-logo img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 88px;
    display: block;
    object-fit: contain;
}

.login-card__header { margin-bottom: 26px; text-align: center; }
.login-card__header h2 { margin: 9px 0 8px; font-size: clamp(2.15rem, 3vw, 2.65rem); line-height: 1.03; letter-spacing: -.045em; }
.login-card__header p { margin: 0; color: var(--muted); line-height: 1.5; }

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0 0 16px;
    padding: 11px 14px;
    border: 1px solid;
    border-radius: 13px;
    font-size: .88rem;
    line-height: 1.45;
}

.alert svg { width: 19px; flex: 0 0 19px; margin-top: 1px; }
.alert--error { color: #8d1e39; border-color: #efc7d1; background: #fff3f6; }
.alert--success { color: #12684e; border-color: #bde6d7; background: #effbf6; }

.login-form { display: grid; gap: 16px; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-size: .86rem; font-weight: 760; }

.input-shell {
    position: relative;
    min-height: 54px;
    display: flex;
    align-items: center;
    border: 1px solid #e6dce1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(49, 29, 38, .035);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.input-shell:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(197, 41, 92, .1), 0 8px 20px rgba(65, 28, 44, .06); transform: translateY(-1px); }
.input-shell--error { border-color: #d75b74; }
.input-shell__icon { width: 48px; display: grid; place-items: center; color: #998d94; }
.input-shell__icon svg { width: 20px; }

.input-shell input {
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0 15px 0 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: .96rem;
}

.input-shell input::placeholder { color: #aaa0a6; }

.password-toggle {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    display: grid;
    place-items: center;
    margin-right: 4px;
    border: 0;
    border-radius: 12px;
    color: #8a7e85;
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover { color: var(--primary); background: #fbf1f5; }
.password-toggle svg { width: 21px; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.form-error { min-height: 15px; color: var(--danger); font-size: .75rem; line-height: 15px; }

.login-button {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 2px;
    padding: 0 22px;
    border: 0;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #ad1d4d);
    box-shadow: 0 15px 32px rgba(197, 41, 92, .28);
    font-weight: 800;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.login-button:hover { transform: translateY(-2px); box-shadow: 0 19px 38px rgba(197, 41, 92, .34); }
.login-button:disabled { cursor: wait; opacity: .78; transform: none; }
.login-button__arrow { width: 20px; }
.login-button__loader { display: none; width: 19px; height: 19px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-button.is-loading .login-button__loader { display: block; }
.login-button.is-loading .login-button__arrow { display: none; }

.login-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    color: #8d8389;
    font-size: .78rem;
}

.security-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(22, 131, 95, .1); }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
    .login-page { grid-template-columns: minmax(0, 46%) minmax(420px, 54%); }
    .visual-content { padding: clamp(28px, 4vw, 46px); }
    .visual-message h1 { font-size: clamp(2.45rem, 4.6vw, 3.65rem); }
    .visual-feature:nth-child(3) { display: none; }
    .visual-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .login-page { display: block; }
    .login-visual { display: none; }
    .login-access {
        width: 100%;
        height: 100vh;
        height: 100dvh;
        padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
        align-items: center;
    }
    .brand__mark { width: 49px; height: 49px; flex-basis: 49px; border-radius: 15px; }
    .login-card__header h2 { font-size: clamp(2rem, 9vw, 2.4rem); }
}

@media (max-width: 420px) {
    .login-access { padding-inline: 14px; }
    .login-card { padding: 25px 19px 22px; border-radius: 23px; }
    .login-logo { width: min(260px, 100%); min-height: 88px; margin-bottom: 19px; padding: 8px 14px; border-radius: 17px; }
    .login-logo img { max-height: 72px; }
    .brand__copy strong { font-size: .95rem; }
    .login-card__header { margin-bottom: 20px; }
    .login-card__header p { font-size: .9rem; }
}

@media (max-height: 760px) {
    .visual-content { gap: 20px; padding-block: 28px; }
    .visual-message h1 { margin-block: 10px 14px; font-size: clamp(2.35rem, 3.8vw, 3.65rem); }
    .visual-message p { line-height: 1.45; }
    .login-access { padding-block: 18px; }
    .login-card { padding-top: 25px; padding-bottom: 24px; }
    .login-logo { min-height: 78px; margin-bottom: 15px; }
    .login-logo img { max-height: 64px; }
    .login-card__header { margin-bottom: 18px; }
    .login-card__header h2 { font-size: 2.25rem; }
    .login-form { gap: 10px; }
    .login-card__footer { margin-top: 14px; }
}

@media (max-height: 650px) {
    .visual-features { display: none; }
    .visual-content { grid-template-rows: auto 1fr; }
    .login-card { padding-block: 19px; }
    .login-logo { min-height: 62px; margin-bottom: 10px; padding: 6px 12px; }
    .login-logo img { max-height: 50px; }
    .login-card__header { margin-bottom: 14px; }
    .login-card__header h2 { margin-block: 6px; font-size: 2rem; }
    .login-card__header p { font-size: .86rem; line-height: 1.35; }
    .input-shell { min-height: 48px; }
    .input-shell input { height: 46px; }
    .password-toggle { width: 42px; height: 42px; flex-basis: 42px; }
    .login-button { min-height: 49px; }
    .login-card__footer { display: none; }
}

@media (max-width: 820px) and (max-height: 560px) {
    .login-card { padding-block: 14px; }
    .login-logo { min-height: 56px; margin-bottom: 8px; padding: 5px 12px; }
    .login-logo img { max-height: 44px; }
    .login-card__header p { display: none; }
}

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