:root {
    --cmm-azul: #172238;
    --cmm-azul-claro: #2469d5;
    --cmm-fondo: #f7f9fd;
    --cmm-borde: #dce3ee;
    --cmm-texto: #182231;
    --cmm-muted: #657184;
    --cmm-azul-suave: #eaf2ff;
}

#mapa-incidencia { height: min(68vh, 620px); min-height: 360px; }

.active-incident-card { border-left: 4px solid var(--cmm-azul-claro); }
.active-incident-card .card-body { min-width: 0; }

body {
    min-height: 100vh;
    background: var(--cmm-fondo);
    color: #1f2937;
}

.app-header {
    background: #fff;
    border-bottom: 1px solid #e3e9ef;
    min-height: 68px;
}

.navbar-brand {
    letter-spacing: .01em;
    color: var(--cmm-azul);
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 250px;
    padding: 1.5rem 1rem;
    background: var(--cmm-azul);
    color: #fff;
    z-index: 1030;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 .5rem 2.5rem;
    color: #fff;
    text-decoration: none;
}

.sidebar-brand small {
    display: block;
    font-size: .67rem;
    color: #c7d6e3;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #7c9db7;
    border-radius: .6rem;
    font-size: .7rem;
    letter-spacing: .05em;
}

.sidebar-caption,
.sidebar-foot {
    padding: 0 .75rem;
    color: #aabed0;
    font-size: .7rem;
    letter-spacing: .08em;
}

.sidebar-caption {
    margin-bottom: .75rem;
}

.sidebar-nav {
    display: grid;
    gap: .2rem;
}

.sidebar-link,
.mobile-link {
    display: block;
    padding: .65rem .75rem;
    border-radius: .5rem;
    text-decoration: none;
}

.sidebar-link {
    color: #e2ebf2;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: #fff;
    background: #294963;
}

.sidebar-sublink,
.mobile-sublink {
    display: block;
    padding: .4rem .75rem .4rem 2.6rem;
    border-radius: .5rem;
    text-decoration: none;
    font-size: .9rem;
}

