:root {
    --brand-red: #a40000;
    --brand-red-dark: #760000;
    --brand-red-soft: #fff1f2;
    --navy: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --border: #dbe3ee;
    --surface: #ffffff;
    --page: #f1f5f9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-family: "Inter", Arial, Helvetica, sans-serif;
    color: var(--navy);
    background: var(--page);
}

body {
    min-width: 320px;
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(430px, 1.08fr) minmax(500px, 0.92fr);
    background: var(--surface);
}

.brand-panel {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(34px, 5vw, 74px);
    color: #ffffff;
    background:
        linear-gradient(140deg, rgba(74, 0, 0, 0.52), rgba(127, 0, 0, 0.82)),
        url("Images/BACKGROUND.png") center / cover no-repeat;
}

.brand-panel::before,
.brand-panel::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    pointer-events: none;
}

.brand-panel::before {
    width: 430px;
    height: 430px;
    top: -170px;
    right: -120px;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.brand-panel::after {
    width: 600px;
    height: 600px;
    right: -320px;
    bottom: -310px;
    background: rgba(86, 0, 0, 0.28);
}

.brand-panel-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(63, 0, 0, 0.28));
}

.brand-lockup {
    max-width: 650px;
    margin: auto 0;
}

.brand-logo {
    width: clamp(110px, 11vw, 160px);
    height: clamp(110px, 11vw, 160px);
    object-fit: contain;
    margin-bottom: 28px;
    filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.2));
}

.brand-copy {
    max-width: 590px;
}

.brand-eyebrow,
.login-kicker {
    display: block;
    font-size: 0.73rem;
    font-weight: 900;
    letter-spacing: 1.65px;
    text-transform: uppercase;
}

.brand-eyebrow {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.78);
}

.brand-copy h1 {
    font-size: clamp(3.2rem, 6vw, 5.8rem);
    font-weight: 950;
    line-height: 0.92;
    letter-spacing: -3px;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.2);
}

.brand-copy p {
    max-width: 530px;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(0.95rem, 1.35vw, 1.15rem);
    font-weight: 550;
    line-height: 1.65;
}

.brand-footer {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.35px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15);
}

.form-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(32px, 6vw, 86px);
    background:
        radial-gradient(circle at 100% 0, rgba(164, 0, 0, 0.045), transparent 33%),
        #ffffff;
}

.mobile-brand {
    display: none;
}

.login-card {
    width: min(100%, 450px);
}

.login-header {
    margin-bottom: 30px;
}

.login-kicker {
    margin-bottom: 10px;
    color: var(--brand-red);
}

.login-header h2 {
    color: var(--brand-red-dark);
    font-size: clamp(2rem, 3vw, 2.65rem);
    font-weight: 950;
    line-height: 1.08;
    letter-spacing: -1.2px;
}

.login-header p {
    margin-top: 11px;
    color: var(--muted);
    font-size: 0.93rem;
    line-height: 1.55;
}

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 13px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #b91c1c;
    background: #fff1f2;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.45;
}

.login-alert svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-form {
    display: grid;
    gap: 18px;
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-group label {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.55px;
    text-transform: uppercase;
}

.input-control {
    position: relative;
    display: flex;
    align-items: center;
}

.input-control > svg {
    position: absolute;
    left: 15px;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #94a3b8;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.input-control input {
    width: 100%;
    height: 52px;
    padding: 0 15px 0 46px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    color: var(--navy);
    background: #f8fafc;
    font-size: 0.87rem;
    font-weight: 650;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input-control input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.input-control:focus-within > svg {
    stroke: var(--brand-red);
}

.input-control input:focus {
    border-color: var(--brand-red);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(164, 0, 0, 0.1);
}

.password-control input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    min-width: 54px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 7px;
    color: #475569;
    background: #eef2f7;
    font-size: 0.71rem;
    font-weight: 850;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    color: var(--brand-red);
    background: #fee2e2;
    outline: none;
}

.login-button {
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    padding: 0 20px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-red), #c31414);
    box-shadow: 0 10px 24px rgba(164, 0, 0, 0.2);
    font-size: 0.84rem;
    font-weight: 850;
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.login-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 13px 27px rgba(164, 0, 0, 0.25);
}

.login-button:focus-visible {
    outline: 3px solid rgba(164, 0, 0, 0.18);
    outline-offset: 3px;
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.72;
}

.access-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 650;
}

.access-note svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: #10b981;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-footer {
    width: min(100%, 450px);
    margin-top: 54px;
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.45px;
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: 100vh;
        justify-content: flex-start;
        padding: 30px 24px;
        background:
            linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98)),
            url("Images/BACKGROUND.png") center / cover no-repeat;
    }

    .mobile-brand {
        width: min(100%, 450px);
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: auto;
    }

    .mobile-brand img {
        width: 56px;
        height: 56px;
        object-fit: contain;
    }

    .mobile-brand div {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .mobile-brand strong {
        color: var(--brand-red-dark);
        font-size: 1.12rem;
        font-weight: 950;
        line-height: 1;
    }

    .mobile-brand span {
        color: #64748b;
        font-size: 0.58rem;
        font-weight: 850;
        letter-spacing: 0.7px;
        text-transform: uppercase;
    }

    .login-card {
        margin: 72px 0 auto;
    }

    .page-footer {
        margin-top: 64px;
    }
}

@media (max-width: 520px) {
    .form-panel {
        padding: 22px 18px 28px;
    }

    .login-card {
        margin-top: 54px;
    }

    .login-header {
        margin-bottom: 25px;
    }

    .login-header h2 {
        font-size: 2rem;
    }

    .input-control input,
    .login-button {
        min-height: 50px;
    }

    .page-footer {
        margin-top: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
