
.ca-bandeja {
    width: 100%;
    background: #f4f6f9;
    padding: 15px;
    color: #111827;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

.ca-header {
    margin-bottom: 18px;
}

.ca-header h1 {
    margin: 0;
    -webkit-text-stroke: 0.5px black;
    color: rgb(54, 169, 224);
    font-size: 28px;
    font-weight: 700;
}

.ca-header label {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 14px;
}

.ca-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.ca-kpi-card {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    min-height: 95px;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
}

.ca-kpi-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 4px;
    height: 72px;
    border-radius: 10px;
}

.ca-border-blue::before {
    background: #1976d2;
}

.ca-border-red::before {
    background: #ef4444;
}

.ca-border-yellow::before {
    background: #f6c105;
}

.ca-border-green::before {
    background: #16a34a;
}

.ca-kpi-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.ca-kpi-value {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ca-kpi-link {
    font-size: 12px;
    color: #374151;
}

.ca-kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
}

.ca-blue-bg {
    background: #1976d2;
}

.ca-red-bg {
    background: #ef4444;
}

.ca-yellow-bg {
    background: #f6c105;
}

.ca-green-bg {
    background: #16a34a;
}

.ca-blue-text {
    color: #1976d2;
}

.ca-red-text {
    color: #ef4444;
}

.ca-yellow-text {
    color: #c58b00;
}

.ca-green-text {
    color: #16a34a;
}

.ca-filters-card {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 18px;
}

