/* ============================================================
   SICOV - BASE GLOBAL RESPONSIVE
   Archivo sugerido:
   static/css/base.css

   Diseñado principalmente para:
   - 1360 x 768: escritorio operativo habitual.
   - 1024 x 768: notebook, tablet horizontal o monitor antiguo.
   - Pantallas grandes: 1440 px, 1600 px, Full HD y superiores.
   - Celulares y tablets en orientación vertical.

   Objetivos:
   - Interfaz compacta y clara.
   - Mantener la mayor superficie útil posible en 768 px de alto.
   - Navbar profesional de dos niveles en escritorio.
   - Menú colapsado en resoluciones menores a 1200 px.
   - Componentes Bootstrap coherentes con el estilo de SICOV.
   ============================================================ */


/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */

:root {
    color-scheme: light;

    /* Identidad */
    --sicov-dark: #111827;
    --sicov-dark-soft: #1e293b;
    --sicov-navy: #1e3a5f;
    --sicov-navy-hover: #172f4e;
    --sicov-primary: #0d6efd;
    --sicov-primary-hover: #0b5ed7;
    --sicov-primary-soft: #eff6ff;
    --sicov-primary-border: #bfdbfe;

    /* Estados */
    --sicov-success: #166534;
    --sicov-success-bg: #dcfce7;
    --sicov-success-border: #86efac;

    --sicov-danger: #991b1b;
    --sicov-danger-bg: #fee2e2;
    --sicov-danger-border: #fca5a5;

    --sicov-warning: #9a3412;
    --sicov-warning-bg: #ffedd5;
    --sicov-warning-border: #fdba74;

    --sicov-info: #155e75;
    --sicov-info-bg: #cffafe;
    --sicov-info-border: #67e8f9;

    /* Superficies y texto */
    --sicov-body-bg: #f5f7fb;
    --sicov-surface: #ffffff;
    --sicov-surface-soft: #f8fafc;
    --sicov-surface-muted: #f1f5f9;
    --sicov-text: #1f2937;
    --sicov-text-soft: #334155;
    --sicov-muted: #64748b;
    --sicov-border: #d7dee8;
    --sicov-border-soft: #e2e8f0;

    /* Tamaños */
    --sicov-font-size: 13px;
    --sicov-control-height: 32px;
    --sicov-control-height-sm: 27px;
    --sicov-radius: 12px;
    --sicov-radius-sm: 8px;

    /* Sombras */
    --sicov-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --sicov-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.07);
    --sicov-shadow-md: 0 10px 26px rgba(15, 23, 42, 0.12);
    --sicov-shadow-navbar: 0 6px 18px rgba(15, 23, 42, 0.16);

    /* Compatibilidad con nombres anteriores */
    --rto-negro-azulado: #0a0f1e;
    --rto-azul-oscuro: var(--sicov-navy);
    --rto-azul-acento: var(--sicov-primary);
    --rto-gris-azulado: #94a3b8;
    --rto-gris-claro: #e2e8f0;
    --rto-blanco: #ffffff;
    --rto-texto: var(--sicov-text);
    --rto-fondo: var(--sicov-body-bg);
    --rto-borde: var(--sicov-border);
    --rto-verde-acento: #22c55e;
}


/* ============================================================
   NORMALIZACIÓN
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--sicov-body-bg);
    color: var(--sicov-text);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: var(--sicov-font-size);
    line-height: 1.35;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
select,
label,
.form-check-input {
    cursor: pointer;
}

textarea {
    resize: vertical;
}

p:last-child {
    margin-bottom: 0;
}

[hidden] {
    display: none !important;
}

::selection {
    background: rgba(13, 110, 253, 0.20);
    color: var(--sicov-dark);
}


/* ============================================================
   ENLACES Y FOCO
   ============================================================ */

a {
    color: var(--sicov-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

a:hover,
a:focus {
    color: var(--sicov-primary-hover);
}

:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.65);
    outline-offset: 2px;
}


