/* --- RESET & DASAR --- */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: #f0f2f5; 
    color: #333;
    line-height: 1.6;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- LAYOUT --- */
.container { 
    background: white; 
    padding: 30px; 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); 
    width: 100%;       
    max-width: 98%;    
    margin: 0 auto;    
    min-height: 80vh;  
}

h2, h3 {
    margin-bottom: 20px;
    color: #2c3e50;
}

/* --- TABEL --- */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
    background: #fff; 
    border-radius: 8px;
    overflow: hidden;
}

/* Sticky Header & Warna Dasar Header */
table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #2c3e50; /* Biru Navy Gelap */
    color: #ffffff !important; /* WAJIB PUTIH AGAR TERBACA */
    padding: 15px;
    font-size: 13px;
    text-transform: uppercase;
    font-weight: 700;
    text-align: center;
    border: none;
    opacity: 1 !important;
}

table td { 
    border-bottom: 1px solid #edf2f7; 
    padding: 12px 15px; 
    text-align: left; 
    color: #4a5568;
}

/* Warna Khusus Kolom Header */
th.col-alpa-head {
    background-color: #e74c3c !important; /* Merah */
    color: #ffffff !important;
}

th.col-qr-head {
    background-color: #95a5a6 !important; /* Abu-abu */
    color: #ffffff !important;
}

/* Baris Selang-Seling & Hover */
table tr:nth-child(even) { background-color: #f8fafc; }
table tr:hover { background-color: #f1f5f9; transition: 0.2s; }

/* Baris yang sudah Scan QR (Hijau) */
.row-scanned { 
    background-color: #d4edda !important; 
}

/* --- TOMBOL --- */
.btn { 
    padding: 12px 24px; 
    color: white; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    text-decoration: none; 
    display: inline-block; 
    font-size: 14px; 
    font-weight: 600;
    margin: 5px 2px; 
    transition: 0.2s;
}

.btn:hover { 
    opacity: 0.85; 
    transform: translateY(-1px); 
}

.btn-save { background-color: #28a745; }
.btn-back { background-color: #6c757d; }
.btn-qr-print {
    background-color: #6f42c1;
    color: white !important;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 11px;
    text-decoration: none;
}

/* --- FORM INPUT --- */
input[type="date"], select { 
    padding: 10px 15px; 
    border: 1px solid #ced4da; 
    border-radius: 6px; 
    margin-bottom: 15px; 
    font-size: 14px;
}

input[type="date"] { max-width: 250px; }

/* --- RESPONSIVE --- */
@media screen and (max-width: 768px) {
    .container { padding: 15px; }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* Styling Navbar */
.navbar {
    background: #280264;
    padding: 15px 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.nav-logo {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    letter-spacing: 1px;
}
.nav-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    align-items: center;
    margin: 0;
}
.nav-menu li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.3s;
    padding: 8px 12px;
    border-radius: 5px;
}
.nav-menu li a:hover, .nav-menu li a.active {
    color: white;
    background: rgba(255,255,255,0.1);
}
.btn-logout {
    background: #dc3545 !important;
    color: white !important;
}
.btn-logout:hover {
    background: #c82333 !important;
}

/* Responsif Mobile */
@media (max-width: 768px) {
    .nav-container { flex-direction: column; gap: 15px; }
    .nav-menu { gap: 10px; flex-wrap: wrap; justify-content: center; }
}