/* Integrare Custom Theme - Carregado apos o Filament */

/* ===== SIDEBAR ===== */
.fi-sidebar {
    background: #ffffff !important;
    border-right: 1px solid rgb(229, 231, 235) !important;
}

.dark .fi-sidebar {
    background: #000000 !important;
    border-right: none !important;
}

.fi-sidebar-nav-groups {
    padding: 1rem !important;
}

.fi-sidebar-item {
    border-radius: 0.375rem !important;
    margin-bottom: 0.25rem !important;
}

.fi-sidebar-item-button {
    padding: 0.75rem 1rem !important;
    font-weight: 500 !important;
    color: rgb(71, 85, 105) !important;
    transition: all 0.15s ease !important;
}

.fi-sidebar-item-button:hover {
    background: rgba(65, 102, 155, 0.1) !important;
    color: rgb(65, 102, 155) !important;
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background: rgba(65, 102, 155, 0.15) !important;
    color: rgb(65, 102, 155) !important;
    border-left: 3px solid rgb(65, 102, 155) !important;
}

.fi-sidebar-group-label {
    color: rgb(148, 163, 184) !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    padding: 1rem 1rem 0.5rem !important;
}

/* Dark mode sidebar */
.dark .fi-sidebar-item-button {
    color: rgba(255, 255, 255, 0.85) !important;
}

.dark .fi-sidebar-item-button:hover {
    background: rgba(65, 102, 155, 0.2) !important;
    color: rgb(148, 180, 220) !important;
}

.dark .fi-sidebar-item-active .fi-sidebar-item-button {
    background: rgba(65, 102, 155, 0.25) !important;
    color: rgb(148, 180, 220) !important;
}

.dark .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ===== HEADER ===== */
.fi-topbar {
    background: white !important;
    border-bottom: 1px solid rgb(229, 231, 235) !important;
    box-shadow: none !important;
}

.dark .fi-topbar {
    background: rgb(17, 24, 39) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

/* ===== CARDS ===== */
.fi-section,
.fi-card {
    background: white !important;
    border: 1px solid rgb(229, 231, 235) !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}

.dark .fi-section,
.dark .fi-card {
    background: rgb(17, 24, 39) !important;
    border-color: rgb(55, 65, 81) !important;
}

/* Stats com borda accent */
.fi-wi-stats-overview-stat {
    border-left: 4px solid rgb(65, 102, 155) !important;
}

/* ===== BOTOES ===== */
.fi-btn-primary {
    background: rgb(65, 102, 155) !important;
    border: none !important;
}

.fi-btn-primary:hover {
    background: rgb(51, 83, 134) !important;
}

/* ===== FORMS ===== */
.fi-input:focus,
.fi-select:focus,
.fi-textarea:focus {
    border-color: rgb(65, 102, 155) !important;
    box-shadow: 0 0 0 3px rgba(65, 102, 155, 0.15) !important;
}

/* ===== TABELAS ===== */
.fi-ta-header-cell {
    background: rgb(248, 250, 252) !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: rgb(74, 74, 74) !important;
}

.dark .fi-ta-header-cell {
    background: rgb(31, 41, 55) !important;
    color: rgb(156, 163, 175) !important;
}

/* ===== TABS ===== */
.fi-tabs-tab-active {
    border-bottom-color: rgb(65, 102, 155) !important;
    color: rgb(65, 102, 155) !important;
}

/* ===== LOGIN PAGE ===== */
.fi-simple-layout {
    background: linear-gradient(135deg, #000000 0%, #4a4a4a 100%) !important;
}

.fi-simple-main {
    background: white !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5) !important;
}

/* ===== CHECKBOX/RADIO ===== */
.fi-checkbox-input:checked,
.fi-radio-input:checked {
    background-color: rgb(65, 102, 155) !important;
    border-color: rgb(65, 102, 155) !important;
}

/* ===== TOGGLE ===== */
.fi-toggle-input:checked + .fi-toggle-track {
    background-color: rgb(65, 102, 155) !important;
}

/* ===== DARK MODE ===== */
.dark body,
.dark .fi-main {
    background: rgb(3, 7, 18) !important;
}

/* ===== ICONES ===== */
.fi-sidebar svg {
    width: 1.125rem !important;
    height: 1.125rem !important;
}

.fi-btn svg {
    width: 1rem !important;
    height: 1rem !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgb(203, 213, 225);
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: rgb(55, 65, 81);
}

/* ===== ACTIVITY TIMELINE ===== */
.activity-timeline {
    position: relative;
    padding-left: 1.75rem;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 2px;
    background: linear-gradient(to bottom, #e2e8f0, transparent);
    border-radius: 1px;
}

.dark .activity-timeline::before {
    background: linear-gradient(to bottom, #334155, transparent);
}

.timeline-item {
    position: relative;
    padding-bottom: 1rem;
    padding-left: 0.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.25rem;
    top: 0.125rem;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.timeline-content {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.timeline-content:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark .timeline-content {
    background: #1e293b;
    border-color: #334155;
}

.dark .timeline-content:hover {
    border-color: #475569;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.375rem;
}

.timeline-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: #1e293b;
    line-height: 1.4;
}

.dark .timeline-title {
    color: #f1f5f9;
}

.timeline-time {
    font-size: 0.6875rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}

.timeline-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.timeline-user {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #64748b;
}

.dark .timeline-user {
    color: #94a3b8;
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* ===== STATS CARDS ENHANCED ===== */
.fi-wi-stats-overview-stat {
    transition: all 0.2s ease !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08) !important;
}

.dark .fi-wi-stats-overview-stat:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.025em !important;
}

.fi-wi-stats-overview-stat-description {
    display: flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    font-size: 0.75rem !important;
}

/* Sparkline chart colors */
.fi-wi-stats-overview-stat-chart {
    opacity: 0.8 !important;
}

/* ===== ENHANCED BADGES ===== */
.fi-badge {
    font-weight: 600 !important;
    padding: 0.25rem 0.625rem !important;
    border-radius: 9999px !important;
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.025em !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
    transition: all 0.15s ease !important;
}

.fi-badge svg {
    width: 0.75rem !important;
    height: 0.75rem !important;
}

/* Badge gradients */
.fi-badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%) !important;
    color: #047857 !important;
}

.fi-badge-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%) !important;
    color: #b45309 !important;
}