.ca-filters-grid {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.ca-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

/* .ca-field select, */
.ca-field input {
    width: 100%;
    height: 38px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    padding: 0 10px;
    background: #fff;
    outline: none;
    box-sizing: border-box;
}

/* .ca-field select:focus,
.ca-field input:focus {
    border-color: #1976d2;
} */

.ca-search-buttons {
    display: flex;
    gap: 8px;
}

.ca-btn-search,
.ca-btn-clear {
    height: 38px;
    padding: 0 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.ca-btn-search {
    background: #0d5db8;
    color: #fff;
    border: none;
}

.ca-btn-search:hover {
    background: #084d98;
}

.ca-btn-clear {
    background: #fff;
    border: 1px solid #cfd6df;
    color: #374151;
}

.ca-btn-clear:hover {
    background: #f3f4f6;
}

.ca-actions-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ca-action-btn {
    height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: .2s;
}

.ca-action-btn:hover {
    transform: translateY(-1px);
}
.ca-btn-export-excel {
    height: 40px;
    padding: 0 16px;
    border: none;
    border-radius: 4px;
    background: #f8f9fa;
    color: #009d57;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
    transition: .2s ease;
}

.ca-btn-export-excel i {
    color: #009d57;
    font-size: 15px;
}

.ca-btn-export-excel:hover {
    background: #ffffff;
    color: #008849;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .16);
    transform: translateY(-1px);
}

.ca-btn-export-excel:hover i {
    color: #008849;
}
.ca-btn-blue {
    background: #0d6efd;
}

.ca-btn-green {
    background: #198754;
}

.ca-btn-purple {
    background: #6f42c1;
}

.ca-btn-excel {
    background: #198754;
}

.ca-btn-cyan {
    background: #17a2b8;
}

.ca-table-wrapper {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 6px;
    margin-bottom: 14px;
    overflow: hidden;
}

.ca-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.ca-criticality-card {
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    border: 1px solid #d8dee8;
}

.ca-criticality-card span {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.ca-criticality-card small {
    display: block;
    font-size: 11px;
    line-height: 1.4;
}

.ca-criticality-card.low {
    border-color: #3b82f6;
    background: #eff6ff;
    color: #1d4ed8;
}

.ca-criticality-card.medium {
    border-color: #facc15;
    background: #fefce8;
    color: #854d0e;
}

.ca-criticality-card.high {
    border-color: #fb923c;
    background: #fff7ed;
    color: #c2410c;
}

.ca-criticality-card.critical {
    border-color: #ef4444;
    background: #fef2f2;
    color: #b91c1c;
}
.ca-critical-box {
    min-height: 150px;
    overflow: visible;
    padding: 12px;
}

.ca-critical-box h4 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
}

.ca-gauge {
    width: 150px;
    height: 75px;
    margin: 0 auto;
    border-radius: 150px 150px 0 0;
    position: relative;
    overflow: hidden;
}

.ca-gauge::after {
    content: "";
    position: absolute;
    width: 110px;
    height: 55px;
    background: #ffffff;
    border-radius: 110px 110px 0 0;
    left: 20px;
    top: 20px;
    z-index: 2;
}

.ca-gauge.low {
    background: linear-gradient(90deg, #bfdbfe, #60a5fa, #2563eb);
}

.ca-gauge.medium {
    background: linear-gradient(90deg, #fde68a, #facc15, #ca8a04);
}

.ca-gauge.high {
    background: linear-gradient(90deg, #fed7aa, #fb923c, #ea580c);
}

.ca-gauge.critical {
    background: linear-gradient(90deg, #fca5a5, #ef4444, #dc2626);
}

.ca-needle {
    position: absolute;
    width: 55px;
    height: 3px;
    background: #111827;
    left: 75px;
    top: 60px;
    transform-origin: left center;
    z-index: 10;
    transition: transform .25s ease;
}

.ca-gauge.low .ca-needle {
    transform: rotate(-155deg);
}

.ca-gauge.medium .ca-needle {
    transform: rotate(-105deg);
}

.ca-gauge.high .ca-needle {
    transform: rotate(-70deg);
}

.ca-gauge.critical .ca-needle {
    transform: rotate(-40deg);
}

.ca-critical-label {
    display: block;
    text-align: center;
    font-weight: 700;
    margin-top: 10px;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 18px;
}

.ca-critical-label.low {
    color: #2563eb;
}

.ca-critical-label.medium {
    color: #ca8a04;
}

.ca-critical-label.high {
    color: #ea580c;
}

.ca-critical-label.critical {
color: #dc2626;
}        
.ca-quick-action:disabled {
    opacity: .55;
    cursor: not-allowed;
}
#datatableConsumosAtipicos {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
    font-size: 12px;
    color: #000;
}

#datatableConsumosAtipicos th {
    background: #f3f4f6;
    border: 1px solid #d8dee8;
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
}

#datatableConsumosAtipicos td {
    border: 1px solid #e5e7eb;
    padding: 9px 8px;
    text-align: center;
    vertical-align: middle;
}

.ca-dot {
    width: 11px;
    height: 11px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 7px;
}

.ca-dot-red {
    background: #ef4444;
}

.ca-dot-orange {
    background: #f97316;
}

.ca-dot-yellow {
    background: #facc15;
}

.ca-dot-blue {
    background: #2563eb;
}

.ca-variation {
    color: #dc2626;
    font-weight: 700;
}

.ca-pill {
    display: inline-block;
    min-width: 70px;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.ca-pill-critical {
    background: #ef4444;
    color: #fff;
}

.ca-pill-high {
    background: #fb923c;
    color: #fff;
}

.ca-pill-medium {
    background: #facc15;
    color: #111;
}

.ca-pill-low {
    background: #3b82f6;
    color: #fff;
}

.ca-pill-pending {
    background: #fde68a;
    color: #111;
}

.ca-pill-assigned {
    background: #bfdbfe;
    color: #111;
}

.ca-pill-review {
    background: #cbd5e1;
    color: #111;
}

.ca-eye-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    background: #0d5db8;
    color: #fff;
    cursor: pointer;
}

.ca-eye-btn:hover {
    transform: translateY(-1px);
}

.ca-detail-section {
    display: grid;
    grid-template-columns: 1fr 250px;
    gap: 16px;
    margin-top: 15px;
}

.ca-detail-main,
.ca-detail-sidebar-card {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 6px;
}

.ca-detail-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #d8dee8;
}

.ca-detail-head h3 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.ca-detail-code {
    color: #dc2626;
    font-weight: 700;
}

.ca-detail-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    padding: 14px;
}

.ca-subscriber-info {
    font-size: 12px;
}

.ca-subscriber-info div {
    margin-bottom: 10px;
    line-height: 1.4;
}

.ca-consumption-panel h4 {
    text-align: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.ca-bars-chart {
    height: 180px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #d8dee8;
    padding-bottom: 10px;
}

.ca-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ca-bar-col span {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.ca-bar {
    width: 24px;
    border-radius: 3px 3px 0 0;
}

.ca-bar-blue {
    background: #1976d2;
}

.ca-bar-red {
    background: #ef4444;
}

.ca-bar-col small {
    margin-top: 6px;
    font-size: 11px;
}

.ca-resume-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.ca-resume-grid div {
    border: 1px solid #d8dee8;
    text-align: center;
    padding: 10px;
}

.ca-resume-grid small {
    display: block;
    color: #64748b;
    margin-bottom: 6px;
    font-size: 11px;
}

.ca-resume-grid strong {
    font-size: 20px;
    color: #1565c0;
}

.ca-danger-text {
    color: #dc2626 !important;
}

.ca-result-box {
    margin-top: 12px;
    border: 1px solid #22c55e;
    background: #ecfdf5;
    color: #15803d;
    text-align: center;
    padding: 10px;
    border-radius: 4px;
}

.ca-result-box strong {
    display: block;
    margin-top: 4px;
}
.result-box {
    margin-top:12px;
    text-align:center;
    padding:10px;
    border-radius:4px;
    font-weight:600;
}

.result-box strong {
    display:block;
    margin-top:4px;
}

.result-box.low {
    border:1px solid #3b82f6;
    background:#eff6ff;
    color:#1d4ed8;
}

.result-box.medium {
    border:1px solid #facc15;
    background:#fefce8;
    color:#854d0e;
}

.result-box.high {
    border:1px solid #fb923c;
    background:#fff7ed;
    color:#c2410c;
}

.result-box.critical {
    border:1px solid #ef4444;
    background:#fef2f2;
    color:#b91c1c;
}
.ca-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ca-detail-sidebar-card {
    padding: 12px;
}

.ca-detail-sidebar-card h4 {
    text-align: center;
    margin-bottom: 10px;
    font-size: 13px;
}

.ca-quick-action {
    width: 100%;
    height: 34px;
    border: none;
    border-radius: 4px;
    color: white;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 12px;
}

.ca-quick-blue {
    background: #1565c0;
}

.ca-quick-yellow {
    background: #f4b400;
}

.ca-quick-cyan {
    background: #14b8a6;
}

.ca-quick-purple {
    background: #7c3aed;
}
.dot{
    width:11px;
    height:11px;
    display:inline-block;
    border-radius:50%;
    margin-right:7px;
}

.dot.red{background:#ef4444;}
.dot.orange{background:#f97316;}
.dot.yellow{background:#facc15;}
.dot.blue{background:#2563eb;}
.variation{
    font-weight:700;
}

.variation.low{
    color:#2563eb;
}

.variation.medium{
    color:#ca8a04;
}

.variation.high{
    color:#ea580c;
}

.variation.critical{
    color:#dc2626;
}
.pill{
    display:inline-block;
    min-width:70px;
    padding:5px 8px;
    border-radius:4px;
    font-size:11px;
    font-weight:700;
}
.pill.critical{background:#ef4444;color:white;}
.pill.high{background:#fb923c;color:white;}
.pill.medium{background:#facc15;color:#111;}
.pill.low{background:#3b82f6;color:white;}
.pill.pending{background:#fde68a;color:#111;}
.pill.assigned{background:#bfdbfe;color:#111;}
.pill.review{background:#cbd5e1;color:#111;}

.bars-chart {
    height: 180px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid #d8dee8;
    padding-bottom: 10px;
}

.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bar-col span {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 5px;
}

.bar {
    width: 24px;
    border-radius: 3px 3px 0 0;
}

.bar.blue {
    background: #1976d2;
}

.bar.red {
    background: #ef4444;
}

.bar-col small {
    margin-top: 6px;
    font-size: 11px;
}

#detalleResultadoBox {
    display: block !important;
    min-height: 42px !important;
    padding: 10px !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    overflow: visible !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#detalleResultadoBox strong {
    display: block !important;
    margin-top: 4px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#detalleResultadoBox.low {
    border: 1px solid #3b82f6 !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
}

#detalleResultadoBox.medium {
    border: 1px solid #facc15 !important;
    background: #fefce8 !important;
    color: #854d0e !important;
}

#detalleResultadoBox.high {
    border: 1px solid #fb923c !important;
    background: #fff7ed !important;
    color: #c2410c !important;
}

#detalleResultadoBox.critical {
    border: 1px solid #ef4444 !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
}
/* ================================
SELECT2 - TEXTO SELECCIONADO
================================ */

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #cfd6df !important;
    border-radius: 4px !important;
    background-color: #fff !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #1f2937 !important;
    line-height: 38px !important;
    padding-left: 10px !important;
    padding-right: 28px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #64748b !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 6px !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #1976d2 !important;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, .12) !important;
}

.ca-map-window {
    position: fixed;
    top: 110px;
    left: 280px;
    width: 900px;
    height: 550px;
    min-width: 520px;
    min-height: 360px;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    z-index: 9999;
    display: none;
    overflow: hidden;
    resize: both;
}

.ca-map-window.show {
    display: block;
}

.ca-map-header {
    height: 52px;
    background: linear-gradient(135deg, #07192f, #0d5db8);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    cursor: move;
    user-select: none;
}

.ca-map-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ca-map-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.ca-map-close:hover {
    background: rgba(255, 255, 255, .30);
}

.ca-map-body {
    height: calc(100% - 52px);
    padding: 16px;
    background: #f4f6f9;
    box-sizing: border-box;
}

.ca-map-layout {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 14px;
}

.ca-map-sidebar {
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    overflow-y: auto;
}

.ca-map-card-header {
    background: linear-gradient(135deg, #07192f, #0d5db8);
    color: #ffffff;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ca-map-card-header h3 {
    margin: 0;
    font-size: 14px;
}

.ca-map-card-header span {
    font-size: 11px;
    opacity: .9;
}

.ca-map-data {
    padding: 12px;
}

.ca-map-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 9px 0;
}

.ca-map-item label {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 3px;
}

.ca-map-item span {
    font-size: 12px;
    color: #111827;
    font-weight: 600;
    word-break: break-word;
}

#osmMap {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #d8dee8;
}

.ca-map-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    background: #198754;
    color: #fff;
    cursor: pointer;
    margin-left: 4px;
}

.ca-map-btn:hover {
    transform: translateY(-1px);
}
.ca-detail-map-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ca-map-detail-btn,
.ca-map-detail-close-btn {
    height: 34px;
    padding: 0 12px;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.ca-map-detail-btn {
    background: #17a2b8;
}

.ca-map-detail-close-btn {
    background: #dc2626;
}

.ca-map-detail-btn:hover,
.ca-map-detail-close-btn:hover {
    transform: translateY(-1px);
}

@media(max-width: 1200px) {
    .ca-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ca-filters-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .ca-detail-section {
        grid-template-columns: 1fr;
    }

    .ca-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .ca-kpi-grid,
    .ca-filters-grid,
    .ca-resume-grid {
        grid-template-columns: 1fr;
    }

    .ca-search-buttons {
        flex-direction: column;
    }
}

/* =========================================================
   ASIGNAR OPERARIO - Bandeja y formulario
   Reutiliza base visual de Consumos Atípicos:
   ca-bandeja, ca-header, ca-filters-card, ca-field,
   ca-search-buttons, ca-btn-search, ca-btn-clear,
   ca-table-wrapper, ca-table-scroll, ca-pill.
   ========================================================= */

/* Bandeja: grilla específica para los filtros de Asignar Operario */
.ca-filters-grid-asignar-operario {
    grid-template-columns: 1.25fr 1.6fr 1.45fr 1.1fr 1.1fr 1fr 1fr auto;
}

/* Botonera inferior derecha para crear una nueva asignación */
.ca-button-bottom-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 4px;
}

.ca-action-primary {
    min-height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 4px;
    background: #0d6efd;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: .2s ease;
}

.ca-action-primary:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
}

/* Tabla Asignar Operario con el mismo patrón visual de Consumos Atípicos */
#datatableAsignarOperario {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
    font-size: 12px;
    color: #000;
}

#datatableAsignarOperario th {
    background: #f3f4f6;
    border: 1px solid #d8dee8;
    padding: 10px 8px;
    text-align: center;
    font-weight: 700;
}

#datatableAsignarOperario td {
    border: 1px solid #e5e7eb;
    padding: 9px 8px;
    text-align: center;
    vertical-align: middle;
}

/* Acciones de fila */
.ca-row-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 4px;
    background: #0d5db8;
    color: #fff;
    cursor: pointer;
    margin: 0 2px;
}

.ca-row-action-btn:hover {
    transform: translateY(-1px);
}

/* Estados adicionales para Asignar Operario */
.ca-pill-draft {
    background: #e5e7eb;
    color: #111827;
}

.ca-pill-rescheduled {
    background: #ddd6fe;
    color: #4c1d95;
}

.ca-pill-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.ca-pill-closed {
    background: #dcfce7;
    color: #166534;
}

/* =========================================================
   FORMULARIO GLOBAL - Gestión Servicio Público
   Útil para formularioAsignarOperario.php y otros formularios
   ========================================================= */

.ca-form-card {
    background: #fff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 18px;
    box-sizing: border-box;
}

.ca-form-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.ca-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: end;
}

.ca-form-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ca-form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ca-form-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ca-form-grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.ca-form-field {
    width: 100%;
    box-sizing: border-box;
}

.ca-form-field.ca-col-2 {
    grid-column: span 2;
}

.ca-form-field.ca-col-3 {
    grid-column: span 3;
}

.ca-form-field.ca-col-4 {
    grid-column: span 4;
}

.ca-form-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #374151;
}

.ca-form-field label span.required,
.ca-form-field label .required {
    color: #dc2626;
    font-weight: 700;
}

.ca-form-field input,
.ca-form-field select,
.ca-form-field textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    padding: 0 10px;
    background: #fff;
    color: #111827;
    outline: none;
    box-sizing: border-box;
    font-size: 13px;
}

