/**
 * Custom styles for Sistema de Prospección
 * Override Metronic styles here
 */

/* Custom colors */
:root {
    --bs-primary: #009ef7;
    --bs-success: #50cd89;
    --bs-danger: #f1416c;
    --bs-warning: #ffc700;
    --bs-info: #7239ea;
}

/* Sidebar */
.app-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #f1f1f4;
    box-shadow: none;
    flex-shrink: 0;
}

.app-sidebar-menu,
.app-sidebar-wrapper {
    background-color: transparent !important;
}

@media (min-width: 992px) {
    .app-wrapper {
        flex-direction: row !important;
    }
    .app-main {
        flex: 1 1 auto;
        min-width: 0;
    }
}

/* Menu section headers */
.menu-heading {
    color: #99A1B7 !important;
    font-size: 0.7rem !important;
    letter-spacing: 0.08rem;
    padding-left: 0.25rem;
}

/* Menu links */
#kt_app_sidebar_menu .menu-item > .menu-link {
    color: #4B5675;
    border-radius: 0.475rem;
    transition: background-color 150ms ease, color 150ms ease;
    padding: 0.55rem 1rem;
    margin: 1px 0;
}

#kt_app_sidebar_menu .menu-item > .menu-link:hover {
    background-color: rgba(27, 132, 255, 0.06);
    color: #009ef7;
}

#kt_app_sidebar_menu .menu-item > .menu-link.active {
    background-color: rgba(27, 132, 255, 0.08);
    color: #009ef7;
    font-weight: 500;
    position: relative;
}

#kt_app_sidebar_menu .menu-item > .menu-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.35rem;
    bottom: 0.35rem;
    width: 3px;
    border-radius: 2px;
    background-color: #009ef7;
}

#kt_app_sidebar_menu .menu-item.here > .menu-link,
#kt_app_sidebar_menu .menu-item.show > .menu-link {
    background-color: rgba(27, 132, 255, 0.05);
    color: #009ef7;
}

/* Sub-menu items */
#kt_app_sidebar_menu .menu-sub .menu-item > .menu-link {
    padding: 0.45rem 1rem 0.45rem 2.25rem;
}

#kt_app_sidebar_menu .menu-sub .menu-item > .menu-link:hover {
    color: #009ef7;
    background-color: rgba(27, 132, 255, 0.04);
}

#kt_app_sidebar_menu .menu-sub .menu-item > .menu-link.active {
    color: #009ef7;
    background-color: transparent;
    font-weight: 500;
}

#kt_app_sidebar_menu .menu-sub .menu-item > .menu-link.active::before {
    display: none;
}

#kt_app_sidebar_menu .menu-sub .menu-item > .menu-link.active .bullet-dot {
    background-color: #009ef7 !important;
    width: 8px;
    height: 8px;
}

/* Icon containers */
#kt_app_sidebar_menu .symbol-label {
    border-radius: 0.475rem;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sidebar footer */
.app-sidebar-footer {
    border-top: none;
}

.app-sidebar-footer .separator {
    border-color: #f1f1f4;
}

.app-sidebar-footer .symbol-label {
    border-radius: 0.475rem;
}

/* Hide user info when sidebar is minimized */
body[data-kt-app-sidebar-minimize="on"] .sidebar-user-info,
body[data-kt-app-sidebar-minimize="on"] .app-sidebar-footer .separator {
    display: none;
}

body[data-kt-app-sidebar-minimize="on"] .app-sidebar-footer {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center;
}

body[data-kt-app-sidebar-minimize="on"] .app-sidebar-footer > div {
    justify-content: center;
}

body[data-kt-app-sidebar-minimize="on"] .app-sidebar-footer .btn-icon {
    display: none;
}

