.pdf-container {
    position: relative;
    width: 100%;
    padding-bottom: 141.4%; /* A4 aspect ratio */
}

.pdf-container embed,
.pdf-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.js-invoice-tablehead th[data-sort] {
    cursor: pointer;
    user-select: none;
}

.js-invoice-tablehead th[data-sort]:not(.active)::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #000;
    vertical-align: middle;
    opacity: 0.5;
}

/* Descending arrow (default) */
.js-invoice-tablehead th[data-sort].active[data-direction="desc"]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #000000;
    vertical-align: middle;
}

/* Ascending arrow */
.js-invoice-tablehead th[data-sort].active[data-direction="asc"]::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #000000;
    vertical-align: middle;
}

.btn-input-style {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    color: #212529;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out;
}

.btn-input-style:hover {
    background-color: #ffffff;
    border-color: #adb5bd;
    color: #212529;
}

.btn-input-style:focus {
    background-color: #ffffff;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    color: #212529;
}

.fcl-pill-dropdown {
    position: relative;
}

.fcl-pill-dropdown-menu {
    min-width: 100%;
    left: 0;
    right: auto;
}

.date-filter {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.date-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-filter-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #CC0000;
}

.date-filter-checkbox-label {
    font-size: 16px;
    font-weight: 500;
    margin: 0;
    cursor: pointer;
}

.date-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.date-filter-label {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

.date-filter-input {
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    color: #212529;
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out;
}

.date-filter-input:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.pill-filter {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pill-filter-legend {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0;
}

.pill-filter-legend.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pill-filter-input {
    position: absolute;
    opacity: 0;
}

.pill-filter-label {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 30px;
    background-color: #e9ecef;
    color: #212529;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pill-filter-label:hover {
    background-color: #dee2e6;
}

.pill-filter-input:checked + .pill-filter-label {
    background-color: #cc0000;
    color: #ffffff;
}

.pill-filter-input:focus + .pill-filter-label {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Pagination container */
.pagination {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    gap: 0;
}

/* Remove default margins */
.pagination .page-item {
    margin: 0;
}

/* Page links */
.pagination .page-link {
    border: none;
    border-right: 1px solid #dee2e6;
    border-radius: 0;
    color: #212529;
    padding: 0.5rem 1rem;
    min-width: 45px;
    text-align: center;
}

/* Remove border on last item */
.pagination .page-item:last-child .page-link {
    border-right: none;
}

/* Active page */
.pagination .page-item.active .page-link {
    background-color: #cc0000;
    border-color: #cc0000;
    color: #ffffff;
    z-index: 1;
}

/* Hover state */
.pagination .page-link:hover:not(.active) {
    background-color: #f8f9fa;
    color: #212529;
}

/* Disabled state */
.pagination .page-item.disabled .page-link {
    background-color: #ffffff;
    color: #6c757d;
    cursor: not-allowed;
}

/* Focus state */
.pagination .page-link:focus {
    box-shadow: none;
    background-color: #f8f9fa;
}

.invoice-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

.status-future {
    background-color: #C4DCFF;
    color: #0A3980;
    border: 1px solid #0A3980;
}

.status-past-due {
    background-color: #FFBEBE;
    color: #7A0000;
    border: 1px solid #7A0000;
}

.status-current {
    background-color: #FFF3B7;
    color: #674D1B;
    border: 1px solid #674D1B;
}

.status-paid {
    background-color: #C3FFE2;
    color: #0E8B4F;
    border: 1px solid #0E8B4F;
}

.status-not-available {
    background-color: #D2D7DD;
    color: #484E55;
    border: 1px solid #484E55;
}

.fcl-not-btn {
    border-bottom: none !important;
}

.fcl-invoice-data {
    font-size: 16px;
    font-weight: 600;
    line-height: 120%;
}

.alert-secondary {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
}

.fcl-invoice-checkbox {
    background-color: #ECF0F4;
    border: none;
    height: 1.25rem;
    width: 1.25rem;
}

.form-check-input.fcl-invoice-checkbox:checked {
    background-color: #CC0000;
    border: 1px solid #CC0000;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}

.fcl-invoice-checkbox.form-check-input[type=checkbox]:indeterminate {
    background-color: #cc0000;
    border-color: #cc0000;
}

.js-invoice-tablebody td,
.js-datafiles-tablebody td {
    vertical-align: middle;
}

/* Also center header cells if needed */
.js-invoice-tablehead th,
.js-datafiles-tablehead th {
    vertical-align: middle;
}

.fcl-hr-override {
    background-color: #dee2e6 !important;
    opacity: 1 !important;
}