/**
 * CASSERV - Tema Dark Blue Premium
 * Design escuro moderno com azul vibrante
 * Inspirado em dashboards SaaS internacionais
 */

:root[data-bs-theme="blue"] {
    /* ========================================
       CORES PRINCIPAIS
    ======================================== */
    --tblr-body-bg: #0f172a;
    --tblr-body-color: #e5e7eb;
    --tblr-body-color-rgb: 229, 231, 235;
    
    /* Backgrounds */
    --tblr-bg-surface: #1e293b;
    --tblr-bg-surface-secondary: #1f2937;
    --tblr-bg-surface-tertiary: #374151;
    
    /* Bordas */
    --tblr-border-color: #374151;
    --tblr-border-color-translucent: rgba(55, 65, 81, 0.5);
    
    /* ========================================
       CORES DE MARCA
    ======================================== */
    --tblr-primary: #3b82f6;
    --tblr-primary-rgb: 59, 130, 246;
    --tblr-primary-darken: #2563eb;
    --tblr-primary-lighten: #60a5fa;
    
    --tblr-secondary: #6b7280;
    --tblr-secondary-rgb: 107, 114, 128;
    
    /* Cores de status */
    --tblr-success: #22c55e;
    --tblr-info: #06b6d4;
    --tblr-warning: #f59e0b;
    --tblr-danger: #ef4444;
    
    /* ========================================
       TIPOGRAFIA
    ======================================== */
    --tblr-text-primary: #e5e7eb;
    --tblr-text-secondary: #d1d5db;
    --tblr-text-muted: #9ca3af;
    --tblr-text-disabled: #6b7280;
    
    --tblr-heading-color: #f9fafb;
    --tblr-link-color: #60a5fa;
    --tblr-link-hover-color: #3b82f6;
    
    /* ========================================
       COMPONENTES
    ======================================== */
    
    /* Cards */
    --tblr-card-bg: #1e293b;
    --tblr-card-border-color: #374151;
    --tblr-card-cap-bg: #1e293b;
    
    /* Navbar */
    --tblr-navbar-bg: #1f2937;
    --tblr-navbar-border-color: #374151;
    
    /* Sidebar */
    --tblr-sidebar-bg: #111827;
    --tblr-sidebar-border-color: #1f2937;
    
    /* Dropdown */
    --tblr-dropdown-bg: #1e293b;
    --tblr-dropdown-border-color: #374151;
    --tblr-dropdown-link-color: #e5e7eb;
    --tblr-dropdown-link-hover-bg: #374151;
    --tblr-dropdown-link-hover-color: #60a5fa;
    --tblr-dropdown-link-active-bg: #1e3a8a;
    --tblr-dropdown-link-active-color: #93c5fd;
    
    /* Forms */
    --tblr-input-bg: #1e293b;
    --tblr-input-border-color: #374151;
    --tblr-input-color: #e5e7eb;
    --tblr-input-placeholder-color: #6b7280;
    --tblr-input-focus-border-color: #3b82f6;
    --tblr-input-focus-bg: #1e293b;
    
    /* Buttons */
    --tblr-btn-bg: #1e293b;
    --tblr-btn-border-color: #374151;
    --tblr-btn-color: #e5e7eb;
    
    /* Tables */
    --tblr-table-bg: transparent;
    --tblr-table-striped-bg: rgba(55, 65, 81, 0.3);
    --tblr-table-hover-bg: rgba(55, 65, 81, 0.5);
    --tblr-table-border-color: #374151;
    --tblr-table-color: #e5e7eb;
}

/* ========================================
   AJUSTES ESPECÍFICOS
======================================== */

[data-bs-theme="blue"] body {
    background-color: #0f172a;
    color: #e5e7eb;
}