/* Custom spacing */
.app-container {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Custom card styles */
.card-prospect {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-prospect:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Header styling */
.app-header {
    background-color: #ffffff !important;
    box-shadow: 0 0 28px 0 rgba(82, 63, 105, 0.13);
}

/* Body and content area styling */
body {
    background-color: #f5f8fa !important;
}

.app-main {
    background-color: #f5f8fa !important;
}

.app-content {
    background-color: #f5f8fa !important;
}

#kt_app_content {
    background-color: #f5f8fa !important;
}

/* Card improvements */
.card {
    box-shadow: 0 0 20px 0 rgba(76, 87, 125, 0.02);
    border: 0;
    background-color: #ffffff;
}

.card-header {
    border-bottom: 1px solid #eff2f5;
    background-color: #ffffff;
}

.card-body {
    background-color: #ffffff;
}

/* Table improvements */
.table {
    color: #5e6278;
}

.table thead th {
    border-bottom: 1px solid #eff2f5;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #a1a5b7;
}

.table tbody tr {
    border-bottom: 1px solid #eff2f5;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Button improvements */
.btn {
    font-weight: 500;
    border-radius: 0.475rem;
}

/* Form improvements */
.form-label {
    color: #5e6278;
    font-weight: 500;
}

.form-control,
.form-select {
    border-color: #e4e6ef;
    color: #5e6278;
    background-color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25);
    background-color: #ffffff;
}

/* Badge improvements */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
}

/* Toolbar styling */
.app-toolbar {
    background-color: transparent;
}

.page-title {
    color: #181c32;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .app-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .card-prospect {
        margin-bottom: 1rem;
    }
    
    .app-content .app-container {
        padding: 1rem;
    }
}

/* SweetAlert2 custom styles - layout flex para que botones queden dentro del modal */
.swal2-popup-custom {
    width: 600px !important;
    max-height: 90vh !important;
    padding: 1.5rem !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}

.swal2-popup-custom .swal2-header {
    flex-shrink: 0;
}

.swal2-popup-custom .swal2-html-container {
    text-align: left;
    margin: 1rem 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: 55vh !important;
    flex: 1 1 auto !important;
}

.swal2-popup-custom .swal2-actions {
    flex-shrink: 0;
    margin-top: 0.5rem !important;
}

.swal2-popup-custom .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #5e6278;
}

.swal2-popup-custom .mb-5 {
    margin-bottom: 1.25rem !important;
}

.swal2-popup-custom .form-select,
.swal2-popup-custom .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
    font-size: 0.925rem;
    color: #5e6278;
    background-color: #ffffff;
}

.swal2-popup-custom .form-select:focus,
.swal2-popup-custom .form-control:focus {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25);
    outline: 0;
}

.swal2-popup-custom textarea.form-control {
    min-height: 120px;
    max-height: 200px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.swal2-popup-custom .form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #a1a5b7;
}

.swal2-popup-custom .text-danger {
    color: #f1416c !important;
}

/* Select2 múltiple mejorado */
.select2-container--bootstrap-5 .select2-selection--multiple {
    min-height: 42px;
    padding: 0.375rem 0.5rem;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
    background-color: #ffffff;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: #009ef7;
    border: none;
    border-radius: 0.375rem;
    color: #ffffff;
    padding: 0.35rem 0.65rem;
    margin: 0.25rem 0.25rem 0.25rem 0;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
    padding: 0;
    color: #ffffff;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: #ffffff;
    border: none;
    background: transparent;
    padding: 0;
    margin-right: 0.25rem;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 0.8;
    cursor: pointer;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1;
    color: #ffffff;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    padding: 0;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.25rem;
}

/* Buscador arriba de los tags seleccionados */
.select2-container--bootstrap-5 .select2-selection--multiple li.select2-search--inline,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search.select2-search--inline {
    order: -1 !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    flex-basis: 100% !important;
    margin: 0 !important;
    padding: 0 0 0.35rem 0 !important;
    border-bottom: 1px solid #eff2f5 !important;
    list-style: none !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field {
    padding: 0.4rem 0.5rem !important;
    margin: 0 !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    color: #5e6278 !important;
    font-size: 0.925rem !important;
    width: 100% !important;
    min-width: 100% !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
    color: #a1a5b7 !important;
    font-style: italic !important;
}

/* Sin borde cuando no hay tags */
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) li.select2-search--inline,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered:not(:has(.select2-selection__choice)) .select2-search--inline {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--multiple,
.select2-container--bootstrap-5.select2-container--open .select2-selection--multiple {
    border-color: #009ef7;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25);
}

.select2-container--bootstrap-5 .select2-dropdown {
    border: 1px solid #e4e6ef;
    border-top: 2px solid #009ef7;
    border-radius: 0 0 0.475rem 0.475rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.15);
    margin-top: 4px;
}