.sidebar-sublink { color: #c7d6e3; }
.sidebar-sublink:hover,
.sidebar-sublink.active { color: #fff; background: #294963; }
.mobile-sublink { color: var(--cmm-azul); }
.mobile-sublink:hover { background: #eef3f7; }

.mobile-link {
    color: var(--cmm-azul);
}

.mobile-link:hover {
    background: #eef3f7;
}

.app-shell {
    margin-left: 250px;
}

.app-shell-public {
    margin-left: 0;
}

.header-title {
    font-weight: 600;
    color: var(--cmm-azul);
}

.nav-pendiente {
    opacity: .62;
    cursor: default;
}

.app-main {
    min-height: calc(100vh - 68px);
    max-width: 1600px;
}

.login-area {
    min-height: min(720px, calc(100vh - 170px));
}

.login-card,
.welcome-panel {
    background: #fff;
}

.section-eyebrow {
    color: var(--cmm-azul-claro);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
}

.period-filter .form-control {
    min-width: 145px;
}

.indicator-card,
.dashboard-card {
    border: 1px solid #e3e9ef;
    box-shadow: 0 2px 12px rgba(22, 50, 79, .04);
}

.indicator-label {
    margin-bottom: .8rem;
    color: #647587;
    font-size: .83rem;
}

.indicator-value {
    color: var(--cmm-azul);
    font-size: clamp(1.6rem, 2vw, 2.1rem);
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-card .card-header {
    padding: 1rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #edf1f4;
}

.chart-wrap {
    position: relative;
    min-height: 300px;
    height: 36vh;
    max-height: 420px;
}

.summary-list {
    padding: 0;
    list-style: none;
}

.summary-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .6rem 0;
    border-bottom: 1px solid #edf1f4;
}

.summary-list li:last-child {
    border-bottom: 0;
}

.empty-message {
    color: #6a7b8c;
}

.incident-facts dt {
    color: #647587;
    font-size: .82rem;
    font-weight: 600;
}

.incident-facts dd {
    margin-bottom: 1rem;
    overflow-wrap: anywhere;
}

.incident-text,
.incident-entry {
    overflow-wrap: anywhere;
}

.dashboard-card .table th {
    color: #647587;
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-card .table th,
.dashboard-card .table td {
    padding: .85rem 1rem;
}

.btn-primary {
    --bs-btn-bg: var(--cmm-azul-claro);
    --bs-btn-border-color: var(--cmm-azul-claro);
    --bs-btn-hover-bg: var(--cmm-azul);
    --bs-btn-hover-border-color: var(--cmm-azul);
}

@media (max-width: 991.98px) {
    .app-shell {
        margin-left: 0;
    }
}

@media (max-width: 575.98px) {
    .header-title {
        display: none;
    }

    .user-meta {
        font-size: .7rem;
    }

    .period-filter {
        width: 100%;
    }

    .period-filter > div {
        flex: 1 1 120px;
    }

    .period-filter .form-control {
        min-width: 0;
    }
}

/* Sistema visual institucional del prototipo */

body {
    color: var(--cmm-texto);
    background: var(--cmm-fondo);
    font-size: .95rem;
}

.app-sidebar {
    width: 278px;
    padding: 1.6rem 1.15rem 1.25rem;
    background: #fff;
    color: var(--cmm-texto);
    border-right: 1px solid var(--cmm-borde);
    box-shadow: none;
}

.sidebar-brand {
    gap: .85rem;
    margin: 0 .4rem 2.1rem;
    color: #141b27;
}

.sidebar-brand:hover { color: #141b27; }

.brand-mark {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: .55rem;
    background: var(--cmm-azul);
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
}

.brand-copy strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.sidebar-brand small {
    margin-top: .32rem;
    color: #4b5666;
    font-size: .72rem;
    line-height: 1.25;
}

.sidebar-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    margin: 0 .15rem 1.65rem;
    padding: .65rem 1rem;
    border-radius: .55rem;
    background: #151e30;
    color: #fff;
    text-decoration: none;
    font-weight: 650;
    font-size: .88rem;
}

.sidebar-action:hover,
.sidebar-action:focus-visible { background: #283a5b; color: #fff; }
.sidebar-action .bi { font-size: 1.05rem; line-height: 1; }

.sidebar-caption {
    margin: 0 .85rem .55rem;
    padding: 0;
    color: #8793a4;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.sidebar-nav { gap: .25rem; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 43px;
    padding: .65rem .85rem;
    color: #465161;
    font-size: .9rem;
    font-weight: 560;
    border-radius: .52rem;
}

.nav-symbol {
    width: 20px;
    flex: 0 0 20px;
    color: currentColor;
    font-size: 1.12rem;
    line-height: 1;
    text-align: center;
}

.sidebar-link:hover { background: #eef4ff; color: #1f5ebf; }
.sidebar-link.active,
.sidebar-link.active:hover { background: #256ad4; color: #fff; }
.nav-pendiente { opacity: .66; }
.sidebar-foot {
    margin: 1rem .3rem 0;
    padding: 1.05rem .55rem 0;
    border-top: 1px solid var(--cmm-borde);
    color: #7b8797;
    font-size: .7rem;
    letter-spacing: 0;
    line-height: 1.5;
}

.app-shell { margin-left: 278px; }
.app-shell-public { margin-left: 0; }
.app-header { min-height: 76px; border-bottom-color: var(--cmm-borde); }
.app-header .navbar { min-height: 76px; }
.header-title {
    color: #161c28;
    font-size: clamp(1rem, 1.4vw, 1.28rem);
    font-weight: 750;
    letter-spacing: -.025em;
}

.header-shortcut {
    align-items: center;
    min-height: 30px;
    padding-right: 1.1rem;
    border-right: 1px solid var(--cmm-borde);
    color: #596575;
    text-decoration: none;
    font-size: .8rem;
    font-weight: 650;
}

.header-shortcut:hover { color: var(--cmm-azul-claro); }
.user-meta { line-height: 1.2; }
.app-main {
    max-width: 1700px;
    min-height: calc(100vh - 76px);
    padding-top: 1.8rem !important;
    padding-bottom: 2.5rem !important;
}

.page-heading h1,
.dashboard-heading h1 {
    color: #151b26;
    font-weight: 760;
    letter-spacing: -.035em;
}

.page-heading .text-secondary { color: #5f6a79 !important; }
.section-eyebrow { color: #2867cb; }

.indicator-card,
.dashboard-card,
.login-card {
    border: 1px solid var(--cmm-borde);
    border-radius: .65rem;
    box-shadow: 0 4px 16px rgba(27, 43, 70, .045);
}

.indicator-card .card-body { padding: 1.25rem 1.3rem; }
.indicator-label {
    margin-bottom: 1.1rem;
    color: #586575;
    font-size: .86rem;
    font-weight: 550;
}

.indicator-value {
    color: #151e2a;
    font-size: clamp(1.9rem, 3vw, 2.6rem);
    letter-spacing: -.045em;
}

.dashboard-card .card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e8edf4;
    border-radius: .65rem .65rem 0 0;
}

.dashboard-card .card-header h2 {
    color: #1c2533;
    font-weight: 690;
    letter-spacing: -.015em;
}

.dashboard-card .card-body { padding: 1.25rem; }
.filter-panel .card-header { border-bottom: 0; padding-bottom: .3rem; }
.filter-panel .card-body { padding-top: .7rem; }
.period-panel .card-body { padding: 1rem 1.25rem; }
.period-panel .period-filter > div { flex: 1 1 180px; max-width: 280px; }
.period-panel .period-filter .form-control { width: 100%; }

.form-label {
    margin-bottom: .4rem;
    color: #455060;
    font-size: .82rem;
    font-weight: 650;
}

.form-control,
.form-select {
    min-height: 42px;
    border-color: #ccd7e6;
    border-radius: .48rem;
    background-color: #fff;
    color: #273341;
}

.form-control:focus,
.form-select:focus {
    border-color: #6da4ea;
    box-shadow: 0 0 0 .2rem rgba(37, 106, 212, .13);
}

textarea.form-control { min-height: 120px; }
.btn { border-radius: .5rem; font-weight: 620; }
.btn-primary {
    --bs-btn-bg: #172238;
    --bs-btn-border-color: #172238;
    --bs-btn-hover-bg: #2a4065;
    --bs-btn-hover-border-color: #2a4065;
    --bs-btn-active-bg: #172238;
    --bs-btn-active-border-color: #172238;
    padding: .55rem 1rem;
}

.btn-link { color: #1f62c5; text-decoration: none; }
.btn-link:hover { text-decoration: underline; }
.table-responsive { border-radius: 0 0 .65rem .65rem; }
.dashboard-card .table { color: #344050; }
.dashboard-card .table thead th {
    padding: .9rem 1rem;
    background: #f5f8fc;
    color: #556171;
    border-bottom-color: #dce4ef;
    font-size: .79rem;
    letter-spacing: .012em;
}

.dashboard-card .table tbody tr:nth-child(even) { background: #fafcff; }
.dashboard-card .table td {
    padding: 1rem;
    border-bottom-color: #e5ebf3;
    font-size: .88rem;
}

.dashboard-card .table tr:last-child td { border-bottom: 0; }
.dashboard-card .table td a { text-decoration: none; }
.table-action { color: #2469d5; font-weight: 650; white-space: nowrap; }
.table-action:hover { text-decoration: underline !important; }
.priority-pill {
    display: inline-flex;
    padding: .28rem .65rem;
    border-radius: 999px;
    background: #eef2f7;
    color: #465467;
    font-size: .76rem;
    font-weight: 650;
    white-space: nowrap;
}

.badge { padding: .4em .68em; border-radius: 999px; font-weight: 650; }
.text-bg-warning { background: #fff4d8 !important; color: #906116 !important; }
.text-bg-info { background: #e7f0ff !important; color: #205db8 !important; }
.text-bg-secondary { background: #edf1f6 !important; color: #566274 !important; }
.text-bg-success { background: #e7f7ed !important; color: #247149 !important; }
.text-bg-primary { background: #e8f0ff !important; color: #245eae !important; }

.pagination .page-link { color: #2c5f9e; border-color: #d5deeb; }
.pagination .page-link:hover { background: #eef4ff; }
.chart-wrap { height: 320px; min-height: 250px; max-height: none; }
.summary-list li { border-bottom-color: #e8edf4; }
.summary-list strong { color: #18283d; }
.empty-message { color: #6d7a8b; }

.form-layout { max-width: 1050px; }
.form-layout .dashboard-card { margin-bottom: 1rem !important; }
.incident-quick-page { max-width: 920px; }
.incident-quick-heading { margin-bottom: 1.15rem; }
.incident-quick-back {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .65rem;
    color: #2469c7;
    font-size: .84rem;
    font-weight: 650;
    text-decoration: none;
}
.incident-quick-back:hover { text-decoration: underline; }
.incident-quick-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.incident-quick-card-header .badge { white-space: nowrap; }
.incident-quick-card .card-body { padding: 1.2rem 1.25rem; }
.incident-quick-card .form-label { color: #253246; font-size: .86rem; }
.incident-quick-card textarea.form-control { min-height: 88px; resize: vertical; }
.incident-quick-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr);
    align-items: center;
    gap: 1.5rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid #e8edf4;
    background: #f8fafd;
}
.incident-quick-meta .form-control { max-width: 360px; }
.incident-quick-operator { display: flex; flex-direction: column; gap: .15rem; }
.incident-quick-operator strong { color: #253246; font-size: .9rem; }
.incident-quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid #e8edf4;
}
@media (max-width: 767px) {
    .incident-quick-card-header { align-items: flex-start; flex-direction: column; }
    .incident-quick-meta { grid-template-columns: 1fr; gap: .8rem; }
    .incident-quick-actions { align-items: stretch; flex-direction: column; }
    .incident-quick-actions .d-flex { width: 100%; }
    .incident-quick-actions .btn { flex: 1; }
}
.incident-info-card { border-left: 4px solid #2469d5; }
.incident-facts dt {
    margin-bottom: .25rem;
    color: #66788e;
    font-size: .72rem;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.incident-facts dd { color: #1e2937; font-weight: 560; }
.incident-description {
    padding: 1rem 1.1rem;
    border: 1px solid #dfe6ef;
    border-radius: .5rem;
    background: #f7f9fc;
    line-height: 1.65;
}

.timeline-card .card-body { padding-left: 1.6rem; }
.timeline-entry {
    position: relative;
    margin-left: .5rem;
    padding: .05rem .2rem 1.35rem 1.2rem;
    border-left: 1px solid #ccd7e6;
}

.timeline-entry:last-child { border-left-color: transparent; padding-bottom: .1rem; }
.timeline-marker {
    position: absolute;
    top: .15rem;
    left: -.35rem;
    color: #2469d5;
    font-size: .7rem;
    line-height: 1;
    background: #fff;
}

.followup-card { border-top: 4px solid #2469d5; }
.followup-card .btn-primary { width: 100%; }
.evidence-entry {
    padding: .7rem .9rem;
    border: 1px solid #e0e7f0 !important;
    border-radius: .5rem;
    background: #fbfcff;
}

.evidence-entry + .evidence-entry { margin-top: .7rem; }
.evidence-entry a { color: #1e64c1; font-weight: 630; }

@media (max-width: 1199.98px) {
    .app-sidebar { width: 248px; }
    .app-shell { margin-left: 248px; }
    .app-shell-public { margin-left: 0; }
}

@media (max-width: 991.98px) {
    .app-shell { margin-left: 0; }
    .app-header .navbar { min-height: 68px; }
    .mobile-nav { display: grid; gap: .25rem; border-top: 1px solid var(--cmm-borde); }
    .mobile-link { color: #425168; font-weight: 600; }
    .mobile-link:hover { color: #205eb7; background: #eef4ff; }
    .mobile-nav .sidebar-action { margin: .5rem 0; }
}

@media (max-width: 575.98px) {
    .app-main { padding-top: 1.25rem !important; }
    .page-heading h1 { font-size: 1.65rem; }
    .page-heading .btn { width: 100%; }
    .user-meta { display: none; }
    .dashboard-card .card-body { padding: 1rem; }
    .dashboard-card .table td,
    .dashboard-card .table thead th { padding: .75rem; }
}

/* Acabado coherente para todas las pantallas del sistema. */
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
.app-header { box-shadow: 0 1px 0 rgba(23, 34, 56, .025); }
.app-main { max-width: none; }
.app-sidebar { gap: 0; }
.sidebar-brand { margin-bottom: 2.25rem; }
.sidebar-brand:focus-visible,
.sidebar-link:focus-visible,
.sidebar-action:focus-visible,
.sidebar-sublink:focus-visible,
.mobile-link:focus-visible,
.btn:focus-visible,
.page-link:focus-visible {
    outline: 3px solid var(--cmm-azul-claro);
    outline-offset: 2px;
}
.sidebar-link:hover { background: var(--cmm-azul-suave); color: var(--cmm-azul-claro); }
.sidebar-link.active,
.sidebar-link.active:hover,
.sidebar-sublink.active { background: var(--cmm-azul-claro); color: #fff; }
.sidebar-sublink { color: var(--cmm-muted); }
.sidebar-sublink:hover { background: var(--cmm-azul-suave); color: var(--cmm-azul-claro); }
.sidebar-foot { color: var(--cmm-muted); }
.sidebar-action,
.btn-primary {
    background: var(--cmm-azul);
    border-color: var(--cmm-azul);
}
.btn-primary {
    --bs-btn-bg: var(--cmm-azul);
    --bs-btn-border-color: var(--cmm-azul);
    --bs-btn-hover-bg: #283957;
    --bs-btn-hover-border-color: #283957;
    --bs-btn-focus-shadow-rgb: 36, 105, 213;
}
.btn-outline-primary {
    --bs-btn-color: var(--cmm-azul-claro);
    --bs-btn-border-color: #adc7ec;
    --bs-btn-hover-bg: var(--cmm-azul-claro);
    --bs-btn-hover-border-color: var(--cmm-azul-claro);
    --bs-btn-focus-shadow-rgb: 36, 105, 213;
}
.btn-outline-secondary {
    --bs-btn-color: #465467;
    --bs-btn-border-color: #c6d1e0;
    --bs-btn-hover-bg: #eef2f7;
    --bs-btn-hover-color: var(--cmm-azul);
    --bs-btn-hover-border-color: #b8c7d9;
}
.page-heading { margin-bottom: 1.5rem !important; }
.page-heading h1 { font-size: clamp(1.65rem, 2.35vw, 2.25rem); }
.page-heading .text-secondary { font-size: .94rem; }
.dashboard-card,
.indicator-card,
.login-card { box-shadow: 0 4px 18px rgba(23, 34, 56, .055); }
.indicator-card { position: relative; overflow: hidden; }
.indicator-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--cmm-azul-claro);
    opacity: .72;
}
.indicator-card .card-body { min-height: 112px; }
.indicator-label { margin-bottom: .7rem; padding-right: 2.8rem; }
.indicator-value { font-variant-numeric: tabular-nums; }
.indicator-icon {
    position: absolute;
    top: 1.15rem;
    right: 1.2rem;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .55rem;
    background: var(--cmm-azul-suave);
    color: var(--cmm-azul-claro);
    font-size: 1.1rem;
}
.dashboard-card .card-header { min-height: 58px; display: flex; align-items: center; }
.filter-panel .card-header { min-height: 50px; }
.dashboard-card .table tbody tr { --bs-table-bg: transparent; }
.dashboard-card .table tbody tr:hover { --bs-table-hover-bg: #f0f5fc; }
.dashboard-card .table td,
.dashboard-card .table th { vertical-align: middle; }
.dashboard-card .table td:first-child a { color: var(--cmm-azul-claro); }
.form-control::placeholder { color: #8390a1; opacity: 1; }
.form-control,
.form-select { transition: border-color .15s ease, box-shadow .15s ease; }
.form-text { color: var(--cmm-muted); font-size: .76rem; }
.pagination .page-link { color: var(--cmm-azul-claro); }
.pagination .active .page-link { background: var(--cmm-azul-claro); border-color: var(--cmm-azul-claro); }
.incident-quick-page { max-width: 1040px; }
.incident-quick-card .card-body { padding: 1.4rem; }
.incident-quick-card .card-header { background: #fff; }
.incident-quick-meta { background: #f7faff; }
.incident-quick-actions { background: #fff; }
.incident-info-card { border-left-color: var(--cmm-azul-claro); }
.timeline-marker { color: var(--cmm-azul-claro); }
.followup-card { border-top-color: var(--cmm-azul-claro); }
.incident-quick-back,
.table-action,
.evidence-entry a { color: var(--cmm-azul-claro); }
.chart-wrap { min-height: 280px; }

/* Acceso: misma identidad visual, sin añadir pasos al ingreso. */
.app-shell-public .app-header { display: none; }
.app-shell-public .app-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-block: 2rem !important;
}
.app-shell-public .login-area { width: 100%; min-height: 0; }
.login-card { overflow: hidden; }
.login-intro {
    padding: 2.5rem 2.5rem 2rem;
    background: #fbfcff;
    border-bottom: 1px solid var(--cmm-borde);
}
.login-intro h1 { max-width: 19rem; margin-inline: auto; font-weight: 750; letter-spacing: -.035em; }
.login-intro p { max-width: 21rem; margin-inline: auto; }
.login-mark {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1.15rem;
    border-radius: .8rem;
    background: var(--cmm-azul-suave);
    color: var(--cmm-azul-claro);
    font-size: 1.75rem;
}
.login-body { padding: 2rem 2.5rem 2.25rem; }
.login-body .btn { min-height: 44px; }
.login-foot {
    padding: .8rem 1rem;
    border-top: 1px solid var(--cmm-borde);
    background: #fbfcff;
    color: var(--cmm-muted);
    font-size: .73rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 575.98px) {
    .login-intro { padding: 2rem 1.25rem 1.5rem; }
    .login-body { padding: 1.5rem 1.25rem; }
    .indicator-card .card-body { min-height: 100px; }
}

/* En la ficha, el siguiente paso operativo precede a los datos complementarios. */
.incident-next-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid #c8daf5;
    border-left: 4px solid var(--cmm-azul-claro);
    border-radius: .65rem;
    background: #f1f6ff;
}
.incident-next-icon {
    display: grid;
    flex: 0 0 2.6rem;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: .65rem;
    background: #dceaff;
    color: var(--cmm-azul-claro);
    font-size: 1.3rem;
}
.incident-next-copy { flex: 1; min-width: 0; }
.incident-next-copy h2 { color: var(--cmm-azul); font-weight: 700; }
.incident-next-copy p { color: #43546d; font-size: .88rem; line-height: 1.5; }
.incident-next-action { flex: 0 0 auto; white-space: nowrap; }
.incident-more-details {
    padding-top: .85rem;
    border-top: 1px solid var(--cmm-borde);
}
.incident-more-details summary,
.incident-optional summary {
    width: fit-content;
    color: var(--cmm-azul-claro);
    font-size: .88rem;
    font-weight: 650;
    cursor: pointer;
}
.incident-more-details summary:focus-visible,
.incident-optional summary:focus-visible {
    outline: 3px solid var(--cmm-azul-claro);
    outline-offset: 3px;
    border-radius: .2rem;
}
.incident-optional[open] summary { margin-bottom: .2rem; }
.followup-card h2 { scroll-margin-top: 1rem; }
.followup-card .card-body { padding-top: 1.1rem; }
.followup-card textarea.form-control { min-height: 85px; }

@media (max-width: 767.98px) {
    .incident-next-step { flex-wrap: wrap; align-items: flex-start; }
    .incident-next-copy { flex-basis: calc(100% - 3.6rem); }
    .incident-next-action { width: 100%; }
}

/* Panel personal del operador: calendario y tareas, sin gráficos generales. */
.operator-calendar-card { overflow: hidden; }
.operator-calendar-card .card-header { padding: 1.15rem 1.25rem; }
.operator-calendar-card .card-header h2 { color: var(--cmm-azul); }
.operator-calendar-nav { display: flex; align-items: center; gap: .6rem; }
.operator-calendar-nav .btn { display: grid; place-items: center; min-width: 34px; min-height: 34px; padding: .2rem; }
.operator-calendar-month { min-width: 8rem; color: var(--cmm-azul); font-size: .88rem; font-weight: 700; text-align: center; }
.operator-calendar-scroll { overflow-x: auto; }
.operator-calendar { width: 100%; min-width: 680px; table-layout: fixed; border-collapse: collapse; }
.operator-calendar th {
    padding: .65rem .5rem;
    border-bottom: 1px solid var(--cmm-borde);
    color: var(--cmm-muted);
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}
.operator-calendar td {
    height: 104px;
    padding: .5rem;
    border: 1px solid #e9eef5;
    vertical-align: top;
    overflow-wrap: anywhere;
}
.operator-calendar tbody tr td:first-child { border-left: 0; }
.operator-calendar tbody tr td:last-child { border-right: 0; }
.operator-calendar tbody tr:last-child td { border-bottom: 0; }
.operator-calendar-empty { background: #fafbfd; }
.operator-calendar-today { background: #f5f9ff; }
.operator-calendar-day {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    margin-bottom: .35rem;
    border-radius: 50%;
    color: #536177;
    font-size: .75rem;
    font-weight: 650;
}
.operator-calendar-today .operator-calendar-day { background: var(--cmm-azul-claro); color: #fff; }
.operator-calendar-shift {
    display: grid;
    gap: .08rem;
    margin-bottom: .25rem;
    padding: .35rem .45rem;
    border-left: 3px solid var(--cmm-azul-claro);
    border-radius: .3rem;
    background: var(--cmm-azul-suave);
    color: var(--cmm-azul);
    font-size: .68rem;
    line-height: 1.3;
}
.operator-calendar-shift strong { font-weight: 700; }
.operator-calendar-shift span { color: #4d6384; }
.operator-calendar-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--cmm-borde);
    color: var(--cmm-muted);
    font-size: .78rem;
}
.operator-calendar-footer a { color: var(--cmm-azul-claro); font-weight: 650; text-decoration: none; }
.operator-calendar-footer a:hover { text-decoration: underline; }
.operator-calendar-key { display: inline-block; width: .7rem; height: .7rem; margin-right: .3rem; border-radius: .2rem; background: var(--cmm-azul-claro); vertical-align: middle; }
.operator-shift-card { border-top: 3px solid var(--cmm-azul-claro); }
.operator-shift-item { display: grid; gap: .15rem; padding: .85rem 1rem; border-radius: .5rem; background: var(--cmm-azul-suave); }
.operator-shift-item + .operator-shift-item { margin-top: .65rem; }
.operator-shift-item strong { color: var(--cmm-azul); }
.operator-shift-item span { color: #51617a; font-size: .86rem; }
.operator-upcoming-item { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; }
.operator-upcoming-item + .operator-upcoming-item { border-top: 1px solid #e9eef5; }
.operator-upcoming-date { display: grid; flex: 0 0 2.7rem; place-items: center; padding: .25rem; border-radius: .45rem; background: var(--cmm-azul-suave); color: var(--cmm-azul-claro); line-height: 1.1; }
.operator-upcoming-date strong { font-size: 1rem; }
.operator-upcoming-date small { font-size: .66rem; text-transform: uppercase; }
.operator-upcoming-item > span:last-child { display: grid; min-width: 0; gap: .1rem; }
.operator-upcoming-item > span:last-child strong { color: var(--cmm-azul); font-size: .87rem; }
.operator-upcoming-item > span:last-child small { color: var(--cmm-muted); }
.operator-incident { display: flex; align-items: center; gap: .85rem; padding: 1rem 1.25rem; color: inherit; text-decoration: none; }
.operator-incident + .operator-incident { border-top: 1px solid #e9eef5; }
.operator-incident:hover { background: #f5f9ff; color: inherit; }
.operator-incident-icon { display: grid; flex: 0 0 2.1rem; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: .5rem; background: var(--cmm-azul-suave); color: var(--cmm-azul-claro); }
.operator-incident-main { display: grid; flex: 1; min-width: 0; gap: .15rem; }
.operator-incident-main strong { color: var(--cmm-azul); font-size: .9rem; }
.operator-incident-main small { color: var(--cmm-muted); overflow-wrap: anywhere; }
.operator-incident-arrow { color: var(--cmm-muted); }

@media (min-width: 1200px) {
    .operator-calendar { min-width: 0; }
    .operator-calendar th { padding-inline: .2rem; font-size: .66rem; }
}

@media (max-width: 575.98px) {
    .operator-calendar-card .card-header { align-items: flex-start; }
    .operator-calendar-nav { width: 100%; justify-content: space-between; }
    .operator-incident { flex-wrap: wrap; }
    .operator-incident .badge { margin-left: 2.95rem; }
    .operator-incident-arrow { margin-left: auto; }
}

/* Ritmo común: más información visible sin sacrificar legibilidad ni controles táctiles. */
.skip-link {
    position: fixed;
    top: .5rem;
    left: .5rem;
    z-index: 1100;
    transform: translateY(-160%);
    padding: .55rem .85rem;
    border-radius: .4rem;
    background: var(--cmm-azul);
    color: #fff;
}
.skip-link:focus { transform: translateY(0); color: #fff; }
.app-sidebar { width: 252px; padding: 1.15rem .85rem 1rem; }
.app-shell { margin-left: 252px; }
.app-shell-public { margin-left: 0; }
.sidebar-brand { margin: 0 .45rem 1.4rem; }
.sidebar-action { margin-bottom: 1.1rem; }
.sidebar-nav { gap: .1rem; overflow-y: auto; min-height: 0; }
.sidebar-link { min-height: 40px; padding: .5rem .75rem; }
.sidebar-sublink { padding: .32rem .65rem .32rem 2.5rem; font-size: .82rem; }
.sidebar-sublink.active, .sidebar-sublink.active:hover { background: var(--cmm-azul-suave); color: var(--cmm-azul-claro); font-weight: 700; }
.sidebar-foot { flex: none; margin-top: .7rem !important; }
.app-header, .app-header .navbar { min-height: 64px; }
.app-main { min-height: calc(100vh - 64px); padding-top: 1.35rem !important; padding-bottom: 2rem !important; }
.header-title { font-size: 1rem; }
.header-title-place { color: var(--cmm-muted); font-weight: 550; }
.page-heading { margin-bottom: 1.1rem !important; }
.page-heading h1 { font-size: clamp(1.55rem, 2.15vw, 2rem); }
.page-heading .text-secondary { line-height: 1.4; }
.section-eyebrow { margin-bottom: .2rem !important; }
.dashboard-card, .indicator-card { box-shadow: 0 2px 10px rgba(23, 34, 56, .045); }
.dashboard-card .card-header { min-height: 48px; padding: .7rem 1rem; }
.dashboard-card .card-header h2, .dashboard-card .card-header h3 { font-size: 1rem; }
.dashboard-card .card-body { padding: 1rem; }
.filter-panel .card-header { min-height: 42px; padding-bottom: .1rem; }
.filter-panel .card-body { padding: .75rem 1rem 1rem; }
.filter-panel:not(:has(.card-header)) .card-body { padding-top: 1rem; }
.filter-panel .row { --bs-gutter-y: .75rem; }
.filter-actions { align-items: flex-end; }
.filter-actions .btn { white-space: nowrap; }
.indicator-card .card-body { min-height: 94px; padding: .9rem 1rem; }
.indicator-label { margin-bottom: .4rem; font-size: .8rem; }
.indicator-value { font-size: clamp(1.65rem, 2.3vw, 2.2rem); }
.indicator-icon { top: .85rem; right: .9rem; width: 2rem; height: 2rem; font-size: 1rem; }
.dashboard-card .table thead th { padding: .7rem .8rem; }
.dashboard-card .table td, .dashboard-card .table tbody th { padding: .7rem .8rem; line-height: 1.4; }
.dashboard-card .table td { overflow-wrap: anywhere; }
.dashboard-card .table td:has(.btn) { white-space: nowrap; }
.dashboard-card .table .btn-sm { white-space: nowrap; }
.btn-primary.btn-sm { padding: .3rem .65rem; }
.form-label { margin-bottom: .3rem; }
.form-control, .form-select { min-height: 40px; }
.form-control-sm, .form-select-sm { min-height: 34px; }
.form-text { margin-top: .25rem; }
.chart-wrap { height: 280px; min-height: 240px; }
.incident-quick-page { max-width: 1150px; }
.incident-quick-card .card-body { padding: 1rem; }
.incident-quick-meta, .incident-quick-actions { padding: .75rem 1rem; }
.incident-quick-actions { position: sticky; bottom: 0; z-index: 5; box-shadow: 0 -4px 14px rgba(23, 34, 56, .07); }
.incident-quick-card textarea.form-control { min-height: 76px; }
.incident-facts dd { margin-bottom: .7rem; }
.incident-description { padding: .75rem .9rem; line-height: 1.55; }
.empty-state { display: grid; justify-items: center; gap: .3rem; padding: 2rem 1rem; text-align: center; }
.empty-state > .bi { color: #9babc0; font-size: 1.65rem; }
.empty-state a { color: var(--cmm-azul-claro); font-size: .87rem; font-weight: 650; text-decoration: none; }
.empty-state a:hover { text-decoration: underline; }
.report-more-metrics { border: 1px solid var(--cmm-borde); border-radius: .65rem; background: #fff; }
.report-more-metrics summary { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; color: var(--cmm-azul-claro); font-size: .88rem; font-weight: 700; cursor: pointer; list-style: none; }
.report-more-metrics summary::-webkit-details-marker { display: none; }
.report-more-metrics summary:focus-visible { outline: 3px solid var(--cmm-azul-claro); outline-offset: 2px; }
.report-more-metrics[open] summary .bi { transform: rotate(180deg); }
.report-more-metrics > .row { margin: 0; padding: 0 .25rem 1rem; }
.camera-map { height: min(52vh, 460px); min-height: 320px; background: #eaf2f8; }
.camera-map-link { color: var(--cmm-azul-claro); font-weight: 650; text-decoration: none; white-space: nowrap; }
.camera-map-link:hover { text-decoration: underline; }
.camera-type-form { max-width: 760px; }
.camera-form { max-width: 1020px; }
.pagination { margin-bottom: 0; }

/* Reportes: lectura progresiva y una sola escala visual. */
.report-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .9rem 1.5rem; }
.report-links { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.report-links a { color: var(--cmm-azul-claro); font-size: .86rem; font-weight: 650; text-decoration: none; white-space: nowrap; }
.report-links a:hover { text-decoration: underline; }
.report-disclosure, .report-panel, .report-summary-card, .report-empty { border: 1px solid var(--cmm-borde); border-radius: .7rem; background: #fff; box-shadow: 0 2px 8px rgba(23, 34, 56, .035); }
.report-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .88rem 1rem; color: var(--cmm-texto); font-size: .93rem; font-weight: 700; cursor: pointer; list-style: none; }
.report-disclosure summary::-webkit-details-marker { display: none; }
.report-disclosure summary:focus-visible { outline: 3px solid var(--cmm-azul-claro); outline-offset: 2px; }
.report-disclosure-hint { color: var(--cmm-muted); font-size: .8rem; font-weight: 500; text-align: right; }
.report-disclosure[open] summary { border-bottom: 1px solid #e9eef5; }
.report-disclosure[open] summary .report-disclosure-hint > .bi { display: inline-block; transform: rotate(180deg); }
.report-disclosure-body { padding: 1rem; }
.report-filters .report-disclosure-body { padding: 0; }
.report-filters .filter-panel { margin: 0 !important; border: 0; box-shadow: none; }
.report-summary-card .card-body { display: flex; flex-direction: column; gap: .15rem; min-height: 112px; padding: 1rem 1.15rem; }
.report-summary-label { color: var(--cmm-muted); font-size: .84rem; font-weight: 600; }
.report-summary-value { color: var(--cmm-azul); font-size: clamp(1.85rem, 2.6vw, 2.35rem); line-height: 1.15; }
.report-summary-note { color: var(--cmm-muted); font-size: .76rem; }
.report-panel .card-body { padding: 1.2rem; }
.report-panel-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 1rem; }
.report-panel h2, .report-panel h3 { color: var(--cmm-texto); font-weight: 700; }
.report-trend-chart { height: 270px; min-height: 270px; }
.report-detail-chart { height: 250px; min-height: 250px; }
.report-chart-empty { display: grid; place-items: center; height: 100%; margin: 0; color: var(--cmm-muted); font-size: .88rem; text-align: center; }
.report-bars { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.report-bar-label { display: flex; justify-content: space-between; gap: .75rem; margin-bottom: .4rem; color: var(--cmm-texto); font-size: .85rem; }
.report-bar-label > span { overflow-wrap: anywhere; }
.report-bar-label strong { flex: none; white-space: nowrap; font-weight: 700; }
.report-bar-label small { color: var(--cmm-muted); font-size: .76rem; font-weight: 500; }
.report-bar-track { height: 7px; overflow: hidden; border-radius: 999px; background: #edf1f6; }
.report-bar-track > span { display: block; height: 100%; border-radius: inherit; background: var(--cmm-azul-claro); }
.report-temporal-highlights { display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; }
.report-temporal-highlights p { display: flex; gap: .5rem; color: var(--cmm-muted); font-size: .84rem; }
.report-temporal-highlights strong { color: var(--cmm-texto); }
.report-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .85rem 1.4rem; }
.report-facts div { padding-bottom: .7rem; border-bottom: 1px solid #edf1f5; }
.report-facts dt { color: var(--cmm-muted); font-size: .8rem; font-weight: 500; }
.report-facts dd { margin: .2rem 0 0; color: var(--cmm-texto); font-weight: 700; }
.report-empty .card-body { display: grid; justify-items: center; gap: .35rem; padding: 2.5rem 1rem; text-align: center; }
.report-empty .bi { margin-bottom: .25rem; color: #92a7c4; font-size: 1.8rem; }
@media (max-width: 575.98px) {
    .report-links { gap: .5rem .85rem; }
    .report-disclosure-hint { max-width: 45%; }
    .report-panel .card-body { padding: 1rem; }
    .report-trend-chart { height: 220px; min-height: 220px; }
    .report-temporal-highlights p { flex-direction: column; gap: 0; }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
    .app-sidebar { width: 232px; }
    .app-shell { margin-left: 232px; }
}
@media (max-width: 991.98px) {
    .app-shell { margin-left: 0; }
    .app-header .navbar { min-height: 64px; }
    .mobile-nav { max-height: calc(100vh - 110px); overflow-y: auto; }
    .mobile-link, .mobile-sublink { padding-block: .45rem; }
}
@media (max-width: 767.98px) {
    .app-main { padding-top: 1rem !important; }
    .header-title-place { display: none; }
    .page-heading { align-items: stretch !important; }
    .filter-actions { width: 100%; }
    .filter-actions .btn { flex: 1; }
    .dashboard-card .table { min-width: 650px; }
    .dashboard-card .table.table-sm { min-width: 500px; }
    .operator-calendar td { height: 90px; }
}
@media (max-width: 575.98px) {
    .app-header .navbar { gap: .5rem; }
    .app-header .navbar .gap-3 { gap: .5rem !important; }
    .app-header .navbar .btn-sm { padding: .35rem .5rem; }
    .page-heading .btn { width: auto; }
    .page-heading > .btn, .page-heading > .d-flex { width: 100%; }
    .page-heading > .d-flex .btn { flex: 1; }
    .indicator-card .card-body { min-height: 90px; }
    .filter-panel .card-body, .dashboard-card .card-body { padding: .85rem; }
    .filter-actions .btn { white-space: normal; }
    .incident-quick-actions .btn { min-height: 42px; }
}
