/* ============================================
   Sistema de Agendamento SEE-PB
   Custom Filament Theme - Dark Mode Elegante
   ============================================ */

/* ============================================
   CSS Variables - Design System
   ============================================ */
:root {
    /* Primary Colors - Indigo */
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-300: #a5b4fc;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;
    --brand-900: #312e81;
    --brand-950: #1e1b4b;

    /* Accent Colors - Teal */
    --accent-400: #2dd4bf;
    --accent-500: #14b8a6;
    --accent-600: #0d9488;

    /* Neutral Colors */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    --neutral-950: #0a0a0a;

    /* Shadows */
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Typography
   ============================================ */
* {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ============================================
   Body & Background - Dark Theme
   ============================================ */
.dark .fi-body {
    background: linear-gradient(180deg, var(--neutral-950) 0%, #0d0d12 100%) !important;
    position: relative;
}

.dark .fi-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Animated Gradient Orbs */
.dark .fi-body::after {
    content: '';
    position: fixed;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 20s ease-in-out infinite;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.15; }
    25% { transform: translate(-50px, 50px) scale(1.1); opacity: 0.2; }
    50% { transform: translate(-100px, 0) scale(1); opacity: 0.15; }
    75% { transform: translate(-50px, -50px) scale(0.9); opacity: 0.1; }
}

/* Secondary Orb */
.dark .fi-layout::before {
    content: '';
    position: fixed;
    bottom: -200px;
    left: -200px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatOrb 25s ease-in-out infinite reverse;
}

/* ============================================
   Main Content Area
   ============================================ */
.fi-main-ctn {
    position: relative;
    z-index: 1;
}

.fi-main {
    position: relative;
    z-index: 1;
}

/* ============================================
   Topbar - Glassmorphism Style
   ============================================ */
.dark .fi-topbar nav {
    background: rgba(23, 23, 23, 0.8) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

.dark .fi-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
}

/* Topbar Navigation Items */
.dark .fi-topbar-item {
    position: relative;
    padding: 0.5rem 1rem !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    transition: all var(--transition-normal) !important;
    color: var(--neutral-400) !important;
}

.dark .fi-topbar-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: white !important;
}

.dark .fi-topbar-item.fi-active {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4) !important;
}

.dark .fi-topbar-item.fi-active::before {
    display: none;
}

/* ============================================
   Cards & Sections - Glassmorphism
   ============================================ */
.dark .fi-section,
.dark .fi-card {
    background: rgba(38, 38, 38, 0.6) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-card) !important;
    overflow: hidden;
}

/* Subtle hover without transform to prevent flickering */
.dark .fi-section:hover,
.dark .fi-card:hover {
    border-color: rgba(99, 102, 241, 0.15) !important;
}

/* Section Headers */
.dark .fi-section-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(20, 184, 166, 0.05)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 1rem 1.25rem !important;
}

.dark .fi-section-header-heading {
    font-weight: 700 !important;
    font-size: 1rem !important;
    background: linear-gradient(135deg, var(--brand-400), var(--accent-400)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ============================================
   Stats Widgets - Beautiful Cards
   ============================================ */
.dark .fi-wi-stats-overview-stat {
    background: linear-gradient(145deg, rgba(38, 38, 38, 0.8), rgba(23, 23, 23, 0.9)) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    position: relative;
    overflow: hidden;
}

.dark .fi-wi-stats-overview-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-500), var(--accent-500)) !important;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

/* Subtle hover without transform */
.dark .fi-wi-stats-overview-stat:hover {
    border-color: rgba(99, 102, 241, 0.2) !important;
}

.dark .fi-wi-stats-overview-stat:hover::before {
    opacity: 1;
}

/* Stat Values */
.dark .fi-wi-stats-overview-stat-value {
    font-size: 2rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, white, var(--neutral-300)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    line-height: 1.2 !important;
}

.dark .fi-wi-stats-overview-stat-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--neutral-400) !important;
    margin-top: 0.25rem !important;
}

/* Stat Icons - Gradient background with white icon */
.dark .fi-wi-stats-overview-stat-icon {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dark .fi-wi-stats-overview-stat-icon svg {
    width: 20px !important;
    height: 20px !important;
    color: white !important;
}

/* Primary color stat (Eventos) */
.dark .fi-wi-stats-overview-stat.fi-color-primary .fi-wi-stats-overview-stat-icon,
.dark .fi-wi-stats-overview-stat:has(.fi-stat-eventos) .fi-wi-stats-overview-stat-icon {
    background: linear-gradient(135deg, #6366f1, #4338ca) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3) !important;
}

/* Info color stat (Usuarios) */
.dark .fi-wi-stats-overview-stat.fi-color-info .fi-wi-stats-overview-stat-icon,
.dark .fi-wi-stats-overview-stat:has(.fi-stat-usuarios) .fi-wi-stats-overview-stat-icon {
    background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.3) !important;
}

/* Warning color stat (Assuntos) */
.dark .fi-wi-stats-overview-stat.fi-color-warning .fi-wi-stats-overview-stat-icon,
.dark .fi-wi-stats-overview-stat:has(.fi-stat-assuntos) .fi-wi-stats-overview-stat-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
}

