/* ==========================================================================
   COOMODEQUI 2.0 - Sistema de diseño (cq-ui)  (2026-10-23)
   Identidad 2.0 "claro premium": verde institucional #00A650, verde noche,
   acento ámbar, tipografías Inter + Plus Jakarta Sans (locales, sin internet).
   Los componentes de módulo están bajo .cq-ui / .cq-login; el marco general
   (menú, barra superior y estilo de módulos anteriores) está en cq-shell.css.
   ========================================================================== */

@font-face {
  font-family: "CQ Inter";
  src: url("../fonts/cq-inter.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "CQ Jakarta";
  src: url("../fonts/cq-jakarta.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  /* Paleta 2.0 basada en el verde institucional del logo (#00A650) */
  --cq-green-950: #04170f;
  --cq-green-900: #072a1b;
  --cq-green-800: #0b3d27;
  --cq-green-700: #006b37;
  --cq-green-600: #008a45;
  --cq-brand:     #00a650;
  --cq-green-500: #00a650;
  --cq-green-400: #2fd27f;
  --cq-green-100: #e1f5ea;
  --cq-green-50:  #f0faf4;
  --cq-amber-600: #c77700;
  --cq-amber-500: #f2a516;
  --cq-amber-100: #fdf1dc;
  --cq-red-600:   #d0342c;
  --cq-red-100:   #fdecea;
  --cq-blue-600:  #1f74c4;
  --cq-blue-100:  #e6f0fb;
  --cq-ink:       #0f1d16;
  --cq-slate:     #2b3a33;
  --cq-muted:     #5f6f67;
  --cq-faint:     #93a19a;
  --cq-line:      #e2e8e5;
  --cq-surface:   #ffffff;
  --cq-bg:        #f3f6f4;
  --cq-field:     #f6f8f7;
  --cq-radius:    16px;
  --cq-radius-sm: 10px;
  --cq-shadow:    0 1px 2px rgba(7, 42, 27, .05), 0 8px 24px -8px rgba(7, 42, 27, .10);
  --cq-shadow-lg: 0 24px 60px -12px rgba(7, 42, 27, .25);
  --cq-ring:      0 0 0 4px rgba(0, 166, 80, .16);
  --cq-grad:      linear-gradient(135deg, #00a650 0%, #008a45 55%, #006b37 100%);
  --cq-font: "CQ Inter", "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --cq-font-display: "CQ Jakarta", "CQ Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Base del contenedor
   -------------------------------------------------------------------------- */
.cq-ui {
  font-family: var(--cq-font);
  color: var(--cq-ink);
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 1280px;
  margin: 0 auto 120px;
  -webkit-font-smoothing: antialiased;
}
.cq-ui *,
.cq-ui *::before,
.cq-ui *::after { box-sizing: border-box; }

/* --------------------------------------------------------------------------
   Encabezado de página
   -------------------------------------------------------------------------- */
.cq-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 22px;
}
.cq-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cq-green-700);
  margin-bottom: 6px;
}
.cq-page-title {
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -.01em;
  color: var(--cq-ink);
  margin: 0;
  line-height: 1.2;
}
.cq-page-title strong { font-weight: 600; }
.cq-page-sub {
  margin: 6px 0 0;
  color: var(--cq-muted);
  font-size: 13px;
}
.cq-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Chips de resumen */
.cq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.cq-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px;
  background: var(--cq-surface);
  border: 1px solid var(--cq-line);
  border-radius: var(--cq-radius-sm);
  min-width: 140px;
}
.cq-chip small {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--cq-faint);
  font-weight: 600;
}
.cq-chip span { font-size: 14px; font-weight: 600; color: var(--cq-ink); }
.cq-chip--accent { background: var(--cq-green-50); border-color: #cfe9da; }
.cq-chip--accent span { color: var(--cq-green-800); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Tarjetas (también restyle de los .panel del tema dentro de .cq-ui,
   incluidos los bloques de vehículo que agrega el JavaScript)
   -------------------------------------------------------------------------- */
.cq-ui .panel,
.cq-card {
  background: var(--cq-surface);
  border: 1px solid var(--cq-line) !important;
  border-radius: var(--cq-radius) !important;
  box-shadow: var(--cq-shadow);
  margin-bottom: 18px;
  overflow: visible;
}
.cq-ui .panel.panel-featured { border-top: 1px solid var(--cq-line) !important; }
.cq-ui .panel-heading {
  position: relative;
  background: transparent !important;
  border-bottom: 1px solid var(--cq-line) !important;
  border-radius: var(--cq-radius) var(--cq-radius) 0 0 !important;
  padding: 16px 22px !important;
}
.cq-ui .panel-title {
  font-family: var(--cq-font);
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--cq-ink) !important;
  letter-spacing: 0;
  margin: 0;
  text-transform: none;
}
.cq-ui .panel-subtitle {
  font-size: 12px;
  color: var(--cq-muted) !important;
  margin: 2px 0 0;
  opacity: 1;
}
.cq-ui .panel-body {
  background: transparent !important;
  padding: 20px 22px !important;
  border-radius: 0 0 var(--cq-radius) var(--cq-radius);
}
.cq-ui .panel-footer {
  background: var(--cq-bg) !important;
  border-top: 1px solid var(--cq-line) !important;
  border-radius: 0 0 var(--cq-radius) var(--cq-radius) !important;
  padding: 14px 22px !important;
}

/* Encabezado de sección numerado */
.cq-step {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cq-step-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--cq-green-800);
  background: var(--cq-green-100);
}
.cq-step-text { display: flex; flex-direction: column; }
.cq-step-text b { font-size: 15px; font-weight: 600; color: var(--cq-ink); }
.cq-step-text em { font-style: normal; font-size: 12px; color: var(--cq-muted); }

/* Cabecera de bloque de vehículo (número de FUEC) */
.cq-ui .zona_origen > .panel-heading,
.cq-ui #zona_origen > .panel-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--cq-green-700) 0%, var(--cq-green-800) 100%) !important;
  border-bottom: 0 !important;
  border-left: 4px solid var(--cq-amber-500);
}
.cq-ui .zona_origen > .panel-heading .panel-title,
.cq-ui #zona_origen > .panel-heading .panel-title {
  color: #fff !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.cq-ui .zona_origen > .panel-heading .panel-subtitle,
.cq-ui #zona_origen > .panel-heading .panel-subtitle {
  color: rgba(255,255,255,.75) !important;
}
.cq-ui .zona_origen > .panel-heading .btn-remove-veh { top: 14px; }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.cq-ui .row { margin-bottom: 4px; }
.cq-ui .control-label,
.cq-ui label {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: .02em;
  color: var(--cq-muted) !important;
  text-align: left !important;
  margin-bottom: 6px;
  padding-top: 8px !important;
}
.cq-ui .required { color: var(--cq-amber-600); margin-left: 2px; }
.cq-ui .form-control {
  height: 40px;
  border: 1px solid var(--cq-line) !important;
  border-radius: var(--cq-radius-sm) !important;
  background: var(--cq-surface) !important;
  box-shadow: none !important;
  font-size: 13.5px;
  color: var(--cq-ink);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.cq-ui textarea.form-control { height: auto; min-height: 64px; resize: vertical; }
.cq-ui .form-control:focus {
  border-color: var(--cq-green-500) !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, .15) !important;
  outline: 0;
}
/* Campos de solo lectura: se ven como dato, no como caja */
.cq-ui .form-control[readonly] {
  background: var(--cq-field) !important;
  border-color: transparent !important;
  color: var(--cq-slate);
  cursor: default;
}
.cq-ui .datepIni[readonly],
.cq-ui .datepFin[readonly] { cursor: pointer; background: var(--cq-surface) !important; border-color: var(--cq-line) !important; }
.cq-ui .autocomplete:not([readonly]) {
  border: 1.5px solid var(--cq-green-500) !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2327ae60' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m14 14-3.5-3.5'/%3E%3C/svg%3E") no-repeat right 12px center !important;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cq-ui .input-group-addon {
  background: var(--cq-field) !important;
  border: 1px solid var(--cq-line) !important;
  border-right: 0 !important;
  color: var(--cq-green-700) !important;
  border-radius: var(--cq-radius-sm) 0 0 var(--cq-radius-sm) !important;
}
.cq-ui .input-group .form-control { border-radius: 0 var(--cq-radius-sm) var(--cq-radius-sm) 0 !important; }
.cq-ui .input-daterange .input-group-addon { border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; }
.cq-ui .input-daterange .form-control:first-child { border-radius: var(--cq-radius-sm) 0 0 var(--cq-radius-sm) !important; }
.cq-ui .help-inline .error,
.cq-ui label.error { color: var(--cq-red-600) !important; font-weight: 500 !important; padding-top: 4px !important; }