.fi-badge-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%) !important;
    color: #b91c1c !important;
}

.fi-badge-primary {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%) !important;
    color: #1e40af !important;
}

.fi-badge-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%) !important;
    color: #0369a1 !important;
}

.fi-badge-gray {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    color: #475569 !important;
}

.dark .fi-badge-success {
    background: rgba(4, 120, 87, 0.25) !important;
    color: #34d399 !important;
}

.dark .fi-badge-warning {
    background: rgba(180, 83, 9, 0.25) !important;
    color: #fbbf24 !important;
}

.dark .fi-badge-danger {
    background: rgba(185, 28, 28, 0.25) !important;
    color: #f87171 !important;
}

.dark .fi-badge-primary {
    background: rgba(30, 64, 175, 0.25) !important;
    color: #60a5fa !important;
}

.dark .fi-badge-info {
    background: rgba(3, 105, 161, 0.25) !important;
    color: #38bdf8 !important;
}

.dark .fi-badge-gray {
    background: rgba(71, 85, 105, 0.25) !important;
    color: #94a3b8 !important;
}

/* ===== SIDEBAR ANIMATIONS ===== */
.fi-sidebar-item-button {
    transition: all 0.15s ease !important;
}

.fi-sidebar-item-button:hover {
    transform: translateX(4px) !important;
}

.fi-sidebar-item-button:hover svg {
    transform: scale(1.1) !important;
    transition: transform 0.15s ease !important;
}

.fi-sidebar-item-active .fi-sidebar-item-button {
    background: rgba(65, 102, 155, 0.15) !important;
    border-left: 3px solid rgb(65, 102, 155) !important;
}

/* Navigation group icons */
.fi-sidebar-group-button {
    transition: all 0.15s ease !important;
}

.fi-sidebar-group-button:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* ===== BREADCRUMBS ===== */
.fi-breadcrumbs {
    font-size: 0.8125rem !important;
}

.fi-breadcrumbs-item {
    transition: color 0.15s ease !important;
}

.fi-breadcrumbs-item:hover {
    color: rgb(65, 102, 155) !important;
}

