:root {
  --turquesa: #218aa1;
  --azul-marino: #22354d;
  --azul-petroleo: #1d5870;
  --gris: #a5b4bb;

  --fondo: #f4f7f9;
  --blanco: #ffffff;

  --texto: #1e293b;
  --texto-suave: #64748b;

  --borde: #e2e8f0;

  --verde: #22a06b;
  --verde-bg: #e9f8f1;

  --ambar: #d98b19;
  --ambar-bg: #fff5dc;

  --rojo: #d94b4b;
  --rojo-bg: #fdecec;

  --sidebar-width: 310px;
}


/* ============================================================
   GENERAL
============================================================ */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: var(--fondo);
  color: var(--texto);
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: flex;
}


/* ============================================================
   MAIN
============================================================ */

.main {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));

  padding: 30px 38px 50px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-bottom: 30px;
}

.topbar h1 {
  margin: 0;
  font-size: 28px;
}

.topbar p {
  color: var(--texto-suave);
  margin: 6px 0 0;
}

.user-box {
  background: white;

  border: 1px solid var(--borde);
  border-radius: 12px;

  padding: 9px 14px 9px 9px;

  display: flex;
  gap: 10px;
  align-items: center;
}

.avatar {
  width: 38px;
  height: 38px;

  border-radius: 50%;

  background: var(--turquesa);
  color: white;

  display: grid;
  place-items: center;

  font-weight: 700;
}

.user-box strong,
.user-box span {
  display: block;
}

.user-box strong {
  font-size: 13px;
}

.user-box span {
  color: var(--texto-suave);
  font-size: 11px;
  margin-top: 2px;
}


/* ============================================================
   STATS
============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 18px;

  margin-bottom: 32px;
}

.stat-card {
  background: white;

  border: 1px solid var(--borde);
  border-radius: 14px;

  padding: 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  box-shadow: 0 4px 15px rgba(34,53,77,.04);
}

.stat-card span {
  color: var(--texto-suave);
  font-size: 13px;
}

.stat-card strong {
  display: block;

  margin-top: 8px;

  font-size: 27px;
}

.stat-icon {
  width: 48px;
  height: 48px;

  border-radius: 12px;

  display: grid;
  place-items: center;

  font-weight: 700;
}

.stat-icon.blue {
  background: #e4f4f7;
  color: var(--turquesa);
}

.stat-icon.green {
  background: var(--verde-bg);
  color: var(--verde);
}

.stat-icon.amber {
  background: var(--ambar-bg);
  color: var(--ambar);
}

.stat-icon.red {
  background: var(--rojo-bg);
  color: var(--rojo);
}


/* ============================================================
   SECTIONS
============================================================ */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 18px;
  margin: 0;
}

.section-header p {
  margin: 5px 0 0;

  color: var(--texto-suave);
  font-size: 13px;
}


/* ============================================================
   QUICK ACTIONS
============================================================ */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 16px;

  margin-bottom: 32px;
}

.quick-card {
  background: white;

  border: 1px solid var(--borde);
  border-radius: 13px;

  padding: 18px;

  display: flex;
  align-items: center;
  gap: 14px;

  cursor: pointer;

  text-align: left;

  transition: .2s;
}

.quick-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 8px 22px rgba(34,53,77,.08);

  border-color: var(--gris);
}

.quick-card.primary {
  border-left: 4px solid var(--turquesa);
}

.quick-icon {
  width: 42px;
  height: 42px;

  border-radius: 10px;

  display: grid;
  place-items: center;

  background: #e4f4f7;
  color: var(--turquesa);

  font-size: 20px;
  font-weight: 700;
}

.quick-card strong,
.quick-card span {
  display: block;
}

.quick-card strong {
  margin-bottom: 4px;
}

.quick-card div span {
  color: var(--texto-suave);
  font-size: 12px;
}


/* ============================================================
   PANEL / TABLE
============================================================ */

.panel {
  background: white;

  border: 1px solid var(--borde);
  border-radius: 15px;

  padding: 22px;

  box-shadow: 0 5px 18px rgba(34,53,77,.04);
}

.btn-outline {
  border: 1px solid var(--turquesa);

  background: white;
  color: var(--turquesa);

  padding: 9px 14px;

  border-radius: 8px;

  cursor: pointer;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;

  border-collapse: collapse;
}

th {
  background: #f7f9fb;

  color: var(--texto-suave);

  font-size: 12px;
  text-align: left;

  padding: 12px;
}

td {
  padding: 14px 12px;

  border-bottom: 1px solid var(--borde);

  font-size: 13px;
}

.badge {
  display: inline-flex;

  align-items: center;

  border-radius: 50px;

  padding: 5px 9px;

  font-size: 11px;
  font-weight: 600;
}

.badge.active {
  background: var(--verde-bg);
  color: var(--verde);
}

.badge.inactive {
  background: #f1f5f9;
  color: #64748b;
}

.loading {
  text-align: center;
  color: var(--texto-suave);

  padding: 30px;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1100px) {

  .stats,
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

}


@media (max-width: 760px) {

  .stats,
  .quick-actions {
    grid-template-columns: 1fr;
  }

}

/* ==========================================================
   PIGI - FORMULARIOS Y PAGINAS INTERNAS
   Nueva OT / Consultas
========================================================== */


/* ---------- PANELES ---------- */

.panel {
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 4px 18px rgba(31, 53, 82, 0.06);
  border: 1px solid #dfe7ec;
}

.form-section {
  width: 100%;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 5px;
  font-size: 21px;
  color: #1f3552;
}

.section-header p {
  margin: 0;
  color: #687b8f;
  font-size: 15px;
}


/* ---------- FORMULARIOS ---------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-grid-search {
  grid-template-columns: minmax(0, 3fr) minmax(180px, 1fr);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-field-wide {
  width: 100%;
}

.form-field label {
  color: #41566f;
  font-size: 14px;
  font-weight: 600;
}

.form-field input,
.form-field select,
.form-field textarea,
.search-main input,
.validation-card select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccd8df;
  background: #ffffff;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 15px;
  color: #1f3552;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.search-main input:focus,
.validation-card select:focus {
  border-color: #2693a8;
  box-shadow: 0 0 0 3px rgba(38, 147, 168, 0.12);
}

.form-field input:disabled {
  background: #f3f6f8;
  color: #7b8b99;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-action {
  justify-content: flex-end;
}


/* ---------- BOTONES ---------- */

.btn-primary,
.btn-outline,
.btn-secondary,
.btn-text,
.button-link {
  min-height: 44px;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-primary {
  background: #2693a8;
  color: #ffffff;
  border: 1px solid #2693a8;
}

.btn-primary:hover {
  background: #1f6a7d;
  border-color: #1f6a7d;
}

.btn-outline {
  background: #ffffff;
  color: #2693a8;
  border: 1px solid #2693a8;
}

.btn-outline:hover {
  background: #eef8fa;
}

.btn-secondary {
  background: #edf2f5;
  color: #41566f;
  border: 1px solid #d8e1e6;
}

.btn-text {
  border: none;
  background: transparent;
  color: #2693a8;
  padding: 8px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* ---------- INFORMACION VEHICULO ---------- */

.info-placeholder {
  margin-top: 22px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #eef8fa;
  color: #526b7b;
  border-left: 4px solid #2693a8;
}


/* ---------- VALIDACIONES TECNICAS ---------- */

.validation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.validation-card {
  background: #f5f8fa;
  border-radius: 12px;
  padding: 16px;
}

.validation-card span {
  display: block;
  margin-bottom: 9px;
  font-weight: 600;
  color: #1f3552;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid #e3eaee;
}

.checklist label {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  background: #f8fafb;
  border-radius: 9px;
  color: #41566f;
}

.checklist input {
  accent-color: #2693a8;
}


/* ---------- TABLAS ---------- */

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

.table-wrapper table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrapper thead {
  background: #f2f6f8;
}

.table-wrapper th {
  text-align: left;
  padding: 15px 14px;
  color: #52677f;
  font-size: 14px;
  white-space: nowrap;
}

.table-wrapper td {
  padding: 16px 14px;
  border-bottom: 1px solid #e3eaee;
  color: #273b52;
}

.loading {
  text-align: center;
  color: #708296 !important;
  padding: 30px !important;
}


/* ---------- TOTAL DE LA ORDEN ---------- */

.order-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 25px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e3eaee;
}

.order-total span {
  color: #63778c;
}

.order-total strong {
  font-size: 26px;
  color: #1f3552;
}


/* ---------- EVIDENCIAS ---------- */

.upload-area {
  min-height: 150px;
  border: 2px dashed #b9cbd3;
  border-radius: 14px;
  background: #f8fbfc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #62778a;
  text-align: center;
}

.upload-area strong {
  color: #1f3552;
  font-size: 17px;
}


/* ---------- BOTONES INFERIORES OT ---------- */

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 5px 0 35px;
}