/* select2 dentro de cq-ui */
.cq-ui .select2-container { width: 100% !important; }
.cq-ui .select2-container .select2-choice {
  height: 40px !important;
  line-height: 38px !important;
  border: 1px solid var(--cq-line) !important;
  border-radius: var(--cq-radius-sm) !important;
  background: var(--cq-surface) !important;
  background-image: none !important;
  box-shadow: none !important;
}
.cq-ui .select2-container .select2-choice .select2-arrow {
  background: transparent !important;
  border-left: 0 !important;
}
.cq-ui .select2-container .select2-choice .select2-arrow b { background-position: 0 6px !important; }
.cq-ui .select2-container.select2-container-active .select2-choice {
  border-color: var(--cq-green-500) !important;
  box-shadow: 0 0 0 3px rgba(39, 174, 96, .15) !important;
}

/* Subtítulo interno */
.cq-subhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 6px;
  padding-left: 15px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cq-green-700);
}
.cq-subhead::after { content: ""; flex: 1; height: 1px; background: var(--cq-line); }
.cq-ui h4.text-success { /* subtítulo "Conductores" dentro de los bloques clonados */
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cq-green-700) !important;
  margin: 18px 0 4px !important;
}

/* Mensajes de motivo / error de vigencias */
.cq-ui [id^="motivo_"]:not(:empty) {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--cq-blue-100);
  border-radius: var(--cq-radius-sm);
  color: #1f5f8b;
  font-size: 12.5px;
}
.cq-ui [id^="error_"]:not(:empty) {
  margin: 8px 0 0;
  padding: 10px 14px;
  background: var(--cq-red-100);
  border-radius: var(--cq-radius-sm);
  color: var(--cq-red-600) !important;
  font-size: 12.5px;
  font-weight: 600;
}

/* Recorridos de anexos */
.cq-ui .well {
  background: var(--cq-bg) !important;
  border: 1px dashed #cdd6dd !important;
  border-radius: var(--cq-radius-sm) !important;
  box-shadow: none !important;
}

/* Interruptor de anexos */
.cq-ui .cq-toggle-row { display: flex; align-items: center; gap: 14px; }
.cq-ui .cq-toggle-row .control-label { padding-top: 0 !important; margin: 0; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.cq-ui .btn,
.cq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--cq-radius-sm) !important;
  font-family: var(--cq-font);
  font-weight: 600;
  letter-spacing: .01em;
  box-shadow: none !important;
  transition: background .15s, border-color .15s, transform .05s;
}
.cq-ui .btn:active { transform: translateY(1px); }
.cq-ui .btn-primary,
.cq-btn--primary {
  background: var(--cq-green-700) !important;
  border: 1px solid var(--cq-green-700) !important;
  color: #fff !important;
}
.cq-ui .btn-primary:hover,
.cq-btn--primary:hover { background: var(--cq-green-800) !important; border-color: var(--cq-green-800) !important; }
.cq-ui .btn-success { background: var(--cq-green-500) !important; border-color: var(--cq-green-500) !important; color: #fff !important; }
.cq-ui .btn-success:hover { background: var(--cq-green-700) !important; border-color: var(--cq-green-700) !important; }
.cq-ui .btn-warning {
  background: #fff !important;
  border: 1px solid var(--cq-amber-500) !important;
  color: var(--cq-amber-600) !important;
}
.cq-ui .btn-warning:hover { background: var(--cq-amber-100) !important; }
.cq-ui .btn-default { background: #fff !important; border: 1px solid var(--cq-line) !important; color: var(--cq-slate) !important; }
.cq-ui .btn-default:hover { background: var(--cq-bg) !important; }
.cq-ui .btn-danger { background: #fff !important; border: 1px solid #f0c4be !important; color: var(--cq-red-600) !important; }
.cq-ui .btn-danger:hover { background: var(--cq-red-100) !important; }
.cq-ui .btn-lg-cq { height: 44px; padding: 0 22px; font-size: 14px; }
.cq-btn--ghost {
  background: transparent;
  border: 1px dashed #b9c6cf;
  color: var(--cq-green-700);
  padding: 10px 16px;
  width: 100%;
  border-radius: var(--cq-radius) !important;
}
.cq-btn--ghost:hover { background: var(--cq-green-50); border-color: var(--cq-green-500); text-decoration: none; color: var(--cq-green-800); }

/* Barra de acciones fija */
.cq-actionbar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  margin-top: 6px;
  background: rgba(255,255,255,.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--cq-line);
  border-radius: var(--cq-radius);
  box-shadow: var(--cq-shadow-lg);
}
.cq-actionbar .cq-hint { color: var(--cq-muted); font-size: 12.5px; }
.cq-actionbar .cq-hint i { color: var(--cq-green-500); margin-right: 4px; }
.cq-actionbar .cq-actions { display: flex; gap: 10px; }
.cq-ui .form-actions { margin: 0; padding: 0; border: 0; background: transparent; }

/* --------------------------------------------------------------------------
   Avisos
   -------------------------------------------------------------------------- */
.cq-alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--cq-radius);
  border: 1px solid;
  margin: 0 0 18px;
  background: #fff;
}
.cq-alert i { font-size: 20px; margin-top: 2px; }
.cq-alert h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }
.cq-alert p { margin: 0; color: var(--cq-slate); }
.cq-alert--danger { border-color: #f2cdc8; background: var(--cq-red-100); }
.cq-alert--danger i, .cq-alert--danger h4 { color: var(--cq-red-600); }
.cq-alert--warn { border-color: #f6dcb0; background: var(--cq-amber-100); }
.cq-alert--warn i, .cq-alert--warn h4 { color: var(--cq-amber-600); }
.cq-alert .cq-alert-actions { margin-top: 12px; }

/* --------------------------------------------------------------------------
   Tablas
   -------------------------------------------------------------------------- */
.cq-ui .table { margin-bottom: 0; border: 0 !important; }
.cq-ui .table > thead > tr > th {
  background: var(--cq-bg);
  color: var(--cq-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 0 !important;
  border-bottom: 1px solid var(--cq-line) !important;
  padding: 11px 12px !important;
  white-space: nowrap;
}
.cq-ui .table > tbody > tr > td {
  border: 0 !important;
  border-bottom: 1px solid #eef1f3 !important;
  padding: 10px 12px !important;
  vertical-align: middle !important;
  font-size: 13px;
}
.cq-ui .table-striped > tbody > tr:nth-of-type(odd) { background: transparent; }
.cq-ui .table-hover > tbody > tr:hover,
.cq-ui .table > tbody > tr:hover { background: var(--cq-green-50) !important; }
.cq-ui .table > tbody > tr.danger > td { background: transparent !important; }
.cq-ui .table > tbody > tr.danger > td:first-child { box-shadow: inset 3px 0 0 var(--cq-red-600); }
.cq-code { font-family: "SFMono-Regular", Menlo, Consolas, monospace; font-size: 12px; color: var(--cq-slate); }
.cq-plate {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fdf6d8;
  border: 1px solid #ecd98a;
  color: #4a3d00;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
}
.cq-plate small { font-weight: 500; letter-spacing: 0; color: #7d6a10; margin-left: 4px; }
.cq-muted { color: var(--cq-muted); }

/* Badges de estado */
.cq-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  text-decoration: none !important;
}
.cq-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cq-badge--ok { background: var(--cq-green-100); color: var(--cq-green-800); }
.cq-badge--off { background: #eef1f3; color: var(--cq-muted); }
.cq-badge--void { background: var(--cq-red-100); color: var(--cq-red-600); }
.cq-badge--late { background: var(--cq-amber-100); color: var(--cq-amber-600); }
a.cq-badge:hover { filter: brightness(.96); }

/* DataTables dentro de cq-ui */
.cq-ui .dataTables_wrapper .dataTables_filter input,
.cq-ui .dataTables_wrapper .dataTables_length select {
  height: 34px;
  border: 1px solid var(--cq-line);
  border-radius: var(--cq-radius-sm);
  padding: 0 10px;
  margin-left: 6px;
}
.cq-ui .dataTables_wrapper .dataTables_filter input:focus { outline: 0; border-color: var(--cq-green-500); box-shadow: 0 0 0 3px rgba(39,174,96,.15); }
.cq-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.cq-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: var(--cq-green-700) !important;
  border-color: var(--cq-green-700) !important;
  color: #fff !important;
  border-radius: 6px;
}
.cq-ui .dataTables_wrapper .dataTables_info,
.cq-ui .dataTables_wrapper .dataTables_length,
.cq-ui .dataTables_wrapper .dataTables_filter { color: var(--cq-muted); font-size: 12.5px; padding: 12px 4px; }

/* Estado vacío */
.cq-empty { text-align: center; padding: 48px 20px; color: var(--cq-muted); }
.cq-empty i { font-size: 32px; color: #c6d0d7; display: block; margin-bottom: 10px; }

/* Filtros */
.cq-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.cq-filters .cq-field { display: flex; flex-direction: column; min-width: 280px; }
.cq-filters .cq-field label { padding-top: 0 !important; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .cq-page-title { font-size: 21px; }
  .cq-chip { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .cq-actionbar { flex-direction: column; align-items: stretch; }
  .cq-actionbar .cq-actions { flex-direction: column-reverse; }
  .cq-actionbar .cq-actions .btn { width: 100%; }
  .cq-filters .cq-field { min-width: 100%; }
}

/* ==========================================================================
   LOGIN
   ========================================================================== */
.cq-login {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  font-family: var(--cq-font);
  color: var(--cq-ink);
  background: var(--cq-bg);
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
}
.cq-login *, .cq-login *::before, .cq-login *::after { box-sizing: border-box; }

.cq-login-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  color: #fff;
  background:
    radial-gradient(1200px 600px at -10% 110%, rgba(243, 156, 18, .22), transparent 60%),
    radial-gradient(900px 500px at 110% -10%, rgba(39, 174, 96, .35), transparent 60%),
    linear-gradient(150deg, var(--cq-green-700) 0%, var(--cq-green-800) 55%, var(--cq-green-900) 100%);
}
.cq-login-brand::after { /* trazo de carretera decorativo */
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.12);
}
.cq-login-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none !important;
  color: #fff !important;
}
.cq-login-logo img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.cq-login-logo b { display: block; font-size: 17px; font-weight: 700; letter-spacing: .14em; }
.cq-login-logo small { display: block; font-size: 12px; opacity: .8; letter-spacing: .02em; }
.cq-login-claim h1 {
  font-size: 38px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 14px;
  color: #fff;
  max-width: 460px;
}
.cq-login-claim h1 strong { font-weight: 600; }
.cq-login-claim p { margin: 0; max-width: 420px; color: rgba(255,255,255,.78); font-size: 14.5px; line-height: 1.6; }
.cq-login-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.cq-login-features span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  font-size: 12px;
  color: #fff;
}
.cq-login-features svg { width: 14px; height: 14px; color: var(--cq-amber-500); }
.cq-login-foot { font-size: 12px; color: rgba(255,255,255,.6); position: relative; z-index: 1; }

.cq-login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.cq-login-card { width: 100%; max-width: 380px; }
.cq-login-card h2 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; color: var(--cq-ink); }
.cq-login-card .cq-login-lead { margin: 0 0 28px; color: var(--cq-muted); font-size: 14px; }

