/* Tema Escuro - MDZ Drive */

/* ========== SIDEBAR ========== */
.app-sidebar {
    background: #1a1d23 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.main-sidebar-header {
    background: #0f1114 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.side-menu__item {
    color: #e1e1e1 !important;
}

.side-menu__item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #fff !important;
}

.side-menu__item.active {
    background: #6366f1 !important;
    color: white !important;
}

.sub-side-menu__item {
    color: #cbd5e1 !important;
}

.sub-side-menu__item:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #e2e8f0 !important;
}

/* ========== HEADER ========== */
.app-header {
    background: #1a1d23 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.header-search input {
    background: #0f1114 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.header-search input::placeholder {
    color: #9ca3af !important;
}

/* ========== MAIN CONTENT ========== */
body {
    background: #0f1114 !important;
    color: #e1e1e1 !important;
}

.main-content {
    background: #0f1114 !important;
}

.card {
    background: #1a1d23 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.card-header {
    background: #1a1d23 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.card-body {
    color: #e1e1e1 !important;
}

.card-title {
    color: #e1e1e1 !important;
}

/* ========== TABLES ========== */
.table {
    color: #e1e1e1 !important;
}

.table thead th {
    background: #0f1114 !important;
    color: #e1e1e1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table tbody td {
    color: #e1e1e1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

.table a {
    color: #818cf8 !important;
}

.table strong {
    color: #e1e1e1 !important;
}

/* ========== FORMS ========== */
.form-control,
.form-select {
    background: #0f1114 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.form-control:focus,
.form-select:focus {
    background: #0f1114 !important;
    border-color: #6366f1 !important;
    color: #e1e1e1 !important;
}

.form-label {
    color: #e1e1e1 !important;
}

/* ========== MODALS ========== */
.modal-content {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modal-header {
    background: #0f1114 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.modal-body {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
}

.modal-footer {
    background: #1a1d23 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.modal-title {
    color: #e1e1e1 !important;
}

.btn-close {
    filter: invert(1) !important;
}

/* Modal de Perfil específico */
#perfilModal .modal-content {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
}

#perfilModal .list-group-item {
    background: #0f1114 !important;
    color: #e1e1e1 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

#perfilModal .list-group-item:hover {
    background: #374151 !important;
}

#perfilModal .list-group-item strong {
    color: #e1e1e1 !important;
}

#perfilModal .list-group-item .text-muted {
    color: #9ca3af !important;
}

/* ========== FILE DETAILS SIDEBAR ========== */
.file-details-sidebar {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
}

.file-details-header {
    background: #0f1114 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.file-details-header h5 {
    color: #e1e1e1 !important;
}

.file-details-body {
    color: #e1e1e1 !important;
}

.file-details-body h5,
.file-details-body h6 {
    color: #e1e1e1 !important;
}

.file-details-body .text-muted {
    color: #9ca3af !important;
}

.file-details-body strong {
    color: #e1e1e1 !important;
}

.file-details-body .table {
    color: #e1e1e1 !important;
}