.select2-container--bootstrap-5 .select2-results__option {
    padding: 0.75rem 1rem;
    color: #5e6278;
    font-size: 0.925rem;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: #f1f1f2;
    color: #009ef7;
}

.select2-container--bootstrap-5 .select2-results__message {
    padding: 0.75rem 1rem;
    color: #a1a5b7;
    font-size: 0.875rem;
    font-style: italic;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true] {
    background-color: #009ef7;
    color: #ffffff;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected=true]:hover {
    background-color: #0085d1;
    color: #ffffff;
}

/* Fix para Select2 single (estructura) - Estilos para cualquier tema */
.select2-container .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 0.475rem !important;
    background-color: #ffffff !important;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    color: #5e6278 !important;
    line-height: calc(1.5em + 0.75rem) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.select2-container .select2-selection--single .select2-selection__placeholder {
    color: #a1a5b7 !important;
}

.select2-container .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem) !important;
    top: 1px !important;
    right: 1px !important;
    width: 2.25rem !important;
}

.select2-container.select2-container--focus .select2-selection--single,
.select2-container.select2-container--open .select2-selection--single {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25) !important;
}

/* Estilos específicos para bootstrap-5 */
.select2-container--bootstrap-5 .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px) !important;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem !important;
    border: 1px solid #e4e6ef !important;
    border-radius: 0.475rem !important;
    background-color: #ffffff !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #5e6278 !important;
    line-height: calc(1.5em + 0.75rem) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__placeholder {
    color: #a1a5b7 !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + 0.75rem) !important;
    top: 1px !important;
    right: 1px !important;
    width: 2.25rem !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection--single,
.select2-container--bootstrap-5.select2-container--open .select2-selection--single {
    border-color: #009ef7 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 158, 247, 0.25) !important;
}

/* Asegurar que el dropdown tenga el z-index correcto */
.select2-container--bootstrap-5 .select2-dropdown {
    z-index: 9999 !important;
}

.select2-dropdown {
    z-index: 9999 !important;
}

/* Contenedor de Select2 */
.select2-container {
    z-index: auto;
    width: 100% !important;
}

/* Asegurar que el select oculto no interfiera */
.select2-hidden-accessible {
    border: 0 !important;
    clip: rect(0 0 0 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    width: 1px !important;
}

/* Fix para tabs con Select2 */
.tab-content {
    position: relative;
    z-index: 1;
}

.card-body {
    position: relative;
    z-index: 1;
}

/* Estilos para autocompletado personalizado */
.position-relative {
    position: relative;
}

/* Modal de negocios: overflow visible para que los dropdowns no se corten */
#dealModal .modal-body.deal-modal-body {
    overflow: visible;
}

#dealModal .modal-dialog {
    overflow: visible;
}

/* Unidad funcional: buscador arriba de los tags en el modal de deals */
#dealModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
}

#dealModal .select2-container--bootstrap-5 .select2-selection--multiple li.select2-search--inline,
#dealModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-search.select2-search--inline {
    order: -1 !important;
    flex-basis: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 1px solid #eff2f5 !important;
}

#dealModal .select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
    width: 100% !important;
    min-width: 100% !important;
}

/* Dropdowns de empresa/estructura - z-index para aparecer sobre el contenido */
#deal-empresa-dropdown,
#deal-estructura-dropdown,
#deal-edit-empresa-dropdown,
#deal-edit-estructura-dropdown {
    z-index: 1060 !important;
}

