/*
 * Rebuildr UI Upgrade Layer — v1.0
 * Applied on top of the compiled Filament theme via FilamentAsset.
 * Plain CSS — no Tailwind required, no compilation step.
 * All selectors target Filament v3 fi- prefix classes for upgrade safety.
 */

/* ═══════════════════════════════════════════════════════════════
   1. GLOBAL BASE
   ═══════════════════════════════════════════════════════════════ */

:root {
    --rui-radius-sm:   6px;
    --rui-radius:      10px;
    --rui-radius-lg:   14px;
    --rui-shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
    --rui-shadow:      0 1px 4px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
    --rui-shadow-md:   0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    --rui-shadow-lg:   0 8px 24px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.05);
    --rui-transition:  150ms cubic-bezier(0.4,0,0.2,1);
    --rui-blue:        #1b55e2;
}

/* ═══════════════════════════════════════════════════════════════
   2. PAGE LAYOUT & HEADER
   ═══════════════════════════════════════════════════════════════ */

/* Stronger page heading typography */
.fi-header-heading {
    font-size: 1.3125rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
    line-height: 1.3 !important;
}

.fi-header-subheading {
    font-size: 0.875rem !important;
    opacity: 0.65;
    margin-top: 0.2rem;
}

/* Breadcrumb separator refinement */
.fi-breadcrumbs-item-separator {
    opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════
   3. SECTION / CARD SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* Elevated, rounded cards throughout */
.fi-section {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow) !important;
    border-width: 1px !important;
}

/* Slightly more pronounced section header */
.fi-section-header {
    padding-top: 1.125rem !important;
    padding-bottom: 1.125rem !important;
}

.fi-section-header-heading {
    font-size: 0.9375rem !important;
    font-weight: 650 !important;
    letter-spacing: -0.015em !important;
}

.fi-section-header-description {
    font-size: 0.8125rem !important;
    opacity: 0.6;
    margin-top: 0.2rem;
}

/* Section divider line */
.fi-section-header + .fi-section-content-ctn,
.fi-section-header + div > .fi-section-content {
    border-top-width: 1px;
    border-color: inherit;
}

/* ═══════════════════════════════════════════════════════════════
   4. TABLE SYSTEM
   ═══════════════════════════════════════════════════════════════ */

/* Wrap the table in a card */
.fi-ta {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow) !important;
    overflow: hidden;
}

/* Column headers — uppercase label style, more compact */
.fi-ta-header-cell {
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    opacity: 0.55;
    padding-top: 0.625rem !important;
    padding-bottom: 0.625rem !important;
}

/* Row hover — very subtle blue tint */
.fi-ta-row {
    transition: background-color var(--rui-transition) !important;
}

/* Tighter row height for denser data display */
.fi-ta-cell {
    padding-top: 0.6875rem !important;
    padding-bottom: 0.6875rem !important;
    font-size: 0.875rem !important;
}

/* Table filter/search bar */
.fi-ta-header {
    border-bottom-width: 1px;
    border-color: inherit;
    padding: 0.875rem 1rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   5. STATS OVERVIEW WIDGET
   ═══════════════════════════════════════════════════════════════ */

.fi-wi-stats-overview-stat {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow) !important;
    transition: transform var(--rui-transition), box-shadow var(--rui-transition) !important;
    border-width: 1px !important;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--rui-shadow-md) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.625rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.03em !important;
    line-height: 1.2 !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    opacity: 0.7;
}

.fi-wi-stats-overview-stat-description {
    font-size: 0.75rem !important;
    margin-top: 0.25rem;
    opacity: 0.6;
}