/* ==========================================================
   CONSULTAS
========================================================== */

.search-main {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-main input {
  min-height: 48px;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 22px;
}

.result-actions {
  display: flex;
  gap: 10px;
}


/* ---------- FICHA DEL VEHICULO ---------- */

.vehicle-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.summary-item {
  padding: 18px;
  background: #f4f8fa;
  border-radius: 12px;
}

.summary-item span {
  display: block;
  color: #708296;
  font-size: 13px;
  margin-bottom: 6px;
}

.summary-item strong {
  color: #1f3552;
  font-size: 17px;
}

.vehicle-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}


/* ---------- ESTADOS ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
}

.badge.inactive {
  background: #edf2f5;
  color: #687b8f;
}


/* ---------- RESPONSIVE ---------- */

@media (max-width: 1100px) {

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

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

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

}

@media (max-width: 760px) {

  .form-grid,
  .form-grid-search,
  .validation-grid,
  .checklist,
  .vehicle-summary {
    grid-template-columns: 1fr;
  }

  .search-main {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-actions,
  .vehicle-actions {
    flex-direction: column;
    align-items: stretch;
  }

}

/* ==========================================================
   PIGI - AJUSTE VISUAL GLOBAL
   Mayor contraste / identidad INGNOVAC
========================================================== */

:root {
  --azul-marino: #1d3048;
  --azul-petroleo: #165a70;
  --turquesa: #168fa6;
  --turquesa-intenso: #087d96;

  --fondo: #edf2f5;
  --blanco: #ffffff;

  --texto: #17283d;
  --texto-suave: #566a7b;

  --borde: #d3dfe5;

  --verde: #16875d;
  --verde-bg: #e5f4ec;

  --ambar: #c47a12;
  --ambar-bg: #fff0cf;

  --rojo: #c83d45;
  --rojo-bg: #fbe7e8;
}


/* FONDO GENERAL */

body {
  background: var(--fondo);
  color: var(--texto);
}


/* TITULOS */

.topbar h1 {
  color: #17283d;
  font-weight: 750;
}

.topbar p {
  color: #607487;
}


/* TARJETAS */

.stat-card {
  border: 1px solid #d5e0e6;
  box-shadow: 0 7px 20px rgba(29,48,72,.07);
}

.stat-card strong {
  color: #17283d;
}

.stat-card span {
  color: #5c7082;
}


/* PANELES */

.panel {
  border: 1px solid #d3dfe5;
  box-shadow: 0 8px 24px rgba(29,48,72,.07);
}

.section-header h2 {
  color: #183b52;
}

.section-header p {
  color: #607487;
}


/* BOTONES */

.btn-primary {
  background: #087d96;
  border-color: #087d96;
  box-shadow: 0 4px 10px rgba(8,125,150,.18);
}

.btn-primary:hover {
  background: #165a70;
  border-color: #165a70;
}

.btn-outline {
  color: #087d96;
  border-color: #168fa6;
}

.btn-outline:hover {
  background: #e8f5f7;
}

.btn-text {
  color: #087d96;
  font-weight: 600;
}


/* CAMPOS */

.form-field label {
  color: #314a62;
}

.form-field input,
.form-field select,
.form-field textarea,
.search-main input,
.validation-card select {
  border-color: #c4d3db;
  color: #17283d;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.search-main input:focus,
.validation-card select:focus {
  border-color: #168fa6;
  box-shadow: 0 0 0 3px rgba(22,143,166,.14);
}


/* TABLAS */

.table-wrapper thead {
  background: #eaf1f4;
}

.table-wrapper th {
  color: #314a62;
  font-weight: 700;
}

.table-wrapper td {
  color: #233a50;
}


/* ESTADOS */

.badge.active {
  background: var(--verde-bg);
  color: var(--verde);
}

.badge.inactive {
  background: #e9eef1;
  color: #596d7e;
}


/* CARDS ACCIONES RAPIDAS */

.quick-card {
  border: 1px solid #d3dfe5;
  box-shadow: 0 5px 16px rgba(29,48,72,.05);
}

.quick-card:hover {
  border-color: #9fc4cf;
  box-shadow: 0 9px 22px rgba(29,48,72,.10);
}

.quick-icon {
  background: #e0f1f4;
  color: #087d96;
}


/* BLOQUES INFORMATIVOS */

.info-placeholder {
  background: #e4f3f6;
  border-left-color: #168fa6;
  color: #3c5d6d;
}

.validation-card,
.summary-item {
  background: #f0f5f7;
}


/* USUARIO */

.user-box {
  border-color: #d3dfe5;
  box-shadow: 0 4px 12px rgba(29,48,72,.05);
}

.avatar {
  background: #168fa6;
}

/* ==========================================================
   PIGI - CONTRASTE VISUAL DEFINITIVO
========================================================== */

body {
  background: #dfe8ed !important;
}

.main {
  background: #e6edf1 !important;
}

.topbar {
  background: #ffffff !important;
  padding: 22px 26px !important;
  border-radius: 16px !important;
  margin-bottom: 28px !important;
  box-shadow: 0 6px 18px rgba(23, 43, 66, 0.08) !important;
}

.topbar h1 {
  color: #172b42 !important;
}

.panel {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 8px 24px rgba(23, 43, 66, 0.10) !important;
}

.stat-card {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 7px 20px rgba(23, 43, 66, 0.10) !important;
}

.section-header h2 {
  color: #155a70 !important;
}

.btn-primary {
  background: #087d96 !important;
  border-color: #087d96 !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background: #155a70 !important;
}

.table-wrapper thead {
  background: #dcebef !important;
}

.table-wrapper th {
  color: #17354b !important;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: #f9fbfc !important;
  border: 1px solid #adc2cc !important;
}

.quick-card {
  background: #ffffff !important;
  border: none !important;
  box-shadow: 0 7px 18px rgba(23, 43, 66, 0.09) !important;
}

.quick-icon {
  background: #d6eef3 !important;
  color: #087d96 !important;
}

.info-placeholder {
  background: #d8eef3 !important;
  color: #244c5d !important;
}

.validation-card,
.summary-item {
  background: #e8f1f4 !important;
}
/* ==========================================================
   PIGI - SIDEBAR DEFINITIVO
   Diseño basado en la referencia aprobada
========================================================== */

/* ==========================================================
   ESTRUCTURA GENERAL
========================================================== */

.sidebar {
  width: var(--sidebar-width) !important;
  min-width: var(--sidebar-width) !important;
  height: 100vh !important;

  position: fixed !important;
  top: 0;
  left: 0;

  display: flex !important;
  flex-direction: column;

  background:
    linear-gradient(
      180deg,
      #21516f 0%,
      #194561 48%,
      #153c56 100%
    ) !important;

  color: #ffffff;

  overflow: hidden;

  box-shadow:
    6px 0 24px rgba(17, 45, 64, 0.16);

  z-index: 100;
}


/* El contenido principal respeta el nuevo ancho */

.main {
  margin-left: var(--sidebar-width) !important;
  width: calc(100% - var(--sidebar-width)) !important;
}


/* ==========================================================
   LOGO + PIGI
========================================================== */

.sidebar-brand {
  padding: 24px 28px 17px;

  text-align: center;

  flex-shrink: 0;
}


.sidebar-logo {
  display: block;

  width: 145px;
  max-width: 82%;
  max-height: 105px;

  margin: 0 auto;

  object-fit: contain;
}


.sidebar-brand-line {
  height: 1px;

  margin: 15px 12px 12px;

  background:
    rgba(255, 255, 255, 0.24);
}


.sidebar-pigi {
  display: flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;

  font-family:
    "Trebuchet MS",
    "Arial Rounded MT Bold",
    Arial,
    sans-serif;

  font-size: 38px;
  font-weight: 800;

  line-height: 1;

  letter-spacing: 4px;
}


.sidebar-pigi .pigi-accent {
  color: #24bdd4;
}


/* ==========================================================
   CONTENEDOR DEL MENU
========================================================== */

.sidebar .menu {
  flex: 1;

  padding: 8px 17px 24px !important;

  overflow-y: auto;
  overflow-x: hidden;
}


.sidebar .menu::-webkit-scrollbar {
  width: 4px;
}


.sidebar .menu::-webkit-scrollbar-track {
  background: transparent;
}


.sidebar .menu::-webkit-scrollbar-thumb {
  background:
    rgba(255, 255, 255, 0.18);

  border-radius: 20px;
}


/* ==========================================================
   TITULOS DE SECCION
========================================================== */

.sidebar-section-title {
  display: flex;
  align-items: center;

  gap: 10px;

  margin: 18px 7px 9px;

  color: #31bdd5;

  font-family:
    "Trebuchet MS",
    Arial,
    sans-serif;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.4px;
}


.sidebar-section-title::before,
.sidebar-section-title::after {
  content: "";

  flex: 1;

  height: 1px;

  background:
    rgba(61, 188, 212, 0.30);
}


.sidebar-section-title span {
  white-space: nowrap;
}


/* ==========================================================
   OPCIONES PRINCIPALES
========================================================== */

.sidebar .menu-item {
  position: relative;

  width: 100%;
  min-height: 49px;

  display: flex;
  align-items: center;

  gap: 14px;

  padding: 10px 13px !important;

  margin: 3px 0 !important;

  border: 0 !important;

  border-radius: 10px !important;

  background: transparent !important;

  color:
    rgba(255, 255, 255, 0.92) !important;

  font-family:
    "Trebuchet MS",
    Arial,
    sans-serif;

  font-size: 15px;
  font-weight: 600;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}


.sidebar .menu-item:hover {
  background:
    rgba(255, 255, 255, 0.08) !important;

  color: #ffffff !important;

  transform:
    translateX(1px);
}


/* Opción seleccionada */

.sidebar .menu-item.active {
  background:
    linear-gradient(
      90deg,
      rgba(47, 126, 171, 0.96),
      rgba(42, 111, 157, 0.82)
    ) !important;

  color: #ffffff !important;

  box-shadow:
    0 5px 16px rgba(7, 35, 52, 0.16);
}


.sidebar .menu-item.active::before {
  content: "";

  position: absolute;

  top: 7px;
  bottom: 7px;
  left: 0;

  width: 4px;

  border-radius:
    0 4px 4px 0;

  background: #27c3db;
}


/* ==========================================================
   ICONOS
========================================================== */

.sidebar .menu-icon {
  width: 26px;
  height: 26px;

  flex:
    0 0 26px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: #ffffff;
}


.sidebar .menu-icon svg {
  width: 23px;
  height: 23px;

  display: block;
}


.sidebar .menu-label {
  flex: 1;

  min-width: 0;
}


/* ==========================================================
   FLECHAS
========================================================== */

.sidebar .menu-chevron,
.sidebar .menu-arrow {
  margin-left: auto;

  flex-shrink: 0;

  color:
    rgba(255, 255, 255, 0.88);

  font-size: 21px;

  line-height: 1;
}


.sidebar .menu-arrow {
  transition:
    transform 0.22s ease;
}


/* ==========================================================
   ORDENES DE TRABAJO
========================================================== */

.sidebar .menu-group {
  width: 100%;
}


/* El submenu empieza cerrado */

.sidebar .submenu {
  display: none !important;

  margin:
    4px 5px 9px 25px !important;

  padding:
    5px 6px !important;

  border-left:
    1px solid
    rgba(61, 188, 212, 0.22);

  background: transparent;
}


/* Solo se muestra al desplegar */

.sidebar .submenu.submenu-open {
  display: block !important;
}


/* Rotación de flecha */

.sidebar .menu-group:has(.submenu-open)
.menu-arrow {
  transform:
    rotate(180deg);
}


/* ==========================================================
   OPCIONES DEL SUBMENU
========================================================== */

.sidebar .submenu-item {
  width: 100%;
  min-height: 42px;

  display: flex;
  align-items: center;

  gap: 10px;

  padding: 8px 11px;

  margin: 2px 0;

  border: 0;

  border-radius: 8px;

  background: transparent;

  color:
    rgba(255, 255, 255, 0.80);

  font-family:
    "Trebuchet MS",
    Arial,
    sans-serif;

  font-size: 14px;
  font-weight: 600;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.18s ease,
    color 0.18s ease;
}


.sidebar .submenu-item:hover {
  background:
    rgba(255, 255, 255, 0.07);

  color: #ffffff;
}


.sidebar .submenu-item.active {
  background:
    rgba(38, 132, 177, 0.34);

  color: #ffffff;
}


.sidebar .submenu-dot {
  width: 6px;
  height: 6px;

  flex:
    0 0 6px;

  border-radius: 50%;

  background: #27bfd7;
}


.sidebar .submenu-icon {
  width: 21px;
  height: 21px;

  flex:
    0 0 21px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  color:
    rgba(255, 255, 255, 0.88);
}


.sidebar .submenu-icon svg {
  width: 19px;
  height: 19px;
}


/* ==========================================================
   PIE / USUARIO
========================================================== */

.sidebar-footer {
  flex-shrink: 0;

  padding:
    15px 20px 20px !important;

  border-top:
    1px solid
    rgba(255, 255, 255, 0.13) !important;

  color: #ffffff !important;
}


.sidebar-user {
  display: flex;
  align-items: center;

  gap: 11px;
}


.sidebar-avatar {
  width: 40px;
  height: 40px;

  flex:
    0 0 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;

  background:
    linear-gradient(
      135deg,
      #27abc5,
      #347da8
    );

  color: #ffffff;

  font-size: 14px;
  font-weight: 700;
}


.sidebar-user-data {
  min-width: 0;

  display: flex;
  flex-direction: column;

  text-align: left;
}


.sidebar-user-data strong {
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;
}


.sidebar-user-data span {
  margin-top: 2px;

  color:
    rgba(255, 255, 255, 0.62);

  font-size: 11px;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 760px) {

  .sidebar {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
    width: 100% !important;
  }

}
/* ============================================================
   PIGI - ESTADOS ACTIVOS DEL MENU
============================================================ */

/* Opción principal seleccionada */
.sidebar .menu-item.active {
  background: #0d314a;
  color: #ffffff;
  box-shadow:
    inset 4px 0 0 #20c5df,
    0 6px 16px rgba(0, 0, 0, 0.14);
}

/* Órdenes de Trabajo cuando alguno de sus hijos está activo */
.sidebar #btnOrdenes.active {
  background: #0d314a;
  color: #ffffff;
}

/* Subopciones normalmente transparentes */
.sidebar .submenu-item {
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
}

/* Subopción seleccionada */
.sidebar .submenu-item.active {
  background: #123d59;
  color: #ffffff;
  font-weight: 700;
}

/* El punto de la opción seleccionada */
.sidebar .submenu-item.active .submenu-dot {
  color: #20c5df;
}

/* Hover sin confundirlo con el seleccionado */
.sidebar .menu-item:not(.active):hover,
.sidebar .submenu-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.08);
}
/* ============================================================
   PIGI - SUBMENU ORDENES DE TRABAJO
============================================================ */