/* Success color stat (Visitantes) */
.dark .fi-wi-stats-overview-stat.fi-color-success .fi-wi-stats-overview-stat-icon,
.dark .fi-wi-stats-overview-stat:has(.fi-stat-visitantes) .fi-wi-stats-overview-stat-icon {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3) !important;
}

/* ============================================
   Tables - Modern Design
   ============================================ */
.dark .fi-ta {
    background: transparent !important;
}

.dark .fi-ta-header-cell {
    background: rgba(38, 38, 38, 0.8) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: var(--neutral-400) !important;
    padding: 1rem 1.25rem !important;
}

.dark .fi-ta-row {
    background: rgba(38, 38, 38, 0.4) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
    transition: all var(--transition-fast) !important;
}

.dark .fi-ta-row:hover {
    background: rgba(99, 102, 241, 0.08) !important;
}

.dark .fi-ta-cell {
    padding: 1rem 1.25rem !important;
    color: var(--neutral-200) !important;
}

/* Table Container */
.dark .fi-ta-content {
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ============================================
   Buttons - Gradient Style
   ============================================ */
.dark .fi-btn-primary {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4) !important;
    transition: all var(--transition-normal) !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
}

.dark .fi-btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5) !important;
}

.dark .fi-btn-primary:active {
    transform: translateY(0) !important;
}

/* Secondary Buttons */
.dark .fi-btn-gray,
.dark .fi-btn-secondary {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(8px) !important;
    color: var(--neutral-300) !important;
    transition: all var(--transition-normal) !important;
    border-radius: 10px !important;
}

.dark .fi-btn-gray:hover,
.dark .fi-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Icon Buttons */
.dark .fi-icon-btn {
    transition: all var(--transition-normal) !important;
    border-radius: 10px !important;
}

.dark .fi-icon-btn:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--brand-400) !important;
}

/* ============================================
   Form Inputs - Modern Style
   ============================================ */
.dark .fi-input,
.dark .fi-select,
.dark .fi-textarea,
.dark [type="text"],
.dark [type="email"],
.dark [type="password"],
.dark [type="number"],
.dark [type="date"],
.dark [type="datetime-local"],
.dark select,
.dark textarea {
    background: rgba(38, 38, 38, 0.8) !important;
    border: 2px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: white !important;
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-normal) !important;
    font-size: 0.9375rem !important;
}

.dark .fi-input:focus,
.dark .fi-select:focus,
.dark .fi-textarea:focus,
.dark [type="text"]:focus,
.dark [type="email"]:focus,
.dark [type="password"]:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: var(--brand-500) !important;
    background: rgba(38, 38, 38, 1) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

/* Labels */
.dark .fi-fo-field-wrp label,
.dark .fi-input-wrp label {
    font-weight: 600 !important;
    color: var(--neutral-300) !important;
    font-size: 0.875rem !important;
    margin-bottom: 0.5rem !important;
}

/* ============================================
   Dropdown Menus
   ============================================ */
.dark .fi-dropdown-panel {
    background: rgba(38, 38, 38, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    overflow: hidden;
}

.dark .fi-dropdown-list-item {
    padding: 0.75rem 1rem !important;
    transition: all var(--transition-fast) !important;
    border-radius: 8px !important;
    margin: 0.25rem !important;
}

.dark .fi-dropdown-list-item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
}

/* ============================================
   Modals
   ============================================ */
.dark .fi-modal-window {
    background: rgba(38, 38, 38, 0.98) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

.dark .fi-modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(20, 184, 166, 0.05)) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 1.5rem !important;
}

.dark .fi-modal-heading {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
}

/* Modal Backdrop */
.dark .fi-modal-close-overlay {
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(4px) !important;
}

/* ============================================
   Badges & Tags
   ============================================ */
.dark .fi-badge {
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 100px !important;
    backdrop-filter: blur(8px) !important;
}

.dark .fi-badge-primary {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    color: white !important;
}

