:root {
    --simprodi-bg: #f4f7fe;
    --simprodi-surface: #ffffff;
    --simprodi-text: #2b3674;
    --simprodi-muted: #64748b;
    --simprodi-primary: #4318ff;
    --simprodi-sidebar-width: 260px;
    --simprodi-radius: 18px;
    --simprodi-shadow: 0 4px 24px rgba(15, 23, 42, 0.05);
}

.simprodi-admin,
body:has(> .sidebar) {
    background: var(--simprodi-bg);
    color: var(--simprodi-text);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

.main-content {
    margin-left: var(--simprodi-sidebar-width);
    padding: 30px;
    transition: margin .3s ease;
}

.app-card,
.card-custom,
.panel-card {
    background: var(--simprodi-surface);
    border: 0;
    border-radius: var(--simprodi-radius);
    box-shadow: var(--simprodi-shadow);
}

.app-card {
    padding: 24px;
    margin-bottom: 24px;
}

.hero-card {
    background: linear-gradient(135deg, #111827 0%, #2b3674 100%);
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    color: #fff;
    overflow: hidden;
    padding: 28px;
    position: relative;
}

.hero-card .hero-icon {
    bottom: -35px;
    font-size: 9rem;
    opacity: .1;
    position: absolute;
    right: -15px;
    transform: rotate(-12deg);
}

.metric-card {
    align-items: center;
    background: #fff;
    border: 0;
    border-radius: 15px;
    box-shadow: var(--simprodi-shadow);
    display: flex;
    gap: 20px;
    height: 100%;
    padding: 24px;
    transition: .3s;
}

.metric-card:hover {
    box-shadow: 0 10px 25px rgba(15, 23, 42, .1);
    transform: translateY(-4px);
}

.metric-icon {
    align-items: center;
    border-radius: 15px;
    display: flex;
    flex: 0 0 60px;
    font-size: 1.8rem;
    height: 60px;
    justify-content: center;
}

.metric-value {
    color: var(--simprodi-text);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.metric-label {
    color: #a3aed1;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.panel-card {
    margin-bottom: 24px;
    padding: 24px;
}

.panel-title {
    color: var(--simprodi-text);
    font-weight: 800;
    margin-bottom: 14px;
}

.quick-link {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    color: #1e293b;
    display: block;
    height: 100%;
    padding: 16px;
    text-decoration: none;
}

.quick-link:hover {
    background: #f5f3ff;
    border-color: var(--simprodi-primary);
    color: #1e293b;
}

.muted-small {
    color: var(--simprodi-muted);
    font-size: .9rem;
}

.app-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.app-page-heading {
    min-width: 0;
}

.app-page-heading h1 {
    color: var(--simprodi-text);
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
}

.app-page-heading p {
    color: var(--simprodi-muted);
    margin: 4px 0 0;
}

.app-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.app-sidebar-toggle {
    border-radius: 10px;
    flex: 0 0 auto;
}

.app-breadcrumb {
    margin-bottom: 1.25rem;
}

.app-breadcrumb .breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.app-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    font-weight: 600;
}

.app-filter-bar {
    align-items: end;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px;
}

.app-filter-field {
    display: grid;
    gap: 5px;
    min-width: 170px;
}

.app-filter-field > span {
    color: var(--simprodi-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.app-filter-search {
    flex: 1 1 240px;
}

.app-filter-actions {
    display: flex;
    gap: 8px;
}

.app-table thead th,
.table-custom thead th {
    border-bottom: 2px solid #e2e8f0;
    color: #64748b;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.app-table tbody td,
.table-custom tbody td {
    color: var(--simprodi-text);
    vertical-align: middle;
}

.app-empty-state {
    color: var(--simprodi-muted);
    padding: 42px 18px;
    text-align: center;
}

.app-empty-state i {
    color: #cbd5e1;
    font-size: 2.25rem;
    margin-bottom: 12px;
}

.app-empty-state p {
    margin: 0;
}

.simprodi-sidebar-backdrop {
    background: rgba(15, 23, 42, .55);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 999;
}

body.sidebar-open .simprodi-sidebar-backdrop {
    display: block;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #dbe1ea;
    border-radius: 9px;
    padding: 6px 10px;
    transition: all 0.2s ease;
}
.dataTables_wrapper .dataTables_length select {
    padding-right: 32px; /* Memberi ruang untuk icon dropdown */
}
.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus {
    border-color: var(--simprodi-primary);
    outline: none;
    box-shadow: inset 0 0 0 1px var(--simprodi-primary);
}

@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .app-page-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .app-page-actions {
        margin-left: 0;
        width: 100%;
    }

    .app-filter-field {
        flex: 1 1 100%;
    }
}
/* Fix DataTables Select overlaps and cut-offs */
.dataTables_length .form-select {
    padding-right: 1.8rem !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    height: auto !important;
    border-radius: 6px;
}
