/* ==========================================================================
   0. CONFIGURATION & THEME VARIABLES (TAMBAHAN UTAMA)
   ========================================================================== */
:root {
    /* --- MODE TERANG (DEFAULT) --- */
    --bg-body: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    --bg-card: #ffffff;
    --bg-filter: #fafafa;
    --text-main: #2c3e50;
    --text-title: #1a252f;
    --text-muted: #7f8c8d;
    --border-color: #e2e8f0;
    --input-border: #cbd5e1;
    --input-bg: #ffffff;
    --shadow-main: rgba(0, 0, 0, 0.05);
    --shadow-card: rgba(0, 0, 0, 0.08);
    --header-bg: rgba(255, 255, 255, 0.95);
    --header-scrolled-bg: rgba(255, 255, 255, 0.9);
}

html[data-theme="dark"] {
    /* --- MODE GELAP (DARK MODE) --- */
    --bg-body: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --bg-card: #1e293b;
    --bg-filter: #1e293b;
    --text-main: #cbd5e1;
    --text-title: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --input-border: #475569;
    --input-bg: #0f172a;
    --shadow-main: rgba(0, 0, 0, 0.2);
    --shadow-card: rgba(0, 0, 0, 0.3);
    --header-bg: rgba(30, 41, 59, 0.95);
    --header-scrolled-bg: rgba(30, 41, 59, 0.9);
}

/* ==========================================================================
   1. RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: var(--bg-body); /* <--- DIGANTI VARIABEL GRADASI */
    color: var(--text-main);  /* <--- DIGANTI VARIABEL TEXT */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background 0.3s ease, color 0.3s ease; /* Transisi halus */
}

/* ==========================================================================
   2. HEADER & NAVIGATION (Dinamis)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    background: var(--header-bg); /* <--- DITINGKATKAN */
    box-shadow: 0 2px 15px var(--shadow-main);
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 20px 40px;
}

header.scrolled {
    width: 80%;
    top: 15px;
    border-radius: 50px;
    padding: 12px 30px;
    box-shadow: 0 5px 25px var(--shadow-main);
    background: var(--header-scrolled-bg); /* <--- DITINGKATKAN */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-title); /* <--- DITINGKATKAN */
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.logo span {
    color: #d4af37;
    margin-right: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted); /* <--- DITINGKATKAN */
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #d4af37;
}

.btn-signin {
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: #ffffff !important;
    padding: 10px 24px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(26, 37, 47, 0.2);
    transition: all 0.3s transform, box-shadow ease !important;
}

.btn-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.3);
    background: linear-gradient(135deg, #d4af37 0%, #b8972f 100%);
}

/* ==========================================================================
   3. SIDE LIVE CLOCK (Kanan Atas)
   ========================================================================== */
#live-clock {
    position: fixed;
    top: 120px;
    right: 40px;
    background: var(--bg-card); /* <--- DITINGKATKAN */
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-main);
    border-left: 4px solid #d4af37;
    z-index: 999;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#live-clock.hidden {
    opacity: 0;
    transform: translateX(50px);
    pointer-events: none;
}

.clock-time {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-title); /* <--- DITINGKATKAN */
    letter-spacing: 1px;
}

.clock-date {
    font-size: 0.75rem;
    color: var(--text-muted); /* <--- DITINGKATKAN */
    text-transform: uppercase;
    margin-top: 2px;
}

/* ==========================================================================
   4. HERO / MAIN CONTENT
   ========================================================================== */
.hero-section {
    padding-top: 180px;
    padding-bottom: 60px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    flex-grow: 1;
}

.badge {
    background-color: rgba(212, 175, 55, 0.1);
    color: #b8972f;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.8rem;
    color: var(--text-title); /* <--- DITINGKATKAN */
    margin-bottom: 20px;
    font-weight: 400;
}

h1 strong {
    font-weight: 700;
    color: #d4af37;
}

.lead-text {
    font-size: 1.1rem;
    color: var(--text-muted); /* <--- DITINGKATKAN */
    line-height: 1.8;
    margin-bottom: 40px;
}

.features-preview {
    margin-top: 20px;   /* Jarak dari teks atas */
    margin-bottom: 20px; /* Jarak dari teks bawah (ini solusinya!) */
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.tag-service {
    margin-bottom: 8px;
    background: var(--bg-card); /* <--- DITINGKATKAN */
    border: 1px dashed var(--input-border); /* <--- DITINGKATKAN */
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: inline-block;
    color: var(--text-muted); /* <--- DITINGKATKAN */
}

/* ==========================================================================
   5. FOOTER BERKOTAK-KOTAK (GRID)
   ========================================================================== */
footer {
    background: var(--bg-card); /* <--- DITINGKATKAN */
    border-top: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    width: 100%;
    padding: 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    margin: 0 auto;
}

.footer-box {
    padding: 20px;
    text-align: center;
    border-right: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-box:last-child {
    border-right: none;
}

.footer-box-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted); /* <--- DITINGKATKAN */
    margin-bottom: 5px;
    font-weight: 600;
}