/* Sidebar - Dark Premium */
[data-bs-theme="blue"] .navbar-vertical {
    background: linear-gradient(180deg, #111827 0%, #1f2937 100%);
    border-right: 1px solid #1f2937;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="blue"] .navbar-vertical .navbar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f9fafb;
}

[data-bs-theme="blue"] .navbar-vertical .navbar-brand strong {
    color: #f9fafb;
}

[data-bs-theme="blue"] .navbar-vertical .navbar-brand i {
    color: #60a5fa;
}

[data-bs-theme="blue"] .navbar-nav .nav-link {
    color: #d1d5db;
    transition: all 0.2s ease;
}

[data-bs-theme="blue"] .navbar-nav .nav-link:hover {
    color: #f9fafb;
    background-color: rgba(59, 130, 246, 0.1);
}

[data-bs-theme="blue"] .navbar-nav .nav-link.active {
    color: #93c5fd;
    background-color: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3b82f6;
    font-weight: 500;
}

[data-bs-theme="blue"] .navbar-nav .nav-link-icon {
    color: #9ca3af;
}

[data-bs-theme="blue"] .navbar-nav .nav-link:hover .nav-link-icon,
[data-bs-theme="blue"] .navbar-nav .nav-link.active .nav-link-icon {
    color: #60a5fa;
}

/* Topbar - Dark Gray */
[data-bs-theme="blue"] .navbar.navbar-light {
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="blue"] .navbar-brand-autodark {
    color: #f9fafb;
}

[data-bs-theme="blue"] .navbar-brand-autodark i {
    color: #60a5fa;
}

/* Dropdown Menu */
[data-bs-theme="blue"] .dropdown-menu {
    background-color: #1e293b;
    border: 1px solid #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="blue"] .dropdown-item {
    color: #e5e7eb;
}

[data-bs-theme="blue"] .dropdown-item:hover,
[data-bs-theme="blue"] .dropdown-item:focus {
    background-color: #374151;
    color: #60a5fa;
}

[data-bs-theme="blue"] .dropdown-item.active {
    background-color: #1e3a8a;
    color: #93c5fd;
}

[data-bs-theme="blue"] .dropdown-divider {
    border-top-color: #374151;
}

/* Cards - Dark Premium */
[data-bs-theme="blue"] .card {
    background-color: #1e293b;
    border: 1px solid #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="blue"] .card-header {
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
    color: #f9fafb;
    font-weight: 600;
}

[data-bs-theme="blue"] .card-footer {
    background-color: #1f2937;
    border-top: 1px solid #374151;
}

/* Tables - Linhas Alternadas */
[data-bs-theme="blue"] .table {
    color: #e5e7eb;
    border-color: #374151;
}

[data-bs-theme="blue"] .table thead th {
    background-color: #1f2937;
    border-bottom: 2px solid #374151;
    color: #f9fafb;
    font-weight: 600;
}

[data-bs-theme="blue"] .table tbody tr {
    border-bottom: 1px solid #374151;
}

[data-bs-theme="blue"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(55, 65, 81, 0.3);
}

[data-bs-theme="blue"] .table-hover tbody tr:hover {
    background-color: rgba(55, 65, 81, 0.5);
    color: #f9fafb;
}

/* DataTables */
[data-bs-theme="blue"] .dataTables_wrapper .dataTables_length,
[data-bs-theme="blue"] .dataTables_wrapper .dataTables_filter,
[data-bs-theme="blue"] .dataTables_wrapper .dataTables_info,
[data-bs-theme="blue"] .dataTables_wrapper .dataTables_paginate {
    color: #d1d5db;
}

[data-bs-theme="blue"] .dataTables_wrapper .dataTables_filter input {
    background-color: #1e293b;
    border: 1px solid #374151;
    color: #e5e7eb;
}

[data-bs-theme="blue"] .dataTables_wrapper .dataTables_filter input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

[data-bs-theme="blue"] .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #d1d5db !important;
}

[data-bs-theme="blue"] .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #374151;
    border-color: #374151;
    color: #60a5fa !important;
}

[data-bs-theme="blue"] .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff !important;
}

/* Forms */
[data-bs-theme="blue"] .form-control,
[data-bs-theme="blue"] .form-select {
    background-color: #1e293b;
    border: 1px solid #374151;
    color: #e5e7eb;
}

[data-bs-theme="blue"] .form-control:focus,
[data-bs-theme="blue"] .form-select:focus {
    background-color: #1e293b;
    border-color: #3b82f6;
    color: #e5e7eb;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

[data-bs-theme="blue"] .form-control::placeholder {
    color: #6b7280;
}

[data-bs-theme="blue"] .form-label {
    color: #d1d5db;
    font-weight: 500;
}

/* Buttons - Azul Vibrante */
[data-bs-theme="blue"] .btn-primary {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
    font-weight: 500;
}

[data-bs-theme="blue"] .btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

[data-bs-theme="blue"] .btn-secondary {
    background-color: #374151;
    border-color: #374151;
    color: #e5e7eb;
}

[data-bs-theme="blue"] .btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-bs-theme="blue"] .btn-outline-primary {
    color: #60a5fa;
    border-color: #3b82f6;
}

