/* =====================================================================
   app.css — gaya bersama antar halaman (hasil ekstraksi dari blok
   <style> tiap view). Hanya aturan identik di >=2 halaman yang pindah
   ke sini; gaya khusus halaman tetap di <style> view masing-masing.
   Tautkan SEBELUM blok <style> supaya aturan halaman tetap menang.
   ===================================================================== */

#wrapper {
            display: flex;
            width: 100%;
            min-height: 100vh;
            position: relative;
        }

#sidebar {
            width: var(--sidebar-width);
            background: #ffffff;
            border-right: 1px solid var(--border-color);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: 1040;
            display: flex;
            flex-direction: column;
            position: fixed;
            top: 0;
            bottom: 0;
            left: 0;
        }

#sidebar.collapsed {
            margin-left: calc(-1 * var(--sidebar-width));
        }

.sidebar-brand {
            padding: 1.5rem 1.25rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            border-bottom: 1px solid var(--border-color);
            background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
            color: #ffffff;
        }

.sidebar-brand i {
            font-size: 1.75rem;
        }

.sidebar-brand-text {
            font-weight: 700;
            font-size: 1.1rem;
            line-height: 1.2;
        }

.sidebar-brand-subtitle {
            font-size: 0.75rem;
            opacity: 0.85;
            font-weight: 400;
        }

.sidebar-menu {
            padding: 1rem 0;
            list-style: none;
            margin: 0;
            flex-grow: 1;
            overflow-y: auto;
        }

.sidebar-menu .menu-header {
            padding: 0.75rem 1.5rem 0.35rem;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--text-muted);
            letter-spacing: 0.05em;
        }

.sidebar-menu .nav-link {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            padding: 0.8rem 1.5rem;
            color: #475569;
            font-weight: 500;
            font-size: 0.925rem;
            border-left: 4px solid transparent;
            transition: all 0.2s ease;
            text-decoration: none;
        }

.sidebar-menu .nav-link:hover {
            color: var(--secondary-blue);
            background-color: var(--light-blue);
        }

.sidebar-menu .nav-link.active {
            color: var(--primary-blue);
            background-color: var(--light-blue);
            border-left-color: var(--secondary-blue);
            font-weight: 600;
        }

.sidebar-menu .nav-link i {
            font-size: 1.15rem;
        }

#content-wrapper {
            flex-grow: 1;
            margin-left: var(--sidebar-width);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

#content-wrapper.expanded {
            margin-left: 0;
        }

.main-navbar {
            background: #ffffff;
            border-bottom: 1px solid var(--border-color);
            padding: 0.85rem 1.5rem;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: sticky;
            top: 0;
            z-index: 99;
        }

.user-greeting {
            font-weight: 600;
            color: var(--text-dark);
            margin: 0;
            font-size: 0.95rem;
        }

.user-role {
            font-size: 0.775rem;
            color: var(--text-muted);
            margin: 0;
        }

.custom-card {
            background: #ffffff;
            border: 1px solid var(--border-color);
            border-radius: 12px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.04);
            margin-bottom: 1.5rem;
        }

.card-header-custom {
            padding: 1.25rem 1.5rem;
            background: transparent;
            border-bottom: 1px solid var(--border-color);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

.sidebar-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(15, 23, 42, 0.4);
            backdrop-filter: blur(2px);
            z-index: 1030;
            display: none;
            transition: opacity 0.3s ease;
        }

.sidebar-overlay.show {
            display: block;
        }

@media (max-width: 991.98px) {
            #sidebar {
                margin-left: calc(-1 * var(--sidebar-width));
            }
            #sidebar.show {
                margin-left: 0;
            }
            #content-wrapper {
                margin-left: 0 !important;
            }
        }

div.logo {
            height: 200px;
            width: 155px;
            display: inline-block;
            opacity: 0.08;
            position: absolute;
            top: 2rem;
            left: 50%;
            margin-left: -73px;
        }

h1 {
            font-weight: lighter;
            letter-spacing: normal;
            font-size: 3rem;
            margin-top: 0;
            margin-bottom: 0;
            color: #222;
        }

