/* assets/css/style.css (VERSI LENGKAP - 300+ BARIS) */

/* Variabel Warna & Font Dasar */
:root {
    --primary-color: #4A69E2;
    --secondary-color: #8E44AD;
    --background-color: #f4f7f9;
    --content-bg: #ffffff;
    --text-color: #333333;
    --text-color-light: #777777;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --error-color: #dc3545;
    --info-color: #17a2b8;
    --font-family: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Layout Umum */
header, nav, main {
    padding: 10px 20px;
}
header {
    background: var(--content-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}
header h1 { margin: 0; color: var(--primary-color); font-size: 1.4rem; }
.header-link { text-decoration: none; }
nav {
    background: var(--content-bg);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
nav a { color: var(--text-color-light); text-decoration: none; padding: 10px 15px; border-radius: 5px; transition: all 0.3s; }
nav a:hover, nav a.active { background-color: var(--primary-color); color: white; }
.nav-right { display: flex; align-items: center; flex-wrap: wrap; }
main { padding: 20px; }
.content { background: var(--content-bg); padding: 20px; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
footer { text-align: center; padding: 20px; font-size: 0.9em; color: var(--text-color-light); }

/* Dashboard */
.dashboard-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.dashboard-category { background-color: #fafbff; border: 1px solid var(--border-color); border-radius: 8px; padding: 15px; }
.dashboard-category h3 { margin-top: 0; border-bottom: 2px solid var(--primary-color); padding-bottom: 10px; margin-bottom: 15px; font-size: 1.1rem; }
.dashboard-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.dashboard-item { background: var(--content-bg); border-radius: 8px; padding: 15px; text-align: center; text-decoration: none; color: var(--text-color); box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.2s; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dashboard-item:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.item-icon img { width: 48px; height: 48px; margin-bottom: 10px; }
.item-title { font-weight: 500; font-size: 0.9rem; }

/* Tabel */
.data-table-full { width: 100%; border-collapse: collapse; margin-top: 20px; }
.data-table-full thead { background-color: var(--primary-color); color: white; }
.data-table-full th, .data-table-full td { border: 1px solid var(--border-color); padding: 12px 15px; text-align: left; white-space: nowrap; }
.data-table-full tbody tr:nth-child(even) { background-color: var(--background-color); }
.data-table-full tbody tr:hover { background-color: #e9ecef; }
.aksi { text-align: center !important; }

/* Form */
.form-table { width: 100%; }
.form-table td { padding: 8px; }
.form-table label { font-weight: 500; }
input[type="text"], input[type="password"], input[type="date"], input[type="time"], input[type="number"], input[type="email"], select, textarea { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 5px; box-sizing: border-box; }
.form-inline, .filter-container form > div { display: flex; flex-wrap: wrap; gap: 15px; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; }
.form-control { width: auto; display: inline-block; padding: 8px; border: 1px solid var(--border-color); border-radius: 5px; }

/* Tombol */
.tombol-tambah, .tombol-edit, .tombol-hapus, .tombol-simpan, .tombol-cetak { display: inline-block; padding: 10px 18px; border-radius: 5px; text-decoration: none; color: white !important; border: none; cursor: pointer; font-size: 0.9em; transition: opacity 0.2s; }
.tombol-tambah, .tombol-simpan { background-color: var(--primary-color); }
.tombol-edit { background-color: #ffc107; }
.tombol-hapus { background-color: var(--error-color); }
.tombol-cetak { background-color: var(--info-color); }
.tombol-tambah:hover, .tombol-edit:hover, .tombol-hapus:hover, .tombol-simpan:hover, .tombol-cetak:hover { opacity: 0.85; }

/* Pesan Status */
.pesan-info, .pesan-sukses, .pesan-error { padding: 15px; border-radius: 5px; margin: 15px 0; border: 1px solid; }
.pesan-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }
.pesan-sukses { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.pesan-error { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }

/* Style Laporan Cetak */
.report-container, .table-matriks { font-size: 9pt; }
.hari-libur { background-color: #ffdddd !important; }
.signature-section { display: flex; justify-content: space-between; margin-top: 40px; }

/* ============================================== */
/* == BAGIAN RESPONSIVE UNTUK TAMPILAN MOBILE === */
/* ============================================== */
@media (max-width: 768px) {
    body { font-size: 14px; }
    header, nav, main { padding: 15px; }
    header { flex-direction: column; gap: 10px; text-align: center; }
    nav { flex-direction: column; gap: 10px; }
    .nav-right { width: 100%; display: flex; justify-content: space-around; }

    /* PERBAIKAN DASHBOARD */
    .dashboard-container { display: flex; flex-direction: column; gap: 25px; }
    .dashboard-items { display: flex; flex-direction: column; gap: 10px; }
    .dashboard-item { flex-direction: row; justify-content: flex-start; align-items: center; text-align: left; padding: 12px 15px; }
    .item-icon img { width: 32px; height: 32px; margin: 0 15px 0 0; }
    .item-title { font-size: 1rem; }
    
    /* PERBAIKAN TOTAL UNTUK TABEL */
    .data-table-full { border: none; }
    .data-table-full thead { display: none; }
    .data-table-full, .data-table-full tbody, .data-table-full tr, .data-table-full td { display: block; width: 100%; box-sizing: border-box; }
    .data-table-full tr { margin-bottom: 15px; border: 1px solid var(--border-color); border-radius: 5px; padding: 15px; }
    .data-table-full td {
        padding: 8px 0;
        text-align: right !important;
        border: none;
        border-bottom: 1px dotted var(--border-color);
        position: relative;
        padding-right: 10px;
        white-space: normal;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .data-table-full tr td:last-child { border-bottom: none; }
    .data-table-full td::before {
        content: attr(data-label);
        font-weight: bold;
        text-align: left;
        white-space: normal;
        padding-right: 15px;
    }
    
    /* PENYESUAIAN KHUSUS UNTUK FORM DI DALAM TABEL */
    .radio-group { display: flex; flex-wrap: wrap; gap: 5px 10px; justify-content: flex-end; }
    .radio-group label { display: flex; align-items: center; font-size: 0.9em; }
    
    /* PERBAIKAN FORM UMUM */
    .filter-container form > div, .form-inline { flex-direction: column; align-items: stretch; gap: 15px; }
    .form-table td, .form-table tr { display: block; width: 100%; }
    .form-table tr { margin-bottom: 15px; }
}