/* --- VARIABEL WARNA & GLOBAL --- */
:root {
    --primary: #4f46e5;       
    --primary-hover: #4338ca; 
    --bg-app: #f8fafc;        
    --surface: #ffffff;       
    --text-main: #0f172a;     
    --text-sub: #64748b;      
    --success: #10b981;       
    --warning: #f59e0b;       
    --danger: #ef4444;        
    --income-bg: #ecfdf5;    
    --income-text: #065f46;  
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-app);
    margin: 0; color: var(--text-main);
    height: 100vh; display: flex; flex-direction: column; overflow: hidden; 
}

/* =========================================
   2. HEADER (DIPERBESAR)
   ========================================= */
.top-bar {
    background: var(--surface);
    padding: 0 25px; 
    height: 80px; /* KITA PERBESAR TINGGI HEADER DARI 60px JADI 80px */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    border-bottom: 1px solid #e2e8f0; 
    flex-shrink: 0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); /* Tambah bayangan halus biar keren */
    z-index: 50;
}

.brand { display: flex; align-items: center; gap: 15px; }

.brand h2 { 
    margin: 0; 
    font-size: 22px; /* Font Judul diperbesar biar imbang sama logo */
    font-weight: 800;
    color: var(--primary); 
    letter-spacing: -0.5px;
}

.brand-logo-large { 
    width: 65px;  /* LOGO JADI BESAR (Sebelumnya 35px) */
    height: 65px; /* LOGO JADI BESAR */
    object-fit: contain; 
    border-radius: 8px; /* Opsional: Biar sudutnya tidak tajam */
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.2)); /* Efek bayangan biar logo 'pop up' */
    transition: transform 0.3s ease;
}

/* Efek saat mouse diarahkan ke logo (opsional, biar interaktif) */
.brand-logo-large:hover {
    transform: scale(1.1) rotate(5deg);
}

.live-badge { 
    background: #ecfdf5; color: var(--success); 
    padding: 6px 12px; border-radius: 20px; 
    font-size: 13px; font-weight: 700; 
    display: flex; align-items: center; gap: 6px; 
    border: 1px solid #a7f3d0;
}
.dot { width: 10px; height: 10px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2); }
.top-actions { display: flex; gap: 10px; }

/* =========================================
   3. MAIN LAYOUT (PENYESUAIAN TINGGI)
   ========================================= */
.main-layout {
    display: flex; 
    flex-direction: row;
    /* Ubah pengurang tinggi layar karena header makin tinggi (80px) */
    height: calc(100vh - 80px); 
    overflow: hidden; 
    background-color: var(--bg-app);
}

/* ... Sisanya ke bawah (panel-left, panel-right) TETAP SAMA seperti sebelumnya ... */
.panel-left {
    flex-grow: 1; padding: 20px;
    overflow-y: auto; min-width: 500px;
    border-right: 1px solid #cbd5e1;
}

.panel-right {
    width: 380px; flex-shrink: 0; 
    background: var(--surface); padding: 25px;
    display: flex; flex-direction: column;
    overflow-y: auto;
    box-shadow: -4px 0 15px rgba(0,0,0,0.03); z-index: 10;
}

/* LAYOUT UTAMA */
.main-layout {
    display: flex; flex-direction: row;
    height: calc(100vh - 60px); overflow: hidden; background-color: var(--bg-app);
}

.panel-left {
    flex-grow: 1; padding: 20px;
    overflow-y: auto; min-width: 500px;
    border-right: 1px solid #cbd5e1;
}

.panel-right {
    width: 380px; flex-shrink: 0; 
    background: var(--surface); padding: 25px;
    display: flex; flex-direction: column;
    overflow-y: auto;
    box-shadow: -4px 0 15px rgba(0,0,0,0.03); z-index: 10;
}

/* ... CSS SEBELUMNYA ... */

/* GANTI BAGIAN INCOME CARD DENGAN INI */
.income-card {
    background: var(--income-bg);
    border: 1px solid #6ee7b7;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1);
    
    /* TAMBAHAN AGAR BISA DIKLIK */
    cursor: pointer;
    transition: all 0.2s;
}

.income-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.2);
    border-color: #34d399;
    background: #d1fae5;
}