.ca-form-field textarea {
    min-height: 92px;
    padding: 10px;
    resize: vertical;
    line-height: 1.45;
}

.ca-form-field input:focus,
.ca-form-field select:focus,
.ca-form-field textarea:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, .12);
}

.ca-form-field input[readonly],
.ca-form-field textarea[readonly],
.ca-form-field select[readonly],
.ca-form-field input:disabled,
.ca-form-field textarea:disabled,
.ca-form-field select:disabled {
    background: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

.ca-form-field .select2-container {
    width: 100% !important;
    display: block !important;
}

.ca-form-help {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.ca-form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.ca-btn-primary,
.ca-btn-secondary,
.ca-btn-danger {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ca-btn-primary {
    background: #0d5db8;
    color: #fff;
}

.ca-btn-primary:hover {
    background: #084d98;
}

.ca-btn-secondary {
    background: #fff;
    border: 1px solid #cfd6df;
    color: #374151;
}

.ca-btn-secondary:hover {
    background: #f3f4f6;
}

.ca-btn-danger {
    background: #dc2626;
    color: #fff;
}

.ca-btn-danger:hover {
    background: #b91c1c;
}

/* Objetivos múltiples del formulario */
.ca-checkbox-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ca-checkbox-item {
    min-height: 38px;
    border: 1px solid #cfd6df;
    border-radius: 4px;
    padding: 8px 10px;
    background: #fff;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    box-sizing: border-box;
    cursor: pointer;
}

.ca-checkbox-item:hover {
    background: #f8fafc;
    border-color: #1976d2;
}

.ca-checkbox-item input[type="checkbox"] {
    width: auto;
    min-height: auto;
    margin-top: 2px;
}

.ca-checkbox-item span {
    color: #111827;
    font-size: 12px;
    line-height: 1.35;
}

/* Tabla interna simple del formulario, si se requiere */
.ca-inner-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

.ca-inner-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    color: #000;
}

.ca-inner-table th {
    background: #f3f4f6;
    border: 1px solid #d8dee8;
    padding: 9px 8px;
    text-align: center;
    font-weight: 700;
}

.ca-inner-table td {
    border: 1px solid #e5e7eb;
    padding: 8px;
    vertical-align: middle;
}

/* Ajustes responsive de Asignar Operario */
@media(max-width: 1200px) {
    .ca-filters-grid-asignar-operario {
        grid-template-columns: repeat(3, 1fr);
    }

    .ca-form-grid,
    .ca-form-grid-4,
    .ca-form-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .ca-form-field.ca-col-3,
    .ca-form-field.ca-col-4 {
        grid-column: span 2;
    }

    .ca-checkbox-list {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px) {
    .ca-filters-grid-asignar-operario,
    .ca-form-grid,
    .ca-form-grid-2,
    .ca-form-grid-3,
    .ca-form-grid-4,
    .ca-form-grid-5 {
        grid-template-columns: 1fr;
    }

    .ca-form-field.ca-col-2,
    .ca-form-field.ca-col-3,
    .ca-form-field.ca-col-4 {
        grid-column: span 1;
    }

    .ca-form-actions,
    .ca-button-bottom-right {
        justify-content: stretch;
        flex-direction: column;
    }

    .ca-btn-primary,
    .ca-btn-secondary,
    .ca-btn-danger,
    .ca-action-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   MODAL ASIGNACIÓN - CSS EXACTO SEGÚN IMAGEN
   ========================================================================== */

/* ============================================================
   1. HEADER
   ============================================================ */

.asg-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #ffffff;
}

/* ============================================================
   2. FILA DE TARJETAS SUPERIORES
   ============================================================ */

.asg-row-cards {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}

.asg-card-main {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.asg-card-main-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.asg-card-main-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-top: 4px;
}

.asg-card-main-desc {
    font-size: 14px;
    color: #6b7280;
    margin-top: 2px;
}

.asg-tags {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.asg-tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.asg-tag-danger {
    background: #fee2e2;
    color: #dc2626;
}

.asg-tag-warning {
    background: #fef3c7;
    color: #d97706;
}

.asg-tag-primary {
    background: #dbeafe;
    color: #2563eb;
}

.asg-card-metric {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.asg-card-metric i {
    font-size: 18px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.asg-card-metric-label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.asg-card-metric-value {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}

.asg-card-metric-sub {
    font-size: 10px;
    color: #9ca3af;
}

.asg-text-danger {
    color: #dc2626 !important;
}

.asg-text-warning {
    color: #d97706 !important;
}

/* ============================================================
   3. CONTENIDO PRINCIPAL
   ============================================================ */

.asg-row-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 18px;
}

.asg-col-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.asg-col-right {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ============================================================
   4. SECCIONES
   ============================================================ */

.asg-section-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.asg-section-header {
    padding: 14px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.asg-section-header i {
    margin-right: 8px;
    color: #2563eb;
}

.asg-section-body {
    padding: 16px 18px;
}

.asg-section-subtitle {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 14px;
}

/* ============================================================
   5. GRIDS
   ============================================================ */

.asg-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 16px;
}

.asg-info-grid label {
    display: block;
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.asg-info-grid span {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: block;
    margin-top: 2px;
}

.asg-form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.asg-field {
    display: flex;
    flex-direction: column;
}

.asg-field label {
    font-size: 10px;
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.asg-field select,
.asg-field input {
    width: 100%;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0 12px;
    font-size: 13px;
    background: #ffffff;
    transition: border-color 0.2s;
}

.asg-field select:focus,
.asg-field input:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.asg-field input[readonly] {
    background: #f9fafb;
    color: #6b7280;
}

/* ============================================================
   6. TIPO DE VISITA - BOTONES
   ============================================================ */

.asg-finding-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.asg-btn-finding {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.asg-btn-finding:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

.asg-btn-finding.active {
    border-color: #2563eb;
    background: #eff6ff;
}

.asg-btn-finding strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.asg-btn-finding strong i {
    margin-right: 6px;
}

.asg-btn-finding.active strong {
    color: #2563eb;
}

.asg-btn-finding span {
    font-size: 11px;
    color: #9ca3af;
    display: block;
    margin-top: 3px;
}

.asg-btn-finding.active span {
    color: #6b7280;
}

/* ============================================================
   7. TEXTAREA
   ============================================================ */

.asg-textarea-obs {
    width: 100%;
    height: 72px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    resize: vertical;
    font-size: 13px;
    font-family: inherit;
    background: #fafafa;
}

.asg-textarea-obs:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

/* ============================================================
   8. BOTONES
   ============================================================ */

.asg-map-container {
    margin-top: 14px;
}

.asg-btn-map {
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: #4b5563;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.asg-btn-map:hover {
    background: #e5e7eb;
}

.asg-bottom-actions {
    display: flex;
    gap: 12px;
}

/* ============================================================
   9. SIDEBAR
   ============================================================ */

.asg-sidebar-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.asg-sidebar-card span {
    display: block;
    color: #9ca3af;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.asg-sidebar-card strong {
    display: block;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
}

.asg-sidebar-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #111827;
}

.asg-sidebar-card p {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
    line-height: 1.5;
}

/* SIDEBAR - CRÍTICO */
.asg-sidebar-critical {
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.asg-sidebar-critical span {
    color: #dc2626;
}

.asg-sidebar-critical h3 {
    color: #dc2626;
}

.asg-sidebar-critical p {
    color: #dc2626;
}

/* SIDEBAR - ICONOS */
.asg-sidebar-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 12px;
}

.asg-sidebar-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.asg-sidebar-icon.red {
    background: #fee2e2;
    color: #dc2626;
}

.asg-sidebar-icon.green {
    background: #dcfce7;
    color: #16a34a;
}

.asg-sidebar-icon.purple {
    background: #ede9fe;
    color: #7c3aed;
}

/* SIDEBAR - BTN MAPA MINI */
.asg-btn-map-mini {
    width: 100%;
    height: 36px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 12px;
    cursor: pointer;
    background: #ffffff;
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.asg-btn-map-mini:hover {
    background: #f9fafb;
}

/* ============================================================
   10. HISTORIAL
   ============================================================ */

.asg-history {
    margin-top: 8px;
}

.asg-history-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #f3f4f6;
}

.asg-history-row:last-child {
    border-bottom: none;
}

.asg-history-row span {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.asg-history-row strong {
    font-size: 12px;
    color: #4b5563;
    margin: 0;
    font-weight: 500;
}

.asg-btn-history {
    width: 100%;
    height: 36px;
    border: none;
    background: transparent;
    color: #2563eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    margin-top: 10px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.asg-btn-history:hover {
    background: #f3f4f6;
}

/* ============================================================
   11. RESPONSIVE
   ============================================================ */

@media (max-width: 1400px) {
    .asg-row-cards {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .asg-card-main {
        grid-column: span 3;
    }

    .asg-row-content {
        grid-template-columns: 1fr;
    }

    .asg-col-right {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }
}

@media (max-width: 1100px) {
    .asg-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asg-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asg-finding-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .asg-col-right {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .asg-row-cards {
        grid-template-columns: 1fr;
    }

    .asg-card-main {
        grid-column: span 1;
    }

    .asg-col-right {
        grid-template-columns: 1fr;
    }

    .asg-info-grid {
        grid-template-columns: 1fr;
    }

    .asg-form-grid {
        grid-template-columns: 1fr;
    }

    .asg-finding-grid {
        grid-template-columns: 1fr;
    }

    .asg-bottom-actions {
        flex-direction: column;
    }

    .asg-btn-map {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   ASIGNAR OPERARIO - VISTA INDEPENDIENTE
   Este bloque adapta el diseño del modal a una vista cargada en workspace.
   ========================================================================== */

.ao-asg-page {
    width: 100%;
    background: #f4f6f9;
    color: #111827;
    box-sizing: border-box;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 0;
    margin: 0;
}

.asg-page-header {
    background: linear-gradient(135deg, #07192f, #0d5db8);
    color: #ffffff;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

.asg-page-header-left,
.asg-page-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.asg-page-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
}

.asg-page-header span {
    color: #dbeafe;
    font-size: 14px;
}

.asg-page-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    height: 34px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 12px !important;
    font-weight: 800;
    color: #ffffff !important;
    text-transform: uppercase;
}

.asg-page-status-danger {
    background: #ef4444;
}

.asg-page-status-warning {
    background: #f59e0b;
}

.asg-page-status-info {
    background: #2563eb;
}

.asg-page-back {
    width: 40px;
    height: 40px;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 34px;
}

.asg-page-back:hover {
    color: #dbeafe;
}

.asg-page-body {
    padding: 18px;
    background: #f4f6f9;
}

.asg-page-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 14px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-radius: 0 0 8px 8px;
}

.asg-page-footer .btn-light,
.asg-page-footer .btn-primary {
    height: 42px;
    padding: 0 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.asg-page-footer .btn-light {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #111827;
}

.asg-page-footer .btn-light:hover {
    background: #f3f4f6;
}

.asg-page-footer .btn-primary {
    background: #0d5db8;
    color: #ffffff;
}

.asg-page-footer .btn-primary:hover {
    background: #084d98;
}

.asg-field-span-2 {
    grid-column: span 2;
}

.asg-field .select2-container {
    width: 100% !important;
}

.asg-field .select2-container--default .select2-selection--single {
    height: 36px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
}

.asg-field .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    font-size: 13px !important;
    color: #111827 !important;
}

.asg-field .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
}

.asg-btn-finding input[type="checkbox"] {
    display: none;
}

.asg-text-counter {
    text-align: right;
    margin-top: 5px;
    font-size: 11px;
    color: #6b7280;
}

@media (max-width: 768px) {
    .asg-page-header,
    .asg-page-header-left,
    .asg-page-header-right,
    .asg-page-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .asg-page-header-right {
        align-items: flex-end;
    }

    .asg-field-span-2 {
        grid-column: span 1;
    }

    .asg-page-footer .btn-light,
    .asg-page-footer .btn-primary {
        width: 100%;
    }
}
/* ============================================================
   FIX ASIGNAR OPERARIO - SIN SIDEBAR, OBJETIVOS ABAJO
   ============================================================ */

.ao-asg-page .asg-service-program-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 16px !important;
    align-items: stretch !important;
    margin-bottom: 18px !important;
}

.ao-asg-page .asg-service-card,
.ao-asg-page .asg-program-card,
.ao-asg-page .asg-objectives-card,
.ao-asg-page .asg-observations-card {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.ao-asg-page .asg-info-split {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 0 22px !important;
}

.ao-asg-page .asg-info-col + .asg-info-col {
    border-left: 1px solid #e5e7eb !important;
    padding-left: 22px !important;
}

.ao-asg-page .asg-info-item {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: center !important;
    padding: 9px 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
}

.ao-asg-page .asg-info-item > i {
    color: #2563eb !important;
    font-size: 16px !important;
    text-align: center !important;
}

.ao-asg-page .asg-info-item label {
    display: block !important;
    margin: 0 0 2px 0 !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    color: #64748b !important;
}

.ao-asg-page .asg-info-item strong {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
}

.ao-asg-page .asg-btn-map {
    width: 100% !important;
    margin-top: 12px !important;
    height: 34px !important;
    border: 1px solid #bfdbfe !important;
    background: #ffffff !important;
    color: #2563eb !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer !important;
}

.ao-asg-page .asg-program-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px 18px !important;
}

.ao-asg-page .asg-program-grid .asg-field {
    min-width: 0 !important;
    width: 100% !important;
}

.ao-asg-page .asg-program-grid input,
.ao-asg-page .asg-program-grid select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 38px !important;
    box-sizing: border-box !important;
}

.ao-asg-page .asg-program-grid input[readonly] {
    background: #f8fafc !important;
    color: #0f172a !important;
    font-weight: 600 !important;
}

.ao-asg-page .asg-finding-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.ao-asg-page .asg-btn-finding {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) 24px !important;
    gap: 10px !important;
    align-items: flex-start !important;
    min-height: 92px !important;
    padding: 14px 12px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    text-align: left !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.ao-asg-page .asg-btn-finding.active {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

.ao-asg-page .asg-finding-icon {
    width: 30px !important;
    height: 30px !important;
    border-radius: 999px !important;
    background: #eff6ff !important;
    color: #2563eb !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
}

.ao-asg-page .asg-btn-finding.active .asg-finding-icon {
    background: #2563eb !important;
    color: #ffffff !important;
}

.ao-asg-page .asg-finding-content {
    min-width: 0 !important;
}

.ao-asg-page .asg-finding-content strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

.ao-asg-page .asg-finding-content small {
    display: block !important;
    margin-top: 4px !important;
    color: #64748b !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
}

.ao-asg-page .asg-check-circle {
    width: 20px !important;
    height: 20px !important;
    border-radius: 999px !important;
    border: 2px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 10px !important;
    flex-shrink: 0 !important;
}

.ao-asg-page .asg-btn-finding.active .asg-check-circle {
    border-color: #2563eb !important;
    background: #2563eb !important;
    color: #ffffff !important;
}

.ao-asg-page .asg-btn-finding input[type="checkbox"] {
    display: none !important;
}

@media (max-width: 1300px) {
    .ao-asg-page .asg-finding-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1100px) {
    .ao-asg-page .asg-service-program-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .ao-asg-page .asg-info-split,
    .ao-asg-page .asg-program-grid,
    .ao-asg-page .asg-finding-grid {
        grid-template-columns: 1fr !important;
    }

    .ao-asg-page .asg-info-col + .asg-info-col {
        border-left: none !important;
        padding-left: 0 !important;
    }
}
/* ============================================================
   ASIGNAR OPERARIO - PANEL DERECHO DE ALERTA
   ============================================================ */

.ao-asg-page .asg-main-sidebar-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 280px !important;
    gap: 18px !important;
    align-items: start !important;
}

.ao-asg-page .asg-main-content {
    min-width: 0 !important;
}

.ao-asg-page .asg-alert-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    min-width: 0 !important;
}

.ao-asg-page .asg-alert-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 10px !important;
    padding: 20px 18px !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08) !important;
    min-height: 130px !important;
    box-sizing: border-box !important;
}

.ao-asg-page .asg-alert-card-critical {
    background: #fff5f5 !important;
    border-color: #fecaca !important;
}

.ao-asg-page .asg-alert-icon {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
    color: #0f172a !important;
    font-size: 18px !important;
}

.ao-asg-page .asg-alert-label {
    display: block !important;
    margin-bottom: 6px !important;
    color: #94a3b8 !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
}

.ao-asg-page .asg-alert-card strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 22px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

.ao-asg-page .asg-alert-card p {
    margin: 8px 0 0 !important;
    color: #64748b !important;
    font-size: 13px !important;
    line-height: 1.35 !important;
}

.ao-asg-page .asg-alert-card-critical strong,
.ao-asg-page .asg-alert-card-critical p,
.ao-asg-page .asg-alert-card-critical .asg-alert-label {
    color: #dc2626 !important;
}

.ao-asg-page .asg-history-list {
    margin-top: 12px !important;
}

.ao-asg-page .asg-history-row {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #eef2f7 !important;
    align-items: center !important;
}

.ao-asg-page .asg-history-row:last-child {
    border-bottom: none !important;
}

.ao-asg-page .asg-history-row span {
    color: #94a3b8 !important;
    font-size: 12px !important;
}

.ao-asg-page .asg-history-row strong {
    color: #0f172a !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: right !important;
    line-height: 1.25 !important;
}

.ao-asg-page .asg-link-history {
    width: 100% !important;
    margin-top: 12px !important;
    border: none !important;
    background: transparent !important;
    color: #2563eb !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    text-align: center !important;
}

.ao-asg-page .asg-link-history i {
    margin-left: 4px !important;
}

@media (max-width: 1200px) {
    .ao-asg-page .asg-main-sidebar-layout {
        grid-template-columns: 1fr !important;
    }

    .ao-asg-page .asg-alert-sidebar {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .ao-asg-page .asg-alert-sidebar {
        grid-template-columns: 1fr !important;
    }
}
/* ============================================================
   ASIGNAR OPERARIO - PANEL DERECHO / DIRECCIÓN DEL SERVICIO
   ============================================================ */

.ao-asg-page .asg-alert-card-address {
    padding: 18px 20px !important;
    text-align: left !important;
}

.ao-asg-page .asg-address-head {
    display: grid !important;
    grid-template-columns: 32px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.ao-asg-page .asg-address-icon {
    width: 30px !important;
    height: 30px !important;
    color: #1d4ed8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px !important;
}

.ao-asg-page .asg-address-head span {
    color: #34416a !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.ao-asg-page .asg-alert-card-address strong {
    display: block !important;
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    margin: 0 0 4px 44px !important;
    line-height: 1.3 !important;
}

.ao-asg-page .asg-alert-card-address p {
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    margin: 2px 0 0 44px !important;
    line-height: 1.25 !important;
}

.ao-asg-page .asg-btn-side-map {
    height: 36px !important;
    min-width: 150px !important;
    margin: 14px auto 0 auto !important;
    padding: 0 18px !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 6px !important;
    background: #ffffff !important;
    color: #0d5db8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    cursor: pointer !important;
}

.ao-asg-page .asg-btn-side-map:hover {
    background: #eff6ff !important;
    border-color: #60a5fa !important;
}

/* ============================================================
   MAPA FLOTANTE REUTILIZADO DESDE CONSUMOS ATÍPICOS
   ============================================================ */

.ca-map-window {
    position: fixed;
    top: 110px;
    left: 280px;
    width: 900px;
    height: 550px;
    min-width: 520px;
    min-height: 360px;
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    z-index: 9999;
    display: none;
    overflow: hidden;
    resize: both;
}

.ca-map-window.show {
    display: block;
}

.ca-map-header {
    height: 52px;
    background: linear-gradient(135deg, #07192f, #0d5db8);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    cursor: move;
    user-select: none;
}

.ca-map-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ca-map-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, .18);
    color: #ffffff;
}

.ca-map-close:hover {
    background: rgba(255, 255, 255, .30);
}

.ca-map-body {
    height: calc(100% - 52px);
    padding: 16px;
    background: #f4f6f9;
    box-sizing: border-box;
}

.ca-map-layout {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 14px;
}

.ca-map-sidebar {
    background: #ffffff;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    overflow-y: auto;
}

.ca-map-card-header {
    background: linear-gradient(135deg, #07192f, #0d5db8);
    color: #ffffff;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ca-map-card-header h3 {
    margin: 0;
    font-size: 14px;
}

.ca-map-card-header span {
    font-size: 11px;
    opacity: .9;
}

.ca-map-data {
    padding: 12px;
}

.ca-map-item {
    border-bottom: 1px solid #e5e7eb;
    padding: 9px 0;
}

.ca-map-item label {
    display: block;
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 3px;
}

.ca-map-item span {
    font-size: 12px;
    color: #111827;
    font-weight: 600;
    word-break: break-word;
}

#osmMap {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #d8dee8;
}

@media (max-width: 768px) {
    .ca-map-window {
        left: 10px !important;
        top: 70px !important;
        width: calc(100% - 20px) !important;
        height: 520px !important;
        min-width: 0 !important;
    }

    .ca-map-layout {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================================
   ASIGNAR OPERARIO - DATATABLE BADGES / BUTTONS
   ============================================================ */
.ao-pill {
    display: inline-block !important;
    min-width: 70px !important;
    padding: 5px 8px !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-align: center !important;
}

.ao-pill-critical { background: #ef4444 !important; color: #ffffff !important; }
.ao-pill-high { background: #fb923c !important; color: #ffffff !important; }
.ao-pill-medium { background: #facc15 !important; color: #111827 !important; }
.ao-pill-low { background: #3b82f6 !important; color: #ffffff !important; }
.ao-pill-draft { background: #dbeafe !important; color: #1d4ed8 !important; }
.ao-pill-assigned { background: #bfdbfe !important; color: #111827 !important; }
.ao-pill-review { background: #cbd5e1 !important; color: #111827 !important; }
.ao-pill-cancelled { background: #fee2e2 !important; color: #991b1b !important; }
.ao-pill-closed { background: #dcfce7 !important; color: #166534 !important; }

.ao-eye-btn {
    width: 30px !important;
    height: 30px !important;
    border: none !important;
    border-radius: 4px !important;
    background: #0d5db8 !important;
    color: #ffffff !important;
    cursor: pointer !important;
}

.ao-eye-btn:hover {
    transform: translateY(-1px) !important;
}
/* ============================================================
   ASIGNAR OPERARIO - BOTONES DENTRO DEL FORMULARIO
   ============================================================ */

.ao-asg-page .asg-buttons-card {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 14px 18px !important;
    box-sizing: border-box !important;
}

.ao-asg-page .asg-form-buttons-inside {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

.ao-asg-page .asg-btn-form-inside {
    height: 40px !important;
    min-width: 145px !important;
    padding: 0 18px !important;
    border-radius: 6px !important;
    border: none !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: .2s ease !important;
}

.ao-asg-page .asg-btn-form-cancel {
    background: #ffffff !important;
    color: #374151 !important;
    border: 1px solid #cfd6df !important;
}

.ao-asg-page .asg-btn-form-cancel:hover {
    background: #f3f4f6 !important;
}

.ao-asg-page .asg-btn-form-draft {
    background: #f59e0b !important;
    color: #111827 !important;
}

.ao-asg-page .asg-btn-form-draft:hover {
    background: #d97706 !important;
}

.ao-asg-page .asg-btn-form-primary {
    background: #0d5db8 !important;
    color: #ffffff !important;
}

.ao-asg-page .asg-btn-form-primary:hover {
    background: #084d98 !important;
}

.ao-asg-page .asg-page-footer {
    display: none !important;
}

@media (max-width: 768px) {
    .ao-asg-page .asg-form-buttons-inside {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .ao-asg-page .asg-btn-form-inside {
        width: 100% !important;
    }
}

.asg-field select.select2:required:invalid + .select2-container .select2-selection--single {
    border-left: 3px solid #ef4444 !important;
    border-color: #ef4444 !important;
}

.asg-field select.select2:required:valid + .select2-container .select2-selection--single {
    border-left: 1px solid #e5e7eb !important;
    border-color: #e5e7eb !important;
}

.asg-field input[type="date"]:required:invalid,
.asg-field input[type="time"]:required:invalid {
    border-left: 3px solid #ef4444 !important;
    border-color: #ef4444 !important;
}

.asg-field input[type="date"]:required:valid,
.asg-field input[type="time"]:required:valid {
    border-left: 1px solid #e5e7eb !important;
    border-color: #e5e7eb !important;
}

.asg-field input[type="date"]:required:valid:focus,
.asg-field input[type="time"]:required:valid:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08) !important;
}