.dark .fi-badge-success {
    background: rgba(34, 197, 94, 0.2) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.dark .fi-badge-warning {
    background: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
}

.dark .fi-badge-danger {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.dark .fi-badge-info {
    background: rgba(20, 184, 166, 0.2) !important;
    color: var(--accent-400) !important;
    border: 1px solid rgba(20, 184, 166, 0.3) !important;
}

/* ============================================
   User Menu / Avatar
   ============================================ */
.dark .fi-user-menu {
    border-radius: 12px !important;
    padding: 0.5rem !important;
    transition: all var(--transition-normal) !important;
}

.dark .fi-user-menu:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-avatar {
    border: 2px solid rgba(99, 102, 241, 0.5) !important;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2) !important;
}

/* ============================================
   Sidebar (quando visível)
   ============================================ */
.dark .fi-sidebar {
    background: rgba(23, 23, 23, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-sidebar-item {
    border-radius: 10px !important;
    margin: 0.25rem 0.5rem !important;
    transition: all var(--transition-normal) !important;
}

.dark .fi-sidebar-item:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-sidebar-item.fi-active {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
}

.dark .fi-sidebar-item.fi-active span,
.dark .fi-sidebar-item.fi-active svg {
    color: white !important;
}

/* ============================================
   Notifications
   ============================================ */
.dark .fi-notification {
    background: rgba(38, 38, 38, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 14px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

.dark .fi-notification-success {
    border-left: 4px solid #22c55e !important;
}

.dark .fi-notification-danger {
    border-left: 4px solid #ef4444 !important;
}

.dark .fi-notification-warning {
    border-left: 4px solid #f59e0b !important;
}

.dark .fi-notification-info {
    border-left: 4px solid var(--accent-500) !important;
}

/* ============================================
   Global Search
   ============================================ */
.dark .fi-global-search-field {
    background: rgba(38, 38, 38, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    transition: all var(--transition-normal) !important;
}

.dark .fi-global-search-field:focus-within {
    background: rgba(38, 38, 38, 0.9) !important;
    border-color: var(--brand-500) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15) !important;
}

/* ============================================
   Pagination
   ============================================ */
.dark .fi-pagination-item {
    border-radius: 10px !important;
    transition: all var(--transition-fast) !important;
}

.dark .fi-pagination-item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
}

.dark .fi-pagination-item.fi-active {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    color: white !important;
}

/* ============================================
   Tabs
   ============================================ */
.dark .fi-tabs-tab {
    border-radius: 10px !important;
    padding: 0.75rem 1.25rem !important;
    transition: all var(--transition-normal) !important;
    font-weight: 500 !important;
}

.dark .fi-tabs-tab:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.dark .fi-tabs-tab[aria-selected="true"] {
    background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
}

/* ============================================
   Widget Styles (no animations to prevent flickering)
   ============================================ */
.fi-wi-widget {
    opacity: 1;
    transform: none;
}

/* ============================================
   Page Header
   ============================================ */
.dark .fi-header {
    padding: 1.5rem 0 !important;
    margin-bottom: 1.5rem !important;
}

.dark .fi-header-heading {
    font-size: 1.75rem !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, white, var(--neutral-300)) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.dark .fi-header-subheading {
    color: var(--neutral-400) !important;
    font-size: 1rem !important;
}

/* Breadcrumbs */
.dark .fi-breadcrumbs {
    margin-bottom: 0.5rem !important;
}

.dark .fi-breadcrumbs-item {
    color: var(--neutral-500) !important;
    font-size: 0.875rem !important;
}

.dark .fi-breadcrumbs-item a:hover {
    color: var(--brand-400) !important;
}

/* ============================================
   Loading States
   ============================================ */
.dark .fi-loading-indicator {
    border-color: rgba(99, 102, 241, 0.2) !important;
    border-top-color: var(--brand-500) !important;
}

/* ============================================
   Empty States
   ============================================ */
.dark .fi-ta-empty-state {
    padding: 4rem 2rem !important;
}

.dark .fi-ta-empty-state-icon {
    color: var(--neutral-600) !important;
}

.dark .fi-ta-empty-state-heading {
    color: var(--neutral-400) !important;
    font-weight: 600 !important;
}

.dark .fi-ta-empty-state-description {
    color: var(--neutral-500) !important;
}

/* ============================================
   Scrollbar Styling
   ============================================ */
.dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.3);
}

/* ============================================
   Selection
   ============================================ */
.dark ::selection {
    background: rgba(99, 102, 241, 0.3);
    color: white;
}

/* ============================================
   Focus States - Accessibility
   ============================================ */
.dark *:focus-visible {
    outline: 2px solid var(--brand-500) !important;
    outline-offset: 2px !important;
}

/* ============================================
   Transitions - Selective (not global to avoid flickering)
   ============================================ */
.dark .fi-btn,
.dark .fi-icon-btn,
.dark .fi-topbar-item-button,
.dark .fi-dropdown-list-item,
.dark .fi-sidebar-item {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

/* ============================================
   Dashboard Specific Styles
   ============================================ */
.dark .fi-dashboard-page {
    padding-top: 1rem !important;
}

/* Widget Grid */
.dark .fi-widgets {
    gap: 1.5rem !important;
}

/* Account Widget */
.dark .fi-wi-account-widget {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(20, 184, 166, 0.1)) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1024px) {
    .dark .fi-wi-stats-overview-stat {
        padding: 1.25rem !important;
    }

    .dark .fi-wi-stats-overview-stat-value {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .dark .fi-header-heading {
        font-size: 1.5rem !important;
    }

    .dark .fi-section,
    .dark .fi-card {
        border-radius: 12px !important;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .dark .fi-body::before,
    .dark .fi-body::after,
    .dark .fi-layout::before {
        display: none !important;
    }

    .dark .fi-topbar,
    .dark .fi-sidebar {
        display: none !important;
    }

    .dark .fi-section,
    .dark .fi-card {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
}

/* ============================================
   Modal/SlideOver - Z-Index Fix
   ============================================ */

/* Overlay de fundo (desfoque) - z-index 41 */
.fi-modal-close-overlay {
    z-index: 41 !important;
}

/* Container que envolve o modal window - z-index 42 (na frente do overlay) */
.fi-modal > div > div.fixed.inset-0 {
    z-index: 42 !important;
}

/* Janela do modal/formulário - z-index 43 (na frente de tudo) */
.fi-modal-window {
    z-index: 43 !important;
}

/* ============================================
   RESPONSIVIDADE MOBILE - MELHORIAS
   ============================================ */

/* Tablet - 1024px */
@media (max-width: 1024px) {
    .fi-main {
        padding: 1rem !important;
    }

    .fi-header {
        padding: 1rem !important;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
    .fi-main {
        padding: 0.75rem !important;
    }

    .fi-header {
        padding: 0.75rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .fi-header-heading {
        font-size: 1.25rem !important;
    }

    /* Tabelas mais compactas */
    .fi-ta-table {
        font-size: 0.8rem !important;
    }

    .fi-ta-cell {
        padding: 0.5rem 0.75rem !important;
    }

    .fi-ta-header-cell {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    /* Actions mais compactas */
    .fi-ta-actions {
        gap: 0.25rem !important;
    }

    /* Stats overview */
    .fi-wi-stats-overview-stat {
        padding: 0.75rem !important;
    }

    .fi-wi-stats-overview-stat-value {
        font-size: 1.25rem !important;
    }

    .fi-wi-stats-overview-stat-label {
        font-size: 0.7rem !important;
    }

    /* Formulários */
    .fi-fo-field-wrp {
        margin-bottom: 0.75rem !important;
    }

    /* Botões de ação */
    .fi-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.8rem !important;
    }

    /* Section headers */
    .fi-section-header {
        padding: 0.75rem !important;
    }

    /* Sidebar colapsada por padrão em mobile */
    .fi-sidebar-nav {
        padding: 0.5rem !important;
    }
}

/* Mobile pequeno - 480px */
@media (max-width: 480px) {
    .fi-main {
        padding: 0.5rem !important;
    }

    .fi-header {
        padding: 0.5rem !important;
    }

    .fi-header-heading {
        font-size: 1.1rem !important;
    }

    /* Tabelas ultra compactas */
    .fi-ta-table {
        font-size: 0.75rem !important;
    }

    .fi-ta-cell {
        padding: 0.4rem 0.5rem !important;
    }

    .fi-ta-header-cell {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.7rem !important;
    }

    /* Oculta texto em botões, mostra só ícone */
    .fi-ta-actions .fi-btn .fi-btn-label {
        display: none !important;
    }

    .fi-ta-actions .fi-btn {
        padding: 0.4rem !important;
    }

    /* Stats ainda menores */
    .fi-wi-stats-overview-stat-value {
        font-size: 1rem !important;
    }

    /* Cards e sections */
    .fi-section,
    .fi-card {
        border-radius: 8px !important;
    }

    /* Modal fullscreen em mobile */
    .fi-modal-window {
        max-width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        min-height: 100vh;
    }

    .fi-modal-slide-over-window {
        width: 100% !important;
        max-width: 100% !important;
    }
}

/* Touch-friendly - mínimo 44px para elementos clicáveis */
@media (pointer: coarse) {
    .fi-ta-row {
        min-height: 48px;
    }

    .fi-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .fi-input {
        min-height: 44px;
    }

    .fi-select-trigger {
        min-height: 44px;
    }
}
