/* ==========================================================================
   OSPL SYSTEM - CUSTOM ACCESSIBILITY & CONTRAST STYLES
   Mejora integral de contraste y legibilidad para etiquetas de datos y text-muted
   ========================================================================== */

/* 1. Contraste global mejorado para text-muted (elimina el tono gris apagado #74788d) */
.text-muted {
    --bs-text-opacity: 1 !important;
    color: #495057 !important;
}

/* Modo oscuro para text-muted */
body[data-layout-mode="dark"] .text-muted {
    color: #cbd5e1 !important;
}

/* 2. Resaltar etiquetas de campos en tarjetas y filas de detalle (DOCUMENTO:, SEXO:, CUIT:, etc.) */
.d-flex.justify-content-between>span.text-muted,
.d-flex.justify-content-between>span:first-child:not(.badge):not(.btn):not(.avatar-title),
.d-flex.justify-content-between.align-items-center>span.text-muted,
.d-flex.justify-content-between.align-items-center>span:first-child:not(.badge):not(.btn),
.card-body .d-flex.justify-content-between>span:first-child,
.card-body .d-flex.justify-content-between>span.text-muted,
.card-detail-item .detail-label,
.detail-label,
.data-label,
.field-label,
.info-label {
    color: #2b303a !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
}

/* 3. Etiquetas en mayúsculas dentro de tarjetas y módulos de detalle */
.text-muted.text-uppercase,
.text-uppercase.text-muted,
small.text-muted.text-uppercase,
span.text-muted.text-uppercase,
p.text-muted.text-uppercase,
div.text-muted.text-uppercase {
    color: #343a40 !important;
    font-weight: 700 !important;
    letter-spacing: 0.4px;
}

/* 4. Encabezados de tabla que actúan como etiquetas de datos */
table.table th.text-muted,
table th.text-muted,
th.text-muted,
.table-details th {
    color: #212529 !important;
    font-weight: 700 !important;
}

/* 5. Resaltar etiquetas 'strong' / 'b' dentro de bloques con text-muted (ej. DNI:, CUIL:, etc.) */
.text-muted strong,
.text-muted b,
.text-muted span.fw-bold,
.text-muted span.fw-semibold {
    color: #1e293b !important;
    font-weight: 700 !important;
}

/* 6. Textos secundarios y etiquetas pequeñas (Inicio:, CUIT:, Mat:, etc.) */
small.text-muted,
.font-size-11.text-muted,
.font-size-12.text-muted {
    color: #3e444e !important;
}

/* 7. Etiquetas de formularios */
label.form-label,
.col-form-label {
    color: #2b303a !important;
    font-weight: 600 !important;
}

/* ==========================================================================
   COMPATIBILIDAD CON MODO OSCURO (DARK MODE)
   ========================================================================== */
body[data-layout-mode="dark"] .d-flex.justify-content-between>span.text-muted,
body[data-layout-mode="dark"] .d-flex.justify-content-between>span:first-child:not(.badge):not(.btn):not(.avatar-title),
body[data-layout-mode="dark"] .card-body .d-flex.justify-content-between>span:first-child,
body[data-layout-mode="dark"] .card-body .d-flex.justify-content-between>span.text-muted,
body[data-layout-mode="dark"] .card-detail-item .detail-label,
body[data-layout-mode="dark"] .detail-label,
body[data-layout-mode="dark"] .data-label,
body[data-layout-mode="dark"] .field-label,
body[data-layout-mode="dark"] .info-label,
body[data-layout-mode="dark"] .text-muted.text-uppercase,
body[data-layout-mode="dark"] .text-uppercase.text-muted,
body[data-layout-mode="dark"] small.text-muted.text-uppercase,
body[data-layout-mode="dark"] span.text-muted.text-uppercase,
body[data-layout-mode="dark"] p.text-muted.text-uppercase,
body[data-layout-mode="dark"] table.table th.text-muted,
body[data-layout-mode="dark"] table th.text-muted,
body[data-layout-mode="dark"] th.text-muted,
body[data-layout-mode="dark"] .text-muted strong,
body[data-layout-mode="dark"] .text-muted b {
    color: #f1f5f9 !important;
}

/* ==========================================================================
   HORIZONTAL TOPBAR GLOBAL FIX - PREVIENE DESBORDAMIENTO EN CUALQUIER RESOLUCIÓN
   ========================================================================== */
body[data-layout="horizontal"] .navbar-header {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 16px !important;
    margin: 0 !important;
}
body[data-layout="horizontal"] .navbar-header > .d-flex:last-child {
    flex-shrink: 0 !important;
    margin-left: auto !important;
}
#page-header-user-dropdown img {
    width: 36px !important;
    height: 36px !important;
    object-fit: cover !important;
}