:root {
    --primary-color: #111827;
    --primary-hover: #1f2937;
    --accent-color: #2563eb;
    --border-color: #e5e7eb;
    --bg-hover: #f9fafb;
    --text-muted: #6b7280;
    --sticky-top: 0px;
}

/* Page Title & Controls */
h4 {
    font-weight: 700;
    color: var(--primary-color);
}

.text-brand {
    color: var(--primary-color) !important;
}

/* Download Buttons */
.btn-outline-primary {
    color: var(--primary-color);
    border-color: #d1d5db;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(17, 24, 39, 0.1), 0 2px 4px -1px rgba(17, 24, 39, 0.06);
}

/* Filter Card (SK DIP) */
.filter-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* Table Container (Card Style) */
.table-responsive {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Custom Table */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

/* Header */
.custom-table thead th {
    background-color: #f9fafb;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
    height: auto;
    /* Reset fixed height if any */
}

/* Sticky Header Override if needed, but matching style first */
.sticky-header th {
    position: sticky;
    top: var(--sticky-top);
    z-index: 10;
}

/* Body Cells */
.custom-table td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    font-size: 0.95rem;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

/* Link/Action Buttons */
.btn-link-custom {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #fff;
    background-color: var(--primary-color);
    border-radius: 6px;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn-link-custom:hover {
    background-color: var(--primary-hover);
    color: #fff;
}

/* =========================================
   Accordion Specifics (blended with new style)
   ========================================= */

/* Accordion Header Row */
.accordion-header-row .accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    /* Reset, let td padding handle it or set flex container padding */
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
}

/* We want the WHOLE row to be clickable/hoverable, 
   so we might need to adjust how we apply padding or click events.
   But current structure has button inside td. 
   Let's style the button to fill the cell. */

.accordion-header-row td {
    padding: 0 !important;
    /* Remove cell padding so button fills it */
}

.accordion-header-row .accordion-toggle {
    padding: 1rem 1.5rem;
    /* Match table cell padding */
    font-weight: 600;
    color: #111827;
}

.accordion-header-row:hover {
    background-color: #f9fafb;
}

.accordion-header-row.active {
    background-color: #f1f5f9;
    /* Slightly darker than hover to indicate open state */
}

.accordion-header-row.active .accordion-toggle {
    color: #111827;
}

/* Accordion Icon */
.toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background-color: #e5e7eb;
    color: #374151;
    margin-right: 12px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.accordion-header-row.active .toggle-icon {
    background-color: var(--primary-color);
    color: #fff;
    transform: rotate(90deg);
}

.toggle-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Accordion Body Rows */
.accordion-body-row {
    display: none;
    background-color: #fff;
}

.accordion-body-row.open {
    display: table-row;
}

/* Indent body content slightly or differentiate it? 
   The prompt asks to match "Daftar Permohonan". 
   Daftar Permohonan is a flat list. check detail? 
   No, just "look like". 
   So we keep the clean white bg. */

.accordion-body-row td {
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
    /* Slightly softer text for body details */
}

/* Animations */
.accordion-body-row.anim-in td {
    animation: rowSlideDown 0.3s ease forwards;
}

.accordion-body-row.anim-out td {
    animation: rowSlideUp 0.2s ease forwards;
}

@keyframes rowSlideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rowSlideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {

    .custom-table th,
    .custom-table td,
    .accordion-header-row .accordion-toggle {
        padding: 0.75rem 1rem;
    }

    .custom-table thead th {
        font-size: 0.7rem;
    }
}