.footer-box-content {
    font-size: 1rem;
    color: var(--text-main); /* <--- DITINGKATKAN */
    font-weight: 500;
}

#footer-time {
    font-weight: 700;
    color: var(--text-title); /* <--- DITINGKATKAN */
    letter-spacing: 1px;
}

/* ==========================================================================
   6. SEPARATE LOGIN PAGE STYLES (REVISED)
   ========================================================================== */
body.login-page {
    background: var(--bg-body); /* <--- DITINGKATKAN */
    min-height: 100vh;
}

.login-main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 140px;
    padding-bottom: 60px;
    width: 100%;
    flex-grow: 1;
}

.login-card {
    background: var(--bg-card); /* <--- DITINGKATKAN */
    width: 80%;
    max-width: 600px;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 15px 35px var(--shadow-card); /* <--- DITINGKATKAN */
    border-top: 5px solid #d4af37;
    border-left: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    border-right: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    border-bottom: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    transition: all 0.3s ease;
}

.login-card-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-card-header h2 {
    font-size: 1.8rem;
    color: var(--text-title); /* <--- DITINGKATKAN */
    font-weight: 700;
    letter-spacing: 0.5px;
}

.login-card-header p {
    font-size: 0.9rem;
    color: var(--text-muted); /* <--- DITINGKATKAN */
    margin-top: 5px;
}

/* Form Input Styling */
.input-group {
    margin-bottom: 22px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main); /* <--- DITINGKATKAN */
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border); /* <--- DITINGKATKAN */
    background-color: var(--input-bg); /* <--- DITINGKATKAN */
    color: var(--text-title); /* <--- DITINGKATKAN */
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Tombol Submit */
.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(26, 37, 47, 0.15);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #d4af37 0%, #b8972f 100%);
    box-shadow: 0 6px 18px rgba(212, 175, 55, 0.25);
}

/* Footer Card Link */
.login-card-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-muted); /* <--- DITINGKATKAN */
}

.login-card-footer a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-card-footer a:hover {
    text-decoration: underline;
    color: #b8972f;
}

.logo-link, .logo-link:hover, .logo-link:visited, .logo-link:active {
    text-decoration: none !important;
    outline: none;
}

/* ==========================================================================
   7. RESPONSIVE MEDIA QUERIES (UPDATED FOR HAMBURGER MENU)
   ========================================================================== */
@media (max-width: 768px) {
    header.scrolled {
        width: 95%;
        top: 10px;
        border-radius: 25px;
        padding: 10px 20px;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-card); /* <--- DITINGKATKAN */
        flex-direction: column;
        gap: 0;
        box-shadow: 0 10px 25px var(--shadow-main);
        border-radius: 12px;
        margin-top: 10px;
        padding: 10px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
        border: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    }

    .nav-menu.active {
        max-height: 300px;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        display: block;
        padding: 15px 0;
        width: 100%;
        border-bottom: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    }

    .btn-signin {
        background: none;
        color: var(--text-title) !important; /* <--- DITINGKATKAN */
        box-shadow: none;
        border-radius: 0;
        padding: 15px 0;
    }
    
    .btn-signin:hover {
        background: rgba(212, 175, 55, 0.1);
        color: #b8972f !important;
        transform: none;
        box-shadow: none;
    }

    .hamburger-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1001;
    }

    .hamburger-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: var(--text-title); /* <--- DITINGKATKAN */
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger-toggle.active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg);
        background-color: #ef4444;
    }

    .hamburger-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-toggle.active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg);
        background-color: #ef4444;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-box {
        border-right: none;
        border-bottom: 1px solid var(--border-color); /* <--- DITINGKATKAN */
    }
    .footer-box:last-child {
        border-bottom: none;
    }
}

@media (min-width: 769px) {
    .hamburger-toggle {
        display: none;
    }
}

.d-none {
    display: none !important;
}

.input-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--input-border); /* <--- DITINGKATKAN */
    background-color: var(--input-bg); /* <--- DITINGKATKAN */
    color: var(--text-title); /* <--- DITINGKATKAN */
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.input-group select:focus {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* ==========================================================================
   8. TOAST NOTIFICATION LURUS DI KANAN ATAS
   ========================================================================== */
.toast-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-box {
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s ease;
    opacity: 0;
}

.toast-box.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left: 5px solid #047857;
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-left: 5px solid #b91c1c;
}