* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
    min-height: 100vh;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f5f5f5;
    position: relative;
    overflow-x: hidden;
    background-image: url('/static/img/dashboard_dark.webp');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: brightness(1.6) contrast(0.7) saturate(0.5);
}

[data-theme="dark"] body {
    background-image: url('/static/img/dashboard_light.webp');
    filter: brightness(0.6) contrast(1.1);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 0;
}

[data-theme="dark"] body::before {
    background: rgba(3, 0, 0, 0.40);
}

/* Theme toggle button on login page */
.theme-btn-login {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10;
    background: rgba(15, 2, 2, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #d4af37;
    font-size: 1.1rem;
    transition: all 0.25s ease;
}

.theme-btn-login:hover {
    background: rgba(212, 175, 55, 0.20);
    border-color: #d4af37;
    transform: scale(1.1);
    color: #f0c84a;
}

/* 3:2 Layout container */
.login-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 3fr 2fr;
    min-height: 100vh;
}

.login-left {
    position: relative;
}

.login-right {
    background: transparent;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ── 4D+1 — pojok kiri atas ── */
.logo-4d {
    position: fixed;
    top: 5%;
    left: 4%;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    line-height: 1;
    z-index: 5;
}

.logo-4d-text {
    display: flex;
    align-items: baseline;
    gap: 0.1em;
}

.logo-4d .text-4d {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    color: #cc1111;
    text-shadow:
        2px 2px 0 #7a0000,
        0 0 30px rgba(220, 0, 0, 0.6),
        0 0 60px rgba(200, 0, 0, 0.3);
    letter-spacing: -2px;
}

.logo-4d .text-plus1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
    font-weight: 900;
    color: #e8e8e8;
    text-shadow: 2px 2px 0 #555, 0 0 20px rgba(255,255,255,0.2);
}

.logo-4d-line {
    width: 140%;
    height: 2px;
    background: linear-gradient(to right, transparent, #ff3300 30%, #ff6600 50%, #ff3300 70%, transparent);
    box-shadow:
        0 0 6px 2px rgba(255, 60, 0, 0.9),
        0 0 16px 4px rgba(200, 0, 0, 0.5),
        0 0 30px 6px rgba(180, 0, 0, 0.3);
    border-radius: 50%;
}

/* ── Garis dekoratif bawah ── */
.deco-line {
    display: none;
}

.deco-line .line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(180, 0, 0, 0.8), transparent);
}

.deco-diamond {
    width: 7px;
    height: 7px;
    background: #cc1111;
    transform: rotate(45deg);
    box-shadow: 0 0 6px rgba(200, 0, 0, 0.8);
    flex-shrink: 0;
}

/* ── Bottom bar ── */
.bottom-bar {
    position: fixed;
    bottom: 5%;
    left: 4%;
    right: 4%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    z-index: 5;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-shrink: 0;
}

.brand-name {
    font-size: clamp(0.9rem, 2vw, 1.7rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.1;
    white-space: nowrap;
}

.brand-name .depth { color: #cc1111; }

.divider-v {
    width: 2px;
    height: 2.5rem;
    background: #cc1111;
    flex-shrink: 0;
}

.brand-tagline {
    font-size: clamp(0.6rem, 1vw, 0.85rem);
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.6;
    white-space: nowrap;
}

.brand-slogan {
    font-size: clamp(0.5rem, 0.85vw, 0.72rem);
    color: #c8962a;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-align: right;
    white-space: nowrap;
}

/* ── Form login ── */
.login-wrap {
    position: relative;
    z-index: 4;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 2, 2, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 18px;
    padding: 2.5rem 2rem;
    box-shadow:
        0 0 25px rgba(255, 255, 255, 0.18),
        0 0 60px rgba(255, 255, 255, 0.08),
        0 24px 60px rgba(0,0,0,0.6),
        0 0 0 1px rgba(212,175,55,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.login-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow:
        0 0 35px rgba(255, 255, 255, 0.30),
        0 0 90px rgba(255, 255, 255, 0.12),
        0 32px 70px rgba(0,0,0,0.7),
        0 0 0 1px rgba(212,175,55,0.2);
}

.login-logo {
    width: auto;
    height: 3.5rem;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.4));
}

.form-heading {
    font-size: clamp(1rem, 4vw, 1.3rem);
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.form-heading .depth { color: #cc1111; }

.form-subheading {
    color: rgba(255, 220, 170, 0.55);
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 1.8rem;
}

.form-label {
    color: rgba(255, 220, 170, 0.85);
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-group-text {
    background: rgba(100, 0, 0, 0.40);
    border: 1px solid rgba(212, 175, 55, 0.30);
    border-right: none;
    color: #d4af37;
}

.form-control {
    background: rgba(30, 4, 0, 0.45);
    border: 1px solid rgba(212, 175, 55, 0.30);
    border-left: none;
    color: #fff8ee;
    padding: 0.6rem 0.85rem;
}

.form-control::placeholder { color: rgba(255, 200, 150, 0.35); }

.form-control:focus {
    background: rgba(40, 5, 0, 0.55);
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
    color: #fff8ee;
}

.input-group:focus-within .input-group-text {
    border-color: #d4af37;
    color: #f0c84a;
}

.btn-login {
    background: linear-gradient(135deg, #7a0000, #a81500);
    border: 1px solid rgba(212, 175, 55, 0.40);
    color: #ffeebb;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    padding: 0.65rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(120, 0, 0, 0.35);
}

.btn-login:hover {
    background: linear-gradient(135deg, #9a0000, #cc0000);
    border-color: #d4af37;
    box-shadow: 0 6px 20px rgba(160, 0, 0, 0.5);
    transform: translateY(-1px);
    color: #fff;
}

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

.alert {
    background: rgba(80, 0, 0, 0.40);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: #ffb3b3;
    font-size: 0.82rem;
    border-radius: 8px;
    padding: 0.6rem 0.8rem;
}

.register-link {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.82rem;
    color: rgba(255, 220, 170, 0.55);
}

.register-link a {
    color: #d4af37;
    font-weight: 600;
    text-decoration: none;
}

.register-link a:hover {
    color: #f0c84a;
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.7rem;
    color: rgba(255, 220, 150, 0.40);
}

/* ── Responsive mobile ── */
@media (max-width: 768px) {
    .login-container {
        grid-template-columns: 1fr;
    }

    .login-left {
        display: none;
    }

    .brand-slogan { display: none; }
    .brand-tagline { display: none; }
    .divider-v  { display: none; }

    .bottom-bar {
        bottom: 2%;
        left: 0;
        right: 0;
        justify-content: center;
        gap: 0;
    }

    .brand-name {
        font-size: 0.75rem;
        letter-spacing: 2px;
        white-space: normal;
        text-align: center;
    }

    .logo-4d { top: 3%; right: 3%; }
    .logo-4d .text-4d  { font-size: 3rem; }
    .logo-4d .text-plus1 { font-size: 2rem; }

    .login-wrap {
        padding: 2rem 1rem 6rem;
    }

    .login-card {
        width: 100%;
        max-width: 400px;
        border-radius: 14px;
        padding: 2rem 1.5rem;
    }
}
