/* =============================================================================
-- File: /admin/style.css (KODE LENGKAP - VERSI FINAL)
-- Fungsi: Berisi semua gaya CSS untuk seluruh halaman di panel admin.
-- Ganti seluruh isi file CSS lama Anda dengan kode ini.
-- ============================================================================= */

/* Import Font dari Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variabel Warna & Dasar */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa; /* Warna latar belakang netral */
    color: #343a40;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =================================
   HALAMAN LOGIN & REGISTRASI
   ================================= */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #e9ecef;
}

.login-container {
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-container h2 {
    text-align: center;
    color: #212529;
    margin-bottom: 25px;
    font-weight: 700;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
    color: #6c757d;
}
.form-footer a {
    color: #4A90E2;
    font-weight: 600;
    text-decoration: none;
}
.form-footer a:hover {
    text-decoration: underline;
}

/* =================================
   KONTAINER & HEADER UTAMA ADMIN
   ================================= */
.admin-container, .report-container {
    width: 95%;
    max-width: 1200px;
    margin: 40px auto;
    background-color: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.admin-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 20px;
    margin-bottom: 30px;
    text-align: center;
}
.admin-header h1 {
    margin: 0;
    font-size: 1.8em;
}
.admin-header p {
    margin: 8px 0 0;
    color: #6c757d;
}
.logout-link {
    color: #dc3545;
    text-decoration: none;
    font-weight: 600;
}
.logout-link:hover {
    text-decoration: underline;
}

/* =================================
   FORM (Tambah & Edit Link)
   ================================= */
.url-form fieldset {
    border: 1px solid #dee2e6;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
}
.url-form legend {
    padding: 0 10px;
    font-weight: 600;
    color: #495057;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 0.9em;
}
.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-group input:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}
.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85em;
}

/* =================================
   TOMBOL (Buttons)
   ================================= */
.btn {
    width: 100%;
    padding: 12px 15px;
    border: none;
    background-color: #4A90E2;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}
.btn:hover {
    background-color: #357ABD;
    transform: translateY(-2px);
}
.btn-add, .btn-export {
    display: inline-block;
    width: auto;
    margin-bottom: 25px;
    padding: 12px 20px;
}
.btn-add {
    background-color: #28a745;
}
.btn-add:hover {
    background-color: #218838;
}
.btn-export {
    background-color: #17a2b8;
}
.btn-export:hover {
    background-color: #138496;
}

/* =================================
   GRAFIK & KARTU STATISTIK
   ================================= */
.stats-grid, .summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.stat-card, .summary-card, .report-chart-card {
    background-color: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}
.stat-card h3, .summary-card h3, .report-chart-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #495057;
    text-align: center;
}
.stat-card canvas, .report-chart-card canvas {
    max-height: 280px;
    width: 100% !important;
}

/* =================================
   TABEL & JUDUL SEKSI
   ================================= */
.table-title, .section-title {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #dee2e6;
    text-align: center;
    color: #343a40;
    margin-bottom: 20px;
}
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: #f8f9fa;
    font-weight: 600;
}
tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}
td.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.action-btn {
    display: inline-block;
    padding: 6px 12px;
    color: white !important;
    border-radius: 5px;
    font-size: 0.9em;
    text-decoration: none;
    transition: opacity 0.2s;
}
.action-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}
.action-btn.report { background-color: #007bff; }
.action-btn.edit { background-color: #ffc107; color: #212529 !important; }
.action-btn.delete { background-color: #dc3545; }
.small-text { font-size: 0.85em; color: #6c757d; }

/* =================================
   HALAMAN LAPORAN
   ================================= */
.summary-card h3 {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
}
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 250px;
    overflow-y: auto;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    font-size: 0.95em;
    border-bottom: 1px solid #f1f3f5;
}
.summary-item:last-child {
    border-bottom: none;
}
.summary-count {
    font-weight: 600;
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.9em;
}

/* =================================
   PAGINATION
   ================================= */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    gap: 8px;
    flex-wrap: wrap;
}
.pagination-link {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #dee2e6;
    color: #4A90E2;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}
.pagination-link:hover {
    background-color: #f4f7f9;
    border-color: #ced4da;
}
.pagination-link.active {
    background-color: #4A90E2;
    color: white;
    border-color: #4A90E2;
    font-weight: 600;
}

/* =================================
   NOTIFIKASI (Success/Error)
   ================================= */
.success, .error {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}
.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* Gaya untuk Filter Tanggal */
.date-filter-form.card { padding: 20px; margin-bottom: 30px; }
.date-filter-form form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-group label {
    margin-bottom: 0;
    font-weight: 500;
}
.filter-group input[type="date"] {
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.btn-reset {
    background-color: #6c757d;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    line-height: 1.5; /* Samakan tinggi dengan tombol filter */
}
.btn-reset:hover {
    background-color: #5a6268;
}
/* Gaya untuk Ringkasan Laporan */
.summary-grid-report {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}
.summary-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}
.summary-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    font-size: 0.95em;
    border-bottom: 1px solid #f1f3f5;
}
.summary-item:last-child {
    border-bottom: none;
}
.summary-count {
    font-weight: 600;
}
.summary-percentage {
    font-weight: 400;
    color: #6c757d;
    font-size: 0.9em;
    margin-left: 5px;
}
/* =================================
   PENATAAN ULANG LAYOUT (BARU)
   ================================= */
.admin-container { padding: 0; }
.admin-header.new-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.header-logo a {
    font-size: 1.5em;
    font-weight: 700;
    color: #4A90E2;
    text-decoration: none;
}
.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}
.header-user span {
    font-weight: 500;
}
.btn-logout, .btn-profile {
    padding: 8px 15px !important;
    font-size: 0.9em !important;
    width: auto !important;
    color: white !important;
}
.btn-logout { background-color: #dc3545 !important; }
.btn-logout:hover { background-color: #c82333 !important; }
.btn-profile { background-color: #6c757d !important; }
.btn-profile:hover { background-color: #5a6268 !important; }
.btn-filter {
    padding: 10px 15px !important;
    font-size: 1em !important;
    width: auto !important;
}

main { padding: 30px; }

.page-title-container {
    text-align: center;
    margin-bottom: 30px;
}
.page-title-container h1 {
    font-size: 2em;
    color: #343a40;
}
.page-title-container p {
    color: #6c757d;
    font-size: 1.1em;
}
.back-link {
    text-decoration: none;
    color: #4A90E2;
    font-weight: 500;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.action-bar .table-title {
    margin: 0;
    border: none;
    padding: 0;
    text-align: left;
}
.action-bar .btn-add {
    margin-bottom: 0;
}

.table-container.card {
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.07);
}

/* Menghapus gaya header lama */
.admin-header:not(.new-layout) {
    display: none;
}
