/* Kategori Pengaduan Section Header - Theme Consistent */
.kategori-section-header .kategori-title {
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.kategori-section-header .kategori-lead {
    color: var(--text-color);
    font-size: 1.15rem;
    opacity: 0.95;
    transition: color 0.3s;
}

[data-theme="dark"] .kategori-section-header .kategori-title {
    color: var(--primary-color);
}
[data-theme="dark"] .kategori-section-header .kategori-lead {
    color: var(--text-color);
    opacity: 0.97;
}
/* Village Info Section Contact Block - Theme Consistent */
.village-contact-item {
    color: var(--text-color);
    background: transparent;
    border-radius: 8px;
    padding: 6px 0;
    transition: background 0.2s, color 0.2s;
}

.village-contact-icon {
    color: var(--text-color);
    font-size: 1.2em;
    min-width: 1.8em;
    text-align: center;
    transition: color 0.2s;
}

.village-contact-email {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.village-contact-item:hover {
    background: var(--primary-color);
    color: #fff;
}
.village-contact-item:hover .village-contact-icon,
.village-contact-item:hover .village-contact-email {
    color: #fff;
}
body.bg-dark, body[data-bs-theme="dark"], html.bg-dark, html[data-bs-theme="dark"] {
    background-color: #181a1b !important;
}
/* Gallery section: .text-muted color for light/dark mode */
body:not(.dark-mode) .section-title + .text-muted,
body:not(.dark-mode) .gallery-card .text-muted,
body:not(.dark-mode) .card .text-muted {
    color: #6c757d !important;
}
body.dark-mode .section-title + .text-muted,
body.dark-mode .gallery-card .text-muted,
body.dark-mode .card .text-muted {
    color: #fff !important;
}
/* Ensure .text-muted is white in dark mode for gallery section */
body.dark-mode .section-title + .text-muted {
    color: #fff !important;
}
/* Hero section heading and paragraph color match form pengaduan */
body:not(.dark-mode) .hero-section h1,
body:not(.dark-mode) .hero-section .display-4,
body:not(.dark-mode) .hero-section p,
body:not(.dark-mode) .hero-section .lead {
    color: #212529 !important;
}
body.dark-mode .hero-section h1,
body.dark-mode .hero-section .display-4,
body.dark-mode .hero-section p,
body.dark-mode .hero-section .lead {
    color: #f1f3f4 !important;
}
/* Hero section heading and paragraph color fix (tanpa Bootstrap) */
body:not(.dark-mode) .hero-section h1,
body:not(.dark-mode) .hero-section p {
    color: #222 !important;
    background: none !important;
}
body.dark-mode .hero-section h1,
body.dark-mode .hero-section p {
    color: #fff !important;
    background: none !important;
}
/* Hero section text color for light/dark mode */
body:not(.dark-mode) .hero-section h1,
body:not(.dark-mode) .hero-section p,
body:not(.dark-mode) .hero-section .display-4,
body:not(.dark-mode) .hero-section .lead {
    color: #222 !important;
}
body.dark-mode .hero-section h1,
body.dark-mode .hero-section p,
body.dark-mode .hero-section .display-4,
body.dark-mode .hero-section .lead {
    color: #fff !important;
}
/* Gallery card text color for light/dark mode */
body:not(.dark-mode) .gallery-card .card-title,
body:not(.dark-mode) .gallery-card .card-text,
body:not(.dark-mode) .gallery-card .text-muted,
body:not(.dark-mode) .gallery-card .small {
    color: #222 !important;
}
body.dark-mode .gallery-card .card-title,
body.dark-mode .gallery-card .card-text,
body.dark-mode .gallery-card .text-muted,
body.dark-mode .gallery-card .small {
    color: #fff !important;
}
/* Default text color for light mode */
body:not(.dark-mode) {
    color: #222 !important;
    background-color: #fff;
}
/* Gallery card text color for light mode */
body:not(.dark-mode) .gallery-card,
body:not(.dark-mode) .gallery-card .card-title,
body:not(.dark-mode) .gallery-card .card-text,
body:not(.dark-mode) .gallery-card .text-muted,
body:not(.dark-mode) .gallery-card .small {
    color: #222 !important;
}
body:not(.dark-mode) .gallery-card {
    background-color: #fff !important;
}
/* Filter select and option text color for dark mode */
body.dark-mode .form-select,
body.dark-mode .form-select option,
body.dark-mode .form-label {
    color: #fff !important;
    background-color: #23272b !important;
}
/* Table text color fix for dark mode */
body.dark-mode .table,
body.dark-mode .table th,
body.dark-mode .table td {
    color: #fff !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #23272b !important;
    color: #fff !important;
}
body.dark-mode .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #181a1b !important;
    color: #fff !important;
}
body.dark-mode .table-hover > tbody > tr:hover > * {
    background-color: #2d3238 !important;
    color: #fff !important;
}

/* Table text color for light mode (ensure contrast) */
body:not(.dark-mode) .table,
body:not(.dark-mode) .table th,
body:not(.dark-mode) .table td {
    color: #222 !important;
}
body:not(.dark-mode) .table-striped > tbody > tr:nth-of-type(odd) > * {
    background-color: #f8f9fa !important;
    color: #222 !important;
}
body:not(.dark-mode) .table-striped > tbody > tr:nth-of-type(even) > * {
    background-color: #fff !important;
    color: #222 !important;
}
body:not(.dark-mode) .table-hover > tbody > tr:hover > * {
    background-color: #e2e6ea !important;
    color: #222 !important;
}
/* Custom CSS untuk Sistem Pengaduan Warga */
:root {
    --primary-color: #22c55e;
    --secondary-color: #16a34a;
    --accent-color: #15803d;
    --light-green: #dcfce7;
    --dark-green: #14532d;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --light-bg: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #22c55e;
    --secondary-color: #16a34a;
    --accent-color: #15803d;
    --light-green: #14532d;
    --dark-green: #dcfce7;
    --text-dark: #f9fafb;
    --text-light: #d1d5db;
    --white: #1f2937;
    --light-bg: #111827;
    --border: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 2rem;
}

/* Buttons */
.btn {
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-success {
    background: var(--primary-color);
    color: white;
}

.btn-success:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

/* Forms */
.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-dark);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Progress Bar */
.progress {
    height: 1rem;
    border-radius: 0.75rem;
    background: var(--light-green);
}

.progress-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 0.75rem;
    transition: width 0.6s ease;
}

/* Status Badges */
.status-menunggu {
    background: #fbbf24;
    color: #92400e;
}

.status-diproses {
    background: #60a5fa;
    color: #1e40af;
}

.status-selesai {
    background: var(--primary-color);
    color: white;
}

.status-ditolak {
    background: #ef4444;
    color: white;
}

/* Tables */
.table {
    background: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-color: var(--border);
    color: var(--text-dark);
}

.table tbody tr:hover {
    background: var(--light-green);
}

/* Dark Mode Toggle */
.theme-toggle {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.1);
}

/* Charts Container */
.chart-container {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Stats Cards */
.stats-card {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* AOS Animation Overrides */
[data-aos="fade-up"] {
    animation: fadeInUp 0.8s ease;
}

[data-aos="slide-left"] {
    animation: slideInLeft 0.8s ease;
}

[data-aos="slide-right"] {
    animation: slideInRight 0.8s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .table-responsive {
        border-radius: 1rem;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}