/* Custom table row styling - Light mode */
.table-row-reversed,
.table-row-reversed > td {
    background-color: #fee2e2 !important;
    border-left: 4px solid #ef4444 !important;
    color: #1f2937 !important; /* Dark gray text */
}

.table-row-completed,
.table-row-completed > td {
    background-color: #dcfce7 !important;
    border-left: 4px solid #22c55e !important;
    color: #1f2937 !important; /* Dark gray text */
}

/* Dark mode support */
.dark .table-row-reversed,
.dark .table-row-reversed > td {
    background-color: #7f1d1d !important; /* Dark red background */
    border-left: 4px solid #ef4444 !important;
    color: #f9fafb !important; /* Light text for dark mode */
}

.dark .table-row-completed,
.dark .table-row-completed > td {
    background-color: #14532d !important; /* Dark green background */
    border-left: 4px solid #22c55e !important;
    color: #f9fafb !important; /* Light text for dark mode */
}

/* Hover effects - Light mode */
.table-row-reversed:hover,
.table-row-reversed:hover > td {
    background-color: #fecaca !important;
    color: #1f2937 !important;
}

.table-row-completed:hover,
.table-row-completed:hover > td {
    background-color: #bbf7d0 !important;
    color: #1f2937 !important;
}

/* Hover effects - Dark mode */
.dark .table-row-reversed:hover,
.dark .table-row-reversed:hover > td {
    background-color: #991b1b !important;
    color: #f9fafb !important;
}

.dark .table-row-completed:hover,
.dark .table-row-completed:hover > td {
    background-color: #166534 !important;
    color: #f9fafb !important;
}

/* Ensure links and other elements maintain proper colors */
.table-row-reversed a,
.table-row-completed a {
    color: inherit !important;
    text-decoration: underline;
}

.dark .table-row-reversed a,
.dark .table-row-completed a {
    color: #f9fafb !important;
    text-decoration: underline;
}

/* Force text color on all child elements */
.table-row-reversed *,
.table-row-completed * {
    color: inherit !important;
}

.dark .table-row-reversed *,
.dark .table-row-completed * {
    color: #f9fafb !important;
}

/* Reduce icon sizes in stats widgets */
.fi-wi-stats-overview-stat-icon {
    width: 1rem !important;
    height: 1rem !important;
}

/* Reduce main stat card icons */
.fi-wi-stats-overview-stat svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* Target description icons specifically */
.fi-wi-stats-overview-stat-description svg {
    width: 0.875rem !important;
    height: 0.875rem !important;
}

/* Target Company Overview Dashboard card icons */
.rounded-full.bg-amber-100 svg,
.rounded-full.bg-blue-100 svg,
.rounded-full.bg-green-100 svg,
.rounded-full.bg-yellow-100 svg,
.rounded-full.bg-purple-100 svg,
.rounded-full.bg-gray-100 svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* Dark mode variants */
.dark .rounded-full.bg-amber-900 svg,
.dark .rounded-full.bg-blue-900 svg,
.dark .rounded-full.bg-green-900 svg,
.dark .rounded-full.bg-yellow-900 svg,
.dark .rounded-full.bg-purple-900 svg,
.dark .rounded-full.bg-gray-900 svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* Section header spacing */
.fi-wi:has(+ .fi-wi [class*="PanelOverview"]) {
    margin-bottom: 1.5rem !important;
}

/* Add top margin to accounting section for visual separation */
[class*="AccountingPanelSection"] {
    margin-top: 2rem !important;
}

/* Reduce section header icon sizes */
[class*="PanelSection"] svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* Reduce action button icon sizes */
.fi-ac-btn-icon svg,
.fi-btn-icon svg,
button svg,
.fi-btn svg,
[type="button"] svg,
.fi-ac-action svg,
.fi-ac svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
}

/* Reduce header action icon sizes */
.fi-header-actions svg,
.fi-page-actions svg,
header svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
}

/* Override Filament default icon sizes */
.fi-icon,
.fi-icon-btn-icon {
    width: 1rem !important;
    height: 1rem !important;
}

/* Reduce all Heroicons to consistent size */
svg[class*="heroicon"] {
    width: 1rem !important;
    height: 1rem !important;
}

/* Reduce modal/alert icon sizes */
.fi-modal-icon svg,
.fi-modal-icon-wrapper svg,
.fi-modal-header svg,
[role="alertdialog"] svg,
.fi-section-header-icon svg,
.fi-section-icon svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
    max-width: 1.5rem !important;
    max-height: 1.5rem !important;
}

/* Reduce notification/banner icon sizes */
.fi-banner svg,
.fi-notification svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}

/* Nuclear option - reduce ALL SVGs in the page content area */
main svg,
.fi-main svg,
.fi-section svg,
.fi-fo svg,
form svg {
    width: 1rem !important;
    height: 1rem !important;
    max-width: 1rem !important;
    max-height: 1rem !important;
}

/* Keep navigation icons slightly larger */
nav svg,
.fi-sidebar svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}