:root {
    --zc-bg: #f1f5f9;
    --zc-carbon: #0f2038;
    --zc-slate: #1e3a5f;
    --zc-indigo: #1d4ed8;
    --zc-indigo-light: #eff6ff;
    --zc-cyan: #0284c7;
    --zc-teal: #0d9488;
    --zc-emerald: #059669;
    --zc-amber: #d97706;
    --zc-rose: #e11d48;
}

body {
    background-color: var(--zc-bg);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #0f172a;
    margin: 0;
    overflow-x: hidden;
}

/* ==================== BLINDAJE ANTI-BLOQUEO DE PANTALLA GRIS EN MODALES ==================== */
.modal-backdrop {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}
.modal.show {
    display: block !important;
    opacity: 1 !important;
    background-color: rgba(15, 32, 56, 0.65) !important;
    backdrop-filter: blur(2px);
    z-index: 1060 !important;
    overflow-x: hidden;
    overflow-y: auto;
}
.modal-dialog {
    z-index: 1065 !important;
    pointer-events: auto !important;
}

/* ==================== NAVBAR CORPORATIVO ==================== */
.zc-navbar {
    background: linear-gradient(90deg, #0a1628 0%, #0f2038 55%, #1e3a5f 100%);
    min-height: 60px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid var(--zc-cyan);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.16);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.zc-hamburger {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    padding: 0;
    flex-shrink: 0;
}
.zc-hamburger:hover, .zc-hamburger:focus {
    background: var(--zc-indigo);
    color: #ffffff;
}
.zc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.zc-brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1d4ed8, #0d9488);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.zc-brand-title {
    display: block;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 1px;
    color: #ffffff;
    line-height: 1.1;
}
.zc-brand-sub {
    display: block;
    font-size: 0.62rem;
    color: #38bdf8;
    letter-spacing: 1.5px;
    font-weight: 700;
}
.zc-nav-links { gap: 5px; }
.zc-nav-item {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.zc-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.zc-nav-item.active {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}
.zc-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.07);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}
.zc-status-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
}
.zc-user-name { font-size: 0.78rem; font-weight: 700; color: #fff; line-height: 1; white-space: nowrap; }
.zc-user-rut { font-size: 0.65rem; color: #94a3b8; }
.zc-btn-logout {
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
    border: 1px solid rgba(244, 63, 94, 0.3);
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.zc-btn-logout:hover { background: var(--zc-rose); color: #fff; }

/* MENÚ LATERAL DESPLEGABLE (CELULAR Y TABLET) */
.zc-offcanvas {
    background: linear-gradient(180deg, #0a1628 0%, #0f2038 100%);
    color: #ffffff;
    width: 280px !important;
    border-right: 2px solid var(--zc-cyan);
}
.zc-offcanvas-header {
    background: rgba(10, 22, 40, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 16px;
}
.zc-mobile-link {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 11px 14px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s ease;
}
.zc-mobile-link:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; }
.zc-mobile-link.active {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    color: #ffffff;
}

/* ==================== ALERTAS ==================== */
.zc-alert-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
    border-radius: 10px;
    font-weight: 600;
}
.zc-alert-danger {
    background: #fff1f2;
    border: 1px solid #fda4af;
    color: #9f1239;
    border-radius: 10px;
    font-weight: 600;
}

/* ==================== PANELES CORPORATIVOS (.zc-panel) ==================== */
.zc-panel {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 14px rgba(15, 32, 56, 0.06);
    overflow: hidden;
}
.zc-panel-header {
    background: linear-gradient(90deg, #0f2038 0%, #1e3a5f 100%);
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--zc-cyan);
}
.zc-panel-title {
    font-size: 0.92rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.zc-panel-body { padding: 16px; }

.zc-form-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.zc-section-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}
.zc-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--zc-carbon);
}
.zc-step-num {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    flex-shrink: 0;
}

/* ==================== FORMULARIOS Y SELECTS SIN TEXTO CORTADO ==================== */
.zc-filter-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 4px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
input.zc-input,
textarea.zc-input,
.form-control-sm {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.82rem;
    padding: 6px 10px;
    min-height: 34px;
}
/* Importante: Reserva 30px a la derecha en todos los select para que la flecha nunca pise el texto */
select.zc-input,
.form-select,
.form-select-sm {
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.82rem;
    padding: 6px 30px 6px 10px !important;
    background-position: right 0.55rem center !important;
    min-height: 34px;
    text-overflow: ellipsis;
}
.zc-input:focus, .form-control-sm:focus, .form-select-sm:focus {
    border-color: var(--zc-indigo);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

/* ==================== BOTONES UNIFORMES (SIN PARTIRSE EN 2 LÍNEAS) ==================== */
.btn {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 600;
}
.zc-btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    min-height: 34px;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.22);
}
.zc-btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: #fff !important;
}
.zc-btn-emerald {
    background: linear-gradient(135deg, #0d9488, #059669);
    color: #fff !important;
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    border-radius: 8px;
    padding: 7px 14px;
    min-height: 34px;
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.22);
}
.zc-btn-emerald:hover {
    opacity: 0.95;
    color: #fff !important;
}
.zc-btn-nav {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    min-height: 32px;
    border-radius: 7px;
}
.zc-btn-nav:hover {
    background: var(--zc-indigo);
    color: #ffffff !important;
    border-color: var(--zc-indigo);
}