/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 11000;
    padding: 6px 10px;
    transform: translateY(-160%);
    background: #000000;
    border-radius: 7px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.16s ease;
}

.skip-link:focus {
    transform: translateY(0);
    color: #ffffff;
}

.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}


/* ============================================================
   ESTRUCTURA PRINCIPAL
   ============================================================ */

main,
.sicov-main {
    width: 100%;
    min-width: 0;
    flex: 1 0 auto;
}

.sicov-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 12px 14px 24px;
}

.sicov-page-fluid {
    width: 100%;
    padding: 12px 14px 24px;
}

.sicov-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.sicov-page-title {
    margin: 0;
    color: var(--sicov-dark);
    font-size: 21px;
    font-weight: 850;
    line-height: 1.2;
}

.sicov-page-subtitle {
    margin: 2px 0 0;
    color: var(--sicov-muted);
    font-size: 12px;
    line-height: 1.3;
}


/* ============================================================
   COMPONENTES BASE COMPACTOS
   ============================================================ */

.card,
.sicov-card {
    background: var(--sicov-surface);
    border: 1px solid var(--sicov-border);
    border-radius: var(--sicov-radius);
    box-shadow: var(--sicov-shadow-sm);
}

.card-header,
.card-footer {
    background: var(--sicov-surface);
    border-color: var(--sicov-border-soft);
}

.card-header {
    padding: 10px 12px;
}

.card-body {
    padding: 12px;
}

.card-footer {
    padding: 9px 12px;
}

.form-label,
label.form-label {
    margin-bottom: 4px;
    color: var(--sicov-text-soft);
    font-size: 12px;
    font-weight: 800;
}

.form-control,
.form-select {
    min-height: var(--sicov-control-height);
    padding: 5px 9px;
    background-color: #ffffff;
    border: 1px solid #c8d1dc;
    border-radius: var(--sicov-radius-sm);
    color: var(--sicov-dark);
    font-size: 13px;
    line-height: 1.25;
    box-shadow: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background-color 0.15s ease;
}

.form-select {
    padding-right: 32px;
}

.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: var(--sicov-primary);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.14);
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
    background-color: var(--sicov-surface-muted);
    color: var(--sicov-muted);
    opacity: 1;
}

textarea.form-control {
    min-height: 72px;
}

.form-text {
    margin-top: 3px;
    color: var(--sicov-muted);
    font-size: 11px;
}

.invalid-feedback,
.valid-feedback {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
}

.input-group-text {
    min-height: var(--sicov-control-height);
    padding: 5px 9px;
    background: var(--sicov-surface-muted);
    border-color: #c8d1dc;
    color: var(--sicov-text-soft);
    font-size: 12px;
}

.form-check-input {
    border-color: #94a3b8;
}

.form-check-input:focus {
    border-color: var(--sicov-primary);
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.14);
}

