* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    color: #152033;
    background:
    /*linear-gradient(120deg, rgba(169, 28, 38, 0.08) 0 34%, transparent 34%),*/ /* Red tint matches the kiosk logo. */
    /*linear-gradient(180deg, #f5f8fb 0%, #edf2f7 100%);*/
    linear-gradient(120deg, color-mix(in srgb, var(--brand-primary-color) 8%, transparent) 0 34%, transparent 34%), 
    linear-gradient(180deg, #f5f8fb 0%, #edf2f7 100%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(380px, 1.05fr);
}

.left-panel {
    position: relative;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: clamp(34px, 5vw, 72px);
    overflow: hidden;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)),
    /*linear-gradient(150deg, #5d0f16 0%, #8f1824 48%, #c82d37 100%);*/ /* Red family chosen to relate to the kiosk logo. */
    linear-gradient(150deg, var(--brand-primary-color) 0%, var(--brand-secondary-color) 100%);
}

.left-panel::before {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
    pointer-events: none;
}

.brand-mark,
.brand-copy {
    position: relative;
    z-index: 1;
}

.brand-mark {
    width: min(260px, 72%);
    padding: 24px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.55);
    /*box-shadow: 0 24px 54px rgba(94, 16, 22, 0.3);*/ /* Red shadow keeps the logo-side panel connected. */
    border-color: var(--brand-secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
}

.brand-mark img {
    display: block;
    width: 100%;
    height: auto;
}

.brand-copy {
    max-width: 440px;
    color: #fff;
}

.brand-copy p,
.login-heading p {
    margin: 0 0 10px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-copy h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 4.25rem);
    line-height: 1.02;
    font-weight: 850;
    letter-spacing: 0;
}

.right-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 6vw, 76px);
}

.login-container {
    width: min(100%, 430px);
    padding: clamp(28px, 4vw, 44px);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(204, 214, 226, 0.86);
    box-shadow: 0 24px 70px rgba(15, 32, 51, 0.13);
}

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

.login-heading p {        
    /*color: #b51f2c;*/ /* Red accent follows the kiosk logo color. */
    color: var(--brand-secondary-color);    
}

.login-container h2 {
    margin: 0;
    color: #152033;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.04;
    font-weight: 850;
    letter-spacing: 0;
}

.field-group {
    margin-bottom: 18px;
}

.login-container label {
    display: block;
    margin-bottom: 8px;
    color: #344054;
    font-size: 0.92rem;
    font-weight: 750;
}

.login-container input {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid #cfd8e3;
    border-radius: 8px;
    /*    background: #fff;
    color: #152033;*/
    background: var(--brand-primary-color);
    color: var(--brand-font-color);
    font-size: 1rem;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

    .login-container input:focus {
        /*border-color: #b51f2c;*/ /* Red focus color follows the kiosk logo. */
        border-color: var(--brand-secondary-color);
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.12);
    }

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 14px;
}

.login-container form > button[type="submit"] {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    /*background: #b51f2c;*/ /* Main login action uses red from the kiosk logo. */
    /*color: #fff;*/
    background: var(--brand-secondary-color);
    color: var(--brand-primary-color);
    font-size: 1rem;
    font-weight: 850;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.login-container form > button[type="submit"]:hover,
.login-container form > button[type="submit"]:focus {
    /*background: #941822;*/ /* Darker red hover state, still tied to the kiosk logo. */
    background: var(--brand-primary-color);
    color: var(--brand-font-color);
    transform: translateY(-1px);
}

.error-message {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #9f1d1d;
    font-size: 0.95rem;
    font-weight: 650;
}

@media (max-width: 820px) {
    body {
        background: color-mix(in srgb, var(--brand-primary-color) 8%, #f5f8fb);
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .left-panel {
        min-height: 270px;
        padding: 28px;
    }

    .brand-mark {
        width: 190px;
        padding: 18px;
    }

    .brand-copy h1 {
        max-width: 420px;
        font-size: 2.1rem;
    }

    .right-panel {
        align-items: start;
        padding: 26px 18px 40px;
    }

    .login-container {
        padding: 28px 22px;
        box-shadow: 0 14px 40px rgba(15, 32, 51, 0.1);
    }
}

@media (max-width: 420px) {
    .left-panel {
        min-height: 230px;
    }

    .brand-copy h1 {
        font-size: 1.7rem;
    }

    .login-container h2 {
        font-size: 2rem;
    }
}