/* Contenedor oscuro que agrupa Nueva OT + Consultas */
#submenuOrdenes.submenu-open {
  background: #0b3049;

  margin: 0 10px 12px 10px;
  padding: 10px;

  border-radius: 0 0 12px 12px;
}


/* Opciones dentro del recuadro oscuro */
#submenuOrdenes .submenu-item {
  width: 100%;
  min-height: 52px;

  padding: 10px 14px;

  border-radius: 9px;

  background: transparent;

  transition:
    background 0.2s ease,
    color 0.2s ease;
}


/* Opción seleccionada: vuelve a ser más clara */
#submenuOrdenes .submenu-item.active {
  background: #19577b;
  color: #ffffff;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.10);
}


/* Hover de opción no seleccionada */
#submenuOrdenes .submenu-item:not(.active):hover {
  background: rgba(255, 255, 255, 0.06);
}
/* ============================================================
   PIGI - FONDO SIDEBAR MAS OSCURO
============================================================ */

.sidebar {
  background:
    linear-gradient(
      180deg,
      #0d3852 0%,
      #082a40 100%
    ) !important;
}
/* ============================================================
   PIGI - MODO COMPACTO
   Reduce tamaños para mostrar más contenido en pantalla
============================================================ */

/* Sidebar un poco más angosto */
:root {
  --sidebar-width: 280px;
}

/* Contenido principal */
.main {
  padding: 20px 22px !important;
}

/* Encabezado superior */
.topbar {
  padding: 16px 20px !important;
  margin-bottom: 20px !important;
}

.topbar h1 {
  font-size: 25px !important;
}

.topbar p {
  font-size: 14px !important;
  margin-top: 3px !important;
}


/* ============================================================
   SIDEBAR COMPACTO
============================================================ */

.sidebar-brand {
  padding: 18px 22px 14px !important;
}

.sidebar-logo {
  max-width: 145px !important;
}

.pigi-title {
  font-size: 38px !important;
  margin-top: 8px !important;
}

.menu {
  padding: 12px 14px !important;
}

.menu-item {
  min-height: 48px !important;
  padding: 10px 14px !important;
  font-size: 15px !important;
}

.menu-section-title {
  margin: 15px 0 10px !important;
  font-size: 11px !important;
}

.icon {
  font-size: 17px !important;
}


/* Submenu Órdenes */
#submenuOrdenes .submenu-item {
  min-height: 44px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
}


/* ============================================================
   CONTENIDO / TARJETAS
============================================================ */

.panel,
.card,
.form-section,
.consulta-card {
  padding: 20px !important;
}

.form-section {
  margin-bottom: 18px !important;
}

.form-section h2,
.panel h2 {
  font-size: 20px !important;
}


/* ============================================================
   FORMULARIOS
============================================================ */

.form-group {
  gap: 5px !important;
}

.form-group label {
  font-size: 13px !important;
}

.form-group input,
.form-group select,
.form-group textarea {
  font-size: 14px !important;
}

.form-group input,
.form-group select {
  min-height: 42px !important;
  padding: 9px 12px !important;
}

.form-grid {
  gap: 14px !important;
}


/* ============================================================
   BOTONES
============================================================ */

.btn,
button.btn {
  min-height: 40px !important;
  padding: 9px 16px !important;
  font-size: 14px !important;
}
/* ============================================================
   PIGI - BOTONES DE ACCION AZUL OSCURO
============================================================ */

/* Botones principales de creación */
.btn-primary,
.btn-nuevo,
.btn-agregar,
button[class*="nuevo"],
button[class*="primary"] {
  background: #0b3049 !important;
  color: #ffffff !important;
  border-color: #0b3049 !important;

  box-shadow:
    0 5px 12px rgba(11, 48, 73, 0.18) !important;
}

/* Hover */
.btn-primary:hover,
.btn-nuevo:hover,
.btn-agregar:hover,
button[class*="nuevo"]:hover,
button[class*="primary"]:hover {
  background: #124563 !important;
  border-color: #124563 !important;
}


/* ============================================================
   ACCIONES RAPIDAS - SOLO EL CUADRO DEL ICONO
============================================================ */

.quick-action .quick-icon,
.quick-action-icon,
.action-icon {
  background: #0b3049 !important;
  color: #ffffff !important;
}

/* Si el icono es SVG */
.quick-action .quick-icon svg,
.quick-action-icon svg,
.action-icon svg {
  stroke: #ffffff !important;
}
/* ============================================================
   PIGI - ACCIONES RAPIDAS
   Tarjeta blanca + icono azul oscuro
============================================================ */

/* Todas las tarjetas permanecen blancas */
.quick-action,
.quick-action.btn-primary,
.quick-action.btn-nuevo,
.quick-action.btn-agregar {
  background: #ffffff !important;
  color: #10283f !important;
  border-color: transparent !important;
}

/* Solo el contenedor del icono */
.quick-action .quick-icon,
.quick-action .quick-action-icon,
.quick-action .action-icon {
  background: #0b3049 !important;
  color: #ffffff !important;
}

/* Iconos SVG */
.quick-action .quick-icon svg,
.quick-action .quick-action-icon svg,
.quick-action .action-icon svg {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

/* Si los iconos usan texto o símbolos */
.quick-action .quick-icon *,
.quick-action .quick-action-icon *,
.quick-action .action-icon * {
  color: #ffffff !important;
} 
/* ============================================================
   PIGI - ACCIONES RAPIDAS
   Tarjetas blancas + iconos azul oscuro
============================================================ */

/* TODAS las tarjetas de acciones rápidas */
.quick-card,
.quick-card.primary {
  background: #ffffff !important;
  color: #10283f !important;
}

/* Títulos */
.quick-card strong,
.quick-card.primary strong {
  color: #10283f !important;
}

/* Textos secundarios */
.quick-card span:not(.quick-icon),
.quick-card.primary span:not(.quick-icon) {
  color: #5f7487 !important;
}

/* CUADRITO DEL ICONO */
.quick-card .quick-icon,
.quick-card.primary .quick-icon {
  background: #0b3049 !important;
  color: #ffffff !important;
}

/* Al pasar el mouse, mantenemos el icono blanco */
.quick-card:hover .quick-icon,
.quick-card.primary:hover .quick-icon {
  background: #0b3049 !important;
  color: #ffffff !important;
}
/* ============================================================
   CENTRAR ICONOS DE ACCIONES RAPIDAS
============================================================ */

.quick-card .quick-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  text-align: center !important;
  line-height: 1 !important;

  padding: 0 !important;
}
/* ============================================================
   PIGI - VALIDACIONES TECNICAS CON BUS
============================================================ */

.validaciones-bus-section {
  overflow: visible;
}


/* ============================================================
   VALIDACIONES SUPERIORES
============================================================ */

.validation-grid-bus {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 16px;

  margin-top: 18px;
  margin-bottom: 22px;
}


.validation-status-card {
  padding: 16px;

  border:
    1px solid #d7e3ea;

  border-radius: 14px;

  background: #ffffff;

  transition:
    border-color .2s ease,
    background .2s ease,
    box-shadow .2s ease;
}


.validation-status-card.is-ok {
  border-color: #8bd5a4;

  background: #f7fcf9;
}


.validation-status-card.has-issue {
  border-color: #f3b36f;

  background: #fffaf5;
}


.validation-card-title {
  display: flex;
  align-items: center;

  gap: 9px;

  margin-bottom: 11px;

  color: #102c43;
}


.validation-card-title strong {
  font-size: 15px;
}


