:root {
    --red: #e30613;
    --red-dark: #b9000b;
    --red-light: #fff1f2;
    --text: #1d2733;
    --muted: #737983;
    --border: #dedfe2;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, Helvetica, sans-serif;
    background: #f7f7f8;
    color: var(--text);
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 52% 48%;
}

/* Left branded panel */
.brand-panel {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #b9000b, #e30613 58%, #ef2630);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

.brand-panel::before {
    content: "";
    position: absolute;
    width: 650px;
    height: 650px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50%;
    right: -250px;
    bottom: -250px;
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 560px;
    height: 180px;
    right: -90px;
    top: 90px;
    border-top: 3px solid rgba(255, 255, 255, .16);
    border-radius: 50%;
    transform: rotate(-16deg);
    box-shadow:
        0 25px 0 rgba(255, 255, 255, .08),
        0 50px 0 rgba(255, 255, 255, .05);
}

.brand-content {
    position: relative;
    z-index: 2;
    width: min(520px, 100%);
}

.logo-wrap {
    width: 290px;
    background: white;
    border-radius: 10px;
    padding: 18px 22px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.logo-wrap img {
    width: 100%;
    display: block;
}

.brand-content h1 {
    margin: 0 0 18px;
    font-size: clamp(38px, 4vw, 60px);
    line-height: 1.05;
    font-weight: 800;
}

.brand-content p {
    margin: 0;
    max-width: 450px;
    font-size: 19px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .88);
}

.brand-line {
    width: 75px;
    height: 5px;
    background: white;
    border-radius: 10px;
    margin: 28px 0;
}

/* Login panel */
.login-panel {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card {
    width: min(440px, 100%);
}

.mobile-logo {
    display: none;
}

.login-card h2 {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 800;
}

.login-subtitle {
    margin: 0 0 34px;
    color: var(--muted);
    font-size: 15px;
}

.form-group {
    margin-bottom: 21px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 750;
}

.input-wrap {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b9199;
    font-size: 18px;
}

input {
    width: 100%;
    height: 54px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    padding: 0 46px;
    font-size: 16px;
    color: var(--text);
    transition: .2s;
}

input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 6, 19, .09);
}

.password-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #777d85;
    cursor: pointer;
    font-size: 17px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 25px;
    font-size: 14px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555b63;
}

.remember input {
    width: 16px;
    height: 16px;
    padding: 0;
    accent-color: var(--red);
}

.forgot {
    color: var(--red);
    text-decoration: none;
    font-weight: 650;
}

.login-btn {
    width: 100%;
    height: 55px;
    border: 0;
    border-radius: 8px;
    background: var(--red);
    color: white;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 7px 16px rgba(227, 6, 19, .18);
    transition: .2s;
}

.login-btn:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 30px 0 22px;
    color: #a0a4aa;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e8e8e8;
}

.support {
    text-align: center;
    font-size: 13px;
    color: var(--muted);
}

.support a {
    color: var(--red);
    font-weight: 700;
    text-decoration: none;
}

.copyright {
    margin-top: 35px;
    text-align: center;
    color: #a0a4aa;
    font-size: 12px;
}

.error {
    display: none;
    margin: 0 0 18px;
    padding: 11px 13px;
    border-radius: 7px;
    background: #fff0f1;
    color: #c5000b;
    font-size: 13px;
    border: 1px solid #ffd1d4;
}

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

    .brand-panel {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 30px 22px;
    }

    .mobile-logo {
        display: block;
        width: 210px;
        margin: 0 auto 45px;
    }

    .mobile-logo img {
        width: 100%;
        display: block;
    }
}

@media (max-width: 480px) {
    .login-panel {
        padding: 25px 18px;
    }

    .mobile-logo {
        width: 185px;
        margin-bottom: 38px;
    }

    .login-card h2 {
        font-size: 29px;
    }

    .login-subtitle {
        margin-bottom: 27px;
    }

    .form-options {
        font-size: 13px;
    }
}