#empresa_constructora_dropdown,
#estructura_dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    margin-top: 0.25rem;
    background-color: #ffffff;
    border: 1px solid #e4e6ef;
    border-radius: 0.475rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    max-height: 300px;
    overflow-y: auto;
}

#empresa_constructora_dropdown .dropdown-item,
#estructura_dropdown .dropdown-item {
    padding: 0.75rem 1rem;
    color: #5e6278;
    font-size: 0.925rem;
    text-decoration: none;
    display: block;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

#empresa_constructora_dropdown .dropdown-item:hover,
#estructura_dropdown .dropdown-item:hover,
#empresa_constructora_dropdown .dropdown-item.active,
#estructura_dropdown .dropdown-item.active {
    background-color: #f1f1f2;
    color: #009ef7;
}

#empresa_constructora_dropdown .dropdown-item-text,
#estructura_dropdown .dropdown-item-text {
    padding: 0.75rem 1rem;
    color: #a1a5b7;
    font-size: 0.875rem;
}

#empresa_constructora_dropdown .dropdown-item-text.text-danger,
#estructura_dropdown .dropdown-item-text.text-danger {
    color: #f1416c;
}

/* Scrollbar personalizado para dropdown */
#empresa_constructora_dropdown::-webkit-scrollbar,
#estructura_dropdown::-webkit-scrollbar {
    width: 8px;
}

#empresa_constructora_dropdown::-webkit-scrollbar-track,
#estructura_dropdown::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 4px;
}

#empresa_constructora_dropdown::-webkit-scrollbar-thumb,
#estructura_dropdown::-webkit-scrollbar-thumb {
    background: #e4e6ef;
    border-radius: 4px;
}

#empresa_constructora_dropdown::-webkit-scrollbar-thumb:hover,
#estructura_dropdown::-webkit-scrollbar-thumb:hover {
    background: #d1d3e0;
}

/* Kanban board */
.kanban-drag-over .kanban-dropspace {
    background-color: rgba(0, 158, 247, 0.08);
    border: 2px dashed var(--bs-primary);
}

.deal-card.cursor-grab {
    cursor: grab;
}

.deal-card.cursor-grab:active {
    cursor: grabbing;
}

/* Prospect view: tabs alineados, sidebar derecha */
.nav-line-tabs.flex-nowrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.nav-line-tabs.flex-nowrap::-webkit-scrollbar {
    height: 4px;
}

/* Formulario de reserva: pasos clickeables */
#reserva-stepper .stepper-item[data-step] {
    cursor: pointer;
    transition: opacity 0.2s, transform 0.2s;
}

#reserva-stepper .stepper-item[data-step]:hover {
    opacity: 0.9;
}

#reserva-stepper .stepper-item[data-step]:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Navegación reserva: indicador de paso y botones compactos */
.reserva-nav-buttons .reserva-step-indicator {
    padding: 0 0.5rem;
}

/* Dashboard: KPI card decoration */
.card-kpi-decorated {
    position: relative;
    overflow: hidden;
}

.card-kpi-decorated::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(27, 132, 255, 0.03) 50%);
    pointer-events: none;
}

/* Theme transition suppression */
[data-kt-theme-mode-switching="true"] * {
    transition: none !important;
}

/* ===========================
   DARK MODE OVERRIDES
   =========================== */
[data-bs-theme="dark"] .app-sidebar {
    background-color: #1e1e2d !important;
    border-right-color: #2d2d3f !important;
}

[data-bs-theme="dark"] .app-sidebar-menu,
[data-bs-theme="dark"] .app-sidebar-wrapper {
    background-color: transparent !important;
}