.file-details-body .table td {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* ========== CHAT SIDEBAR ========== */
.chat-sidebar {
    background: #1a1d23 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.chat-header {
    background: #0f1114 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.chat-messages {
    background: #1a1d23 !important;
}

.chat-message.user {
    background: #374151 !important;
    color: #e1e1e1 !important;
}

.chat-message.assistant {
    background: #1f2937 !important;
    color: #e1e1e1 !important;
}

.chat-input-area {
    background: #0f1114 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.chat-input-area textarea {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

/* ========== BADGES ========== */
.badge.bg-success {
    background-color: #065f46 !important;
    color: #d1fae5 !important;
}

.badge.bg-warning {
    background-color: #78350f !important;
    color: #fef3c7 !important;
}

.badge.bg-danger {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
}

.badge.bg-info {
    background-color: #1e3a8a !important;
    color: #dbeafe !important;
}

.badge.bg-secondary {
    background-color: #374151 !important;
    color: #e5e7eb !important;
}

/* ========== ALERTS ========== */
.alert-success {
    background-color: #065f46 !important;
    color: #d1fae5 !important;
    border-color: #065f46 !important;
}

.alert-danger {
    background-color: #7f1d1d !important;
    color: #fecaca !important;
    border-color: #7f1d1d !important;
}

.alert-warning {
    background-color: #78350f !important;
    color: #fef3c7 !important;
    border-color: #78350f !important;
}

.alert-info {
    background-color: #1e3a8a !important;
    color: #dbeafe !important;
    border-color: #1e3a8a !important;
}

/* ========== DROPDOWNS ========== */
.dropdown-menu {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dropdown-item {
    color: #e1e1e1 !important;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #fff !important;
}

.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Botão de perfil no header */
.header-element .dropdown-toggle {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.header-element .dropdown-toggle:hover,
.header-element .dropdown-toggle:focus {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* Avatar e texto do perfil */
.header-element .avatar {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.header-element .fw-semibold {
    color: #e1e1e1 !important;
}

.header-element .text-muted {
    color: #9ca3af !important;
}

/* ========== CORREÇÕES TEMA ESCURO ========== */

/* Hover das pastas em documents - usando a classe correta */
[data-theme-mode="dark"] .file-card:hover {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #fff !important;
}

[data-theme-mode="dark"] .file-card:hover .fw-semibold,
[data-theme-mode="dark"] .file-card:hover small {
    color: #fff !important;
}

/* Cor de fundo para file-card no tema escuro */
[data-theme-mode="dark"] .file-card {
    background: #1a1d23 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

/* Ícone e botão do tema escuro */
[data-theme-mode="dark"] .header-theme-toggle button {
    background: #374151 !important;
    border-color: #4b5563 !important;
    color: #fbbf24 !important;
}

[data-theme-mode="dark"] .header-theme-toggle button:hover {
    background: #4b5563 !important;
    border-color: #6b7280 !important;
}

[data-theme-mode="dark"] #themeIcon {
    color: #fbbf24 !important; /* Amarelo para o ícone no tema escuro */
}

/* Modais no tema escuro */
[data-theme-mode="dark"] .modal-content {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .modal-header {
    background: #0f1114 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .modal-body {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .modal-footer {
    background: #1a1d23 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .modal-title {
    color: #e1e1e1 !important;
}

/* Kanban no tema escuro */
[data-theme-mode="dark"] .kanban-column {
    background: #1a1d23 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .kanban-item {
    background: #0f1114 !important;
    color: #e1e1e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

[data-theme-mode="dark"] .kanban-item:hover {
    background: #1f2937 !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
}

[data-theme-mode="dark"] .kanban-column-header {
    color: #e1e1e1 !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme-mode="dark"] .kanban-column-count {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

/* Painel de detalhes do documento */
[data-theme-mode="dark"] .file-details-sidebar {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .file-details-sidebar .card {
    background: #0f1114 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .file-details-sidebar .card-body {
    background: #0f1114 !important;
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .file-details-sidebar h5,
[data-theme-mode="dark"] .file-details-sidebar h6 {
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .file-details-sidebar .text-muted {
    color: #9ca3af !important;
}

/* Campos dinâmicos no modal de tipos de processo */
[data-theme-mode="dark"] .campo-item {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .campo-item:hover {
    background: #374151 !important;
    color: #fff !important;
}

[data-theme-mode="dark"] .sortable-ghost {
    background: rgba(99, 102, 241, 0.2) !important;
    opacity: 0.5 !important;
}

[data-theme-mode="dark"] .list-group-item {
    background: #1a1d23 !important;
    color: #e1e1e1 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-theme-mode="dark"] .list-group-item:hover {
    background: #374151 !important;
    color: #fff !important;
}

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

::-webkit-scrollbar-track {
    background: #0f1114;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* ========== TEXT COLORS ========== */
h1, h2, h3, h4, h5, h6 {
    color: #e1e1e1 !important;
}

p {
    color: #e1e1e1 !important;
}

/* Page header específico */
.page-header-breadcrumb h3,
.page-header-breadcrumb h1,
.page-header-breadcrumb h2,
.page-header-breadcrumb h4,
.page-header-breadcrumb h5,
.page-header-breadcrumb h6 {
    color: #e1e1e1 !important;
}

.page-header-breadcrumb p,
.page-header-breadcrumb .text-muted {
    color: #9ca3af !important;
}

[data-theme-mode="dark"] .page-header-breadcrumb h3,
[data-theme-mode="dark"] .page-header-breadcrumb h1,
[data-theme-mode="dark"] .page-header-breadcrumb h2,
[data-theme-mode="dark"] .page-header-breadcrumb h4,
[data-theme-mode="dark"] .page-header-breadcrumb h5,
[data-theme-mode="dark"] .page-header-breadcrumb h6 {
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .page-header-breadcrumb p,
[data-theme-mode="dark"] .page-header-breadcrumb .text-muted {
    color: #9ca3af !important;
}

.text-muted {
    color: #9ca3af !important;
}

.text-primary {
    color: #818cf8 !important;
}

.text-success {
    color: #34d399 !important;
}

.text-danger {
    color: #f87171 !important;
}

.text-warning {
    color: #fbbf24 !important;
}

/* ========== LINKS ========== */
a {
    color: #818cf8 !important;
}

a:hover {
    color: #a5b4fc !important;
}

/* ========== PROGRESS BARS ========== */
.progress {
    background-color: #374151 !important;
}

.progress-bar {
    background-color: #6366f1 !important;
}

/* ========== FILE UPLOAD AREA ========== */
.file-upload-area {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #e1e1e1 !important;
}

.file-upload-area:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: #6366f1 !important;
}

.file-upload-area.dragging {
    background: rgba(99, 102, 241, 0.2) !important;
    border-color: #818cf8 !important;
}

/* ========== PAGINATION ========== */
.pagination .page-link {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

.pagination .page-link:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    border-color: #6366f1 !important;
    color: #fff !important;
}

.pagination .page-item.active .page-link {
    background: #6366f1 !important;
    border-color: #6366f1 !important;
    color: white !important;
}

/* ========== TOOLTIPS ========== */
.tooltip-inner {
    background-color: #374151 !important;
}

.tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #374151 !important;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    background: transparent !important;
}

.breadcrumb-item {
    color: #9ca3af !important;
}

.breadcrumb-item.active {
    color: #e1e1e1 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #6b7280 !important;
}

/* ========== CORREÇÕES ADICIONAIS PARA PERFIL ========== */
[data-theme-mode="dark"] .header-element .dropdown-toggle {
    background: #1a1d23 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .header-element .dropdown-toggle:hover,
[data-theme-mode="dark"] .header-element .dropdown-toggle:focus,
[data-theme-mode="dark"] .header-element .dropdown-toggle.show {
    background: #374151 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

[data-theme-mode="dark"] .dropdown-menu {
    background: #1a1d23 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
}

[data-theme-mode="dark"] .dropdown-item {
    color: #e1e1e1 !important;
}

[data-theme-mode="dark"] .dropdown-item:hover,
[data-theme-mode="dark"] .dropdown-item:focus {
    background: rgba(99, 102, 241, 0.2) !important;
    color: #fff !important;
}

[data-theme-mode="dark"] .dropdown-item i {
    color: #818cf8 !important;
}

/* Botões no tema escuro */
[data-theme-mode="dark"] .btn-primary {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
    color: white !important;
}

[data-theme-mode="dark"] .btn-secondary {
    background-color: #4b5563 !important;
    border-color: #4b5563 !important;
    color: white !important;
}

[data-theme-mode="dark"] .btn-danger {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: white !important;
}