@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* =========================================
   1. CSS VARIABLES (THEMES)
========================================= */
:root {
    --bg-color: #e0e5ec;
    --text-color: #1a1a1a;
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    
    --btn-primary: rgba(0, 123, 255, 0.8);
    --btn-success: rgba(40, 167, 69, 0.8);
    --btn-danger: rgba(220, 53, 69, 0.8);
    --btn-warning: rgba(255, 193, 7, 0.8);
    --btn-info: rgba(23, 162, 184, 0.8);
}

body.dark-mode {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

/* =========================================
   2. GLOBAL STYLES & BACKGROUND
========================================= */
* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Background Parallax Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(60px);
    z-index: -1;
    opacity: 0.6;
}
.shape1 { width: 400px; height: 400px; background: #ff007f; top: -10%; left: -10%; }
.shape2 { width: 500px; height: 500px; background: #00d2ff; bottom: -10%; right: -5%; }
.shape3 { width: 300px; height: 300px; background: #7b2cbf; top: 40%; left: 40%; }

/* Liquid Glass Effect */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 16px;
}

/* =========================================
   3. TOP BAR & HEADER NAVBAR
========================================= */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 30px;
    margin-bottom: -10px;
}

.clock { font-size: 0.95em; font-weight: 600; letter-spacing: 1px; }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin: 20px;
    gap: 20px;
}

/* Container Logo Kiri dan Kanan */
.nav-logos {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1; /* Memberikan ruang proporsional agar tengah seimbang */
}
.left-logos { justify-content: flex-start; }
.right-logos { justify-content: flex-end; }

.header-logo {
    max-height: 35px; /* Tinggi seragam untuk 4 logo */
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.05));
}

/* Bagian Tengah Header */
.nav-center {
    flex: 2;
    text-align: center;
}

.event-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.event-subtitle {
    margin: 5px 0 0 0;
    font-size: 0.85rem;
    font-weight: 400;
    opacity: 0.8;
}

/* =========================================
   4. LAYOUT & TOOLBAR
========================================= */
.container { padding: 0 20px 20px 20px; }

.toolbar {
    display: flex;
    gap: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.glass-input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    outline: none;
    font-size: 1em;
    transition: all 0.3s ease;
}
.glass-input:focus { background: rgba(255, 255, 255, 0.2); box-shadow: 0 0 10px rgba(255,255,255,0.2); }

/* =========================================
   DASHBOARD METRICS CARDS
========================================= */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.metric-card {
    padding: 20px;
    text-align: center;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.metric-title {
    font-size: 0.9em;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.7;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--btn-primary); /* Default color */
}

/* Penyesuaian agar warna nilai terlihat jelas di Dark Mode */
body.dark-mode .metric-value[style*="color: #17a2b8"] { color: #00d2ff !important; }
body.dark-mode .metric-value[style*="color: #7b2cbf"] { color: #b76eff !important; }

/* =========================================
   5. BUTTONS
========================================= */
.btn {
    padding: 10px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    margin-right: 5px;
}
.btn-sm { padding: 6px 12px; font-size: 0.85em; }

.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); }
.btn:active:not(:disabled) { transform: translateY(0); }

/* Efek Tombol saat di-disable (Approved/Rejected) */
.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(100%);
}

.btn-glass { background: rgba(255, 255, 255, 0.1); color: var(--text-color); border: 1px solid var(--glass-border); }
.btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, 0.2); }
.btn-primary { background: var(--btn-primary); }
.btn-success { background: var(--btn-success); }
.btn-danger { background: var(--btn-danger); }
.btn-warning { background: var(--btn-warning); color: #000; }
.btn-info { background: var(--btn-info); }

/* =========================================
   6. TABLE
========================================= */
.table-container { padding: 20px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid var(--glass-border); }
th { font-weight: 600; text-transform: uppercase; font-size: 0.9em; letter-spacing: 1px; opacity: 0.8; }

/* Table Row Clickable */
tbody tr { cursor: pointer; transition: background 0.3s ease; }
tbody tr:hover { background: rgba(255, 255, 255, 0.15); }
.action-cell { cursor: default; }

/* =========================================
   7. MODAL & CARD GRID
========================================= */
.modal { display: none; position: fixed; z-index: 100; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); backdrop-filter: blur(5px); }
.modal-content { margin: 5% auto; padding: 30px; width: 90%; max-width: 650px; animation: slideIn 0.4s ease-out; }
.close-btn { float: right; font-size: 28px; cursor: pointer; opacity: 0.7; transition: 0.3s; }
.close-btn:hover { opacity: 1; }

@keyframes slideIn { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

/* Default Light Mode untuk Info Card (Lebih Terang & Kontras) */
.info-card {
    background: #ffffff;
    color: #1a1a1a;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}
.info-card:hover { transform: translateY(-2px); }
.info-card.full-width { grid-column: span 2; }

.info-label {
    font-size: 0.75em;
    text-transform: uppercase;
    color: #555; /* Abu-abu gelap agar kontras di light mode */
    margin-bottom: 5px;
    letter-spacing: 1px;
    font-weight: 600;
}
.info-value {
    font-size: 1.05em;
    font-weight: 600;
    color: #000;
}

/* Transisi ke Dark Mode untuk Info Card */
body.dark-mode .info-card {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
    border: 1px solid var(--glass-border);
    box-shadow: none;
}
body.dark-mode .info-card:hover { background: rgba(255, 255, 255, 0.1); }
body.dark-mode .info-label { color: #aaa; }
body.dark-mode .info-value { color: #fff; }

/* =========================================
   8. GLOBAL LOADER
========================================= */
.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px);
    z-index: 9999; display: flex; flex-direction: column;
    justify-content: center; align-items: center; color: white;
    visibility: hidden; opacity: 0; transition: opacity 0.3s ease;
}
.loader-overlay.active { visibility: visible; opacity: 1; }

.spinner {
    width: 60px; height: 60px;
    border: 5px solid rgba(255,255,255,0.2);
    border-top-color: #00d2ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================
   9. FOOTER
========================================= */
.footer {
    text-align: center;
    padding: 15px;
    margin: 20px;
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.9;
}

/* =========================================
   10. RESPONSIVE DESIGN (MEDIA QUERIES)
========================================= */
@media (max-width: 900px) {
    .navbar { flex-direction: column; text-align: center; }
    .nav-logos { justify-content: center; flex-wrap: wrap; }
    .left-logos, .right-logos { justify-content: center; width: 100%; }
}

@media (max-width: 600px) {
    .modal-grid { grid-template-columns: 1fr; }
    .info-card.full-width { grid-column: span 1; }
    .toolbar { flex-direction: column; }
    .top-bar { flex-direction: column; gap: 10px; }
}