.btn {
    min-height: var(--sicov-control-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--sicov-radius-sm);
    font-size: 12.5px;
    font-weight: 750;
    line-height: 1.1;
    white-space: nowrap;
    box-shadow: none;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        transform 0.05s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus,
.btn:active:focus {
    box-shadow: none;
}

.btn-sm {
    min-height: var(--sicov-control-height-sm);
    padding: 4px 8px;
    border-radius: 7px;
    font-size: 11.5px;
}

.btn-primary {
    background: var(--sicov-primary);
    border-color: var(--sicov-primary);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: var(--sicov-primary-hover) !important;
    border-color: var(--sicov-primary-hover) !important;
}

.btn-light {
    background: var(--sicov-surface-soft);
    border-color: #cbd5e1;
    color: var(--sicov-text-soft);
}

.btn-light:hover,
.btn-light:focus {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: var(--sicov-dark);
}

.alert {
    margin-bottom: 12px;
    padding: 9px 11px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.35;
}

.badge {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
}

.table-responsive,
.sicov-table-responsive-auto {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.table {
    margin-bottom: 0;
    color: var(--sicov-text);
    font-size: 12.5px;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 7px 8px;
    border-color: var(--sicov-border-soft);
}

.table thead th {
    color: var(--sicov-text-soft);
    font-size: 11.5px;
    font-weight: 800;
    white-space: nowrap;
}

.table-hover > tbody > tr:hover > * {
    background-color: #eef8ff;
}

.pagination {
    gap: 4px;
    margin-bottom: 0;
}

.page-link {
    min-width: 30px;
    min-height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 4px 8px;
    border-color: var(--sicov-border);
    color: var(--sicov-text-soft);
    font-size: 12px;
}

.page-item.active .page-link {
    background: var(--sicov-navy);
    border-color: var(--sicov-navy);
}

.modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
}

.modal-header {
    padding: 11px 14px;
    border-bottom-color: var(--sicov-border-soft);
}

.modal-title {
    color: var(--sicov-dark);
    font-size: 15px;
    font-weight: 800;
}

.modal-body {
    padding: 14px;
    color: var(--sicov-text-soft);
    font-size: 13px;
}

.modal-footer {
    gap: 7px;
    padding: 10px 14px;
    border-top-color: var(--sicov-border-soft);
}

.dropdown-menu {
    padding: 6px;
    background: #ffffff;
    border: 1px solid var(--sicov-border);
    border-radius: 9px;
    box-shadow: var(--sicov-shadow-md);
    font-size: 12.5px;
}

.dropdown-item {
    padding: 7px 9px;
    border-radius: 6px;
    color: var(--sicov-text-soft);
    font-size: 12.5px;
    line-height: 1.2;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--sicov-surface-muted);
    color: var(--sicov-dark);
}


/* ============================================================
   HEADER / NAVBAR
   ============================================================ */

.rto-header {
    position: relative;
    z-index: 1030;
    width: 100%;
    flex: 0 0 auto;
    background: var(--sicov-navy);
    box-shadow: var(--sicov-shadow-navbar);
}

.rto-header .navbar.sicov-navbar,
.navbar.sicov-navbar,
.sicov-navbar {
    width: 100%;
    max-width: 100%;
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    margin: 0;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
}

.sicov-navbar.sicov-navbar-scrolled,
.sicov-navbar-scrolled {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
}

.navbar.sicov-navbar > .container-fluid,
.sicov-navbar > .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
}


/* ============================================================
   NAVBAR - LÍNEA SUPERIOR
   ============================================================ */

.sicov-navbar-top {
    width: 100% !important;
    min-height: 58px;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    padding: 7px 16px !important;
    background: linear-gradient(
        135deg,
        var(--rto-negro-azulado) 0%,
        var(--sicov-navy) 62%,
        #27466f 100%
    ) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}


/* ============================================================
   MARCA / LOGO
   ============================================================ */

.sicov-brand {
    min-width: 0;
    max-width: 54vw;
    display: inline-flex !important;
    flex: 0 1 auto;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    text-decoration: none !important;
}

.sicov-brand:hover,
.sicov-brand:focus {
    text-decoration: none !important;
}

.navbar-logo-img {
    width: auto;
    height: 44px;
    max-width: 82px;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.34));
}

.sicov-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.04;
}

.sicov-brand-text span {
    display: block;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
}

.sicov-brand-text small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.90);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
}


/* ============================================================
   NAVBAR - ACCIONES SUPERIORES
   ============================================================ */

.sicov-top-actions {
    min-width: 0;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.sicov-ingeniero-nav {
    min-width: 0;
    max-width: 360px;
}

.sicov-ingeniero-link {
    min-height: 34px;
    max-width: 360px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow: hidden;
    padding: 5px 10px !important;
    border-radius: 7px;
    font-size: 11.5px !important;
    font-weight: 800;
    line-height: 1.12;
    text-decoration: none !important;
    white-space: nowrap;
}

.sicov-ingeniero-link i {
    flex: 0 0 auto;
    font-size: 13px;
    line-height: 1;
}

.sicov-ingeniero-ok {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(148, 163, 184, 0.45) !important;
    color: #ffffff !important;
}

.sicov-ingeniero-ok:hover,
.sicov-ingeniero-ok:focus {
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.58) !important;
    color: #ffffff !important;
}