.fi-wi-stats-overview-stat-description-icon {
    width: 0.875rem !important;
    height: 0.875rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   6. BADGE SYSTEM
   ═══════════════════════════════════════════════════════════════ */

.fi-badge {
    font-size: 0.6875rem !important;
    font-weight: 650 !important;
    letter-spacing: 0.03em !important;
    padding: 0.25rem 0.625rem !important;
    border-radius: 9999px !important;
}

/* Slightly bolder badge for status columns */
.fi-ta-cell .fi-badge {
    font-size: 0.6875rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   7. SIDEBAR NAVIGATION
   ═══════════════════════════════════════════════════════════════ */

/* Group labels — more prominent section separators */
.fi-sidebar-group-label {
    font-size: 0.625rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    margin-top: 0.25rem !important;
}

/* Nav items — rounded pill style */
.fi-sidebar-item-button {
    border-radius: 8px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    transition: background-color var(--rui-transition), color var(--rui-transition) !important;
    margin-bottom: 1px;
}

.fi-sidebar-item-label {
    font-size: 0.875rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   8. BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.fi-btn {
    border-radius: var(--rui-radius) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
    transition: all var(--rui-transition) !important;
}

.fi-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.fi-btn-size-md {
    padding-top: 0.5625rem !important;
    padding-bottom: 0.5625rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   9. FORM FIELDS
   ═══════════════════════════════════════════════════════════════ */

.fi-fo-field-wrp-label label,
.fi-input-wrp label {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
}

.fi-input,
.fi-select-input,
.fi-textarea {
    border-radius: var(--rui-radius) !important;
    font-size: 0.875rem !important;
    transition: border-color var(--rui-transition), box-shadow var(--rui-transition) !important;
}

.fi-input:focus,
.fi-select-input:focus,
.fi-textarea:focus {
    box-shadow: 0 0 0 3px rgba(27, 85, 226, 0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════
   10. TABS
   ═══════════════════════════════════════════════════════════════ */

.fi-tabs-tab {
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: color var(--rui-transition) !important;
}

.fi-tabs-tab[aria-selected="true"] {
    font-weight: 650 !important;
}

/* ═══════════════════════════════════════════════════════════════
   11. DROPDOWN / SELECT
   ═══════════════════════════════════════════════════════════════ */

.fi-dropdown-panel {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow-lg) !important;
    overflow: hidden;
}

.fi-dropdown-list-item-label {
    font-size: 0.875rem !important;
}

/* ═══════════════════════════════════════════════════════════════
   12. MODAL
   ═══════════════════════════════════════════════════════════════ */

.fi-modal-window {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow-lg) !important;
    overflow: hidden;
}

.fi-modal-header {
    padding: 1.25rem 1.5rem !important;
    border-bottom-width: 1px;
}

.fi-modal-heading {
    font-size: 1.0625rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
}

.fi-modal-footer {
    padding: 1rem 1.5rem !important;
    border-top-width: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   13. INFOLIST
   ═══════════════════════════════════════════════════════════════ */

.fi-in-entry-wrp-label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    opacity: 0.5;
}

.fi-in-text-item-content {
    font-size: 0.9375rem !important;
    font-weight: 500 !important;
    margin-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   14. NOTIFICATION / TOAST
   ═══════════════════════════════════════════════════════════════ */

.fi-no-notification {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow-lg) !important;
}

/* ═══════════════════════════════════════════════════════════════
   15. TOPBAR
   ═══════════════════════════════════════════════════════════════ */

.fi-topbar {
    border-bottom-width: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   16. EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */

.fi-ta-empty-state-heading {
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: -0.01em !important;
}

.fi-ta-empty-state-description {
    font-size: 0.875rem !important;
    opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════
   17. WIDGET CONTAINERS
   ═══════════════════════════════════════════════════════════════ */

/* Tighter spacing between header widgets and table */
.fi-page-content > .fi-wi-stats-overview + * {
    margin-top: 0.5rem;
}

/* Stats overview grid — no extra outer card wrapper needed */
.fi-wi-stats-overview {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════
   18. FILTERS BAR
   ═══════════════════════════════════════════════════════════════ */

.fi-ta-filters-form {
    padding: 1rem !important;
    border-top-width: 1px;
    border-color: inherit;
}

/* Filter toggle button */
.fi-ta-filters-toggle-btn {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    border-radius: var(--rui-radius) !important;
}

/* ═══════════════════════════════════════════════════════════════
   19. CHART WIDGETS
   ═══════════════════════════════════════════════════════════════ */

.fi-wi-chart {
    border-radius: var(--rui-radius-lg) !important;
    box-shadow: var(--rui-shadow) !important;
    border-width: 1px !important;
}

.fi-wi-chart-heading {
    font-size: 0.9375rem !important;
    font-weight: 650 !important;
    letter-spacing: -0.01em !important;
}

/* ═══════════════════════════════════════════════════════════════
   20. PAGINATION
   ═══════════════════════════════════════════════════════════════ */

.fi-ta-pagination {
    padding: 0.75rem 1rem !important;
    border-top-width: 1px;
    border-color: inherit;
}

.fi-pagination-item-btn {
    border-radius: var(--rui-radius-sm) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    min-width: 2rem;
}
