/* DrDiabetes Theme Definitions */

.doutordm2-dark {
    --primary-bg      : #111408; /* Mais escuro */
    --secondary-bg    : #075C57; /* VERDE */
    --glass-bg        : rgba(7, 92, 87, 0.2);
    --glass-border    : rgba(205, 215, 98, 0.3);
    --glass-shadow    : 0 8px 32px rgba(0, 0, 0, 0.5);
    --text-primary    : #ffffff;
    --text-secondary  : rgba(255, 255, 255, 0.7);
    --accent-green    : #00A19A; /* CIANO */
    --accent-blue     : #075C57; /* VERDE */
    --accent-yellow   : #CDD762; /* LIMÃO */
    --gradient-primary: linear-gradient(135deg, #00A19A 0%, #075C57 100%);
    --gradient-accent : linear-gradient(135deg, #CDD762 0%, #00A19A 100%);
    color-scheme: dark;
}

.doutordm2-light {
    --primary-bg      : #f4f7f6; /* Branco acinzentado */
    --secondary-bg    : #ffffff;
    --glass-bg        : rgba(255, 255, 255, 0.8);
    --glass-border    : rgba(7, 92, 87, 0.2);
    --glass-shadow    : 0 4px 16px rgba(0, 0, 0, 0.05);
    --text-primary    : #111408; /* Texto escuro */
    --text-secondary  : #075C57; /* Verde escuro */
    --accent-green    : #00A19A;
    --accent-blue     : #075C57;
    --accent-yellow   : #9BA42D; /* Limão mais queimado para contraste */
    --gradient-primary: linear-gradient(135deg, #075C57 0%, #00A19A 100%);
    --gradient-accent : linear-gradient(135deg, #00A19A 0%, #CDD762 100%);
    color-scheme: light;
}

/* Submenu Refinements - Light */
.doutordm2-light .submenu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(7, 92, 87, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.doutordm2-light .submenu-link {
    color: #111408;
}

.doutordm2-light .submenu-link:hover {
    background: rgba(0, 161, 154, 0.1);
    color: #075C57;
}

.doutordm2-light .menu-separator {
    background: rgba(7, 92, 87, 0.1);
}

/* Submenu Refinements - Dark */
.doutordm2-dark .submenu {
    background: rgba(17, 20, 8, 0.98);
    border: 1px solid rgba(205, 215, 98, 0.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.doutordm2-dark .submenu-link {
    color: #ffffff;
}

.doutordm2-dark .submenu-link:hover {
    background: rgba(205, 215, 98, 0.15);
    color: #CDD762;
}

.doutordm2-dark .menu-separator {
    background: rgba(205, 215, 98, 0.2);
}

/* Select Refinements */
.doutordm2-dark select, .doutordm2-dark select option {
    background-color: #2c2f1a !important;
    color: #ffffff !important;
}

.doutordm2-light select, .doutordm2-light select option {
    background-color: #ffffff !important;
    color: #111408 !important;
}

/* Select2 Light Theme Refinements */
.doutordm2-light .select2-container--default .select2-selection--single,
body.doutordm2-light .select2-container--default .select2-selection--single,
.doutordm2-light .select2-container--default .select2-selection--multiple,
body.doutordm2-light .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #111408 !important;
}

.doutordm2-light .select2-container--default .select2-selection__rendered,
body.doutordm2-light .select2-container--default .select2-selection__rendered {
    color: #111408 !important;
}

.doutordm2-light .select2-container--default .select2-selection__placeholder,
body.doutordm2-light .select2-container--default .select2-selection__placeholder {
    color: #64748b !important;
}

.doutordm2-light .select2-container--default .select2-selection--single .select2-selection__arrow b,
body.doutordm2-light .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #111408 transparent transparent transparent !important;
}

.doutordm2-light .select2-dropdown,
body.doutordm2-light .select2-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.doutordm2-light .select2-container--default .select2-results__option,
body.doutordm2-light .select2-container--default .select2-results__option {
    background-color: #ffffff !important;
    color: #111408 !important;
}

.doutordm2-light .select2-container--default .select2-results__option--highlighted[aria-selected],
body.doutordm2-light .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #075C57 !important;
    color: #ffffff !important;
}

.doutordm2-light .select2-container--default .select2-results__option[aria-selected="true"],
body.doutordm2-light .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: rgba(7, 92, 87, 0.15) !important;
    color: #075C57 !important;
}

.doutordm2-light .select2-search__field,
body.doutordm2-light .select2-search__field,
.doutordm2-light .select2-container--default .select2-search--dropdown .select2-search__field,
body.doutordm2-light .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #ffffff !important;
    color: #111408 !important;
    border: 1px solid #cbd5e1 !important;
}

.doutordm2-light .select2-search__field::placeholder,
body.doutordm2-light .select2-search__field::placeholder {
    color: #94a3b8 !important;
}


/* Botão Fechar modal - tema claro */
.doutordm2-light .btn-close {
    background: #075C57;
    color: #ffffff;
    border: none;
}
.doutordm2-light .btn-close:hover {
    background: #00A19A;
    color: #ffffff;
}

/* Table Refinements - Dark Mode */
.doutordm2-dark .modern-datatable tbody td {
    color: var(--text-primary) !important;
}

.doutordm2-dark .modern-datatable tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Fix for sorting column in Dark Mode (was light background with light text) */
.doutordm2-dark .modern-datatable td.sorting_1 {
    background-color: rgba(205, 215, 98, 0.12) !important; /* Subtle yellow highlight */
    color: var(--text-primary) !important;
}

.doutordm2-dark .modern-datatable thead th {
    color: var(--text-primary) !important;
}

/* Table Refinements - Light Mode */
.doutordm2-light .modern-datatable tbody td {
    color: var(--text-primary) !important; /* Force dark text in all columns */
}

.doutordm2-light .modern-datatable tbody tr:nth-child(odd) {
    background: #ffffff !important;
}

.doutordm2-light .modern-datatable tbody tr:nth-child(even) {
    background: #f1f5f9 !important;
}

.doutordm2-light .modern-datatable tbody tr:hover {
    background: #e2e8f0 !important;
}

.doutordm2-light .modern-datatable td.sorting_1 {
    background-color: #e2e8f0 !important; /* Slightly darker light for highlight */
    color: var(--text-primary) !important;
}

.doutordm2-light .modern-datatable thead th {
    background: #e2e8f0 !important;
    color: var(--text-primary) !important;
    border-bottom: 2px solid #cbd5e1 !important;
}

/* Pagination Refinements - doutordm2 */
.doutordm2-dark .dataTables_paginate.pagination,
.doutordm2-dark .dataTables_paginate.paging_bootstrap.pagination {
    background: rgba(17, 20, 8, 0.4) !important;
    border: 1px solid rgba(205, 215, 98, 0.2) !important;
    backdrop-filter: blur(10px);
}

.doutordm2-light .dataTables_paginate.pagination,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px;
    padding: 6px 8px;
    gap: 6px;
    margin-top: 1rem;
}

.doutordm2-light .dataTables_paginate.pagination ul,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.doutordm2-light .dataTables_paginate.pagination ul li a,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 10px;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.doutordm2-light .dataTables_paginate.pagination ul li a:hover,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination ul li a:hover {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}

.doutordm2-light .dataTables_paginate.pagination ul li.active a,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination ul li.active a {
    background: #075C57 !important;
    border-color: #075C57 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(7, 92, 87, 0.2);
}

.doutordm2-light .dataTables_paginate.pagination ul li.disabled a,
.doutordm2-light .dataTables_paginate.paging_bootstrap.pagination ul li.disabled a {
    opacity: 0.5 !important;
    pointer-events: none !important;
    background: #f1f5f9 !important;
    color: #94a3b8 !important;
}

/* Melhoria nas setas de navegação */
.doutordm2-light .dataTables_paginate.pagination ul li.prev a,
.doutordm2-light .dataTables_paginate.pagination ul li.next a,
.doutordm2-dark .dataTables_paginate.pagination ul li.prev a,
.doutordm2-dark .dataTables_paginate.pagination ul li.next a {
    font-weight: 600;
    font-family: inherit;
}