.sicov-ingeniero-alerta {
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    color: var(--sicov-navy) !important;
}

.sicov-ingeniero-alerta:hover,
.sicov-ingeniero-alerta:focus {
    background: #f8fbff !important;
    border-color: var(--sicov-primary) !important;
    color: var(--sicov-navy) !important;
}

.sicov-ingeniero-label {
    flex: 0 0 auto;
    font-weight: 850;
    opacity: 0.94;
}

.sicov-ingeniero-nombre {
    min-width: 0;
    max-width: 205px;
    display: inline-block;
    overflow: hidden;
    color: inherit;
    font-weight: 900;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.sicov-ingeniero-dropdown-text {
    max-width: 330px;
    color: var(--sicov-dark) !important;
    font-size: 12px;
    line-height: 1.25;
    white-space: normal;
}

.sicov-user-link {
    min-height: 34px !important;
    max-width: 250px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    overflow: hidden;
    padding: 4px 9px !important;
    background: #ffffff !important;
    border: 1px solid #94a3b8 !important;
    border-radius: 7px;
    color: var(--sicov-navy) !important;
    text-decoration: none !important;
    white-space: nowrap;
}

.sicov-user-link:hover,
.sicov-user-link:focus {
    background: #f8fbff !important;
    border-color: var(--sicov-primary) !important;
    color: var(--sicov-navy) !important;
}

.sicov-user-img,
.sicov-user-placeholder {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 50%;
}

.sicov-user-img {
    object-fit: cover;
    border: 1px solid rgba(15, 23, 42, 0.15);
}

.sicov-user-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.10);
    color: #00599f;
}

.sicov-user-name {
    min-width: 0;
    max-width: 155px;
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ============================================================
   BOTÓN TOGGLER
   ============================================================ */

.sicov-toggler {
    min-width: 38px;
    min-height: 34px;
    flex: 0 0 auto;
    margin-left: auto;
    padding: 4px 7px;
    border-color: rgba(255, 255, 255, 0.42) !important;
    border-radius: 8px;
}

.sicov-toggler:focus {
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.34);
}

.sicov-toggler .navbar-toggler-icon {
    width: 1.15em;
    height: 1.15em;
}


/* ============================================================
   NAVBAR - LÍNEA INFERIOR
   ============================================================ */

.sicov-navbar-bottom {
    width: 100% !important;
    min-height: 46px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 6px 12px !important;
    background: var(--sicov-surface-muted) !important;
    border-bottom: 1px solid var(--sicov-border);
    box-shadow: 0 4px 12px rgba(10, 15, 30, 0.08);
}

.sicov-navbar-bottom #mainNav {
    width: 100%;
    max-width: 100%;
}

.sicov-menu {
    width: 100%;
    min-height: 32px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    margin: 0;
    padding: 0;
}

