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

:root {
    --primary: #10b981; /* Emerald green modern */
    --primary-dark: #059669;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; }

/* Navbar */
.nav { background-color: var(--card-bg); padding: 15px 25px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--border-color); }
.nav h2 { font-size: 1.2rem; font-weight: 700; color: var(--primary-dark); margin: 0 !important; }

/* Layout & Cards */
.container { max-width: 800px; margin: 30px auto; padding: 0 20px; }
.login-container { max-width: 400px; margin: 8vh auto; padding: 0 20px; }
.card, .login-container, .container > div:not(.filter-group) { background: var(--card-bg); padding: 30px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); margin-bottom: 25px; border: 1px solid #fff; }
.container { padding: 0; background: transparent; box-shadow: none; border: none; } 

h2, h3 { color: var(--text-main); margin-bottom: 20px; font-weight: 600; }

/* Form & Input */
.form-group { margin-bottom: 18px; text-align: left; }
label { display: block; margin-bottom: 8px; font-size: 0.9rem; font-weight: 500; color: var(--text-main); }
input, select { width: 100%; padding: 12px 16px; border: 2px solid var(--border-color); border-radius: 10px; font-size: 0.95rem; background-color: #f9fafb; transition: all 0.3s ease; box-sizing: border-box; margin-bottom: 15px; color: var(--text-main); }
input:focus, select:focus { outline: none; border-color: var(--primary); background-color: #fff; box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1); }

/* Buttons */
.btn, .btn-primary, .btn-danger, .btn-kembali { display: inline-block; padding: 12px 20px; border: none; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 0.95rem; text-align: center; text-decoration: none; transition: all 0.3s ease; width: 100%; box-sizing: border-box; }
.btn-primary { background-color: var(--primary); color: white; margin-top: 10px; }
.btn-primary:hover:not(:disabled) { background-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 15px rgba(16, 185, 129, 0.25); }
.btn-primary:disabled { background-color: #d1d5db; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-danger { background-color: #fee2e2; color: var(--danger); width: auto; padding: 8px 16px; font-size: 0.85rem; border: 1px solid #fecaca; }
.btn-danger:hover { background-color: var(--danger); color: white; }

.btn-kembali { background-color: #fef3c7; color: #d97706; width: auto; padding: 8px 16px; font-size: 0.85rem; border: 1px solid #fde68a; }
.btn-kembali:hover { background-color: var(--warning); color: white; }

/* Filter Group */
.filter-group { display: flex; gap: 15px; margin-bottom: 25px; align-items: center; }
.filter-group select { margin-bottom: 0; flex: 1; }
.filter-group button { margin-top: 0; width: auto; flex: 1; white-space: nowrap; }

/* Tabel Modern */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 15px; min-width: 600px; }
th, td { padding: 16px; border-bottom: 1px solid var(--border-color); text-align: left; font-size: 0.9rem; }
th { background-color: #f8fafc; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; border-top: 1px solid var(--border-color); }
th:first-child { border-top-left-radius: 10px; border-left: 1px solid var(--border-color); }
th:last-child { border-top-right-radius: 10px; border-right: 1px solid var(--border-color); }
td:first-child { border-left: 1px solid var(--border-color); }
td:last-child { border-right: 1px solid var(--border-color); }
tr:last-child td:first-child { border-bottom-left-radius: 10px; }
tr:last-child td:last-child { border-bottom-right-radius: 10px; }
tr:hover td { background-color: #f9fafb; }

.foto-bukti { max-width: 50px; height: 50px; object-fit: cover; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); transition: transform 0.3s; }
.foto-bukti:hover { transform: scale(2); z-index: 10; position: relative; }

/* Kamera & Alert */
#lokasiStatus { padding: 15px; border-radius: 10px; margin-bottom: 20px; font-weight: 500; font-size: 0.9rem; text-align: center; }
.kamera-container { border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.15); margin-bottom: 25px; background: #000; border: 4px solid #fff; }
video { width: 100%; display: block; }
.peringatan { font-size: 0.8rem; color: var(--danger); margin-bottom: 15px; display: block; }

/* Responsif HP */
@media (max-width: 768px) {
    .nav { padding: 15px; flex-direction: column; gap: 15px; text-align: center; }
    .nav h2 { margin-bottom: 5px !important; }
    .filter-group { flex-direction: column; }
    .filter-group select, .filter-group button { width: 100%; }
    .container { margin-top: 15px; padding: 0 15px; }
    .card, .container > div:not(.filter-group) { padding: 20px; }
    
    /* Tabel bisa di-scroll ke samping di HP */
    table { display: block; overflow-x: auto; white-space: nowrap; border: none; }
    th:first-child, th:last-child, td:first-child, td:last-child { border-left: none; border-right: none; border-radius: 0; }
    td, th { border: 1px solid var(--border-color); }
}

/* --- Fitur Toggle Password --- */
.password-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}
.password-wrapper input {
    margin-bottom: 0 !important; 
    padding-right: 40px !important; 
}
.toggle-password {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    width: 20px;
    height: 20px;
    /* Ikon Mata Terbuka (SVG) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    color: transparent; /* Menyembunyikan teks emoji lama yang rusak */
}
.toggle-password:hover {
    opacity: 1;
}
/* Ikon Mata Tertutup/Coret (SVG) saat class 'tutup' aktif */
.toggle-password.tutup {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}