/* CAJA DE TOTALIZACIÓN EJECUTIVA (SIN QUIEBRE DE LÍNEA) */
.zc-totals-box {
    background: linear-gradient(135deg, #0f2038 0%, #1e3a5f 100%);
    color: #ffffff;
    border-radius: 10px;
    padding: 14px 18px;
    border-left: 4px solid #14b8a6;
    box-shadow: 0 4px 12px rgba(15, 32, 56, 0.12);
}
.zc-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: #cbd5e1;
    margin-bottom: 4px;
    white-space: nowrap;
}
.zc-totals-final {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 1.08rem;
    font-weight: 800;
    color: #2dd4bf;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding-top: 8px;
    margin-top: 6px;
    white-space: nowrap;
}

/* ==================== TARJETAS DE TELEMETRÍA (KPIs) ==================== */
.zc-telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.zc-metric-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 32, 56, 0.04);
    position: relative;
    overflow: hidden;
}
.zc-metric-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}
.accent-indigo::before { background: var(--zc-indigo); }
.accent-amber::before { background: var(--zc-amber); }
.accent-cyan::before { background: var(--zc-cyan); }
.accent-emerald::before { background: var(--zc-emerald); }
.accent-rose::before { background: var(--zc-rose); }

.zc-metric-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f0f6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--zc-indigo);
    flex-shrink: 0;
}
.zc-metric-val { font-size: 1.3rem; font-weight: 800; line-height: 1.15; color: #0f2038 !important; }
.zc-metric-lbl { font-size: 0.72rem; color: #64748b !important; font-weight: 600; }

/* ==================== PLANIFICADOR HORARIO FIJO Y TÁCTIL ==================== */
.zc-planner-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 32, 56, 0.06);
}
.zc-planner-header {
    background: linear-gradient(90deg, #0f2038 0%, #1e3a5f 100%);
    color: #ffffff;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--zc-cyan);
}
.zc-range-title { font-weight: 700; font-size: 0.92rem; letter-spacing: 0.3px; }

.zc-view-pills {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px;
    border-radius: 8px;
}
.zc-view-pills a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 6px;
    white-space: nowrap;
}
.zc-view-pills a.active { background: #38bdf8; color: #0f2038; }

.zc-timegrid-scroll {
    max-height: 580px;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    user-select: none;
    position: relative;
}
/* Grilla con tamaño fijo entre horas para conservar las proporciones en Tablet y Celular */
.zc-timegrid-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
    table-layout: fixed;
}
.zc-hour-col-header {
    width: 64px;
    min-width: 64px;
    background: #f8fafc;
    text-align: center;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    color: #64748b;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 25;
}
.zc-day-col-header {
    min-width: 112px;
    background: #f8fafc;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    text-align: center;
    padding: 6px 4px;
    position: sticky;
    top: 0;
    z-index: 18;
}
.zc-day-col-header.is-today { background: #eff6ff; border-bottom: 2px solid var(--zc-indigo); }
.zc-day-name { font-size: 0.72rem; text-transform: uppercase; font-weight: 800; color: #475569; }
.zc-day-num { font-size: 0.85rem; font-weight: 800; color: #0f2038; }

.zc-weekend-header { background-color: #0f2038 !important; color: #f8fafc !important; }
.zc-weekend-header .zc-day-name, .zc-weekend-header .zc-day-num { color: #f8fafc !important; }
.zc-weekend-cell { background-color: #e2e8f0 !important; }

.zc-hour-axis {
    width: 64px;
    min-width: 64px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-align: right;
    padding: 3px 8px;
    border-right: 1px solid #cbd5e1;
    background: #f8fafc;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    vertical-align: top;
    position: sticky;
    left: 0;
    z-index: 12;
}
.zc-row-hour td { border-top: 1px solid #cbd5e1; }
.zc-row-half td { border-top: 1px dashed #e2e8f0; }

.zc-slot-cell {
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border-right: 1px solid #e2e8f0;
    padding: 0 !important;
    position: relative !important;
    cursor: crosshair;
    background: #ffffff;
    /* Permite arrastrar horas en pantallas táctiles sin que el navegador mueva el scroll vertical */
    touch-action: pan-x pan-y;
}
.zc-slot-cell.is-today-col { background: #f8fbff; }
.zc-slot-cell:hover { background: #f1f5f9; }

/* BLOQUES DE CITAS EJECUTIVOS CON TEXTO FLUIDO */
.zc-event-block {
    position: absolute;
    top: 1px;
    left: 2px;
    right: 2px;
    z-index: 20 !important;
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 0.7rem;
    color: #ffffff !important;
    background: linear-gradient(135deg, #1d4ed8, #0f2038) !important;
    border-left: 4px solid #38bdf8 !important;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 32, 56, 0.25);
    opacity: 1 !important;
    display: block !important;
}
.zc-tipo-ot, .zc-ag-agenda_taller {
    background: linear-gradient(135deg, #1e3a5f, #0f2038) !important;
    border-left: 4px solid #f59e0b !important;
}
.zc-tipo-diagnostico, .zc-ag-agenda_cliente {
    background: linear-gradient(135deg, #0284c7, #1e3a8a) !important;
    border-left: 4px solid #38bdf8 !important;
}
.zc-tipo-visita_cliente {
    background: linear-gradient(135deg, #0d9488, #115e59) !important;
    border-left: 4px solid #5eead4 !important;
}
.zc-ev-llego_cliente {
    background: linear-gradient(135deg, #059669, #064e3b) !important;
    border-left: 4px solid #34d399 !important;
}
.zc-ev-cancelada {
    background: linear-gradient(135deg, #64748b, #334155) !important;
    border-left: 4px solid #cbd5e1 !important;
}

.zc-ev-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 2px;
    font-weight: 800;
    line-height: 1.15;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 2px;
    margin-bottom: 2px;
}
.zc-ev-time { font-size: 0.63rem; color: #bae6fd !important; white-space: nowrap; }
.zc-ev-body { font-size: 0.66rem; color: #f8fafc !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ARRASTRE INTERACTIVO */
.zc-slot-cell.zc-drag-active {
    background-color: rgba(29, 78, 216, 0.75) !important;
    border-left: 3px solid #0f2038 !important;
    border-right: 3px solid #0f2038 !important;
}
.zc-slot-cell.zc-drag-top {
    background: linear-gradient(180deg, #0f2038 0%, rgba(29, 78, 216, 0.85) 100%) !important;
    border-top: 2px solid #0f2038 !important;
}
.zc-drag-header-label {
    position: absolute;
    top: 2px;
    right: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #ffffff;
    pointer-events: none;
    z-index: 25;
}
.zc-drag-floating-card {
    position: fixed;
    z-index: 9999;
    width: 150px;
    background: #0f2038;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(15, 32, 56, 0.3);
    border: 1px solid var(--zc-cyan);
    padding: 7px 12px;
    font-size: 0.76rem;
    pointer-events: none;
}

/* ==================== TABLAS Y BOTONERAS EN LÍNEA HORIZONTAL ==================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.zc-table {
    width: 100%;
    margin-bottom: 0;
    font-size: 0.8rem;
    border-collapse: separate;
    border-spacing: 0;
}
.zc-table thead th {
    background-color: #f8fafc;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap;
}
.zc-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}
.zc-table tbody tr:hover { background-color: #f8fafc; }

/* Evita que las columnas de operaciones apilen botones en pirámide */
.zc-action-group,
.zc-table td .d-flex.justify-content-center {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    gap: 5px;
    white-space: nowrap !important;
}
.zc-action-group .btn,
.zc-table td .btn {
    flex-shrink: 0;
    white-space: nowrap !important;
    height: 30px;
    padding: 0 9px !important;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zc-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* BADGES DE ESTADO */
.badge-CREADO { background-color: #e0f2fe; color: #0369a1; border: 1px solid #7dd3fc; font-weight: 700; }
.badge-PENDIENTE { background-color: #fef3c7; color: #b45309; border: 1px solid #fcd34d; font-weight: 700; }
.badge-ENVIADO { background-color: #dbeafe; color: #1d4ed8; border: 1px solid #93c5fd; font-weight: 700; }
.badge-APROBADO { background-color: #d1fae5; color: #047857; border: 1px solid #6ee7b7; font-weight: 700; }
.badge-RECHAZADO { background-color: #ffe4e6; color: #be123c; border: 1px solid #fda4af; font-weight: 700; }

.zc-modal-header {
    background: linear-gradient(90deg, #0f2038 0%, #1e3a5f 100%);
    color: #fff;
    border-bottom: 2px solid var(--zc-cyan);
}
.bg-indigo { background-color: #1d4ed8 !important; color: #fff !important; }

.webp-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid #cbd5e1; cursor: pointer; flex-shrink: 0; }
.webp-thumb-lg { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; border: 1px solid #cbd5e1; }
.preview-camera-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 8px; border: 2px solid var(--zc-indigo); }

/* VIN / CHASIS LEGIBLE EN TODAS LAS VISTAS */
.zc-vin-code,
code {
    font-family: 'Consolas', 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.9rem !important;
    font-weight: 700;
    color: #0f2038 !important;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.6px;
    display: inline-block;
}

/* ==================== DRAG & DROP DE FILAS EN COTIZACIONES / OT ==================== */
.zc-drag-handle {
    cursor: grab;
    color: #64748b;
    padding: 4px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}
.zc-drag-handle:hover { background-color: #cbd5e1; color: #0f2038; }
.zc-drag-handle:active { cursor: grabbing; }
#tabla-items-cotizacion tbody tr.zc-row-dragging { opacity: 0.45; background-color: #dbeafe !important; }
#tabla-items-cotizacion tbody tr.zc-drop-above td { border-top: 3px solid #1d4ed8 !important; }
#tabla-items-cotizacion tbody tr.zc-drop-below td { border-bottom: 3px solid #1d4ed8 !important; }

/* ==================== REGLAS RESPONSIVE (NOTEBOOK, TABLET, CELULAR) ==================== */
@media (min-width: 992px) and (max-width: 1400px) {
    .zc-nav-item { font-size: 0.74rem; padding: 6px 9px; gap: 4px; }
    .zc-brand-title { font-size: 0.9rem; }
}

@media (max-width: 991.98px) {
    .zc-telemetry-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .zc-planner-header,
    .zc-panel-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    .zc-header-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .zc-header-actions input.form-control,
    .zc-header-actions select.form-select {
        flex: 1 1 180px;
    }
    #tabla-items-cotizacion {
        min-width: 680px;
    }
}

@media (max-width: 767.98px) {
    .zc-navbar { min-height: 54px; }
    .zc-panel-body { padding: 12px; }
    .zc-form-section { padding: 12px; }
    .zc-telemetry-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .zc-metric-card { padding: 10px 12px; gap: 10px; }
    .zc-metric-icon { width: 36px; height: 36px; font-size: 1.05rem; }
    .zc-metric-val { font-size: 1.1rem; }
    .zc-metric-lbl { font-size: 0.68rem; }
    .zc-header-actions .btn {
        flex: 1 1 auto;
    }
    .zc-view-pills {
        width: 100%;
        display: flex;
    }
    .zc-view-pills a {
        flex: 1;
        text-align: center;
    }
    .modal-dialog {
        margin: 0.5rem;
    }
}

@media (max-width: 420px) {
    .zc-telemetry-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== BARRA DE PAGINACIÓN GLOBAL (36 / 48 / 60) ==================== */
.zc-pagination-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    font-size: 0.8rem;
}

.zc-pag-info {
    color: #475569;
}

.zc-pag-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.zc-pag-label {
    color: #64748b;
    font-weight: 600;
    font-size: 0.76rem;
}

.zc-pag-select {
    width: auto !important;
    min-width: 112px;
    padding-top: 2px;
    padding-bottom: 2px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #0f2038;
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.zc-pag-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.zc-pag-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.76rem;
    padding: 2px 9px;
    border-radius: 6px;
}

.zc-pag-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.zc-pag-btn.active {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.zc-pag-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.zc-pag-dots {
    color: #94a3b8;
    padding: 0 4px;
    font-weight: 700;
}

@media (max-width: 576px) {
    .zc-pagination-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .zc-pag-controls {
        justify-content: center;
    }
}