.validation-card-icon {
  width: 29px;
  height: 29px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  background: #e4f3f7;

  color: #078ca7;

  font-size: 17px;
  font-weight: 700;
}


.validation-status-card.has-issue
.validation-card-icon {
  background: #fff0e0;

  color: #e57a14;
}


.validation-status-card select {
  width: 100%;

  min-height: 42px;

  padding: 8px 11px;

  border:
    1px solid #c9d9e2;

  border-radius: 9px;

  background: #ffffff;

  color: #16334a;

  font-size: 14px;
}


/* Comentario de novedad */

.validation-comment-wrap {
  display: none;

  margin-top: 11px;
}


.validation-comment-wrap.visible {
  display: block;
}


.validation-comment-wrap label {
  display: block;

  margin-bottom: 6px;

  color: #536d7e;

  font-size: 12px;
  font-weight: 600;
}


.validation-comment-wrap textarea {
  width: 100%;

  min-height: 65px;

  padding: 9px 10px;

  resize: vertical;

  border:
    1px solid #d4e0e7;

  border-radius: 8px;

  background: #ffffff;

  color: #17364c;

  font-family: inherit;
  font-size: 13px;
}


/* ============================================================
   CONTENEDOR DEL BUS
============================================================ */

.bus-validation-container {
  margin-top: 8px;

  padding: 18px;

  border:
    1px solid #d9e5eb;

  border-radius: 15px;

  background:
    linear-gradient(
      180deg,
      #ffffff 0%,
      #f8fbfc 100%
    );
}


.bus-validation-header {
  margin-bottom: 10px;
}


.bus-validation-header h3 {
  margin: 0;

  color: #11344a;

  font-size: 17px;
}


.bus-validation-header p {
  margin:
    4px 0 0;

  color: #688091;

  font-size: 13px;
}


/* ============================================================
   ESCENARIO DEL BUS
============================================================ */

.bus-stage {
  position: relative;

  width: 100%;
  min-height: 430px;

  margin-top: 6px;

  padding:
    62px 100px 60px;

  border-radius: 13px;

  background:
    #f8fbfc;

  overflow: hidden;
}


.bus-image {
  display: block;

  width: 84%;
  max-width: 980px;

  height: auto;

  margin:
    75px auto 20px;

  object-fit: contain;

  user-select: none;

  pointer-events: none;
}


/* ============================================================
   PUNTOS DEL BUS
============================================================ */

.bus-check-point {
  position: absolute;

  display: flex;
  align-items: center;

  gap: 7px;

  padding: 6px 9px;

  border: 0;

  border-radius: 9px;

  background:
    rgba(255, 255, 255, .93);

  color: #17364c;

  font-family: inherit;

  font-size: 12px;
  font-weight: 650;

  cursor: pointer;

  box-shadow:
    0 3px 10px
    rgba(20, 55, 75, .08);

  transition:
    transform .18s ease,
    background .18s ease,
    color .18s ease,
    box-shadow .18s ease;

  z-index: 5;
}


.bus-check-point:hover {
  transform:
    translateY(-1px);

  box-shadow:
    0 5px 13px
    rgba(20, 55, 75, .13);
}


.bus-point-status {
  width: 22px;
  height: 22px;

  flex:
    0 0 22px;

  display: flex;
  align-items: center;
  justify-content: center;

  border:
    2px solid #a9b9c3;

  border-radius: 50%;

  background: #ffffff;

  color: transparent;

  font-size: 12px;

  transition: .2s;
}


/* REALIZADO */

.bus-check-point.completed {
  background: #eaf8ef;

  color: #15733b;
}


.bus-check-point.completed
.bus-point-status {
  border-color: #37a95d;

  background: #37a95d;

  color: #ffffff;
}


/* NO REALIZADO AL FINALIZAR */

.bus-check-point.not-completed {
  background: #fff0f0;

  color: #a82f2f;
}


.bus-check-point.not-completed
.bus-point-status {
  border-color: #df4040;

  background: #df4040;

  color: #ffffff;
}


/* ============================================================
   POSICIONES
============================================================ */

.point-limpieza {
  top: 52px;
  left: 9%;
}


.point-ajuste {
  top: 138px;
  left: 2%;
}


.point-conteo {
  top: 48px;
  left: 43%;
}


.point-transmision {
  top: 48px;
  right: 16%;
}


.point-voltajes {
  top: 145px;
  right: 1%;
}


.point-conexion {
  top: 235px;
  right: 1%;
}


.point-sensores {
  bottom: 30px;
  left: 10%;
}


.point-sello {
  bottom: 28px;
  left: 43%;
}


.point-herramienta {
  bottom: 28px;
  right: 13%;
}


/* ============================================================
   CHECKBOXES OCULTOS
============================================================ */

.bus-hidden-checks {
  position: absolute;

  width: 1px;
  height: 1px;

  overflow: hidden;

  opacity: 0;

  pointer-events: none;
}


/* ============================================================
   LEYENDA
============================================================ */

.bus-validation-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;

  gap: 28px;

  margin-top: 12px;

  color: #617787;

  font-size: 12px;
}


.bus-validation-legend > div {
  display: flex;
  align-items: center;

  gap: 7px;
}


.legend-dot {
  width: 13px;
  height: 13px;

  display: inline-block;

  border-radius: 50%;
}


.legend-ok {
  background: #37a95d;
}


.legend-pending {
  background: #ffffff;

  border:
    2px solid #9cabb5;
}


.legend-error {
  background: #df4040;
}


/* ============================================================
   RESUMEN
============================================================ */

.validation-summary {
  margin-top: 18px;

  padding: 16px;

  border:
    1px solid #dce6eb;

  border-radius: 14px;

  background: #ffffff;
}


.validation-summary-title {
  margin-bottom: 12px;

  color: #16364d;

  font-size: 14px;
  font-weight: 700;
}


.validation-summary-grid {
  display: grid;

  grid-template-columns:
    150px
    150px
    150px
    minmax(250px, 1fr);

  gap: 12px;
}


.validation-summary-card {
  padding: 13px;

  border:
    1px solid #e0e8ed;

  border-radius: 10px;

  background: #fbfcfd;
}


.validation-summary-card span {
  display: block;

  color: #63798a;

  font-size: 11px;
}


.validation-summary-card strong {
  display: block;

  margin-top: 4px;

  color: #112f46;

  font-size: 24px;
}


.summary-ok strong {
  color: #27924c;
}


.summary-warning strong {
  color: #dd7816;
}


.summary-pending strong {
  color: #697c89;
}


.validation-general-comment label {
  display: block;

  margin-bottom: 6px;

  color: #425f72;

  font-size: 12px;
  font-weight: 650;
}


.validation-general-comment textarea {
  width: 100%;

  min-height: 65px;

  padding: 10px;

  resize: vertical;

  border:
    1px solid #d4e0e7;

  border-radius: 9px;

  font-family: inherit;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1200px) {

  .validation-grid-bus {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }


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


  .validation-general-comment {
    grid-column:
      1 / -1;
  }


  .bus-stage {
    min-height: 460px;

    padding-left: 70px;
    padding-right: 70px;
  }

}


@media (max-width: 800px) {

  .validation-grid-bus {
    grid-template-columns: 1fr;
  }


  .bus-stage {
    min-height: auto;

    padding:
      20px 10px;
  }


  .bus-image {
    width: 100%;

    margin:
      15px auto;
  }


  .bus-check-point {
    position: static;

    width: 100%;

    margin-bottom: 6px;
  }


  .validation-summary-grid {
    grid-template-columns: 1fr;
  }

}
/* ============================================================
   CORRECCION - TARJETAS RADIO, LUCES, PUERTAS Y BATERIA
============================================================ */

.validaciones-bus-section .validation-grid-bus {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;

  width: 100% !important;

  margin-top: 18px !important;
  margin-bottom: 22px !important;

  visibility: visible !important;
  opacity: 1 !important;
}

.validaciones-bus-section .validation-grid-bus .validation-status-card {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;

  position: relative !important;

  width: auto !important;
  height: auto !important;
  min-height: 120px !important;

  padding: 16px !important;

  background: #ffffff !important;

  border: 1px solid #d7e3ea !important;
  border-radius: 14px !important;
}

.validaciones-bus-section .validation-card-title {
  display: flex !important;
  align-items: center !important;

  gap: 9px !important;

  margin-bottom: 11px !important;
}

.validaciones-bus-section .validation-status-card select {
  display: block !important;

  width: 100% !important;
  height: 42px !important;

  visibility: visible !important;
  opacity: 1 !important;
}
/* ============================================================
   CENTRAR ICONOS Y TITULOS DE VALIDACIONES PRINCIPALES
============================================================ */

.validaciones-bus-section
.validation-status-card
.validation-card-title {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;

  gap: 8px !important;

  text-align: center !important;
}

.validaciones-bus-section
.validation-card-icon {
  margin: 0 auto !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.validaciones-bus-section
.validation-card-title strong {
  width: 100% !important;

  text-align: center !important;
}
/* ============================================================
   PIGI - MODAL NUEVO VEHICULO
============================================================ */

.pigi-modal {
  position: fixed;

  inset: 0;

  display: none;

  align-items: center;
  justify-content: center;

  padding: 24px;

  z-index: 9999;
}


.pigi-modal.is-open {
  display: flex;
}


.pigi-modal-backdrop {
  position: absolute;

  inset: 0;

  background:
    rgba(12, 35, 51, .48);

  backdrop-filter:
    blur(2px);
}


.pigi-modal-card {
  position: relative;

  width: 100%;
  max-width: 620px;

  max-height: 90vh;

  overflow-y: auto;

  padding: 24px;

  border-radius: 16px;

  background: #ffffff;

  box-shadow:
    0 20px 55px
    rgba(10, 35, 50, .22);

  z-index: 1;
}


.pigi-modal-header {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;
}


.pigi-modal-header h2 {
  margin: 0;

  color: #14364d;

  font-size: 21px;
}


.pigi-modal-header p {
  margin: 5px 0 0;

  color: #6c8291;

  font-size: 13px;
}


.pigi-modal-close {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0;

  border: none;

  border-radius: 9px;

  background: #edf4f7;

  color: #36566b;

  font-size: 25px;
  line-height: 1;

  cursor: pointer;
}


.pigi-modal-close:hover {
  background: #dfecef;
}


.new-vehicle-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}


.new-vehicle-grid .form-group {
  display: flex;

  flex-direction: column;

  gap: 7px;
}


.new-vehicle-grid
.form-group-full {
  grid-column: 1 / -1;
}


.new-vehicle-grid label {
  color: #35566b;

  font-size: 13px;
  font-weight: 650;
}


.new-vehicle-grid input,
.new-vehicle-grid select {
  width: 100%;

  min-height: 43px;

  padding: 9px 11px;

  border:
    1px solid #ccdbe3;

  border-radius: 9px;

  background: #ffffff;

  color: #17364c;

  font-family: inherit;
  font-size: 14px;

  outline: none;
}


.new-vehicle-grid input:focus,
.new-vehicle-grid select:focus {
  border-color: #159bb4;

  box-shadow:
    0 0 0 3px
    rgba(21, 155, 180, .10);
}


.vehicle-form-message {
  min-height: 20px;

  margin-top: 15px;

  font-size: 13px;
  font-weight: 600;
}


.vehicle-form-message.error {
  color: #bd3434;
}


.vehicle-form-message.success {
  color: #258348;
}


.pigi-modal-actions {
  display: flex;

  justify-content: flex-end;

  gap: 10px;

  margin-top: 20px;
}


@media (max-width: 650px) {

  .new-vehicle-grid {
    grid-template-columns: 1fr;
  }


  .new-vehicle-grid
  .form-group-full {
    grid-column: auto;
  }


  .pigi-modal-card {
    padding: 18px;
  }

} 
/* ============================================================
   PIGI - CONSULTAS REORGANIZADAS
============================================================ */

.consultas-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}


/* ============================================================
   COLUMNA DE RESULTADOS
============================================================ */

.consultas-resultados {
  min-width: 0;

  padding: 20px;

  border-radius: 16px;

  background: #ffffff;

  box-shadow:
    0 8px 24px
    rgba(18, 53, 73, .06);
}


.consultas-resultados-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  margin-bottom: 18px;
}


.consultas-resultados-header h2 {
  margin: 0;

  color: #14384d;

  font-size: 22px;
}


.consultas-resultados-header p {
  margin: 4px 0 0;

  color: #6b8291;

  font-size: 13px;
}


/* ============================================================
   PESTAÑAS
============================================================ */

.consultas-tabs {
  display: flex;

  gap: 8px;

  margin-bottom: 18px;

  padding: 5px;

  border-radius: 11px;

  background: #edf3f6;
}


.consulta-tab {
  flex: 1;

  min-height: 42px;

  padding: 8px 14px;

  border: 0;

  border-radius: 8px;

  background: transparent;

  color: #496678;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  cursor: pointer;

  transition: .2s ease;
}


.consulta-tab:hover {
  background: rgba(255,255,255,.6);

  color: #17394f;
}


.consulta-tab.active {
  background: #0e5873;

  color: #ffffff;

  box-shadow:
    0 4px 10px
    rgba(13, 73, 97, .16);
}


/* ============================================================
   PANELES
============================================================ */

.consulta-tab-panel {
  display: none;
}


.consulta-tab-panel.active {
  display: block;
}


.consulta-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 12px;
}


.consulta-panel-title h3 {
  margin: 0;

  color: #17394f;

  font-size: 17px;
}


.consulta-panel-title p {
  margin: 3px 0 0;

  color: #718694;

  font-size: 12px;
}


/* ============================================================
   TABLAS
============================================================ */

.consultas-table-wrapper {
  width: 100%;

  overflow-x: auto;

  border:
    1px solid #e0e9ee;

  border-radius: 11px;
}


.consultas-table-wrapper table {
  width: 100%;

  border-collapse: collapse;

  font-size: 13px;
}


.consultas-table-wrapper thead {
  background: #f2f6f8;
}


.consultas-table-wrapper th {
  padding: 12px 10px;

  color: #17394f;

  font-size: 12px;
  font-weight: 750;

  text-align: left;

  white-space: nowrap;
}


.consultas-table-wrapper td {
  padding: 12px 10px;

  border-top:
    1px solid #e6edf1;

  color: #365568;

  vertical-align: middle;
}


.consultas-table-wrapper tbody tr {
  transition: background .18s ease;
}


.consultas-table-wrapper tbody tr:hover {
  background: #f7fbfc;
}


/* ============================================================
   COLUMNA DERECHA
============================================================ */

.consultas-lateral {
  display: flex;
  flex-direction: column;

  gap: 16px;

  position: sticky;
  top: 18px;
}


.consulta-side-card {
  padding: 18px;

  border-radius: 15px;

  background: #ffffff;

  box-shadow:
    0 8px 24px
    rgba(18, 53, 73, .06);
}


.consulta-side-title {
  margin-bottom: 14px;
}


.consulta-side-title h3 {
  margin: 0;

  color: #17394f;

  font-size: 17px;
}


.consulta-side-title p {
  margin: 4px 0 0;

  color: #718694;

  font-size: 12px;

  line-height: 1.45;
}


/* ============================================================
   BUSCADOR
============================================================ */

.consulta-search-field {
  display: flex;
  flex-direction: column;

  gap: 6px;

  margin-bottom: 10px;
}


.consulta-search-field label {
  color: #3f6174;

  font-size: 12px;
  font-weight: 700;
}


.consulta-search-field input {
  width: 100%;

  min-height: 42px;

  padding: 9px 11px;

  border:
    1px solid #cbdbe4;

  border-radius: 9px;

  background: #ffffff;

  color: #17394f;

  font-family: inherit;
  font-size: 14px;

  outline: none;
}


.consulta-search-field input:focus {
  border-color: #1598b1;

  box-shadow:
    0 0 0 3px
    rgba(21, 152, 177, .10);
}


.consulta-search-button {
  width: 100%;

  margin-top: 2px;
}


.consulta-clear-button {
  width: 100%;

  margin-top: 6px;

  text-align: center;
}


/* ============================================================
   FICHA VEHICULO
============================================================ */

.consulta-vehicle-card {
  display: block !important;
}


.ficha-side-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 12px;
}


.consulta-placa-box {
  padding: 14px;

  margin-bottom: 14px;

  border:
    1px solid #d6e4ea;

  border-radius: 11px;

  background: #f6fafb;

  text-align: center;
}


.consulta-placa-box span {
  display: block;

  margin-bottom: 4px;

  color: #6e8390;

  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
}


.consulta-placa-box strong {
  display: block;

  color: #12374e;

  font-size: 25px;
  letter-spacing: 1px;
}


.consulta-ficha-datos {
  display: flex;
  flex-direction: column;

  gap: 0;

  border:
    1px solid #e1eaee;

  border-radius: 10px;

  overflow: hidden;
}


.consulta-ficha-row {
  display: grid;

  grid-template-columns: 42% 58%;

  gap: 8px;

  padding: 10px 11px;

  border-bottom:
    1px solid #e8eef1;
}


.consulta-ficha-row:last-child {
  border-bottom: 0;
}


.consulta-ficha-row span {
  color: #708591;

  font-size: 12px;
}


.consulta-ficha-row strong {
  color: #17394f;

  font-size: 12px;

  text-align: right;
}


.consulta-ficha-actions {
  display: grid;

  margin-top: 12px;
}


.consulta-ficha-actions .btn-primary {
  width: 100%;
}


/* ============================================================
   HISTORIAL PEQUENO
============================================================ */

.consulta-historial {
  margin-top: 18px;
}


.consulta-historial-header {
  margin-bottom: 8px;
}


.consulta-historial-header h4 {
  margin: 0;

  color: #24485d;

  font-size: 13px;
}


.consulta-historial-table {
  max-height: 190px;

  overflow: auto;

  border:
    1px solid #e1e9ed;

  border-radius: 9px;
}


.consulta-historial-table table {
  width: 100%;

  border-collapse: collapse;

  font-size: 11px;
}


.consulta-historial-table th {
  padding: 8px;

  background: #f3f7f9;

  color: #496678;

  text-align: left;
}


.consulta-historial-table td {
  padding: 8px;

  border-top:
    1px solid #e7edef;

  color: #496678;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1150px) {

  .consultas-layout {
    grid-template-columns:
      minmax(0, 1.6fr)
      minmax(300px, .9fr);
  }

}


@media (max-width: 900px) {

  .consultas-layout {
    grid-template-columns: 1fr;
  }


  .consultas-lateral {
    position: static;
  }

}


@media (max-width: 650px) {

  .consultas-resultados-header {
    align-items: stretch;
    flex-direction: column;
  }


  .consultas-tabs {
    flex-direction: column;
  }


  .consulta-ficha-row {
    grid-template-columns: 1fr;
  }


  .consulta-ficha-row strong {
    text-align: left;
  }

}
/* ============================================================
   FACTURACION DE LA OT
============================================================ */

.ot-billing-section {
  margin-top: 22px;
  margin-bottom: 22px;
}


.ot-billing-box {
  padding: 18px 20px;

  border:
    1px solid #cfe1e8;

  border-left:
    4px solid #1598b1;

  border-radius: 12px;

  background: #f4fafc;
}


.ot-billing-box .form-field {
  margin: 0;
}


.ot-billing-box label {
  display: block;

  margin-bottom: 8px;

  color: #17394f;

  font-size: 15px;
  font-weight: 700;
}


.ot-billing-box select {
  width: 100%;

  min-height: 46px;

  padding: 10px 12px;

  border:
    1px solid #bfd3dc;

  border-radius: 9px;

  background: #ffffff;

  color: #17394f;

  font-family: inherit;
  font-size: 15px;
}

/* Botón marcar todas las actividades */
#btnMarcarTodasActividades {
  margin-top: 18px;
}
#otObservacionesValidacionesGeneral {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}.validation-general-comment {
  grid-column: 1 / -1;
  width: 100%;
}
/* ============================================================
   PIGI - VISTA GENERAL COMPACTA
============================================================ */


/* ============================================================
   CONTENIDO PRINCIPAL
============================================================ */

.main {
  padding: 18px 22px 30px !important;
}


/* ============================================================
   CABECERA SUPERIOR
============================================================ */

.topbar {
  padding: 16px 20px !important;
  margin-bottom: 18px !important;
  border-radius: 14px !important;
}


.topbar h1 {
  font-size: 24px !important;
}


.topbar p {
  margin-top: 3px !important;
  font-size: 13px !important;
}


/* ============================================================
   TARJETAS DE RESUMEN
============================================================ */

.stats {
  gap: 14px !important;
  margin-bottom: 18px !important;
}


.stat-card {
  padding: 16px 18px !important;
  min-height: 92px !important;
  border-radius: 13px !important;
}


.stat-card span {
  font-size: 12px !important;
}


.stat-card strong {
  margin-top: 5px !important;
  font-size: 24px !important;
}


.stat-icon {
  width: 44px !important;
  height: 44px !important;
}


/* ============================================================
   PANELES
============================================================ */

.panel,
.card,
.form-section,
.consulta-card {
  padding: 18px !important;
  margin-bottom: 16px !important;
  border-radius: 14px !important;
}


.section-header {
  gap: 14px !important;
  margin-bottom: 16px !important;
}


.section-header h2,
.panel h2,
.form-section h2 {
  font-size: 18px !important;
}


.section-header p {
  font-size: 13px !important;
}


/* ============================================================
   FORMULARIOS
============================================================ */

.form-grid {
  gap: 12px 14px !important;
}


.form-field {
  gap: 5px !important;
}


.form-field label,
.form-group label {
  font-size: 12px !important;
}


.form-field input,
.form-field select,
.form-field textarea,
.form-group input,
.form-group select,
.form-group textarea,
.search-main input,
.validation-card select {
  font-size: 13px !important;
  padding: 9px 11px !important;
  border-radius: 8px !important;
}


.form-field input,
.form-field select,
.form-group input,
.form-group select {
  min-height: 39px !important;
}


.form-field textarea {
  min-height: 90px !important;
}


/* ============================================================
   BOTONES
============================================================ */

.btn-primary,
.btn-outline,
.btn-secondary,
.btn-text,
.button-link,
.btn,
button.btn {
  min-height: 38px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 8px !important;
}


/* ============================================================
   TABLAS
============================================================ */

.table-wrapper th,
.consultas-table-wrapper th {
  padding: 9px 9px !important;
  font-size: 11px !important;
}


.table-wrapper td,
.consultas-table-wrapper td {
  padding: 9px 9px !important;
  font-size: 12px !important;
}


.loading {
  padding: 20px !important;
}


/* ============================================================
   CONSULTAS / MODULOS DE DOS COLUMNAS
============================================================ */

.consultas-layout {
  gap: 14px !important;
}


.consultas-resultados {
  padding: 16px !important;
}


.consultas-resultados-header {
  margin-bottom: 14px !important;
}


.consultas-lateral {
  gap: 12px !important;
}


.consulta-side-card {
  padding: 15px !important;
}


.consulta-side-title {
  margin-bottom: 10px !important;
}


.consulta-search-field {
  margin-bottom: 8px !important;
}


.consulta-placa-box {
  padding: 12px !important;
  margin-bottom: 10px !important;
}


.consulta-ficha-row {
  padding: 8px 10px !important;
}


.consulta-historial {
  margin-top: 12px !important;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1100px) {

  .main {
    padding: 16px !important;
  }

}


