:root {
    --brand: #111827;
    --muted: #6b7280;
}

.custom-table,
.custom-table th,
.custom-table td {
    border-color: var(--brand) !important;
}

.sticky-header th {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.4px;
    height: 56px;
    vertical-align: middle;
}

.custom-table td {
    vertical-align: middle;
    font-size: 0.95rem;
}

.custom-table tbody tr:hover {
    background: rgba(17, 24, 39, 0.03);
    transition: background 0.2s ease;
}

/* Square toggle button */
.sq-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--brand);
    background: #fff;
    color: var(--brand);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1;
    border-radius: 0.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.sq-toggle:hover {
    background: var(--brand);
    color: #fff;
}

.sq-symbol {
    display: inline-block;
    transition: transform 0.25s ease;
}

.sq-toggle[aria-expanded="true"] .sq-symbol {
    transform: rotate(45deg);
}

.sq-placeholder {
    display: inline-block;
    width: 28px;
    height: 28px;
}

/* Responsive tweaks */
@media (max-width: 640px) {
    .custom-table thead {
        display: none;
    }

    .custom-table,
    .custom-table tbody,
    .custom-table tr,
    .custom-table td {
        display: block;
        width: 100%;
    }

    .custom-table tr {
        border: 1px solid #e9ecef;
        border-radius: 0.75rem;
        padding: 0.5rem;
        margin-bottom: 1rem;
    }

    .custom-table td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.75rem;
        color: var(--muted);
        text-transform: uppercase;
        margin-bottom: 0.25rem;
    }
}

/* ==================== FILTER CARD STYLES ==================== */
.chip {
    background: #f6f7f9;
    border: 1px solid #e9ecef;
    color: #111827;
    border-radius: 999px;
    padding: 0.45rem 1rem;
    transition: 0.15s;
}
.chip:hover {
    background: #f0f2f5;
}
.chip-active {
    background: #111827;
    color: #fff;
    border-color: #111827;
}
.chip i {
    vertical-align: -2px;
}

/* Select2 SKPD dropdown */
.select2-container {
    width: 100% !important;
}
.select2-container--bootstrap-5 .select2-selection--single {
    height: 44px !important;
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    background: #fff;
    position: relative;
    padding-right: 2rem;
    transition: 0.15s;
}
.select2-container--bootstrap-5 .select2-selection__rendered {
    line-height: 44px !important;
    padding-left: 0.75rem !important;
    color: #111827;
}
.select2-container--bootstrap-5 .select2-selection__arrow {
    display: none;
}
.select2-container--bootstrap-5 .select2-selection--single::after {
    content: "\ea4e";
    font-family: "remixicon";
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    color: #6b7280;
    pointer-events: none;
}
.select2-container--bootstrap-5.select2-container--open
    .select2-selection--single::after {
    transform: translateY(-50%) rotate(180deg);
    color: #111827;
}

/* Tahun select */
#year.form-select {
    height: 44px;
}
.filter-select:focus {
    box-shadow: none !important;
    border-color: #e5e7eb !important;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .chip {
        padding: 0.35rem 0.8rem;
    }
    .select2-container--bootstrap-5 .select2-selection--single {
        height: 40px !important;
    }
}
