:root {
    --hse-green: #1D9E75;
    --hse-green-dark: #0F6E56;
    --hse-green-light: #E1F5EE;
    --hse-amber: #EF9F27;
    --hse-red: #E24B4A;
    --sidebar-bg: #08111f;
    --card-bg: #ffffff;
    --body-bg: #f0f4f1;
    --text-main: #1a1a1a;
    --text-muted: #7a8080;
    --border: #e3e7e3;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--body-bg);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ══════════════════════════════════════
           LEFT PANEL
        ══════════════════════════════════════ */
.left-panel {
    width: 46%;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.75rem 2.5rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* Grid texture */
.left-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 38px, rgba(29, 158, 117, .055) 38px, rgba(29, 158, 117, .055) 39px),
        repeating-linear-gradient(90deg, transparent, transparent 38px, rgba(29, 158, 117, .055) 38px, rgba(29, 158, 117, .055) 39px);
    pointer-events: none;
}

/* Glow orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.orb-1 {
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(29, 158, 117, .16) 0%, transparent 68%);
    bottom: -110px;
    right: -100px;
}

.orb-2 {
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(29, 158, 117, .1) 0%, transparent 70%);
    top: 50px;
    right: 30px;
}

.orb-3 {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(29, 158, 117, .08) 0%, transparent 70%);
    top: 200px;
    left: -40px;
}

/* Brand */
.brand {
    position: relative;
    z-index: 1;
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(29, 158, 117, .15);
    border: 1px solid rgba(29, 158, 117, .28);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 10.5px;
    color: var(--hse-green);
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hse-green);
    animation: blink 1.8s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(1.25);
    }
}

.brand-name {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: .5rem;
    letter-spacing: -.5px;
}

.brand-tagline {
    font-size: .82rem;
    color: rgba(255, 255, 255, .38);
    line-height: 1.65;
    max-width: 260px;
}

/* Divider accent */
.left-divider {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2.5rem 0 1.5rem;
}

.left-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .08);
}

.left-divider span {
    font-size: 10px;
    color: rgba(255, 255, 255, .25);
    letter-spacing: 1px;
    white-space: nowrap;
}

.left-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, .08);
}

/* Stats */
.stats {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-card {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    padding: .85rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideUp .5s ease both;
}

.stat-card:nth-child(1) {
    animation-delay: .1s;
}

.stat-card:nth-child(2) {
    animation-delay: .2s;
}

.stat-card:nth-child(3) {
    animation-delay: .3s;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.ic-green {
    background: rgba(29, 158, 117, .2);
    color: var(--hse-green);
}

.ic-amber {
    background: rgba(239, 159, 39, .2);
    color: var(--hse-amber);
}

.ic-red {
    background: rgba(226, 75, 74, .2);
    color: var(--hse-red);
}

.stat-info {
    flex: 1;
}

.stat-val {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-desc {
    font-size: .72rem;
    color: rgba(255, 255, 255, .38);
    margin-top: 2px;
}

.stat-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.badge-up {
    background: rgba(29, 158, 117, .18);
    color: var(--hse-green);
}

.badge-warn {
    background: rgba(239, 159, 39, .18);
    color: var(--hse-amber);
}

.badge-err {
    background: rgba(226, 75, 74, .18);
    color: var(--hse-red);
}

/* Footer left */
.left-footer {
    position: relative;
    z-index: 1;
    margin-top: 2rem;
    font-size: .7rem;
    color: rgba(255, 255, 255, .2);
}

/* ══════════════════════════════════════
           RIGHT PANEL
        ══════════════════════════════════════ */
.right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    position: relative;
    background: var(--body-bg);
}

.right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle at top right, rgba(29, 158, 117, .07) 0%, transparent 70%);
    pointer-events: none;
}

/* Login Card */
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 2.4rem 2.2rem;
    box-shadow: 0 4px 32px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 1;
    animation: fadeCard .5s ease both;
}

@keyframes fadeCard {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top accent bar */
.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 2.2rem;
    right: 2.2rem;
    height: 3px;
    background: linear-gradient(90deg, var(--hse-green), var(--hse-green-dark));
    border-radius: 0 0 4px 4px;
}

/* Card header */
.card-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--hse-green);
    margin-bottom: .35rem;
}

.card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: .3rem;
}

.card-sub {
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

/* Error */
.alert-err {
    display: none;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: .65rem .9rem;
    font-size: .8rem;
    color: #b91c1c;
    margin-bottom: 1.1rem;
}

.alert-err.show {
    display: flex;
}

/* Form fields */
.field-group {
    margin-bottom: 1rem;
}

.field-label {
    display: block;
    font-size: .79rem;
    font-weight: 500;
    color: #444;
    margin-bottom: .4rem;
}

.field-wrap {
    position: relative;
}

.field-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .95rem;
    color: #c0c8c0;
    pointer-events: none;
    transition: color .2s;
}