.sicov-menu .nav-item {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.sicov-menu .nav-link {
    min-height: 32px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    padding: 6px 9px !important;
    background: #ffffff !important;
    border: 1px solid var(--sicov-border) !important;
    border-radius: 6px;
    box-shadow: var(--sicov-shadow-xs);
    color: var(--sicov-navy) !important;
    font-size: 11.5px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none !important;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

.sicov-menu .nav-link i {
    color: inherit;
    font-size: 12px;
    line-height: 1;
}

.sicov-menu .nav-link:hover,
.sicov-menu .nav-link:focus {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    box-shadow: 0 2px 5px rgba(10, 15, 30, 0.08);
    color: var(--sicov-navy) !important;
    transform: none !important;
}

.sicov-menu .nav-link.active,
.sicov-menu .show > .nav-link,
.sicov-menu .nav-link[aria-expanded="true"] {
    background: var(--sicov-navy) !important;
    border-color: var(--sicov-navy) !important;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.25);
    color: #ffffff !important;
    transform: none !important;
}

.sicov-menu .nav-link.text-warning,
.sicov-menu .nav-link.fw-semibold {
    background: #ffffff !important;
    border-color: var(--sicov-border) !important;
    color: var(--sicov-navy) !important;
    font-weight: 800 !important;
}

.sicov-menu .nav-link.text-warning:hover,
.sicov-menu .nav-link.fw-semibold:hover,
.sicov-menu .nav-link.text-warning:focus,
.sicov-menu .nav-link.fw-semibold:focus {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
    color: var(--sicov-navy) !important;
}

.sicov-menu .nav-link.text-warning.active,
.sicov-menu .nav-link.fw-semibold.active {
    background: var(--sicov-navy) !important;
    border-color: var(--sicov-navy) !important;
    color: #ffffff !important;
}

.sicov-navbar .dropdown-toggle::after {
    margin-left: 4px;
    vertical-align: 0.12em;
}


/* ============================================================
   DROPDOWNS DEL NAVBAR
   ============================================================ */

.sicov-navbar .dropdown-menu,
.dropdown-menu-dark {
    margin-top: 5px;
    padding: 6px;
    background: #ffffff !important;
    border: 1px solid var(--sicov-border) !important;
    border-radius: 9px;
    box-shadow: 0 12px 24px rgba(10, 15, 30, 0.18) !important;
    color: var(--sicov-text) !important;
}

.sicov-navbar .dropdown-header,
.dropdown-header {
    padding: 6px 9px 4px;
    color: var(--sicov-muted) !important;
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

.sicov-navbar .dropdown-item,
.dropdown-menu-dark .dropdown-item {
    padding: 7px 9px;
    border-radius: 6px;
    color: var(--sicov-navy) !important;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
}

.sicov-navbar .dropdown-item i,
.dropdown-menu-dark .dropdown-item i {
    color: var(--sicov-primary);
}

.sicov-navbar .dropdown-item:hover,
.sicov-navbar .dropdown-item:focus,
.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
    background: var(--sicov-surface-muted) !important;
    color: var(--sicov-navy) !important;
}

.sicov-navbar .dropdown-divider,
.dropdown-menu-dark .dropdown-divider {
    margin: 4px 0;
    border-top-color: var(--sicov-border) !important;
}


/* ============================================================
   FOOTER
   ============================================================ */

.rto-footer {
    width: 100%;
    flex: 0 0 auto;
    padding-top: 18px;
    padding-bottom: 12px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #e5e7eb;
    font-size: 12px;
    line-height: 1.4;
}

.rto-footer h5,
.rto-footer h6 {
    margin-bottom: 7px;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.rto-footer p {
    color: #cbd5e1;
}

.rto-footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.rto-footer a:hover,
.rto-footer a:focus {
    color: var(--rto-verde-acento);
    text-decoration: underline;
}

.rto-footer hr {
    margin: 12px 0;
    border-color: rgba(255, 255, 255, 0.18);
}

.rto-version {
    font-size: 10.5px;
    letter-spacing: 0.02em;
    opacity: 0.76;
}


/* ============================================================
   WHATSAPP FLOTANTE
   ============================================================ */

.whatsapp-float {
    position: fixed !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 9999 !important;
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #22c55e !important;
    border-radius: 50% !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.30) !important;
    color: #ffffff !important;
    font-size: 30px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease !important;
}

.whatsapp-float:hover,
.whatsapp-float:focus {
    color: #ffffff !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 9px 22px rgba(0, 0, 0, 0.38) !important;
}


/* ============================================================
   ESCRITORIO GRANDE: 1600 PX O MÁS
   ============================================================ */

@media (min-width: 1600px) {
    .sicov-page {
        max-width: 1720px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .sicov-navbar-top {
        padding-right: 20px !important;
        padding-left: 20px !important;
    }

    .sicov-navbar-bottom {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}


/* ============================================================
   ESCRITORIO OPERATIVO: 1200 A 1399 PX
   Incluye principalmente 1360 x 768.
   ============================================================ */

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .sicov-navbar-top {
        min-height: 54px;
        gap: 10px;
        padding: 6px 12px !important;
    }

    .navbar-logo-img {
        height: 40px;
        max-width: 74px;
    }

    .sicov-brand {
        max-width: 47vw;
        gap: 8px !important;
    }

    .sicov-brand-text span {
        font-size: 20px;
    }

    .sicov-brand-text small {
        max-width: 330px;
        font-size: 8.5px;
        letter-spacing: 0.08em;
    }

    .sicov-top-actions {
        gap: 6px;
    }

    .sicov-ingeniero-link,
    .sicov-user-link {
        min-height: 32px !important;
    }

    .sicov-ingeniero-nombre {
        max-width: 165px;
    }

    .sicov-user-name {
        max-width: 115px;
    }

    .sicov-navbar-bottom {
        min-height: 43px;
        padding: 5px 10px !important;
    }

    .sicov-menu {
        min-height: 31px;
        gap: 4px;
    }

    .sicov-menu .nav-link {
        min-height: 31px;
        gap: 4px !important;
        padding: 5px 8px !important;
        font-size: 11px;
    }

    .sicov-menu .nav-link i {
        font-size: 11.5px;
    }

    .sicov-page,
    .sicov-page-fluid {
        padding-top: 10px;
        padding-right: 12px;
        padding-left: 12px;
    }
}


/* ============================================================
   ESCRITORIO MUY AJUSTADO: 1200 A 1279 PX
   ============================================================ */

@media (min-width: 1200px) and (max-width: 1279.98px) {
    .sicov-brand-text small {
        max-width: 250px;
        letter-spacing: 0.055em;
    }

    .sicov-ingeniero-label {
        display: none;
    }

    .sicov-ingeniero-nombre {
        max-width: 140px;
    }

    .sicov-user-name {
        max-width: 90px;
    }

    .sicov-menu .nav-link {
        padding-right: 6px !important;
        padding-left: 6px !important;
        font-size: 10.5px;
    }
}


/* ============================================================
   ALTURA REDUCIDA DE ESCRITORIO
   Optimización específica para pantallas de 768 px de alto.
   ============================================================ */

@media (min-width: 1200px) and (max-height: 800px) {
    .sicov-navbar-top {
        min-height: 52px;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .navbar-logo-img {
        height: 38px;
    }

    .sicov-navbar-bottom {
        min-height: 42px;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .sicov-menu .nav-link {
        min-height: 30px;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .rto-footer {
        padding-top: 14px;
        padding-bottom: 9px;
    }
}


/* ============================================================
   ESCRITORIO: MENÚ SIEMPRE EXPANDIDO DESDE 1200 PX
   ============================================================ */

@media (min-width: 1200px) {
    .sicov-navbar-bottom #mainNav {
        display: flex !important;
        flex-basis: auto !important;
        align-items: center !important;
    }

    .sicov-menu .nav-item.d-xl-none,
    .sicov-menu li.d-xl-none,
    .sicov-menu .sicov-mobile-only,
    .sicov-navbar-bottom .sicov-ingeniero-nav.d-xl-none,
    .sicov-navbar-bottom .sicov-user-mobile.d-xl-none {
        display: none !important;
    }
}


/* ============================================================
   1024 PX, TABLETS Y MENÚ COLAPSADO
   Se aplica por debajo de 1200 px.
   ============================================================ */

@media (max-width: 1199.98px) {
    .sicov-navbar-top {
        min-height: 56px;
        gap: 9px;
        padding: 7px 11px !important;
    }

    .navbar-logo-img {
        height: 40px;
        max-width: 72px;
    }

    .sicov-brand {
        max-width: calc(100vw - 70px);
        gap: 8px !important;
    }

    .sicov-brand-text span {
        font-size: 20px;
    }

    .sicov-brand-text small {
        max-width: 420px;
        font-size: 8.5px;
        letter-spacing: 0.075em;
    }

    .sicov-top-actions {
        display: none !important;
    }

    .sicov-navbar-bottom {
        min-height: 0;
        display: block !important;
        padding: 0 !important;
        background: var(--sicov-surface-muted) !important;
    }

    .sicov-navbar-bottom #mainNav {
        width: 100%;
        padding: 9px 11px 11px;
        background: var(--sicov-surface-muted);
        border-top: 1px solid var(--sicov-border);
    }

    .sicov-menu {
        min-height: 0;
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 5px;
    }

    .sicov-menu .nav-item,
    .sicov-menu .nav-item.d-xl-none {
        width: 100%;
        display: block !important;
    }

    .sicov-menu .nav-link,
    .sicov-menu .sicov-ingeniero-link,
    .sicov-menu .sicov-user-link {
        width: 100% !important;
        min-height: 36px;
        max-width: 100%;
        justify-content: flex-start !important;
        padding: 8px 10px !important;
        border-radius: 7px;
        font-size: 12.5px;
    }

    .sicov-ingeniero-nav,
    .sicov-ingeniero-link,
    .sicov-user-link {
        width: 100%;
        max-width: 100%;
    }

    .sicov-ingeniero-nombre,
    .sicov-user-name {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
    }

    .sicov-navbar .dropdown-menu,
    .dropdown-menu-dark {
        position: static !important;
        width: 100%;
        margin-top: 4px;
        margin-bottom: 5px;
        transform: none !important;
        box-shadow: none !important;
    }

    .sicov-page,
    .sicov-page-fluid {
        padding: 10px 10px 20px;
    }

    .sicov-page-header {
        gap: 9px;
        margin-bottom: 10px;
    }
}


/* ============================================================
   TABLET VERTICAL Y CELULARES GRANDES
   ============================================================ */

@media (max-width: 767.98px) {
    :root {
        --sicov-font-size: 13px;
    }

    .sicov-navbar-top {
        min-height: 52px;
        gap: 7px;
        padding: 6px 8px !important;
    }

    .navbar-logo-img {
        height: 36px;
        max-width: 64px;
    }

    .sicov-brand {
        max-width: calc(100vw - 58px);
        gap: 7px !important;
    }

    .sicov-brand-text span {
        font-size: 18px;
    }

    .sicov-brand-text small {
        max-width: 270px;
        font-size: 7.8px;
        letter-spacing: 0.055em;
    }

    .sicov-toggler {
        min-width: 36px;
        min-height: 32px;
        padding: 3px 6px;
    }

    .sicov-navbar-bottom #mainNav {
        padding: 8px;
    }

    .sicov-menu .nav-link,
    .sicov-menu .sicov-ingeniero-link,
    .sicov-menu .sicov-user-link {
        min-height: 36px;
        padding: 8px 9px !important;
        font-size: 12px;
    }

    .sicov-page,
    .sicov-page-fluid {
        padding: 8px 7px 18px;
    }

    .sicov-page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .sicov-page-title {
        font-size: 19px;
    }

    .card-header,
    .card-body,
    .card-footer {
        padding-right: 10px;
        padding-left: 10px;
    }

    .modal-dialog {
        margin: 8px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-right: 11px;
        padding-left: 11px;
    }

    .modal-footer {
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
    }

    .table > :not(caption) > * > * {
        padding: 6px 7px;
    }

    .rto-footer {
        padding-top: 14px;
        padding-bottom: 10px;
        font-size: 11.5px;
    }

    .whatsapp-float {
        right: 12px !important;
        bottom: 12px !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 28px !important;
    }
}


/* ============================================================
   CELULARES PEQUEÑOS
   ============================================================ */

@media (max-width: 479.98px) {
    .navbar-logo-img {
        height: 33px;
        max-width: 58px;
    }

    .sicov-brand-text span {
        font-size: 16.5px;
    }

    .sicov-brand-text small {
        max-width: 190px;
        font-size: 7.2px;
        letter-spacing: 0.035em;
    }

    .sicov-ingeniero-label {
        display: none;
    }

    .sicov-page-title {
        font-size: 18px;
    }

    .btn {
        white-space: normal;
    }

    .input-group {
        flex-wrap: wrap;
    }

    .input-group > .form-control,
    .input-group > .form-select,
    .input-group > .btn {
        min-width: 0;
    }
}


/* ============================================================
   CELULARES MUY ANGOSTOS
   ============================================================ */

@media (max-width: 359.98px) {
    .sicov-brand-text small {
        display: none;
    }

    .sicov-brand-text span {
        font-size: 16px;
    }

    .navbar-logo-img {
        height: 31px;
    }
}


/* ============================================================
   CELULARES EN HORIZONTAL CON POCA ALTURA
   ============================================================ */

@media (max-width: 1199.98px) and (max-height: 500px) and (orientation: landscape) {
    .sicov-navbar-top {
        min-height: 46px;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    .navbar-logo-img {
        height: 32px;
    }

    .sicov-brand-text span {
        font-size: 16px;
    }

    .sicov-brand-text small {
        display: none;
    }

    .sicov-navbar-bottom #mainNav {
        max-height: calc(100dvh - 46px);
        overflow-y: auto;
    }
}


/* ============================================================
   MOVIMIENTO REDUCIDO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* ============================================================
   IMPRESIÓN
   ============================================================ */

@media print {
    body {
        display: block;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
    }

    .rto-header,
    .rto-footer,
    .whatsapp-float,
    .skip-link,
    .btn,
    .no-print {
        display: none !important;
    }

    main,
    .sicov-main,
    .sicov-page,
    .sicov-page-fluid {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card,
    .sicov-card,
    .modal-content {
        border: 1px solid #b8b8b8 !important;
        box-shadow: none !important;
    }

    a {
        color: #000000 !important;
        text-decoration: none !important;
    }
}


/* ============================================================
   SICOV - Mensajes globales compactos
============================================================ */

.sicov-global-messages {
    width: 100%;
    padding: 0 14px;
    margin: 8px auto 0;
}

.sicov-global-messages .alert {
    position: relative;

    width: 100%;
    max-width: 1620px;
    min-height: 32px;

    margin: 0 auto 6px;
    padding: 6px 38px 6px 11px;

    font-size: 0.78rem;
    line-height: 1.25;

    border-radius: 6px;
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.07);
}

/* Botón X de cierre */

.sicov-global-messages .alert .btn-close {
    position: absolute;
    top: 50%;
    right: 10px;

    width: 9px;
    height: 9px;
    padding: 5px;

    font-size: 0.65rem;

    transform: translateY(-50%);
}

/* Evita márgenes innecesarios dentro del mensaje */

.sicov-global-messages .alert p {
    margin: 0;
}

/* Mensaje con iconos */

.sicov-global-messages .alert i {
    margin-right: 5px;
    font-size: 0.8rem;
}

/* Celulares */

@media (max-width: 575.98px) {
    .sicov-global-messages {
        padding: 0 7px;
        margin-top: 6px;
    }

    .sicov-global-messages .alert {
        min-height: 30px;
        padding: 6px 34px 6px 9px;

        font-size: 0.74rem;
        line-height: 1.2;
    }
}


/* ============================================================
   IDENTIDAD DEL SISTEMA - RESPETAR TEXTO CONFIGURADO
   Mantiene mayúsculas, minúsculas, tildes y caracteres especiales
   exactamente como fueron guardados en la base de datos.
============================================================ */

.sicov-brand-text .sicov-brand-title,
.sicov-brand-text .sicov-brand-subtitle {
    text-transform: none !important;
    font-variant: normal !important;
    font-variant-caps: normal !important;
    font-feature-settings: normal !important;
}

.sicov-brand-text .sicov-brand-title {
    letter-spacing: 0.03em;
}

.sicov-brand-text .sicov-brand-subtitle {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em !important;
    line-height: 1.2;
    unicode-bidi: plaintext;
}