.cq-login .cq-msg .alert {
  border-radius: var(--cq-radius-sm);
  border: 1px solid #f2cdc8;
  background: var(--cq-red-100);
  color: var(--cq-red-600);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  box-shadow: none;
}
.cq-login .cq-msg .alert.alert-success { border-color: #cfe9da; background: var(--cq-green-100); color: var(--cq-green-800); }
.cq-login .cq-msg .alert .close { opacity: .5; }

.cq-field-l { margin-bottom: 18px; }
.cq-field-l label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--cq-slate);
  margin: 0 0 7px;
}
.cq-input-wrap { position: relative; }
.cq-input-wrap > .cq-ico {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--cq-faint);
  pointer-events: none;
  transition: color .15s;
}
.cq-login input.cq-input {
  width: 100%;
  height: 48px;
  padding: 0 46px 0 42px;
  border: 1px solid var(--cq-line);
  border-radius: 10px;
  background: #fff;
  font: 500 14.5px var(--cq-font);
  color: var(--cq-ink);
  outline: 0;
  box-shadow: none;
  transition: border-color .15s, box-shadow .15s;
}
.cq-login input.cq-input::placeholder { color: #b3bdc5; font-weight: 400; }
.cq-login input.cq-input:focus { border-color: var(--cq-green-500); box-shadow: 0 0 0 4px rgba(39,174,96,.14); }
.cq-input-wrap:focus-within > .cq-ico { color: var(--cq-green-700); }
.cq-field-l.error input.cq-input { border-color: var(--cq-red-600); }
.cq-toggle-pass {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--cq-faint);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cq-toggle-pass svg { width: 18px; height: 18px; }
.cq-toggle-pass:hover { color: var(--cq-green-700); background: var(--cq-green-50); }
.cq-caps { display: none; margin-top: 7px; font-size: 12px; color: var(--cq-amber-600); }
.cq-caps.on { display: block; }

.cq-login-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 22px; }
.cq-check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--cq-slate); font-weight: 500; margin: 0; }
.cq-check input { width: 16px; height: 16px; accent-color: var(--cq-green-700); margin: 0; }

.cq-login button.cq-submit {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cq-green-700), var(--cq-green-800));
  color: #fff;
  font: 600 15px var(--cq-font);
  letter-spacing: .01em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 8px 20px rgba(30, 82, 48, .25);
  -webkit-appearance: none;
  transition: transform .06s, box-shadow .15s, filter .15s;
}
.cq-login button.cq-submit:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(30, 82, 48, .32); }
.cq-login button.cq-submit:active { transform: translateY(1px); }
.cq-login button.cq-submit[disabled] { opacity: .75; cursor: progress; }
.cq-login button.cq-submit svg { width: 18px; height: 18px; }

.cq-login-extra { margin-top: 22px; text-align: center; font-size: 13px; color: var(--cq-muted); }
.cq-login-extra a { color: var(--cq-green-700); font-weight: 600; }
.cq-login-extra .well { text-align: left; background: var(--cq-bg); border: 1px solid var(--cq-line); border-radius: 10px; box-shadow: none; }
.cq-login-copy { margin-top: 36px; text-align: center; font-size: 12px; color: var(--cq-faint); }

@media (max-width: 900px) {
  .cq-login { grid-template-columns: 1fr; }
  .cq-login-brand { padding: 26px 24px 30px; min-height: auto; }
  .cq-login-claim h1 { font-size: 24px; margin-top: 22px; }
  .cq-login-claim p, .cq-login-features, .cq-login-foot { display: none; }
  .cq-login-panel { align-items: flex-start; padding-top: 32px; }
}

/* Botón cerrar de los mensajes en el login */
.cq-login .cq-msg .alert .close {
  float: right;
  background: none;
  border: 0;
  padding: 0 0 0 10px;
  font-size: 18px;
  line-height: 1;
  color: inherit;
  text-shadow: none;
  box-shadow: none;
  opacity: .55;
  cursor: pointer;
}
.cq-login .cq-msg .alert .close:hover { opacity: .9; }