[data-bs-theme="dark"] .app-sidebar-logo {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .app-sidebar-toggle {
    background-color: #2d2d3f !important;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item > .menu-link {
    color: #9899ac;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item > .menu-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item > .menu-link.active {
    background-color: rgba(27, 132, 255, 0.12);
    color: #ffffff;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item > .menu-link.active::before {
    background-color: #009ef7;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item.here > .menu-link,
[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-item.show > .menu-link {
    background-color: rgba(255, 255, 255, 0.04);
    color: #ffffff;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-sub .menu-item > .menu-link {
    color: #6d6d80;
}

[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-sub .menu-item > .menu-link:hover,
[data-bs-theme="dark"] #kt_app_sidebar_menu .menu-sub .menu-item > .menu-link.active {
    color: #ffffff;
}

[data-bs-theme="dark"] .menu-heading {
    color: #565674 !important;
}

[data-bs-theme="dark"] .app-sidebar .separator {
    border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .app-sidebar-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .app-sidebar-footer .text-gray-900 {
    color: #cdcdde !important;
}

[data-bs-theme="dark"] .app-sidebar-footer .text-muted {
    color: #565674 !important;
}

[data-bs-theme="dark"] .app-header {
    background-color: #1c1c2e !important;
    box-shadow: 0 0 28px 0 rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] body,
[data-bs-theme="dark"] .app-main,
[data-bs-theme="dark"] .app-content,
[data-bs-theme="dark"] #kt_app_content {
    background-color: #151521 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #1e1e2d;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] .card-header {
    background-color: #1e1e2d;
    border-bottom-color: #2d2d3f;
}

[data-bs-theme="dark"] .card-body {
    background-color: transparent;
}

[data-bs-theme="dark"] .table {
    color: #cdcdde;
}

[data-bs-theme="dark"] .table thead th {
    color: #565674;
    border-bottom-color: #2d2d3f;
}

[data-bs-theme="dark"] .table tbody tr {
    border-bottom-color: #2d2d3f;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: #1b1b29 !important;
    border-color: #2d2d3f !important;
    color: #cdcdde !important;
}

[data-bs-theme="dark"] .separator {
    border-color: #2d2d3f !important;
}

[data-bs-theme="dark"] .text-dark {
    color: #cdcdde !important;
}

[data-bs-theme="dark"] .text-gray-400 {
    color: #565674 !important;
}

[data-bs-theme="dark"] .text-gray-600 {
    color: #7e8299 !important;
}

[data-bs-theme="dark"] .page-title {
    color: #cdcdde;
}

[data-bs-theme="dark"] #empresa_constructora_dropdown,
[data-bs-theme="dark"] #estructura_dropdown {
    background-color: #1e1e2d;
    border-color: #2d2d3f;
}

[data-bs-theme="dark"] #empresa_constructora_dropdown .dropdown-item,
[data-bs-theme="dark"] #estructura_dropdown .dropdown-item {
    color: #cdcdde;
}

[data-bs-theme="dark"] #empresa_constructora_dropdown .dropdown-item:hover,
[data-bs-theme="dark"] #estructura_dropdown .dropdown-item:hover {
    background-color: rgba(27, 132, 255, 0.1);
    color: #009ef7;
}

[data-bs-theme="dark"] .card-kpi-decorated::after {
    background: linear-gradient(135deg, transparent 50%, rgba(27, 132, 255, 0.05) 50%);
}

/* Topbar shortcuts */
.topbar-shortcut {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.475rem;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.topbar-shortcut:hover {
    background-color: #f1f1f4;
}

.topbar-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.topbar-shortcut-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #4B5675;
    white-space: nowrap;
}

.topbar-shortcut:hover .topbar-shortcut-label {
    color: #252F4A;
}

/* Theme toggle button */
.topbar-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 0.475rem;
    border: none;
    background: transparent;
    color: #78829D;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}

.topbar-theme-toggle:hover {
    background-color: #f1f1f4;
    color: #252F4A;
}

/* User button */
.topbar-user-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* Dark mode header overrides */
[data-bs-theme="dark"] .topbar-shortcut:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

[data-bs-theme="dark"] .topbar-shortcut-label {
    color: #9899ac;
}

[data-bs-theme="dark"] .topbar-shortcut:hover .topbar-shortcut-label {
    color: #cdcdde;
}

[data-bs-theme="dark"] .topbar-theme-toggle {
    color: #9899ac;
}

[data-bs-theme="dark"] .topbar-theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #cdcdde;
}

