/* =========================================
   RESET BROWSER & PENGATURAN DASAR
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    overflow-x: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
}

/* =========================================
   HALAMAN LOGIN (index.html)
   ========================================= */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 350px;
    text-align: center;
}

.login-card h2 {
    margin-top: 0;
    color: #333;
}

/* Wadah untuk input PIN dan Ikon Mata */
.password-container {
    position: relative;
    margin: 20px 0;
    width: 100%;
}

/* Desain kotak inputnya */
.password-container input[type="password"],
.password-container input[type="text"] {
    width: 100%;
    padding: 15px;
    padding-right: 45px;
    /* Memberi ruang agar teks tidak tertimpa ikon mata */
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 24px;
    text-align: center;
    letter-spacing: 5px;
    box-sizing: border-box;
}

/* Posisi Ikon Mata */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #7f8c8d;
    font-size: 18px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #2c3e50;
}

/* --- TAMBAHAN DESAIN TOMBOL MASUK --- */
.btn-login {
    background-color: #2c3e50;
    /* Warna biru gelap senada dengan sidebar */
    color: white;
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background-color: #3498db;
    /* Berubah jadi biru terang saat disentuh kursor */
}

/* =========================================
   HALAMAN DASHBOARD (dashboard.html)
   ========================================= */
.dashboard-container {
    display: flex;
    height: 100vh;
    /* Memastikan setinggi layar */
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Mengunci sidebar full ke bawah */
}

.sidebar-header {
    padding: 20px;
    background-color: #1a252f;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #34495e;
    transition: background 0.3s;
}

.sidebar-menu li:hover {
    background-color: #34495e;
}

.sidebar-menu li.active {
    background-color: #3498db;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    /* Memastikan hanya konten kanan yang bisa discroll */
    height: 100vh;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

.card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* =========================================
   KOMPONEN UMUM (Tombol, Form, & Alert)
   ========================================= */
button {
    padding: 10px 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.btn-primary {
    background-color: #2c3e50;
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: #3498db;
}

.btn-logout {
    background-color: #e74c3c;
    color: white;
}

.btn-tambah {
    background-color: #2980b9;
    color: white;
}

.btn-simpan {
    background-color: #27ae60;
    color: white;
}

.btn-batal {
    background-color: #95a5a6;
    color: white;
}

.hidden {
    display: none !important;
}

.pesan-error {
    color: #e74c3c;
    font-size: 14px;
    margin-bottom: 10px;
    display: none;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #3498db;
    outline: none;
}

.btn-group {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* =========================================
   MODAL / POP-UP OVERLAY
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* =========================================
   DESAIN TABEL CLEAN
   ========================================= */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}

.tabel-clean {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tabel-clean th,
.tabel-clean td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.tabel-clean th {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.tabel-clean tr:hover {
    background-color: #fcfcfc;
}

/* Badge Kategori */
.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

.badge-aktif {
    background-color: #d4edda;
    color: #155724;
}

.badge-nonaktif {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-koin {
    background-color: #fff3cd;
    color: #856404;
}

.badge-minuman {
    background-color: #d1ecf1;
    color: #0c5460;
}

.badge-makanan {
    background-color: #f8d7da;
    color: #721c24;
}

/* =========================================
   NAVIGASI (HAMBURGER & SIDEBAR)
   ========================================= */
.btn-hamburger {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2c3e50;
    padding: 0 10px;
}

.btn-hamburger:hover {
    color: #3498db;
}

.btn-tutup-sidebar {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.btn-tutup-sidebar:hover {
    color: white;
}

/* =========================================
   RESPONSIF (MOBILE VIEW)
   ========================================= */
@media (max-width: 768px) {
    .sidebar {
        display: none;
        position: absolute;
        height: 100vh;
        z-index: 1000;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
    }

    .sidebar.tampil-hp {
        display: flex;
    }

    .btn-tutup-sidebar {
        display: block;
    }
}

/* =========================================
   LAYOUT KHUSUS HALAMAN KASIR
   ========================================= */
.topbar-kasir {
    background-color: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.container-kasir {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}