:root {
    --bg-dark: #11161c;
    --bg-dark-soft: #18212a;
    --surface: #ffffff;
    --surface-soft: #f4f6f8;
    --text: #18212a;
    --muted: #6b7680;
    --line: #dfe4e8;
    --accent: #c41230;
    --accent-dark: #991026;
    --danger-bg: #fff0ed;
    --danger-text: #9f2f1d;
    --shadow: 0 28px 80px rgba(8, 15, 22, 0.16);
    --radius-xl: 28px;
    --radius-lg: 16px;
    --radius-md: 11px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-dark);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--bg-dark);
    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 {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.08fr);
}

.brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    padding: clamp(36px, 5vw, 78px);
    color: #fff;
    background:
        radial-gradient(circle at 15% 15%, rgba(196, 18, 48, 0.28), transparent 34%),
        radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.07), transparent 26%),
        linear-gradient(145deg, var(--bg-dark-soft), #0c1116 72%);
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.brand-panel::before {
    width: 440px;
    height: 440px;
    right: -240px;
    top: -120px;
}

.brand-panel::after {
    width: 620px;
    height: 620px;
    left: -390px;
    bottom: -410px;
}

.brand-content {
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.brand-logo {
    width: min(285px, 76%);
    height: auto;
    display: block;
    padding: 15px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.brand-copy {
    margin: auto 0;
    max-width: 620px;
}

.eyebrow {
    margin: 0 0 14px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.brand-copy h1 {
    margin: 0;
    max-width: 640px;
    font-size: clamp(3rem, 5.6vw, 6.2rem);
    line-height: 0.96;
    letter-spacing: -0.06em;
    font-weight: 760;
}

.brand-copy .intro {
    max-width: 520px;
    margin: 26px 0 0;
    font-size: clamp(1rem, 1.3vw, 1.22rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.68);
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: max-content;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.66);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #54d77c;
    box-shadow: 0 0 0 5px rgba(84, 215, 124, 0.12);
}

.form-panel {
    display: grid;
    place-items: center;
    padding: clamp(30px, 6vw, 90px);
    background:
        linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
        radial-gradient(circle at 80% 20%, rgba(196, 18, 48, 0.11), transparent 34%);
}

.login-card {
    width: min(100%, 520px);
    padding: clamp(34px, 4.4vw, 58px);
    border: 1px solid rgba(24, 33, 42, 0.08);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.mobile-logo {
    display: none;
    margin-bottom: 34px;
}

.mobile-logo img {
    width: 230px;
    height: auto;
    display: block;
}

.login-header h2 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.login-header > p:last-child {
    margin: 15px 0 0;
    line-height: 1.65;
    color: var(--muted);
}

.alert {
    margin-top: 26px;
    padding: 13px 15px;
    border: 1px solid rgba(159, 47, 29, 0.16);
    border-radius: var(--radius-md);
    color: var(--danger-text);
    background: var(--danger-bg);
    font-size: 0.91rem;
}

form {
    margin-top: 30px;
}

.field + .field {
    margin-top: 20px;
}

.field label {
    display: block;
    margin: 0 0 8px;
    font-size: 0.9rem;
    font-weight: 720;
}

.field input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    outline: none;
    color: var(--text);
    background: var(--surface-soft);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
    border-color: var(--accent);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(196, 18, 48, 0.13);
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 104px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--text);
    background: rgba(24, 33, 42, 0.06);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 20px 0 26px;
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 0.88rem;
    color: var(--muted);
    cursor: pointer;
}

.checkbox input {
    width: 17px;
    height: 17px;
    accent-color: var(--accent);
}

.support-note {
    text-align: right;
    font-size: 0.78rem;
    color: var(--muted);
}

.submit-button {
    width: 100%;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: var(--radius-md);
    color: #fff;
    background: var(--accent);
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(196, 18, 48, 0.24);
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.submit-button:hover {
    transform: translateY(-1px);
    background: var(--accent-dark);
    box-shadow: 0 18px 34px rgba(196, 18, 48, 0.30);
}

.submit-button:active {
    transform: translateY(0);
}

.login-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: #9099a1;
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 24px;
    }

    .mobile-logo {
        display: block;
    }
}

@media (max-width: 560px) {
    .form-panel {
        padding: 0;
        background: #fff;
    }

    .login-card {
        min-height: 100vh;
        width: 100%;
        padding: 34px 24px;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .form-options,
    .login-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .support-note {
        text-align: left;
    }
}
