/* ========================================
    Color Institucional: Guinda #691C32
    Alcaldía Iztapalapa - Panel de Operadores v2
    ======================================== */

/* ================================
   SIDEBAR COMPLETO (FONDO GUINDA)
   ================================ */
.main-sidebar {
    background-color: #691C32 !important;
}

.brand-link {
    background-color: #691C32 !important;
    border-bottom: 2px solid #4a1224 !important;
    color: #ffffff !important;
}

.brand-text {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* ================================
   NAVEGACIÓN SIDEBAR (TEXTO BLANCO)
   ================================ */
.nav-sidebar .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

.nav-sidebar .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

.nav-sidebar .nav-item > .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Submenús */
.nav-treeview .nav-item > .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.nav-treeview .nav-item > .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Menú abierto */
.menu-open > .nav-link {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

/* ================================
   ICONOS DEL SIDEBAR
   ================================ */
.nav-icon {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ================================
   CABECERA (NAVBAR)
   ================================ */
.navbar {
    background-color: #691C32 !important;
    border-bottom: 2px solid #4a1224 !important;
}

.navbar-brand {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Navbar superior y Sidebar */
.navbar .nav-link,
.nav-sidebar .nav-link {
    color: #ffffff !important;
}

.navbar .nav-link:hover,
.nav-sidebar .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Pestañas del contenido (Tabs) */
.nav-tabs .nav-link {
    color: #495057 !important;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    color: #691C32 !important;
}

.nav-tabs .nav-link.active {
    color: #691C32 !important;
    border-bottom: 2px solid #691C32 !important;
}

/* ================================
   BOTONES PRIMARIOS
   ================================ */
.btn-primary {
    background-color: #691C32 !important;
    border-color: #5a182a !important;
}

.btn-primary:hover {
    background-color: #4b1423 !important;
    border-color: #3d101c !important;
}

/* ================================
   ELEMENTOS DE TABLA
   ================================ */
.table thead th {
    border-bottom: 2px solid #691C32 !important;
}

/* Links en tablas */
.text-primary {
    color: #691C32 !important;
}

/* ================================
   FORMULARIOS
   ================================ */
.form-control:focus,
.form-select:focus {
    border-color: #691C32 !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 28, 50, 0.25) !important;
}

.form-check-input:checked {
    background-color: #691C32 !important;
    border-color: #691C32 !important;
}

/* ================================
   SCROLLBAR DEL SIDEBAR
   ================================ */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ================================
   FOOTER
   ================================ */
.main-footer {
    background-color: #4a1224 !important;
    color: #ffffff !important;
}

/* =========================================================
   SRE UI REPAIR: Stack Vertical para Selectores (Fix Truncamiento)
   ========================================================= */

/* Fallback para Firefox y navegadores que soportan white-space en <option> */
.selector select option {
    white-space: normal !important;
    padding: 8px 4px !important;
    border-bottom: 1px solid #e0e0e0;
    line-height: 1.4;
}

/* Forzamos que las cajas de permisos se apilen una sobre otra 
   para ganar el 100% del ancho horizontal disponible */
.selector {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
}

.selector-available, .selector-chosen {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px;
}

ul.selector-chooser {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    transform: none !important;
    width: 100% !important;
    height: auto !important;
    padding: 10px 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

ul.selector-chooser li {
    margin: 0 15px !important;
}

.selector select {
    min-height: 250px !important;
    padding: 10px !important;
    font-size: 14px !important;
}

/* =========================================================
   SRE: Campos de Control Administrativo (v6.1)
   Revisado y Curso Completado - UI Destacada
   ========================================================= */

/* Columnas en tabla - texto destacado */
.field-revisado,
.field-curso_completado {
    font-size: 16px !important;
    font-weight: 600 !important;
    text-align: center !important;
}

/* Checkboxes de revisado y curso en vista de detalle */
.field-revisado .form-check-input,
.field-curso_completado .form-check-input {
    transform: scale(1.8) !important;
    cursor: pointer !important;
}

/* Labels de campos */
.field-revisado label,
.field-curso_completado label {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #691C32 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* En tablas, mostrar como badges */
.field-revisado .boolean-badge,
.field-curso_completado .boolean-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
}

.field-revisado .boolean-badge.sim {
    background-color: #28a745;
    color: white;
}

.field-revisado .boolean-badge.nao {
    background-color: #6c757d;
    color: white;
}

.field-curso_completado .boolean-badge.sim {
    background-color: #17a2b8;
    color: white;
}

.field-curso_completado .boolean-badge.nao {
    background-color: #6c757d;
    color: white;
}