/* ============================================
   Doramax Admin — Custom Dark Theme
   ============================================ */

/* Fondo general del panel */
.dark .fi-body,
.dark body.fi-body {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.18), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.08), transparent 60%),
        linear-gradient(180deg, #0a0a0f 0%, #0f0f14 100%) !important;
    min-height: 100vh;
}

/* Sidebar más oscura y con acento violeta */
.dark .fi-sidebar {
    background: linear-gradient(180deg, #0d0d13 0%, #0a0a10 100%) !important;
    border-right: 1px solid rgba(139, 92, 246, 0.12);
}
.dark .fi-sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}
.dark .fi-sidebar-item-active > a,
.dark .fi-sidebar-item > a:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.16) 0%, rgba(139, 92, 246, 0.04) 100%) !important;
    border-left: 3px solid rgb(139, 92, 246);
    color: rgb(196, 181, 253) !important;
}
.dark .fi-sidebar-group-label {
    color: rgba(139, 92, 246, 0.7) !important;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
}

/* Topbar */
.dark .fi-topbar {
    background: rgba(10, 10, 15, 0.85) !important;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
}

/* Secciones / Cards */
.dark .fi-section,
.dark .fi-ta,
.dark .fi-fo-component-ctn,
.dark .fi-wi-stats-overview-stat,
.dark .fi-card {
    background: linear-gradient(180deg, rgba(20, 20, 28, 0.95) 0%, rgba(15, 15, 22, 0.98) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.1) !important;
    box-shadow: 0 4px 24px -8px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
}
.dark .fi-section-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

/* Botones primarios con glow */
.dark .fi-btn-primary,
.dark .fi-ac-btn-action.fi-color-primary,
.dark button[type="submit"].fi-btn-primary {
    background: linear-gradient(135deg, rgb(139, 92, 246) 0%, rgb(167, 139, 250) 100%) !important;
    border: none !important;
    box-shadow: 0 4px 20px -6px rgba(139, 92, 246, 0.6);
    transition: all 0.2s ease;
}
.dark .fi-btn-primary:hover {
    box-shadow: 0 6px 28px -6px rgba(139, 92, 246, 0.9);
    transform: translateY(-1px);
}

/* Botón de import (danger/rojo) con glow carmesí */
.dark .fi-ac-btn-action.fi-color-danger {
    background: linear-gradient(135deg, rgb(244, 63, 94) 0%, rgb(225, 29, 72) 100%) !important;
    border: none !important;
    box-shadow: 0 4px 20px -6px rgba(244, 63, 94, 0.5);
}
.dark .fi-ac-btn-action.fi-color-danger:hover {
    box-shadow: 0 6px 28px -6px rgba(244, 63, 94, 0.85);
    transform: translateY(-1px);
}

/* Tablas */
.dark .fi-ta-table thead {
    background: rgba(139, 92, 246, 0.06) !important;
}
.dark .fi-ta-table thead th {
    color: rgba(196, 181, 253, 0.85) !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.72rem;
}
.dark .fi-ta-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.04) !important;
}

/* Inputs */
.dark .fi-input,
.dark .fi-select-input {
    background: rgba(20, 20, 28, 0.8) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
}
.dark .fi-input:focus,
.dark .fi-select-input:focus {
    border-color: rgb(139, 92, 246) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18) !important;
}

/* Select searchable (autocomplete) */
.dark .fi-select-input-ctn .choices__list--dropdown,
.dark .fi-fo-select-options {
    background: #14141c !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    border-radius: 10px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
}
.dark .fi-fo-select-option:hover,
.dark .choices__item--selectable.is-highlighted {
    background: rgba(139, 92, 246, 0.14) !important;
}

/* Modal de import */
.dark .fi-modal-window {
    background: linear-gradient(180deg, #14141c 0%, #0f0f16 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}
.dark .fi-modal-header {
    border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.06), transparent);
}

/* Notificaciones */
.dark .fi-no-notification {
    background: linear-gradient(135deg, rgba(20, 20, 28, 0.98), rgba(15, 15, 22, 0.98)) !important;
    border-left: 4px solid rgb(139, 92, 246);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
}
.dark .fi-no-notification.fi-color-success { border-left-color: rgb(16, 185, 129); }
.dark .fi-no-notification.fi-color-danger { border-left-color: rgb(244, 63, 94); }
.dark .fi-no-notification.fi-color-warning { border-left-color: rgb(245, 158, 11); }

/* Paginación y badges */
.dark .fi-pagination-item.fi-active {
    background: rgb(139, 92, 246) !important;
    color: white !important;
}
.dark .fi-badge {
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Scrollbar */
.dark ::-webkit-scrollbar { width: 10px; height: 10px; }
.dark ::-webkit-scrollbar-track { background: #0a0a0f; }
.dark ::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.3);
    border-radius: 5px;
}
.dark ::-webkit-scrollbar-thumb:hover { background: rgba(139, 92, 246, 0.55); }

/* Login card */
.dark .fi-simple-main-ctn {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139, 92, 246, 0.25), transparent 60%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(16, 185, 129, 0.1), transparent 60%),
        #0a0a0f !important;
}
.dark .fi-simple-main {
    background: linear-gradient(180deg, rgba(20, 20, 28, 0.95), rgba(15, 15, 22, 0.98)) !important;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 30px 80px -20px rgba(139, 92, 246, 0.4);
    border-radius: 16px;
}

/* Logo/marca */
.fi-logo {
    filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.4));
}
.fi-sidebar-header .fi-logo {
    transition: all 0.3s ease;
}
.fi-sidebar-header .fi-logo:hover {
    filter: drop-shadow(0 0 18px rgba(139, 92, 246, 0.8));
}

/* Dashboard widgets */
.dark .fi-wi .fi-section {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.dark .fi-wi .fi-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px -12px rgba(139, 92, 246, 0.3);
}