.wrap {
            max-width: 1024px;
            margin: 5rem auto;
            padding: 2rem;
            background: #fff;
            text-align: center;
            border: 1px solid #efefef;
            border-radius: 0.5rem;
            position: relative;
        }

pre {
            white-space: normal;
            margin-top: 1.5rem;
        }

code {
            background: #fafafa;
            border: 1px solid #efefef;
            padding: 0.5rem 1rem;
            border-radius: 5px;
            display: block;
        }

p {
            margin-top: 1.5rem;
        }

.footer {
            margin-top: 2rem;
            border-top: 1px solid #efefef;
            padding: 1em 2em 0 2em;
            font-size: 85%;
            color: #999;
        }

a:active,
        a:link,
        a:visited {
            color: #dd4814;
        }

/* Button Customization */
.btn-primary-blue {
            background-color: var(--secondary-blue);
            border-color: var(--secondary-blue);
            color: #ffffff;
            font-weight: 500;
            border-radius: 8px;
            padding: 0.55rem 1.1rem;
            transition: all 0.2s;
        }

/* Tautan <a class="btn-primary-blue">: aturan a:link global di atas punya
   spesifisitas lebih tinggi (0,1,1) sehingga menimpanya jadi merah.
   Turunkan aturan ini agar teks tombol tetap putih. */
        a.btn-primary-blue:link,
        a.btn-primary-blue:visited,
        a.btn-primary-blue:active {
            color: #ffffff;
        }

.btn-primary-blue:hover {
            background-color: var(--primary-blue);
            border-color: var(--primary-blue);
            color: #ffffff;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
        }

.btn-outline-blue {
            border-color: var(--border-color);
            color: #475569;
            background-color: #ffffff;
            font-weight: 500;
            border-radius: 8px;
        }

.btn-outline-blue:hover {
            background-color: var(--light-blue);
            color: var(--secondary-blue);
            border-color: var(--hover-blue);
        }

.form-control:focus, .form-select:focus {
            border-color: var(--accent-blue);
            box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.15);
        }

/* Table Design */
.custom-table {
            margin: 0;
            vertical-align: middle;
        }

.custom-table tbody td {
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border-color);
            color: #334155;
            font-size: 0.9rem;
        }

.custom-table tbody tr {
            transition: background-color 0.15s ease;
        }

.custom-table tbody tr:hover {
            background-color: rgba(239, 246, 255, 0.6);
        }

.btn-action-view {
            background-color: #eff6ff;
            color: #2563eb;
            border: 1px solid #dbeafe;
        }

.btn-action-delete {
            background-color: #fef2f2;
            color: #dc2626;
            border: 1px solid #fee2e2;
        }

.btn-action-delete:hover { background-color: #dc2626; color: #fff; }

/* Pagination Styling */
.pagination .page-link {
            border-radius: 6px;
            margin: 0 2px;
            color: #475569;
            border-color: var(--border-color);
            font-size: 0.875rem;
        }

.pagination .page-item.active .page-link {
            background-color: var(--secondary-blue);
            border-color: var(--secondary-blue);
            color: #ffffff;
        }

/* Stat Summary Cards */
.stat-card {
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1.25rem;
            background: #ffffff;
            display: flex;
            align-items: center;
            gap: 1rem;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

.stat-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }

.stat-icon {
            width: 52px;
            height: 52px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            flex-shrink: 0;
        }

.accordion-button::after {
            background-size: 1.1rem;
        }

/* Mini Category Card Inside Accordion */
.category-box {
            background: #f8fafc;
            border: 1px solid var(--border-color);
            border-radius: 10px;
            padding: 1rem;
            height: 100%;
            transition: all 0.2s ease;
        }

.category-box:hover {
            border-color: var(--accent-blue);
            background: #ffffff;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
        }

/* Grid kategori: 5 kolom berkas per baris pada collapsible statistik */
.kategori-grid {
            display: grid;
            grid-template-columns: minmax(0, 1fr);
            gap: 1rem;
        }

@media (min-width: 576px) {
            .kategori-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

@media (min-width: 992px) {
            .kategori-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

@media (min-width: 1200px) {
            .kategori-grid {
                grid-template-columns: repeat(5, minmax(0, 1fr));
            }
        }