/* ... SISANYA SAMA ... */
/* BOOTH & TABLE */
.booth-monitor {
    background: var(--surface); border: 2px solid #e2e8f0;
    border-radius: 12px; margin-bottom: 25px; overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05); transition: 0.3s;
}
.booth-header {
    background: #f8fafc; padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between;
    align-items: center; font-weight: 700; color: var(--text-sub); font-size: 13px;
}
.booth-content { padding: 25px; text-align: center; min-height: 110px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state h3 { color: var(--text-sub); margin: 0; }
.empty-state p { color: #94a3b8; margin: 8px 0 0; font-size: 13px; }
.active-session { width: 100%; display: flex; justify-content: space-between; align-items: center; }
.session-info { text-align: left; }
.session-queue { font-size: 36px; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; }
.session-name { font-size: 18px; font-weight: 700; margin: 8px 0; color: var(--text-main); }
.session-detail { font-size: 14px; color: var(--text-sub); background: #f1f5f9; padding: 4px 8px; border-radius: 4px; }
.badge-idle { background: #e2e8f0; color: #64748b; padding: 4px 10px; border-radius: 6px; font-size: 11px; }
.badge-active { background: var(--primary); color: white; padding: 4px 10px; border-radius: 6px; font-size: 11px; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

/* TABLE */
.panel-header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.badge-count { background: var(--primary); color: white; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.table-container { background: var(--surface); border-radius: 10px; border: 1px solid #e2e8f0; overflow-y: auto; height: 100%; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: #f8fafc; padding: 12px 15px; text-align: left; font-size: 12px; color: var(--text-sub); position: sticky; top: 0; }
.data-table td { padding: 12px 15px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }

/* INPUT FORM */
.panel-right h3 { margin-top: 0; margin-bottom: 20px; font-size: 18px; color: var(--primary); border-bottom: 2px dashed #e2e8f0; padding-bottom: 15px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 13px; }
.form-group input { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; background: #f8fafc; }
.form-group input:focus { outline: none; border-color: var(--primary); background: #fff; }
.catalog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pkg-card { border: 1px solid #e2e8f0; padding: 15px 10px; border-radius: 8px; cursor: pointer; text-align: center; background: white; }
.pkg-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.pkg-card.selected { border-color: var(--primary); background: #e0e7ff; color: var(--primary); font-weight: bold; }
.total-bar { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin: 20px 0; border-top: 2px dashed #e2e8f0; padding-top: 15px; }

/* BUTTONS */
button { cursor: pointer; border: none; font-family: inherit; border-radius: 6px; transition: 0.2s; font-weight: 600; }
.btn-primary { background: var(--primary); color: white; padding: 12px; width: 100%; margin-top: 10px; }
.btn-qr { background: #1e293b; color: white; padding: 12px; width: 100%; margin-top: 8px; }
.btn-call { background: var(--primary); color: white; padding: 6px 14px; font-size: 12px; border-radius: 20px; }
.btn-finish { background: var(--success); color: white; padding: 10px 24px; font-size: 14px; border-radius: 8px; }
.btn-secondary, .btn-settings, .btn-status { padding: 8px 12px; font-size: 12px; color: var(--text-main); background: #e2e8f0; }
.btn-status.open { background: #dcfce7; color: #166534; }
.btn-status.closed { background: #fee2e2; color: #991b1b; }
.btn-danger-outline { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 7px 12px; font-size: 11px; }
.btn-save { background: var(--primary); color: white; padding: 8px 20px; border-radius: 6px; }

/* MODAL */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.5); backdrop-filter: blur(2px); }
.modal-content { background-color: white; margin: 15% auto; padding: 25px; border-radius: 12px; width: 90%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); animation: popIn 0.2s ease-out; }
@keyframes popIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-footer { margin-top: 20px; text-align: right; display: flex; gap: 10px; justify-content: flex-end; }
.setting-item { display: flex; justify-content: space-between; margin-bottom: 12px; align-items: center; }
.setting-item input { width: 100px; padding: 6px; }
/* UTILS */
.loading-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.9); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 999; }
.spinner { width: 40px; height: 40px; border: 4px solid #e2e8f0; border-top: 4px solid var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }