:root {
    /* Mapeamos el color primario de Bootstrap al azul corporativo de Cívika */
    --bs-primary: #1e499a;
    --bs-primary-rgb: 30, 73, 154;

    --bs-danger: #dc3545;
    --bs-danger-rgb: 220, 53, 69;

    --civika-brand-blue: #1e499a;
    --civika-sidebar-dark: #343a40;
}

/* Botones y enlaces principales heredan automáticamente el primario */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover {
    background-color: #163674; /* Un tono ligeramente más oscuro para el efecto hover */
    border-color: #132e61;
}

.btn-danger {
    background-color: var(--bs-danger);
    border-color: var(--bs-danger);
}
.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

a {
    color: var(--bs-primary);
}

[class*="sidebar-dark-"],
.app-sidebar {
    background-color: var(--civika-sidebar-dark) !important;
}

.brand-text,
.navbar-brand-text {
    color: var(--civika-brand-blue);
    font-weight: 600;
}


body .btn-outline-primary:not(.btn-operacion):hover,
body .btn-outline-primary:not(.btn-operacion):active,
.btn-check:checked + .btn-outline-primary {
    color: #0d6efd !important;
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.08) !important;
}
body .btn-outline-danger:not(.btn-operacion):hover,
body .btn-outline-danger:not(.btn-operacion):active {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.08) !important;
}
body .btn-outline-success:not(.btn-operacion):hover,
body .btn-outline-success:not(.btn-operacion):active {
    color: #198754 !important;
    border-color: #198754 !important;
    background-color: rgba(25, 135, 84, 0.08) !important;
}
body .btn-outline-warning:not(.btn-operacion):hover,
body .btn-outline-warning:not(.btn-operacion):active {
    color: #d97706 !important;
    border-color: #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.1) !important;
}
body .btn-outline-info:not(.btn-operacion):hover,
body .btn-outline-info:not(.btn-operacion):active {
    color: #0891b2 !important;
    border-color: #06b6d4 !important;
    background-color: rgba(6, 182, 212, 0.1) !important;
}
body .btn-outline-secondary:not(.btn-operacion):hover,
body .btn-outline-secondary:not(.btn-operacion):active,
body .btn-outline-dark:not(.btn-operacion):hover,
body .btn-outline-dark:not(.btn-operacion):active {
    color: #343a40 !important;
    border-color: #6c757d !important;
    background-color: rgba(108, 117, 125, 0.1) !important;
}

body .btn-outline-primary:hover .bi, body .btn-outline-danger:hover .bi,
body .btn-outline-success:hover .bi, body .btn-outline-warning:hover .bi,
body .btn-outline-info:hover .bi, body .btn-outline-secondary:hover .bi,
body .btn-outline-dark:hover .bi {
    color: inherit !important;
}

body .btn-primary, body .btn-success, body .btn-warning,
body .btn-danger, body .btn-secondary, body .btn-info {
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
body .btn-primary:hover, body .btn-primary:active,
body .btn-success:hover, body .btn-success:active,
body .btn-warning:hover, body .btn-warning:active,
body .btn-danger:hover, body .btn-danger:active,
body .btn-secondary:hover, body .btn-secondary:active,
body .btn-info:hover, body .btn-info:active {
    filter: brightness(0.92);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
}

body .btn-white, body .btn-solid-white, body .btn-light {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
body .btn-white:hover, body .btn-white:active,
body .btn-solid-white:hover, body .btn-solid-white:active,
body .btn-light:hover, body .btn-light:active {
    background-color: #e9ecef !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
}

#overlay_full_page {
    opacity: 0;
    visibility: hidden;
    background: #000;
    width: 100%;
    height: 100%;
    z-index: 1080;
    top: 0;
    left: 0;
    position: fixed;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
#overlay_full_page.visible {
    opacity: 0.5;
    visibility: visible;
}