:root {
    color-scheme: light;
    --accent: #bf3c41;
    --accent-dark: #9f2d32;
    --ink: #29262b;
    --muted: #706a72;
    --line: #e7e1e3;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    min-width: 280px;
    min-height: 100vh;
    min-height: 100svh;
    font-family: "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    color: var(--ink);
    background: radial-gradient(ellipse at 90% 15%, rgba(191, 60, 65, .22), transparent 55%),
                radial-gradient(ellipse at 10% 90%, rgba(191, 60, 65, .12), transparent 50%), #1c181d;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 76px 76px;
    mask-image: linear-gradient(135deg, #000, transparent 80%);
}

.login-layout {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    align-items: center;
    gap: 84px;
    width: min(1180px, 100%);
    min-height: 100vh;
    min-height: 100svh;
    margin: 0 auto;
    padding: 48px 32px;
}

.brand-panel { align-self: stretch; display: flex; flex-direction: column; color: #fff; padding: 12px 0; }
.brand-name { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; letter-spacing: 2px; }
.brand-symbol { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; color: #fff; background: rgba(191, 60, 65, .2); font-size: 23px; letter-spacing: 0; }
.brand-content { margin: auto 0; padding: 55px 0; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 25px; color: #ded2d7; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.eyebrow span { width: 7px; height: 7px; background: #ed8a8e; border-radius: 50%; box-shadow: 0 0 0 5px rgba(191, 60, 65, .15); }
.brand-content h1 { margin: 0; max-width: 560px; font-size: clamp(42px, 4.5vw, 62px); font-weight: 650; line-height: 1.12; letter-spacing: -2.5px; }
.brand-content h1 span { color: #e78387; }
.brand-description { margin: 26px 0 0; max-width: 375px; color: #c2b9c0; font-size: 17px; line-height: 1.7; }
.brand-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.brand-features span { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 9px; background: rgba(255, 255, 255, .035); color: #ded5db; font-size: 12px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.brand-features svg { width: 17px; height: 17px; color: #e78387; }
.brand-footer { margin: 0; color: #a59aa3; font-size: 12px; }

.login-card { position: relative; min-width: 0; padding: 36px 38px 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .65); border-radius: 24px; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, .25); }
.login-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; background: var(--accent); }
.card-brand { padding-bottom: 23px; margin-bottom: 25px; border-bottom: 1px solid #eee9eb; }
.card-brand img { display: block; width: 235px; max-width: 100%; height: auto; border-radius: 5px; }
.card-eyebrow { margin: 0 0 8px !important; color: var(--accent) !important; font-size: 11px !important; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.card-heading h2 { margin: 0; font-size: 28px; font-weight: 650; line-height: 1.2; letter-spacing: -.8px; }
.card-heading > p { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
#login-form, .session_on { margin-top: 25px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.input-wrap { position: relative; }
.input-wrap > svg { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: #8c7f86; pointer-events: none; }
.input-wrap input { display: block; width: 100%; height: 50px; padding: 0 14px 0 45px; border: 1px solid var(--line); border-radius: 10px; background: #fbf9fa; color: var(--ink); font: inherit; font-size: 15px; transition: border-color .15s, box-shadow .15s, background .15s; }
.input-wrap input::placeholder { color: #786e77; opacity: 1; }
.input-wrap input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px rgba(191, 60, 65, .12); }
.password-wrap input { padding-right: 53px; }
.password-toggle { position: absolute; right: 4px; top: 3px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; color: #796c74; background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle[aria-pressed="true"] { color: var(--accent); background: #f9ecee; }
.password-toggle:focus-visible, .login-button:focus-visible { outline: 3px solid #e89397; outline-offset: 3px; }
.login-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 24px; padding: 13px 18px; border: 0; border-radius: 10px; background: var(--accent); box-shadow: 0 6px 15px rgba(191, 60, 65, .2); color: #fff; font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, transform .15s; }
.login-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }
.login-button:disabled { cursor: wait; opacity: .8; }
.button-arrow { width: 19px; height: 19px; }
.login-button:disabled .button-arrow { display: none; }
.button-spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#alertBoxes { margin-top: 20px; padding: 12px 14px; border: 1px solid transparent; border-radius: 10px; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
#alertBoxes.box-error { background: #fff1f2; border-color: #f3d4d7; color: #8b262b; }
#alertBoxes.box-success { background: #edf8f1; border-color: #cce7d5; color: #25613b; }
.login-help { margin: 24px 0 0; color: var(--muted); text-align: center; font-size: 12px; line-height: 1.6; }
.card-footer { margin: 24px 0 0; padding-top: 18px; border-top: 1px solid #eee9eb; color: #756b74; text-align: center; font-size: 11px; line-height: 1.7; }
.card-footer span { margin: 0 3px; }

@media (max-width: 1000px) {
    .login-layout { grid-template-columns: minmax(0, 1fr) 420px; gap: 40px; }
    .login-card { padding-right: 30px; padding-left: 30px; }
    .brand-content h1 { font-size: 46px; }
}

@media (max-width: 820px) {
    .login-layout { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 24px; max-width: 510px; padding: 30px 24px; }
    .brand-panel { padding: 0 6px; }
    .brand-name { font-size: 12px; letter-spacing: 1.6px; }
    .brand-symbol { width: 32px; height: 32px; border-radius: 9px; font-size: 19px; }
    .brand-content, .brand-footer { display: none; }
    .login-card { padding: 32px 32px 24px; }
}

@media (max-width: 440px) {
    .login-layout { padding: 22px 16px; gap: 20px; }
    .login-card { padding: 27px 22px 21px; border-radius: 20px; }
    .card-brand { margin-bottom: 23px; padding-bottom: 20px; }
    .card-brand img { width: 215px; }
    .card-heading h2 { font-size: 26px; }
    .input-wrap input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}