.field-input {
    width: 100%;
    background: #f7faf7;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: .72rem .9rem .72rem 2.55rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .875rem;
    color: var(--text-main);
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.field-input::placeholder {
    color: #bdc8bd;
}

.field-input:focus {
    border-color: var(--hse-green);
    background: #fff;
    box-shadow: 0 0 0 3.5px rgba(29, 158, 117, .1);
}

.field-wrap:focus-within .field-icon {
    color: var(--hse-green);
}

/* Password toggle */
.pw-toggle {
    position: absolute;
    right: .85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #c0c8c0;
    font-size: .9rem;
    padding: 0;
    line-height: 1;
    transition: color .2s;
}

.pw-toggle:hover {
    color: var(--hse-green);
}

/* Extras row */
.form-extras {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.4rem;
}

.remember {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .79rem;
    color: var(--text-muted);
    cursor: pointer;
}

.remember input {
    accent-color: var(--hse-green);
    cursor: pointer;
}

.forgot {
    font-size: .79rem;
    color: var(--hse-green);
    text-decoration: none;
    font-weight: 500;
}

.forgot:hover {
    text-decoration: underline;
}

/* Submit */
.btn-login {
    width: 100%;
    background: var(--hse-green);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: .82rem;
    font-family: 'Syne', sans-serif;
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background .2s, transform .12s, box-shadow .2s;
    position: relative;
    overflow: hidden;
}

.btn-login::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .1) 0%, transparent 60%);
    pointer-events: none;
}

.btn-login:hover {
    background: var(--hse-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(29, 158, 117, .28);
}

.btn-login:active {
    transform: translateY(0);
}

/* Loading */
.btn-login.loading .btn-text {
    opacity: 0;
}

.btn-login.loading::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 1.2rem 0;
    font-size: .74rem;
    color: #ccc;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* SSO */
.btn-sso {
    width: 100%;
    background: #f7faf7;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: .72rem;
    font-family: 'DM Sans', sans-serif;
    font-size: .84rem;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background .2s, border-color .2s;
}

.btn-sso:hover {
    background: var(--hse-green-light);
    border-color: #bbd8cc;
}

/* Card footer */
.card-footer {
    text-align: center;
    margin-top: 1.4rem;
    font-size: .73rem;
    color: #bbb;
}

/* ══════════════════════════════════════
           RESPONSIVE
        ══════════════════════════════════════ */

/* Tablet landscape (≤ 1024px) */
@media (max-width: 1024px) {
    .left-panel {
        width: 42%;
        padding: 2.2rem 2rem;
    }

    .brand-name {
        font-size: 1.7rem;
    }
}

/* Tablet portrait (≤ 768px) — panel kiri jadi header atas */
@media (max-width: 768px) {
    body {
        flex-direction: column;
        min-height: 100vh;
        overflow: auto;
    }

    .left-panel {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 1.4rem 1.5rem;
        min-height: auto;
        gap: 1rem;
    }

    /* Sembunyikan stats & divider, tampilkan brand saja */
    .stats,
    .left-divider,
    .left-footer {
        display: none;
    }

    .brand-tagline {
        display: none;
    }

    .brand-name {
        font-size: 1.3rem;
        margin-bottom: 0;
    }

    .brand-chip {
        margin-bottom: .4rem;
    }

    /* Orb juga sembunyikan biar clean */
    .orb {
        display: none;
    }

    /* Stats horizontal compact di samping brand */
    .stats-compact {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        align-items: center;
    }

    .sc-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        background: rgba(255, 255, 255, .06);
        border: 1px solid rgba(255, 255, 255, .08);
        border-radius: 10px;
        padding: 6px 12px;
        min-width: 64px;
    }

    .sc-val {
        font-family: 'Syne', sans-serif;
        font-size: .95rem;
        font-weight: 700;
        color: #fff;
    }

    .sc-desc {
        font-size: 9.5px;
        color: rgba(255, 255, 255, .38);
        margin-top: 1px;
        white-space: nowrap;
    }

    .right-panel {
        padding: 1.5rem 1rem;
        flex: 1;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }
}

/* Mobile (≤ 480px) */
@media (max-width: 480px) {
    .left-panel {
        padding: 1.1rem 1.2rem;
    }

    .stats-compact {
        gap: 6px;
    }

    .sc-item {
        padding: 5px 9px;
        min-width: 56px;
    }

    .sc-val {
        font-size: .85rem;
    }

    .login-card {
        padding: 1.75rem 1.2rem;
    }

    .card-title {
        font-size: 1.3rem;
    }
}

/* Sangat kecil (≤ 360px) */
@media (max-width: 360px) {
    .stats-compact {
        display: none;
    }

    .left-panel {
        padding: 1rem 1.1rem;
    }
}