@media (max-width: 760px) {

  .main {
    padding: 12px !important;
  }

}
/* ============================================================
   PIGI - ESCALA GENERAL DE LA INTERFAZ
============================================================ */

html {
  zoom: 0.95
  ;
}
/* ============================================================
   PIGI - SIDEBAR PLEGABLE
============================================================ */

:root {
  --sidebar-width-open: 280px;
  --sidebar-width-closed: 76px;
}


/* ============================================================
   CORREGIR ALTURA POR ZOOM 0.90
  
============================================================ */

.sidebar {
  width: var(--sidebar-width-open) !important;
  min-width: var(--sidebar-width-open) !important;

  /*
    Compensa el zoom general del 90%.
    Evita que la barra termine antes de llegar
    a la parte inferior de la pantalla.
  */
  height: calc(100vh / 0.95) !important;

  transition:
    width 0.25s ease,
    min-width 0.25s ease !important;
}


.main {
  margin-left: var(--sidebar-width-open) !important;

  width:
    calc(
      100% - var(--sidebar-width-open)
    ) !important;

  transition:
    margin-left 0.25s ease,
    width 0.25s ease !important;
}


/* ============================================================
   BOTON ABRIR / CERRAR
============================================================ */

.sidebar-toggle {
  position: absolute;

  top: 18px;
  right: 10px;

  z-index: 120;

  width: 34px;
  height: 34px;
  min-height: 34px !important;

  padding: 0 !important;

  display: grid;
  place-items: center;

  border:
    1px solid
    rgba(255, 255, 255, 0.22);

  border-radius: 50%;

  background: #0b3049;

  color: #ffffff;

  font-size: 20px;
  line-height: 1;

  cursor: pointer;

  box-shadow:
    0 4px 12px
    rgba(11, 48, 73, 0.25);

  transition:
    transform 0.2s ease,
    background 0.2s ease;
}


.sidebar-toggle:hover {
  background: #168fa6;
}


/* ============================================================
   SIDEBAR CERRADO
============================================================ */

body.sidebar-collapsed .sidebar {
  width:
    var(--sidebar-width-closed) !important;

  min-width:
    var(--sidebar-width-closed) !important;
}


body.sidebar-collapsed .main {
  margin-left:
    var(--sidebar-width-closed) !important;

  width:
    calc(
      100% -
      var(--sidebar-width-closed)
    ) !important;
}


/* ============================================================
   IDENTIDAD CUANDO ESTA CERRADO
============================================================ */

body.sidebar-collapsed
.sidebar-toggle {
  transform: rotate(180deg);
  top: 18px;
  right: 20px;
}

body.sidebar-collapsed
.sidebar-brand {
  padding: 58px 8px 14px !important;
}

body.sidebar-collapsed
.sidebar-logo {
  width: 48px !important;
  max-width: 48px !important;

  margin:
    0 auto !important;
}


body.sidebar-collapsed
.sidebar-brand-line,
body.sidebar-collapsed
.sidebar-pigi {
  display: none !important;
}


/* ============================================================
   MENU CUANDO ESTA CERRADO
============================================================ */

body.sidebar-collapsed
.sidebar .menu {
  padding:
    12px 8px 24px !important;
}


body.sidebar-collapsed
.sidebar-section-title {
  display: none !important;
}


body.sidebar-collapsed
.sidebar .menu-item {
  width: 52px !important;

  min-width: 52px !important;
  min-height: 48px !important;

  margin:
    4px auto !important;

  padding:
    10px !important;

  justify-content:
    center !important;

  gap: 0 !important;
}


body.sidebar-collapsed
.sidebar .menu-icon {
  margin: 0 !important;
}


body.sidebar-collapsed
.sidebar .menu-label,
body.sidebar-collapsed
.sidebar .menu-chevron,
body.sidebar-collapsed
.sidebar .menu-arrow {
  display: none !important;
}


/* Ocultar submenu al cerrar la barra */

body.sidebar-collapsed
.sidebar .submenu {
  display: none !important;
}


/* ============================================================
   USUARIO INFERIOR
============================================================ */

body.sidebar-collapsed
.sidebar-footer {
  padding:
    12px 8px !important;
}


body.sidebar-collapsed
.sidebar-user {
  justify-content:
    center !important;
}


body.sidebar-collapsed
.sidebar-user-data {
  display: none !important;
}


/* ============================================================
   AJUSTE LOGO - SIDEBAR CERRADO
============================================================ */

body.sidebar-collapsed .sidebar-brand {
  padding: 58px 8px 14px !important;
}
/* ============================================================
   VEHICULOS - SEPARACION ENTRE BLOQUES
============================================================ */

#panelVehiculo {
  margin-top: 28px !important;
}
/* ============================================================
   VEHICULOS - FILTRO DE ESTADO
============================================================ */

#filtroEstadoVehiculo {
  width: 100%;

  min-height: 44px;

  padding: 10px 42px 10px 14px;

  border: 1px solid var(--borde);

  border-radius: 10px;

  background-color: var(--blanco);

  color: var(--texto);

  font-size: 14px;

  outline: none;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}


#filtroEstadoVehiculo:focus {
  border-color: var(--turquesa);

  box-shadow:
    0 0 0 3px
    rgba(33, 138, 161, 0.12);
}
/* ============================================================
   PROTECCION VISUAL DE SESION
============================================================ */

html:not(.sesion-validada) body {
  visibility: hidden;
}

/* ============================================================
   PAQUETE 2 - SESION Y MOVIL
============================================================ */
.btn-cerrar-sesion {
  border: 1px solid var(--borde);
  background: transparent;
  color: inherit;
  border-radius: 9px;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
}
.btn-cerrar-sesion:hover { border-color: var(--turquesa); }
.btn-cerrar-sesion-sidebar { width: 100%; margin-top: 10px; }
.btn-cerrar-sesion-top { margin-left: 12px; }
.evidencia-video { display:flex; align-items:center; justify-content:center; min-height:100px; font-weight:700; }

@media (max-width: 768px) {
  body { zoom: 1 !important; }
  .app { min-width: 0 !important; }
  .sidebar { width: 76px !important; min-width: 76px !important; }
  .sidebar .menu-label, .sidebar .menu-chevron, .sidebar-section-title span,
  .sidebar-user-data, .sidebar-pigi, .btn-cerrar-sesion-sidebar { display: none !important; }
  .sidebar-brand { padding-left: 8px !important; padding-right: 8px !important; }
  .sidebar-logo { max-width: 52px !important; }
  .main { margin-left: 76px !important; width: calc(100% - 76px) !important; min-width: 0 !important; }
  .topbar { padding: 12px 14px !important; gap: 8px; align-items: center; }
  .topbar h1 { font-size: 20px !important; }
  .topbar p, .user-box > div:not(.avatar) { display: none !important; }
  .btn-cerrar-sesion-top { padding: 7px 9px; font-size: 12px; margin-left: 4px; }
  #contenidoPrincipal { padding: 12px !important; }
  .panel, .form-section { padding: 14px !important; }
  .form-grid, .filters-grid, .vehicle-form-grid { grid-template-columns: 1fr !important; }
  input, select, textarea, button { max-width: 100%; }
  .table-wrapper, .table-responsive { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  .upload-area { padding: 18px 12px !important; }
  .evidencias-lista { grid-template-columns: 1fr !important; }
  .evidencia-item { min-width: 0; }
  .evidencia-preview { width: 100%; height: auto; max-height: 260px; object-fit: cover; }
}

@media (max-width: 480px) {
  .sidebar { width: 64px !important; min-width: 64px !important; }
  .main { margin-left: 64px !important; width: calc(100% - 64px) !important; }
  .sidebar-toggle { display: none !important; }
  .topbar { flex-wrap: wrap; }
  .section-header { align-items: flex-start !important; }
  .section-header h2, .section-header h3 { font-size: 17px !important; }
}