/* Ajustes de contraste: el tema anterior usa tipografía de peso 300 */
.cq-ui, .cq-ui p, .cq-ui span, .cq-ui td, .cq-ui em, .cq-ui small { font-weight: 400; }
.cq-ui .form-control { font-weight: 500 !important; color: var(--cq-ink) !important; }
.cq-ui .form-control[readonly] { color: var(--cq-slate) !important; }
.cq-ui .form-control::placeholder { color: #aab6bf !important; font-weight: 400; }
.cq-page-sub, .cq-step-text em, .cq-actionbar .cq-hint { font-weight: 400 !important; color: var(--cq-muted) !important; }
.cq-ui .zona_origen > .panel-heading .panel-subtitle,
.cq-ui #zona_origen > .panel-heading .panel-subtitle { font-weight: 400 !important; color: rgba(255,255,255,.82) !important; }

/* select2 sin doble borde y a todo el ancho de su columna */
.cq-ui .select2-container.form-control {
  border: 0 !important;
  padding: 0 !important;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
}
.cq-ui .select2-container .select2-choice .select2-chosen { font-weight: 500; color: var(--cq-ink); }
.cq-ui .cq-chip span { font-weight: 600; }
.cq-ui .cq-step-text b { font-weight: 600; }
.cq-ui .table .btn-xs { white-space: nowrap; padding: 4px 10px; font-size: 12px; }
.cq-ui .cq-code { white-space: nowrap; }
.cq-ui .table > tbody > tr > td { white-space: nowrap; }
.cq-ui .table > tbody > tr > td:nth-child(4) { white-space: normal; min-width: 180px; }
.cq-ui .input-daterange .form-control { text-align: left; }

/* ==========================================================================
   Marca de versión Coomodequi 2.0
   ========================================================================== */
.cq-v2 {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px 3px 4px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--cq-green-800);
  background: var(--cq-green-100);
  border: 1px solid #cfe9da;
  white-space: nowrap;
}
.cq-v2 b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cq-green-700), var(--cq-green-800));
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}
.cq-v2--dark { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.cq-v2--dark b { background: var(--cq-amber-500); color: #3a2400; }
.cq-footer-v2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  font-size: 11.5px;
  color: var(--cq-faint);
}
.cq-login-logo .cq-v2 { margin-left: 4px; }

/* ==========================================================================
   2.0 - Componentes para listados (Vehículos)
   ========================================================================== */
.cq-ui--wide { max-width: none; }

/* Selector segmentado (filtro por estado) */
.cq-segment {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  margin: 0 0 12px;
  background: var(--cq-bg);
  border: 1px solid var(--cq-line);
  border-radius: 10px;
}
.cq-segment-item {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 7px 14px !important;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  color: var(--cq-muted) !important;
  transition: background .15s, color .15s;
}
.cq-segment-item input { position: absolute; opacity: 0; pointer-events: none; }
.cq-segment-item:hover { color: var(--cq-ink) !important; }
.cq-segment-item.is-active { background: #fff; color: var(--cq-green-800) !important; box-shadow: 0 1px 3px rgba(16,40,24,.12); }
.cq-segment-count {
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e7ecef;
  color: var(--cq-slate);
  font-size: 11px;
  text-align: center;
}
.cq-segment-item.is-active .cq-segment-count { background: var(--cq-green-100); color: var(--cq-green-800); }

/* Placa como enlace */
.cq-ui a.cq-plate--link { text-decoration: none !important; transition: box-shadow .15s, transform .05s; }
.cq-ui a.cq-plate--link:hover { box-shadow: 0 0 0 3px rgba(236, 217, 138, .55); color: #2d2500; }

/* Barra de acciones masivas: discreta hasta que haya selección */
#cq-bulk { opacity: .55; transition: opacity .2s; }
#cq-bulk.is-active { opacity: 1; }
#cq-bulk .form-control { height: 38px; }

.cq-ui .table > tbody > tr > td small { font-size: 11.5px; }
.cq-ui .column-check input { width: 16px; height: 16px; accent-color: var(--cq-green-700); cursor: pointer; }

/* ==========================================================================
   2.0 - Formulario de vehículo (mismo HTML, nueva disposición en 2 columnas)
   ========================================================================== */
.cq-vform form.form-horizontal > fieldset:first-of-type {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 2px;
  min-width: 0;
}
.cq-vform fieldset > .form-group,
.cq-vform fieldset > .control-group {
  margin: 0 0 12px !important;
  min-width: 0;
}
.cq-vform fieldset > .form-group > .control-label,
.cq-vform fieldset > .control-group > .control-label {
  display: block;
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 0 6px;
}
.cq-vform fieldset > .form-group > [class*="col-md"],
.cq-vform fieldset > .control-group > [class*="col-md"],
.cq-vform fieldset > .control-group > .controls {
  float: none !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
.cq-vform fieldset > .form-group .form-group { margin: 0 !important; }
.cq-vform .cq-span,
.cq-vform fieldset > .form-group:has(.input-daterange),
.cq-vform fieldset > .well { grid-column: 1 / -1; }
.cq-vform fieldset > .cq-subhead { margin: 14px 0 10px; padding-left: 0; }
#ocultar { display: none !important; }

/* Rangos de fechas (SOAT, tecnomecánica, T. operación, vinculación) */
.cq-vform fieldset > .form-group:has(.input-daterange) {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 16px;
  padding: 12px 14px 4px;
  background: var(--cq-bg);
  border: 1px solid var(--cq-line);
  border-radius: var(--cq-radius-sm);
}
.cq-vform fieldset > .form-group:has(.input-daterange) > .control-label:first-child { flex: 1 1 100%; }
.cq-vform fieldset > .form-group:has(.input-daterange) > .col-md-6 { flex: 2 1 420px; width: auto !important; margin-bottom: 10px !important; }
.cq-vform fieldset > .form-group:has(.input-daterange) > .control-label:not(:first-child) { flex: 0 0 auto; width: auto !important; margin: 0 0 20px !important; }
.cq-vform fieldset > .form-group:has(.input-daterange) > .col-md-3,
.cq-vform fieldset > .form-group:has(.input-daterange) > .col-md-4 { flex: 1 1 200px; width: auto !important; margin-bottom: 10px !important; }
.cq-vform fieldset > .form-group:has(.input-daterange) > .col-md-4 > .control-label { width: 100% !important; float: none; padding: 0 !important; }
.cq-vform fieldset > .form-group:has(.input-daterange) > .col-md-4 > [class*="col-md"] { width: 100% !important; float: none; padding: 0 !important; }
.cq-vform .input-daterange .input-group-addon { font-size: 11.5px; font-weight: 600; color: var(--cq-muted) !important; }

/* Equipamiento como lista de chequeo */
.cq-vform .well.cq-equip { padding: 10px 14px !important; float: none !important; }
.cq-vform .cq-equip > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr) 88px;
  gap: 4px 18px;
  align-items: center;
  margin: 0;
}
.cq-vform .cq-equip > .row::before, .cq-vform .cq-equip > .row::after { display: none; }
.cq-vform .cq-equip > .row > * { float: none !important; width: auto !important; padding: 6px 0 !important; margin: 0 !important; }
.cq-vform .cq-equip > .row > .control-label {
  font-size: 11.5px !important;
  color: var(--cq-slate) !important;
  border-bottom: 1px solid #edf0f2;
}
.cq-vform .cq-equip > .row > div { border-bottom: 1px solid #edf0f2; }
.cq-vform .cq-equip select.form-control { height: 32px; padding: 2px 8px; font-weight: 600 !important; }

/* Barra de acciones del formulario */
.cq-vform fieldset.form-actions.cq-actionbar { justify-content: flex-end; gap: 10px; margin: 18px 0 0; }
.cq-vform fieldset.form-actions.cq-actionbar .btn { height: 42px; padding: 0 20px; }

/* Secciones de propietario e histórico (edición) */
.cq-vform .panel-foot { padding: 12px 22px 18px; display: flex; justify-content: flex-end; }
.cq-vform #tabla-propietario td, .cq-vform #tabla-historia td { vertical-align: top !important; }
.cq-vform .delete-row { color: var(--cq-red-600); padding: 10px 6px; }

@media (max-width: 991px) {
  .cq-vform form.form-horizontal > fieldset:first-of-type { grid-template-columns: 1fr; }
  .cq-vform .cq-equip > .row { grid-template-columns: minmax(0, 1fr) 88px; }
}

/* 2.0 - Ajustes de filtros */
.cq-ui .admin-box { min-height: 0 !important; }
.cq-ui .select2-container-multi .select2-choices {
  min-height: 40px;
  padding: 4px 6px;
  border: 1px solid var(--cq-line) !important;
  border-radius: var(--cq-radius-sm) !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
}
.cq-ui .select2-container-multi.select2-container-active .select2-choices { border-color: var(--cq-green-500) !important; box-shadow: 0 0 0 3px rgba(39,174,96,.15) !important; }
.cq-ui .select2-container-multi .select2-choices .select2-search-choice {
  margin: 3px 4px 3px 0;
  padding: 4px 8px 4px 22px;
  border: 1px solid #cfe9da !important;
  border-radius: 999px !important;
  background: var(--cq-green-100) !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--cq-green-800) !important;
  font-size: 12px;
  font-weight: 600;
}
.cq-ui .select2-container-multi .select2-choices .select2-search-field input { height: 30px; }

/* ==========================================================================
   2.0 PREMIUM - Capa de identidad (tipografía de marca, tarjetas, botones)
   Se aplica sobre todo lo anterior; no cambia la estructura de las pantallas.
   ========================================================================== */
.cq-ui { font-size: 13.5px; letter-spacing: -.003em; }
.cq-ui ::selection, .cq-login ::selection { background: rgba(0,166,80,.18); }

/* Encabezado de página */
.cq-page-head { margin: 2px 0 24px; align-items: center; }
.cq-eyebrow {
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: var(--cq-green-50);
  border: 1px solid #d3eedf;
  color: var(--cq-green-700);
  font-size: 10.5px;
  letter-spacing: .14em;
  margin-bottom: 10px;
}
.cq-eyebrow .cq-v2 { margin-left: 2px; padding: 0; background: none; border: 0; }
.cq-page-title {
  font-family: var(--cq-font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.025em;
  color: var(--cq-ink);
}
.cq-page-title strong {
  font-weight: 800;
  background: linear-gradient(120deg, var(--cq-green-800), var(--cq-brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cq-page-sub { font-size: 13.5px; margin-top: 8px; max-width: 640px; }

/* Indicadores (chips) */
.cq-chips { gap: 12px; margin-bottom: 22px; }
.cq-chip {
  position: relative;
  overflow: hidden;
  padding: 14px 18px 15px;
  min-width: 160px;
  border-radius: 14px;
  border: 1px solid var(--cq-line);
  box-shadow: var(--cq-shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cq-chip:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(7,42,27,.05), 0 16px 32px -12px rgba(7,42,27,.18); }
.cq-chip small { font-size: 10.5px; letter-spacing: .1em; color: var(--cq-muted); }
.cq-chip span {
  font-family: var(--cq-font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.cq-ui .cq-chip span { font-weight: 700; }
.cq-chip--accent {
  background: radial-gradient(120% 140% at 100% 0%, rgba(47,210,127,.35), transparent 55%), linear-gradient(140deg, var(--cq-green-800), var(--cq-green-900));
  border-color: transparent;
}
.cq-chip--accent small { color: rgba(255,255,255,.7); }
.cq-chip--accent span { color: #fff !important; }
.cq-chip--accent::after {
  content: ""; position: absolute; right: -18px; bottom: -18px; width: 70px; height: 70px;
  border-radius: 50%; border: 10px solid rgba(255,255,255,.06);
}

/* Tarjetas */
.cq-ui .panel, .cq-card { border-radius: var(--cq-radius) !important; box-shadow: var(--cq-shadow); }
.cq-ui .panel-heading { padding: 18px 24px !important; }
.cq-ui .panel-body { padding: 22px 24px !important; }
.cq-ui .panel-title { font-family: var(--cq-font-display); font-size: 15.5px !important; font-weight: 700 !important; letter-spacing: -.01em; }
.cq-step-num {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--cq-grad); color: #fff;
  box-shadow: 0 6px 14px -4px rgba(0,138,69,.55);
  font-family: var(--cq-font-display);
}
.cq-step-text b { font-family: var(--cq-font-display); font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.cq-ui .zona_origen > .panel-heading,
.cq-ui #zona_origen > .panel-heading {
  background: radial-gradient(90% 160% at 100% 0%, rgba(47,210,127,.28), transparent 60%), linear-gradient(135deg, var(--cq-green-800), var(--cq-green-900)) !important;
  border-left: 0;
}
.cq-ui .zona_origen > .panel-heading::before,
.cq-ui #zona_origen > .panel-heading::before {
  content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cq-amber-500);
}

/* Campos */
.cq-ui .form-control { height: 42px; border-radius: var(--cq-radius-sm) !important; }
.cq-ui .form-control:focus,
.cq-ui .select2-container.select2-container-active .select2-choice,
.cq-ui .select2-container-multi.select2-container-active .select2-choices,
.cq-ui .dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--cq-brand) !important;
  box-shadow: var(--cq-ring) !important;
}
.cq-ui .select2-container .select2-choice { height: 42px !important; line-height: 40px !important; border-radius: var(--cq-radius-sm) !important; }
.cq-subhead { color: var(--cq-green-700); font-size: 10.5px; letter-spacing: .14em; }
.cq-subhead::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--cq-brand); transform: rotate(45deg); }

/* Botones */
.cq-ui .btn, .cq-btn { border-radius: var(--cq-radius-sm) !important; font-weight: 600; transition: background .15s, border-color .15s, box-shadow .2s, transform .08s, filter .15s; }
.cq-ui .btn-primary, .cq-btn--primary,
.cq-ui .btn-success {
  background: var(--cq-grad) !important;
  border: 1px solid var(--cq-green-700) !important;
  color: #fff !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 18px -8px rgba(0,107,55,.65) !important;
}
.cq-ui .btn-primary:hover, .cq-btn--primary:hover,
.cq-ui .btn-success:hover { filter: brightness(1.07); background: var(--cq-grad) !important; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 12px 24px -8px rgba(0,107,55,.7) !important; }
.cq-ui .btn-default { box-shadow: 0 1px 2px rgba(7,42,27,.05) !important; }
.cq-ui .btn-default:hover { border-color: #c9d6cf !important; color: var(--cq-ink) !important; }

/* Barra de acciones */
.cq-actionbar { border-radius: 18px; background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }

/* Tablas */
.cq-ui .table > thead > tr > th { background: #f6f8f7; color: var(--cq-muted); font-size: 10.5px; letter-spacing: .09em; padding: 12px 14px !important; }
.cq-ui .table > tbody > tr > td { padding: 12px 14px !important; border-bottom-color: #eef2f0 !important; }
.cq-ui .table > tbody > tr { transition: background .12s; }
.cq-ui .table-hover > tbody > tr:hover, .cq-ui .table > tbody > tr:hover { background: #f4fbf7 !important; }
.cq-plate {
  background: linear-gradient(180deg, #fff8d6, #fbe9a0);
  border: 1px solid #e3c757;
  border-radius: 7px;
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 1px 2px rgba(74,61,0,.12);
  font-family: var(--cq-font-display);
  font-weight: 800;
  letter-spacing: .1em;
}
.cq-badge { font-weight: 600; padding: 4px 10px; }
.cq-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.cq-ui .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { background: var(--cq-grad) !important; border-color: var(--cq-green-700) !important; border-radius: 8px; }
.cq-ui .dataTables_wrapper .dataTables_filter input,
.cq-ui .dataTables_wrapper .dataTables_length select { height: 36px; border-radius: 10px; background: #fff; }

/* Selector segmentado */
.cq-segment { border-radius: 12px; background: #eef3f0; border-color: #e2e9e5; }
.cq-segment-item { border-radius: 9px; }
.cq-segment-item.is-active { box-shadow: 0 1px 2px rgba(7,42,27,.08), 0 4px 12px -4px rgba(7,42,27,.18); }

/* Marca 2.0 */
.cq-v2 { background: var(--cq-green-50); border-color: #cdeedc; color: var(--cq-green-700); }
.cq-v2 b { background: var(--cq-grad); box-shadow: 0 2px 6px -2px rgba(0,138,69,.6); }
.cq-v2--dark { color: #fff; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }
.cq-v2--dark b { background: linear-gradient(135deg, #ffc44d, #f2a516); color: #3a2400; box-shadow: 0 0 14px rgba(242,165,22,.55); }

@media (max-width: 767px) {
  .cq-ui { font-size: 14px; margin-bottom: 140px; }
  .cq-page-head { margin-bottom: 18px; }
  .cq-page-title { font-size: 24px; }
  .cq-page-actions { width: 100%; }
  .cq-page-actions .btn { flex: 1 1 auto; }
  .cq-chips { gap: 10px; }
  .cq-chip { padding: 12px 14px; }
  .cq-chip span { font-size: 20px; }
  .cq-ui .panel-heading { padding: 14px 16px !important; }
  .cq-ui .panel-body { padding: 16px !important; }
  .cq-ui .table-responsive, .cq-ui .dataTables_wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cq-segment { display: flex; width: 100%; }
  .cq-segment-item { flex: 1 1 auto; justify-content: center; }
}

/* ==========================================================================
   2.0 PREMIUM - Login
   ========================================================================== */
.cq-login { background: #f3f6f4; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.cq-login-brand {
  isolation: isolate;
  background:
    radial-gradient(700px 480px at 85% 8%, rgba(47,210,127,.30), transparent 60%),
    radial-gradient(640px 520px at 0% 100%, rgba(242,165,22,.20), transparent 60%),
    radial-gradient(900px 700px at 40% 60%, rgba(0,166,80,.20), transparent 70%),
    linear-gradient(160deg, #0a3a24 0%, #072a1b 45%, #04170f 100%);
}
.cq-login-brand::before { /* retícula tecnológica */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
  mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 80%);
}
.cq-login-brand::after { /* órbita */
  right: -140px; bottom: -200px; width: 620px; height: 620px;
  border: 1px solid rgba(47,210,127,.22);
  box-shadow: 0 0 0 70px rgba(255,255,255,.015), 0 0 0 140px rgba(255,255,255,.012);
  z-index: -1;
}
.cq-login-logo img {
  border-radius: 16px; width: 58px; height: 58px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 10px 30px rgba(0,0,0,.35), 0 0 40px rgba(47,210,127,.35);
}
.cq-login-logo b { font-family: var(--cq-font-display); font-weight: 800; letter-spacing: .2em; font-size: 16px; }
.cq-login-logo small { opacity: .72; }
.cq-login-claim h1 {
  font-family: var(--cq-font-display);
  font-size: 44px; font-weight: 400; letter-spacing: -.035em; line-height: 1.08; max-width: 520px;
}
.cq-login-claim h1 strong {
  font-weight: 800;
  background: linear-gradient(100deg, #ffffff 10%, #8ff0bd 60%, #2fd27f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cq-login-claim p { font-size: 15px; color: rgba(255,255,255,.72); max-width: 440px; }
.cq-login-features { gap: 10px; margin-top: 30px; }
.cq-login-features span {
  padding: 9px 14px; border-radius: 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-size: 12.5px; font-weight: 500;
}
.cq-login-features svg { color: #2fd27f; }
.cq-login-foot { color: rgba(255,255,255,.5); }

.cq-login-panel {
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(0,166,80,.08), transparent 60%),
    #f3f6f4;
}
.cq-login-card {
  max-width: 420px;
  padding: 40px 36px 30px;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(226,232,229,.9);
  border-radius: 24px;
  box-shadow: 0 1px 2px rgba(7,42,27,.04), 0 30px 70px -30px rgba(7,42,27,.30);
}
.cq-login-card h2 { font-family: var(--cq-font-display); font-size: 28px; font-weight: 800; letter-spacing: -.03em; }
.cq-login-card .cq-login-lead { font-size: 14px; }
.cq-field-l label { font-size: 12px; letter-spacing: .02em; color: var(--cq-slate); }
.cq-login input.cq-input { height: 50px; border-radius: 12px; background: #f8faf9; border-color: #e1e8e4; }
.cq-login input.cq-input:focus { background: #fff; border-color: var(--cq-brand); box-shadow: var(--cq-ring); }
.cq-login button.cq-submit {
  height: 52px; border-radius: 12px;
  background: var(--cq-grad);
  box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 30px -12px rgba(0,107,55,.75);
  font-family: var(--cq-font-display); font-weight: 700; font-size: 15px; letter-spacing: .01em;
}
.cq-login button.cq-submit:hover { filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 18px 36px -12px rgba(0,107,55,.8); }
.cq-login button.cq-submit svg { transition: transform .2s; }
.cq-login button.cq-submit:hover svg { transform: translateX(3px); }
.cq-check input { accent-color: var(--cq-brand); }
.cq-login-extra a { color: var(--cq-green-700); }
.cq-login-copy { margin-top: 26px; }
.cq-login-mobile-head { display: none; }

@media (max-width: 900px) {
  .cq-login { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .cq-login-brand { padding: 22px 20px 64px; }
  .cq-login-claim h1 { font-size: 26px; margin-top: 22px; max-width: 360px; }
  .cq-login-brand::after { width: 360px; height: 360px; right: -120px; bottom: -180px; }
  .cq-login-panel { align-items: flex-start; padding: 0 16px 28px; margin-top: -44px; background: transparent; }
  .cq-login-card { padding: 28px 22px 22px; border-radius: 22px; }
  .cq-login-card h2 { font-size: 24px; }
}
@media (max-width: 380px) {
  .cq-login-logo small { display: none; }
}
.cq-login-logo .cq-v2 b { display: inline-flex; font-size: 10.5px; letter-spacing: .02em; font-family: var(--cq-font); }
.cq-login-panel { position: relative; z-index: 2; }
@media (max-width: 900px) {
  .cq-login-logo { flex-wrap: wrap; row-gap: 10px; }
  .cq-login-logo img { width: 48px; height: 48px; border-radius: 14px; }
  .cq-login-logo b { font-size: 14px; }
  .cq-login-logo .cq-v2 { flex-basis: auto; margin-left: 0; }
}
@media (max-width: 767px) {
  .cq-chip { min-width: 0; flex: 1 1 calc(50% - 10px); }
  .cq-chip--accent { flex-basis: 100%; }
}
@media (max-width: 900px) {
  .cq-login-card { background: #fff; }
}

/* ==========================================================================
   2.0 - Componentes reutilizables (Conductores / Hoja de vida / Incapacidades)
   ========================================================================== */
.cq-txt-red { color: var(--cq-red-600) !important; }
.cq-txt-amber { color: var(--cq-amber-600) !important; }
.cq-ui .cq-wrap { white-space: normal !important; min-width: 160px; }
.cq-badge--info { background: var(--cq-blue-100); color: var(--cq-blue-600); }

/* Persona (avatar + nombre) */
.cq-person { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.cq-avatar {
  flex: 0 0 36px; width: 36px; height: 36px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cq-green-50); border: 1px solid #cdeedc; color: var(--cq-green-700);
  font-family: var(--cq-font-display); font-weight: 800; font-size: 12.5px; letter-spacing: .02em;
}
.cq-person-txt { display: flex; flex-direction: column; line-height: 1.25; white-space: normal; }
.cq-person-txt b, .cq-ui a.cq-person-link { font-weight: 700; color: var(--cq-ink); text-decoration: none; }
.cq-ui a.cq-person-link:hover { color: var(--cq-green-700); text-decoration: underline; }
.cq-person-txt small { color: var(--cq-muted); font-size: 12px; }

/* Buscador grande (cédula) */
.cq-search-card {
  padding: 20px 22px; margin: 0 0 20px;
  background: #fff; border: 1px solid var(--cq-line); border-radius: var(--cq-radius); box-shadow: var(--cq-shadow);
}
.cq-ui .cq-search-card label { padding-top: 0 !important; display: block; }
.cq-search-row { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.cq-search-input { position: relative; flex: 1 1 280px; max-width: 520px; }
.cq-search-input > i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--cq-faint); font-size: 16px; pointer-events: none; }
.cq-ui .cq-search-input .form-control {
  height: 52px; padding-left: 44px; font-size: 18px !important; font-weight: 700 !important;
  letter-spacing: .06em; font-family: var(--cq-font-display); border-radius: 14px !important;
}
.cq-ui .cq-search-row .btn { height: 52px; padding: 0 22px; border-radius: 14px !important; font-size: 14px; }

/* Perfil de la hoja de vida */
.cq-hv-profile {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center;
  padding: 22px 24px; margin: 0 0 14px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(47,210,127,.30), transparent 60%),
    linear-gradient(140deg, #0b3d27 0%, #072a1b 60%, #04170f 100%);
  box-shadow: var(--cq-shadow-lg);
}
.cq-hv-profile::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 60% 100% at 85% 20%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 100% at 85% 20%, #000 20%, transparent 75%);
}
.cq-hv-photo-big {
  width: 96px; height: 96px; border-radius: 24px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #00a650, #006b37);
  box-shadow: 0 0 0 3px rgba(255,255,255,.18), 0 12px 30px rgba(0,0,0,.35);
  font-family: var(--cq-font-display); font-weight: 800; font-size: 32px; color: #fff;
}
.cq-hv-photo-big img { width: 100%; height: 100%; object-fit: cover; }
.cq-hv-id h2 { margin: 6px 0 8px; color: #fff; font-family: var(--cq-font-display); font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.cq-hv-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cq-hv-cargo { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.75); letter-spacing: .04em; text-transform: uppercase; }
.cq-hv-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 13px; color: rgba(255,255,255,.82); }
.cq-hv-facts > span:not(.cq-badge) { display: inline-flex; align-items: center; gap: 6px; }
.cq-hv-facts i { color: #2fd27f; }
.cq-hv-facts b { color: #fff; }
.cq-ui .cq-hv-actions .btn { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.22) !important; color: #fff !important; height: 42px; padding: 0 18px; }
.cq-ui .cq-hv-actions .btn:hover { background: rgba(255,255,255,.18) !important; }

/* Índice de secciones */
.cq-hv-nav {
  position: sticky; top: 132px; z-index: 30;
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 6px; margin: 0 0 18px;
  background: rgba(255,255,255,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--cq-line); border-radius: 14px; box-shadow: var(--cq-shadow);
}
.cq-hv-nav::-webkit-scrollbar { display: none; }
.cq-ui .cq-hv-nav a {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 10px; white-space: nowrap;
  font-size: 12.8px; font-weight: 600; color: var(--cq-muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.cq-ui .cq-hv-nav a:hover { background: var(--cq-green-50); color: var(--cq-green-700); }
.cq-hv-nav a i { color: var(--cq-green-600); }
.cq-hv-sec { scroll-margin-top: 196px; }

/* Formulario principal en cuadrícula de 12 columnas (mismos campos) */
.cq-hv #hv-datos fieldset > .row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px 18px; margin: 0 0 6px;
}
.cq-hv #hv-datos fieldset > .row::before,
.cq-hv #hv-datos fieldset > .row::after { display: none; }
.cq-hv #hv-datos fieldset > .row > [class*="col-md-"] { float: none; width: auto; padding: 0; min-height: 0; grid-column: span 3; }
.cq-hv #hv-datos fieldset > .row > .col-md-2 { grid-column: span 2; }
.cq-hv #hv-datos fieldset > .row > .col-md-4 { grid-column: span 4; }
.cq-hv #hv-datos fieldset > .row > .col-md-6 { grid-column: span 6; }
.cq-hv #hv-datos fieldset > .row > .col-md-12 { grid-column: 1 / -1; }
.cq-hv #hv-datos fieldset > .row > .col-md-12:empty { display: none; }
.cq-hv #hv-datos label,
.cq-hv #hv-datos .label-control {
  display: block; float: none !important; width: auto !important;
  padding: 0 !important; margin: 0 0 6px; min-height: 0;
  font-size: 11.5px; font-weight: 600; color: var(--cq-muted); line-height: 1.35;
}
.cq-hv #hv-datos label strong { font-weight: 600; color: var(--cq-amber-600); }
.cq-hv select:not(.form-control) {
  width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--cq-line); border-radius: var(--cq-radius-sm);
  background: #fff; font-weight: 500; color: var(--cq-ink); font-size: 13.5px;
}
.cq-hv select:not(.form-control):focus { outline: 0; border-color: var(--cq-brand); box-shadow: var(--cq-ring); }
.cq-hv .help-inline:empty { display: none; }
.cq-hv .alert-success {
  display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 10px 14px;
  background: var(--cq-green-50); border: 1px solid #cdeedc; border-radius: 12px; color: var(--cq-green-800); font-size: 12.5px;
}
.cq-hv .alert-success .close { order: 2; margin-left: auto; float: none; opacity: .6; font-size: 16px; }
.cq-hv fieldset.form-actions.cq-actionbar { justify-content: flex-end; gap: 10px; margin: 20px 0 0; }
.cq-hv fieldset.form-actions.cq-actionbar .btn { height: 42px; padding: 0 22px; }

/* Cámara */
.cq-hv-camera {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 16px; margin: 0 0 18px;
  background: var(--cq-bg); border: 1px dashed #cbd8d1; border-radius: 14px;
}
.cq-hv-camera-preview { display: flex; gap: 12px; align-items: center; }
.cq-hv-camera #results img { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; box-shadow: var(--cq-shadow); }
.cq-hv-camera #my_camera:empty { display: none; }
.cq-hv-camera #my_camera video { border-radius: 12px; }
.cq-hv-camera-txt { display: flex; flex-direction: column; gap: 4px; }
.cq-hv-camera-txt b { font-family: var(--cq-font-display); font-size: 14px; }
.cq-hv-camera-txt span { color: var(--cq-muted); font-size: 12.5px; }
.cq-hv-camera-btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* Secciones con tablas editables */
.cq-hv .panel-body .table td .form-control { height: 38px; min-width: 120px; }
.cq-hv .panel-body .table td textarea.form-control { min-height: 38px; height: 38px; }
.cq-hv .panel-body .table .actions,
.cq-hv .panel-body .table td:last-child { white-space: nowrap; }
.cq-hv .delete-row { color: var(--cq-red-600); padding: 8px; font-size: 15px; }
.cq-ui .cq-hv-sec [id^="mas-"] {
  float: none !important; margin: 12px 0 0 !important; height: 36px; padding: 0 14px;
  background: #fff !important; border: 1px dashed #b9c9c0 !important; color: var(--cq-green-700) !important; box-shadow: none !important;
}
.cq-ui .cq-hv-sec [id^="mas-"]::after { content: "Agregar fila"; font-weight: 600; }
.cq-ui .cq-hv-sec [id^="mas-"]:hover { background: var(--cq-green-50) !important; border-color: var(--cq-brand) !important; }
.cq-hv .panel-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 14px 24px; border-top: 1px solid var(--cq-line); background: #fafcfb; border-radius: 0 0 var(--cq-radius) var(--cq-radius);
}
.cq-hv .panel-foot .btn { height: 40px; padding: 0 20px; }
.cq-hv #hv-firma img { max-width: 100%; height: auto; border: 1px solid var(--cq-line); border-radius: 12px; padding: 8px; background: #fff; margin: 0 0 12px; }
.cq-hv #uploadimage { padding: 0 15px; }

/* Cuadrículas simples de formulario */
.cq-grid { display: grid; gap: 14px 18px; margin: 0 0 6px; }
.cq-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cq-span-all { grid-column: 1 / -1; }
.cq-ui .cq-label { display: block; font-size: 11.5px; font-weight: 600; color: var(--cq-muted); margin: 0 0 6px; padding-top: 8px; }
.cq-segment--block { display: flex; margin: 0; }
.cq-segment--block .cq-segment-item { flex: 1 1 0; justify-content: center; }

/* Pestañas 2.0 dentro del contenido */
.cq-ui .nav.cq-tabs {
  display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 16px;
  background: #eef3f0; border: 1px solid #e2e9e5; border-radius: 12px;
}
.cq-ui .nav.cq-tabs::before, .cq-ui .nav.cq-tabs::after { display: none; }
.cq-ui .nav.cq-tabs > li { float: none; margin: 0; }
.cq-ui .nav.cq-tabs > li > a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 9px;
  font-size: 13px; font-weight: 600; color: var(--cq-muted); background: transparent;
}
.cq-ui .nav.cq-tabs > li > a:hover { background: rgba(255,255,255,.7); color: var(--cq-ink); }
.cq-ui .nav.cq-tabs > li.active > a,
.cq-ui .nav.cq-tabs > li.active > a:hover,
.cq-ui .nav.cq-tabs > li.active > a:focus { background: #fff; color: var(--cq-green-700); box-shadow: 0 1px 2px rgba(7,42,27,.08), 0 4px 12px -4px rgba(7,42,27,.18); }
.cq-ui .nav.cq-tabs > li.active .cq-segment-count { background: var(--cq-green-100); color: var(--cq-green-800); }
.cq-ui .cq-tab-content { border: 0; box-shadow: none; padding: 0; background: transparent; }
.cq-tab-help { color: var(--cq-muted); font-size: 13px; margin: 0 0 12px; }
.cq-tab-actions { display: flex; justify-content: flex-end; padding: 14px 0 0; }
.cq-ui .cq-table-compact > thead > tr > th,
.cq-ui .cq-table-compact > tbody > tr > td { padding: 9px 10px !important; font-size: 12.5px; }
.cq-ui .cq-table-compact > tfoot > tr > td { padding: 10px !important; border-top: 2px solid var(--cq-line) !important; background: #f6f8f7; }
.cq-cell-accent { background: rgba(0,166,80,.07); font-weight: 700; color: var(--cq-green-800); }
.cq-ui .cq-empty-row { text-align: center; color: var(--cq-muted); padding: 28px 12px !important; white-space: normal !important; }
.cq-ui .table .column-check input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--cq-green-700); cursor: pointer; }

@media (max-width: 991px) {
  .cq-hv #hv-datos fieldset > .row > [class*="col-md-"] { grid-column: span 6; }
  .cq-hv #hv-datos fieldset > .row > .col-md-12 { grid-column: 1 / -1; }
  .cq-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cq-hv-nav { top: 70px; }
}
@media (max-width: 767px) {
  .cq-hv-profile { grid-template-columns: auto minmax(0, 1fr); padding: 18px; gap: 14px; border-radius: 20px; }
  .cq-hv-photo-big { width: 68px; height: 68px; border-radius: 18px; font-size: 22px; }
  .cq-hv-id h2 { font-size: 20px; }
  .cq-hv-actions { grid-column: 1 / -1; }
  .cq-ui .cq-hv-actions .btn { width: 100%; }
  .cq-hv-nav { top: 66px; margin-left: -2px; margin-right: -2px; }
  .cq-hv-sec { scroll-margin-top: 130px; }
  .cq-hv #hv-datos fieldset > .row { grid-template-columns: 1fr; }
  .cq-hv #hv-datos fieldset > .row > [class*="col-md-"] { grid-column: 1 / -1; }
  .cq-grid--3 { grid-template-columns: 1fr; }
  .cq-search-input { max-width: none; }
  .cq-ui .cq-search-row .btn { flex: 1 1 100%; }
  .cq-hv .panel-foot { padding: 12px 16px; }
  .cq-hv .panel-foot .btn { flex: 1 1 100%; }
  .cq-ui .nav.cq-tabs { display: flex; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .cq-ui .nav.cq-tabs > li > a { white-space: nowrap; }
}
/* Selectores generados por Bonfire (form_dropdown) dentro de la hoja de vida */
.cq-hv #hv-datos fieldset > .row > [class*="col-md-"] .form-group { margin: 0; }
.cq-hv #hv-datos fieldset > .row > [class*="col-md-"] .form-group > label:empty { display: none; }
.cq-hv #hv-datos fieldset > .row > [class*="col-md-"] .form-group > [class*="col-md-"] { float: none; width: 100%; padding: 0; }
.cq-ui input[type=file] { font-size: 13px; color: var(--cq-muted); }
.cq-ui input[type=file]::file-selector-button {
  margin-right: 12px; height: 38px; padding: 0 16px; border: 1px solid var(--cq-line); border-radius: 10px;
  background: #fff; color: var(--cq-green-700); font-weight: 600; font-family: var(--cq-font); cursor: pointer;
}
.cq-ui input[type=file]::file-selector-button:hover { background: var(--cq-green-50); border-color: #c8e8d6; }
@media (max-width: 767px) { .cq-hv-profile { align-items: start; } }

/* ==========================================================================
   Contratación 2.0 (contratos, contratantes y plantillas) - 2026-10-23
   ========================================================================== */
.cq-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cq-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cq-span-2 { grid-column: span 2; }
.cq-grid > div > .control-label, .cq-grid > div > label { display: block; padding-top: 0 !important; margin: 0 0 6px; text-align: left !important; }
.cq-var { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #eef3f0; color: var(--cq-green-700); font: 600 10.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0; vertical-align: 1px; white-space: nowrap; }
.cq-strong { font-weight: 600; color: var(--cq-ink); }
.cq-muted-sm { color: var(--cq-muted); font-size: 11.5px; display: block; line-height: 1.35; }
.cq-badge--neutral { background: #eef3f0; color: var(--cq-slate); }
.cq-badge--neutral::before { background: var(--cq-green-500); }
.cq-hint-line { margin: 14px 0 0; color: var(--cq-muted); font-size: 12.5px; }
.cq-hint-line i { color: var(--cq-green-500); margin-right: 4px; }
.cq-modal-help { color: var(--cq-muted); font-size: 13px; margin: 0 0 14px; }
.cq-modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.cq-mfp .panel-body textarea { min-height: 96px; resize: vertical; }
.cq-mfp .panel-body > label { display: block; margin: 0 0 6px; }
.cq-alert--compact { padding: 12px 14px; margin-bottom: 14px; }
.cq-alert--compact i { font-size: 18px; }
.cq-alert--compact h4 { font-size: 13.5px; }
.cq-alert--compact p { font-size: 12.5px; }
.cq-empty--card { background: #fff; border: 1px dashed #cfdcd5; border-radius: var(--cq-radius); padding: 40px 20px; }
.cq-empty--card b { display: block; color: var(--cq-ink); font-size: 15px; margin-bottom: 4px; }
.cq-empty--card i { color: var(--cq-green-500); opacity: .55; }

/* Filtros del listado de contratos */
.cq-filter-panel .panel-body { padding: 16px 18px !important; }
.cq-filters .cq-field--sm { min-width: 150px; flex: 1 1 150px; max-width: 210px; }
.cq-filters .cq-field--btn { min-width: 0; }
.cq-filters .cq-field--btn .btn { height: 40px; padding: 0 22px; }
.cq-filters .cq-field .select2-container { width: 100% !important; }
.cq-table-panel { padding: 8px 14px 14px !important; }
.cq-ui .dt-buttons { display: inline-flex; gap: 6px; padding: 10px 0 0; }
.cq-ui .dt-buttons .dt-button,
.cq-ui .dt-buttons .btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; margin: 0;
  border: 1px solid var(--cq-line); border-radius: 10px; background: #fff; background-image: none;
  color: var(--cq-green-700); font: 600 12.5px var(--cq-font); box-shadow: 0 1px 2px rgba(7,42,27,.05);
}
.cq-ui .dt-buttons .dt-button:hover { background: var(--cq-green-50) !important; border-color: #c8e8d6; }
.cq-table-ctr > tbody > tr > td { white-space: nowrap; }
.cq-table-ctr > tbody > tr > td:nth-child(3),
.cq-table-ctr > tbody > tr > td:nth-child(4) { white-space: normal; min-width: 180px; }
.cq-table-ctr .cq-code a { color: inherit; text-decoration: none; border-bottom: 1px dashed currentColor; }
.cq-table-ctr .cq-code a:hover { color: var(--cq-green-600); }
.cq-ui tr.cq-row-off > td { background: #fafbfb; }
.cq-ui tr.cq-row-off > td, .cq-ui tr.cq-row-void > td { color: var(--cq-muted) !important; }
.cq-ui tr.cq-row-void > td { background: #fff8f7; }
.cq-btn-pair { display: inline-flex; gap: 4px; }
.cq-link-action { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--cq-green-700); text-decoration: none; border-bottom: 1px dashed rgba(0,107,55,.4); }
.cq-link-action:hover, .cq-link-action:focus { color: var(--cq-green-600); text-decoration: none; }
.cq-ui .btn.cq-btn-danger-soft { color: var(--cq-red-600) !important; border-color: #f0c4be !important; }
.cq-ui .btn.cq-btn-danger-soft:hover { background: var(--cq-red-100) !important; }

/* Crear contrato */
.cq-party {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 18px 20px; margin: 0 0 18px; border-radius: var(--cq-radius); color: #fff;
  background: radial-gradient(380px 200px at 100% 0%, rgba(47,210,127,.28), transparent 60%), linear-gradient(140deg, #0b3d27 0%, #072a1b 70%);
  box-shadow: var(--cq-shadow);
}
.cq-party-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.12); font-size: 20px; color: var(--cq-green-400); }
.cq-party small { display: block; color: rgba(255,255,255,.6); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.cq-party b { display: block; font-family: var(--cq-font-display); font-size: 18px; line-height: 1.25; color: #fff; }
.cq-party-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: rgba(255,255,255,.78); font-size: 12.5px; }
.cq-party-meta i { color: var(--cq-green-400); margin-right: 3px; }
.cq-party-resp { text-align: right; padding-left: 16px; border-left: 1px solid rgba(255,255,255,.14); }
.cq-party-resp b { font-size: 14.5px; }
.cq-party-resp span { color: rgba(255,255,255,.7); font-size: 12.5px; }
.cq-input-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; font-weight: 700 !important; color: var(--cq-green-700) !important; letter-spacing: .06em; }
.cq-load-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 0 0 14px; border-radius: 12px; background: var(--cq-green-50); border: 1px solid #d3ecdf; color: var(--cq-slate); font-size: 12.5px; }
.cq-load-bar i.fa-magic { color: var(--cq-green-600); margin-right: 4px; }
.cq-actionbar--sticky { position: sticky; bottom: 12px; z-index: 20; box-shadow: var(--cq-shadow-lg); }
.cq-ctr-form .cke { border-radius: 12px; overflow: hidden; border-color: var(--cq-line) !important; }

/* Contratantes */
.cq-cell-stack b { display: block; font-weight: 600; color: var(--cq-ink); line-height: 1.3; }
.cq-cell-stack small { display: block; color: var(--cq-muted); font-size: 11.5px; line-height: 1.4; }
.cq-cell-stack small i { width: 13px; color: var(--cq-green-600); }
.cq-ui .cq-bulkbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 4px 0; color: var(--cq-muted); font-size: 12.5px; }
.cq-ui a.cq-person-link, .cq-ui .cq-cell-stack a { color: var(--cq-green-700); font-weight: 600; }

/* Plantillas y membretes */
.cq-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.cq-thumb { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--cq-line); border-radius: 14px; background: #fff; }
.cq-thumb-title { font-size: 12px; font-weight: 700; color: var(--cq-slate); display: flex; align-items: center; gap: 6px; }
.cq-thumb-title i { color: var(--cq-green-600); }
.cq-thumb-img { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f3f6f4 center / contain no-repeat; border: 1px solid #edf1ef; }
.cq-thumb-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.cq-thumb-img--empty { display: grid; place-items: center; color: #b7c4bd; font-size: 12px; }
.cq-thumb input[type=file] { max-width: 100%; }
.cq-thumb--wide .cq-thumb-img { aspect-ratio: 16 / 10; }
.cq-vars-box { padding: 14px 16px; border-radius: 12px; background: var(--cq-blue-100); border: 1px solid #c9ddf3; color: #18518a; font-size: 12.5px; line-height: 1.9; }
.cq-vars-box b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.cq-tpl-name { display: flex; align-items: center; gap: 10px; }
.cq-tpl-ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--cq-green-50); color: var(--cq-green-700); }
.cq-tpl-ico--dyn { background: var(--cq-blue-100); color: var(--cq-blue-600); }

@media (max-width: 991px) {
  .cq-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cq-thumbs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cq-party { grid-template-columns: auto minmax(0, 1fr); }
  .cq-party-resp { grid-column: 1 / -1; text-align: left; border-left: 0; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,.14); }
}
@media (max-width: 767px) {
  .cq-grid--2, .cq-grid--4 { grid-template-columns: 1fr; }
  .cq-span-2 { grid-column: 1 / -1; }
  .cq-filters .cq-field--sm { max-width: none; flex: 1 1 calc(50% - 6px); min-width: calc(50% - 6px); }
  .cq-filters .cq-field--btn, .cq-filters .cq-field--btn .btn { width: 100%; }
  .cq-thumbs { grid-template-columns: 1fr; }
  .cq-load-bar .btn { width: 100%; }
  .cq-actionbar--sticky { bottom: 8px; }
  .cq-modal-actions .btn { flex: 1 1 100%; }
  .cq-party { padding: 16px; }
}
.cq-ctte #tbl_contratantes > tbody > tr > td { white-space: normal; vertical-align: top; }
.cq-ctte #tbl_contratantes > tbody > tr > td:nth-child(2) { min-width: 210px; }
.cq-ctte #tbl_contratantes > tbody > tr > td.cq-wrap { min-width: 150px; max-width: 220px; }
.cq-ctte #tbl_contratantes .cq-cell-stack small { word-break: break-word; }
.cq-ctte #tbl_contratantes > tbody > tr > td:nth-child(3) { min-width: 190px; }
.cq-ctte #tbl_contratantes > tbody > tr > td:nth-child(5) { min-width: 230px; }
.cq-ctte #tbl_contratantes > tbody > tr > td:nth-child(n+6) { white-space: nowrap; }
.cq-ctte #tbl_contratantes > tbody > tr > td:nth-child(n+6) small { word-break: normal; }

/* Crédito Osmontech (login) - 2026-10-24 */
.cq-credit { display: inline-flex; align-items: center; gap: 4px; color: var(--cq-muted); text-decoration: none; font-size: 12px; transition: color .15s; }
.cq-credit strong { color: var(--cq-green-700); font-weight: 700; letter-spacing: .01em; }
.cq-credit:hover, .cq-credit:focus { color: var(--cq-ink); text-decoration: none; }
.cq-credit:hover strong { color: var(--cq-green-600); }
.cq-credit-arrow { font-size: 11px; margin-left: 2px; opacity: .7; }
.cq-credit--dark { display: flex; margin-top: 6px; color: rgba(255,255,255,.55); }
.cq-credit--dark strong { color: var(--cq-green-400); }
.cq-credit--dark:hover, .cq-credit--dark:focus { color: #fff; }
.cq-credit--dark:hover strong { color: #fff; }
.cq-login-copy.cq-login-credit { margin-top: 8px; }