[data-bs-theme="blue"] .btn-outline-primary:hover {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

/* Links */
[data-bs-theme="blue"] a {
    color: #60a5fa;
}

[data-bs-theme="blue"] a:hover {
    color: #3b82f6;
}

/* Modals */
[data-bs-theme="blue"] .modal-content {
    background-color: #1e293b;
    border: 1px solid #374151;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="blue"] .modal-header {
    background-color: #1f2937;
    border-bottom: 1px solid #374151;
}

[data-bs-theme="blue"] .modal-footer {
    background-color: #1f2937;
    border-top: 1px solid #374151;
}

/* Botão de fechar modal - garantir contraste em tema escuro */
[data-bs-theme="blue"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

[data-bs-theme="blue"] .btn-close:hover {
    opacity: 1;
}

/* Alerts */
[data-bs-theme="blue"] .alert-success {
    background-color: rgba(34, 197, 94, 0.15);
    border-color: #22c55e;
    color: #86efac;
}

[data-bs-theme="blue"] .alert-info {
    background-color: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
    color: #67e8f9;
}

[data-bs-theme="blue"] .alert-warning {
    background-color: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #fcd34d;
}

[data-bs-theme="blue"] .alert-danger {
    background-color: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #fca5a5;
}

/* Badges - Verde Vivo para Status */
[data-bs-theme="blue"] .badge {
    background-color: #374151;
    color: #e5e7eb;
}

[data-bs-theme="blue"] .badge.bg-primary {
    background-color: #3b82f6 !important;
    color: #ffffff;
}

[data-bs-theme="blue"] .badge.bg-success {
    background-color: #22c55e !important;
    color: #ffffff;
}

[data-bs-theme="blue"] .badge.bg-info {
    background-color: #06b6d4 !important;
    color: #ffffff;
}

[data-bs-theme="blue"] .badge.bg-warning {
    background-color: #f59e0b !important;
    color: #1f2937;
}

[data-bs-theme="blue"] .badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff;
}

/* Page Header */
[data-bs-theme="blue"] .page-header {
    background-color: #1e293b;
    border-bottom: 1px solid #374151;
}

/* Footer */
[data-bs-theme="blue"] .footer {
    background-color: #1e293b;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Empty State */
[data-bs-theme="blue"] .empty {
    color: #9ca3af;
}

[data-bs-theme="blue"] .empty-title {
    color: #d1d5db;
}

[data-bs-theme="blue"] .empty-img i {
    color: #60a5fa;
}

/* Scrollbar (Webkit) */
[data-bs-theme="blue"] ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

[data-bs-theme="blue"] ::-webkit-scrollbar-track {
    background: #1e293b;
}

[data-bs-theme="blue"] ::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 5px;
}

[data-bs-theme="blue"] ::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* SweetAlert2 Blue Theme */
[data-bs-theme="blue"] .swal2-popup {
    background-color: #1e293b !important;
    border: 1px solid #374151;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="blue"] .swal2-title,
[data-bs-theme="blue"] .swal2-html-container {
    color: #e5e7eb !important;
}

[data-bs-theme="blue"] .swal2-confirm {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

[data-bs-theme="blue"] .swal2-confirm:hover {
    background-color: #2563eb !important;
}

[data-bs-theme="blue"] .swal2-cancel {
    background-color: #374151 !important;
    color: #e5e7eb !important;
}

/* Submenu Dropdown (3º nível) */
[data-bs-theme="blue"] .navbar-vertical .dropdown-menu {
    background-color: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="blue"] .navbar-vertical .dropdown-menu .dropdown-item {
    color: #d1d5db;
}

[data-bs-theme="blue"] .navbar-vertical .dropdown-menu .dropdown-item:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

[data-bs-theme="blue"] .navbar-vertical .dropdown-menu .dropdown-item i {
    color: #9ca3af;
}

[data-bs-theme="blue"] .navbar-vertical .dropdown-menu .dropdown-item:hover i {
    color: #60a5fa;
}

/* Dropend (submenu lateral) */
[data-bs-theme="blue"] .dropend .dropdown-menu {
    background-color: rgba(31, 41, 55, 0.98);
}

/* Efeitos de Hover Suaves */
[data-bs-theme="blue"] .btn,
[data-bs-theme="blue"] .nav-link,
[data-bs-theme="blue"] .dropdown-item {
    transition: all 0.2s ease;
}

/* Destaque Azul para Elementos Ativos */
[data-bs-theme="blue"] .active-highlight {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
}

/* Status Badges Premium */
[data-bs-theme="blue"] .badge-status-success {
    background-color: #22c55e;
    color: #ffffff;
    font-weight: 500;
}

[data-bs-theme="blue"] .badge-status-warning {
    background-color: #f59e0b;
    color: #1f2937;
    font-weight: 500;
}

[data-bs-theme="blue"] .badge-status-danger {
    background-color: #ef4444;
    color: #ffffff;
    font-weight: 500;
}

[data-bs-theme="blue"] .badge-status-info {
    background-color: #06b6d4;
    color: #ffffff;
    font-weight: 500;
}

/* Leveza Visual - Sombras Discretas */
[data-bs-theme="blue"] .card,
[data-bs-theme="blue"] .modal-content,
[data-bs-theme="blue"] .dropdown-menu {
    backdrop-filter: blur(10px);
}

/* Efeito Glassmorphism Sutil */
[data-bs-theme="blue"] .card-glass {
    background-color: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
