*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Nunito', sans-serif;
    background: #f5f0ed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 860px;
    width: 100%;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(178, 62, 39, 0.12);
}

/* LEFT PANEL */
.left {
    background: #b23e27;
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.left::before {
    content: '';
    position: absolute;
    top: -70px;
    right: -70px;
    width: 230px;
    height: 230px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.left::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.logo-area {
    position: relative;
    z-index: 1;
}

.logo-area img {
    height: 180px;
    width: auto;
    object-fit: contain;
}

.login-logo {
    width: 300px;
    height: auto;
    object-fit: cover;
    filter: brightness(0) invert(1);
}

.left-footer {
    position: relative;
    z-index: 1;
}

.admin-badge {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 1rem;
}

.tagline {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    letter-spacing: 0.02em;
}

/* RIGHT PANEL */
.right {
    padding: 3rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome {
    font-size: 2rem;
    font-weight: bold;
    color: #1a1a1a;
    letter-spacing: 0.06em;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
}

.sub-welcome {
    font-size: 1rem;
    color: #aaa;
    margin-bottom: 2rem;
    letter-spacing: 0.08em;
}

/* Error alert */
.alert-danger {
    background: #fdf2f0;
    border: 1px solid #f0c4bb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.72rem;
    color: #b23e27;
    letter-spacing: 0.03em;
    line-height: 1.7;
}

.alert-danger ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #b23e27;
    margin-bottom: 0.45rem;
}

.field input[type="text"],
.field input[type="password"] {
    width: 100%;
    padding: 0.72rem 1rem;
    border: 1.5px solid #e8ddd9;
    border-radius: 10px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.85rem;
    color: #1a1a1a;
    background: #fdf9f8;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
    letter-spacing: 0.04em;
}

.field input[type="text"]:focus,
.field input[type="password"]:focus {
    border-color: #b23e27;
    background: #fff;
}

.row-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.2rem 0 1.5rem;
}

.check-wrap {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

.check-wrap input[type="checkbox"] {
    accent-color: #b23e27;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.check-wrap label {
    font-size: 0.72rem;
    color: #999;
    letter-spacing: 0.06em;
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 0.82rem;
    background: #b23e27;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 0.82rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.btn-login:hover {
    background: #9a3421;
}

.btn-login:active {
    transform: scale(0.99);
}

hr {
    border: none;
    border-top: 1px solid #f0e8e5;
    margin: 1.25rem 0 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet landscape */
@media (max-width: 860px) {
    body {
        padding: 1.5rem;
    }

    .login-logo {
        width: 200px !important;
    }

    .logo-area img {
        height: 140px;
    }

    .left {
        padding: 2.5rem 2rem;
    }

    .right {
        padding: 2.5rem 2rem;
    }

    .welcome {
        font-size: 1.6rem;
    }
}

/* Tablet portrait — left panel jadi header horizontal */
@media (max-width: 640px) {
    body {
        padding: 1.25rem;
        align-items: flex-start;
    }

    .card {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .left {
        flex-direction: row;
        align-items: center;
        padding: 1.5rem 1.75rem;
        gap: 1rem;
    }

    .left::before {
        width: 130px;
        height: 130px;
        top: -40px;
        right: -40px;
    }

    .left::after {
        width: 90px;
        height: 90px;
        bottom: -25px;
        left: -25px;
    }

    .logo-area img,
    .login-logo {
        width: 130px !important;
        height: auto !important;
    }

    .left-footer {
        text-align: right;
    }

    .admin-badge {
        font-size: 0.6rem;
        margin-bottom: 0.4rem;
    }

    .tagline {
        display: none;
    }

    .right {
        padding: 2rem 1.75rem 2.25rem;
    }

    .welcome {
        font-size: 1.5rem;
    }

    .sub-welcome {
        font-size: 0.88rem;
        margin-bottom: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    body {
        padding: 1rem;
        align-items: center;
    }

    .card {
        border-radius: 16px;
    }

    .left {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.75rem 1.5rem 1.5rem;
        gap: 0.75rem;
    }

    .logo-area img,
    .login-logo {
        width: 110px !important;
        height: auto !important;
    }

    .left-footer {
        text-align: center;
    }

    .admin-badge {
        font-size: 0.58rem;
        margin-bottom: 0;
    }

    .tagline {
        display: none;
    }

    .right {
        padding: 1.75rem 1.5rem 2rem;
    }

    .welcome {
        font-size: 1.35rem;
    }

    .sub-welcome {
        font-size: 0.83rem;
        margin-bottom: 1.25rem;
    }

    .field input[type="text"],
    .field input[type="password"] {
        padding: 0.8rem 1rem;
        font-size: 0.88rem;
    }

    .btn-login {
        padding: 0.88rem;
    }

    .row-check {
        margin: 0.1rem 0 1.2rem;
    }
}

/* Mobile XS */
@media (max-width: 360px) {
    body {
        padding: 0.75rem;
    }

    .left {
        padding: 1.5rem 1.25rem;
    }

    .logo-area img,
    .login-logo {
        width: 90px !important;
    }

    .right {
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .welcome {
        font-size: 1.2rem;
    }
}