/*
 * Marca AZUL sobre el theme Ubold.
 * Ubold usa su propio namespace de variables (--theme-*), NO las de Bootstrap
 * (--bs-*). Por eso se sobreescriben las --theme-primary* para recolorear
 * botones, enlaces, menú activo, badges, etc. de forma consistente.
 */
:root {
    --theme-primary: #2563eb !important;
    --theme-primary-rgb: 37, 99, 235 !important;
    --theme-primary-text-emphasis: #1d4ed8 !important;
    --theme-primary-bg-subtle: #dbeafe !important;
    --theme-primary-border-subtle: #93c5fd !important;

    --theme-link-color: #2563eb !important;
    --theme-link-color-rgb: 37, 99, 235 !important;
    --theme-link-hover-color: #1d4ed8 !important;
    --theme-link-hover-color-rgb: 29, 78, 216 !important;

    /* Equivalentes Bootstrap por si algún componente nativo los usa. */
    --bs-primary: #2563eb !important;
    --bs-primary-rgb: 37, 99, 235 !important;
    --bs-link-color: #2563eb !important;
    --bs-link-hover-color: #1d4ed8 !important;
}

/* Botón primario: forzado por si el theme define color directo. */
.btn-primary {
    --theme-btn-bg: #2563eb;
    --theme-btn-border-color: #2563eb;
    --theme-btn-hover-bg: #1d4ed8;
    --theme-btn-hover-border-color: #1d4ed8;
    --theme-btn-active-bg: #1d4ed8;
    --theme-btn-active-border-color: #1d4ed8;
    --bs-btn-bg: #2563eb;
    --bs-btn-border-color: #2563eb;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    background-color: #2563eb;
    border-color: #2563eb;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
}

.bg-primary,
.badge.bg-primary,
.text-bg-primary {
    background-color: #2563eb !important;
}
.text-primary { color: #2563eb !important; }
.border-primary { border-color: #2563eb !important; }
.bg-primary-subtle { background-color: #dbeafe !important; }

.brand-azul {
    color: #2563eb;
    font-weight: 700;
}

/*
 * Menú lateral AZUL con buen contraste (texto e iconos claros).
 * Se usa el modo "dark" de Ubold y se sobreescriben sus variables de menú.
 */
:root {
    --theme-sidenav-bg: #1e3a8a !important;
    --theme-sidenav-border-color: #172554 !important;
    --theme-sidenav-item-color: rgba(255, 255, 255, 0.82) !important;
    --theme-sidenav-item-hover-color: #ffffff !important;
    --theme-sidenav-item-hover-bg: rgba(255, 255, 255, 0.14) !important;
    --theme-sidenav-item-active-color: #ffffff !important;
    --theme-sidenav-item-active-bg: rgba(255, 255, 255, 0.20) !important;
}

/* Marca e íconos del sidebar en blanco (el azul no contrasta sobre azul). */
.sidenav-menu .brand-azul,
.sidenav-menu .logo,
.sidenav-menu .logo * {
    color: #ffffff !important;
}

/* Títulos de sección del menú, legibles sobre el azul. */
.sidenav-menu .side-nav-title {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Íconos del menú heredan el color del texto (lucide usa currentColor). */
.sidenav-menu .side-nav-link .menu-icon {
    color: inherit !important;
}