/* ===== TABLE ROW HOVER ===== */
.fi-ta-row {
    transition: background-color 0.15s ease !important;
}

.fi-ta-row:hover {
    background-color: rgba(65, 102, 155, 0.04) !important;
}

.dark .fi-ta-row:hover {
    background-color: rgba(65, 102, 155, 0.1) !important;
}

/* ===== WIZARD STEPS ===== */
.fi-wizard-step {
    transition: all 0.2s ease !important;
}

.fi-wizard-step-active .fi-wizard-step-indicator {
    background: rgb(65, 102, 155) !important;
    color: white !important;
    box-shadow: 0 0 0 4px rgba(65, 102, 155, 0.2) !important;
}

.fi-wizard-step-completed .fi-wizard-step-indicator {
    background: #41669b !important;
    color: white !important;
}

/* ===== SECTION HEADERS ===== */
.fi-section-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1rem 1.25rem !important;
}

.dark .fi-section-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border-bottom-color: #334155 !important;
}

/* ===== MODAL OVERLAY ===== */
.fi-modal-window {
    animation: modalSlideIn 0.2s ease-out !important;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== NOTIFICATION BADGE ===== */
.fi-sidebar-item-badge {
    background: #ef4444 !important;
    color: white !important;
    padding: 0.125rem 0.5rem !important;
    border-radius: 9999px !important;
    font-size: 0.625rem !important;
    font-weight: 700 !important;
    animation: badgePulse 2s infinite !important;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* ===== APEX CHARTS CUSTOM ===== */
.apexcharts-tooltip {
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.apexcharts-legend-text {
    font-family: 'Inter', sans-serif !important;
}

/* ===== LOADING STATES ===== */
.fi-loading-indicator {
    color: #41669b !important;
}

/* ===== FORM SECTIONS ===== */
.fi-fo-section {
    border-left: 3px solid transparent !important;
    transition: border-color 0.15s ease !important;
}

.fi-fo-section:focus-within {
    border-left-color: rgb(65, 102, 155) !important;
}

/* ===== EMPTY STATE ===== */
.fi-ta-empty-state {
    padding: 3rem !important;
}

.fi-ta-empty-state-icon {
    color: #94a3b8 !important;
}

/* ===== PROGRESS BARS ===== */
.progress-bar-container {
    width: 100%;
    height: 0.5rem;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .progress-bar-container {
    background: #334155;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* ===== AVATAR IMPROVEMENTS ===== */
.fi-avatar {
    border: 2px solid white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.dark .fi-avatar {
    border-color: #1e293b !important;
}

/* ===== PAGINATION DROPDOWN - WIDTH FIX ===== */
.fi-pagination-records-per-page-select {
    max-width: 80px !important;
    width: auto !important;
}

.fi-pagination-records-per-page-select select,
.fi-pagination-records-per-page-select .fi-select-input,
.fi-pagination-records-per-page-select .choices,
.fi-pagination-records-per-page-select .choices__inner {
    max-width: 80px !important;
    min-width: auto !important;
    width: auto !important;
}

.fi-pagination {
    gap: 0.5rem !important;
}

.fi-pagination-records-per-page-select-label {
    white-space: nowrap !important;
}

/* ===== USER MENU DROPDOWN FIX ===== */
.fi-dropdown-panel {
    min-width: 180px !important;
    max-width: 220px !important;
    width: auto !important;
}

.fi-dropdown-list {
    width: 100% !important;
}

.fi-dropdown-list-item {
    white-space: nowrap !important;
}

/* ===== ALL DROPDOWNS/SELECTS WIDTH FIX ===== */
.fi-input-wrp.fi-select select,
.fi-select-input {
    min-width: auto !important;
}

/* ===== SIDEBAR COLLAPSE BUTTON ===== */
.fi-sidebar-nav-collapse-btn {
    background: rgb(65, 102, 155) !important;
    color: white !important;
    border-radius: 0.375rem !important;
    padding: 0.5rem !important;
    transition: all 0.2s ease !important;
}

.fi-sidebar-nav-collapse-btn:hover {
    background: rgb(51, 83, 134) !important;
    transform: scale(1.05) !important;
}

.fi-sidebar-nav-collapse-btn svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
}
