/* =====================================
   VEHICULOS CSS AISLADO - VHX
===================================== */

.vhx-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
  align-items: start;
}

/* =========================
   PANEL IZQUIERDO
========================= */
.vhx-main {
  min-width: 0;
}

.vhx-header {
  margin-bottom: 20px;
}

.vhx-header h2 {
  font-size: 34px;
  font-weight: 700;
  margin: 0;
  color: #111827;
}

/* =========================
   FILTROS
========================= */
.vhx-filters-box {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
}

.vhx-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
}

.vhx-field {
  display: flex;
  flex-direction: column;
}

.vhx-field label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}

.vhx-field input,
.vhx-field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 14px;
  background: white;
  box-sizing: border-box;
}

.vhx-field input:focus,
.vhx-field select:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 0 3px rgba(42,82,152,0.12);
}

/* =========================
   BOTONES
========================= */
.vhx-btn {
  border: none;
  border-radius: 10px;
  height: 44px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

.vhx-btn:hover {
  transform: translateY(-1px);
}

.vhx-btn-primary {
  background: #2f56a6;
  color: white;
}

.vhx-btn-primary:hover {
  background: #24468a;
}

.vhx-btn-danger {
  background: #ea4335;
  color: white;
}

.vhx-btn-danger:hover {
  background: #cf3528;
}

.vhx-btn-light {
  background: #eef2f7;
  color: #111827;
}

.vhx-btn-light:hover {
  background: #dde5ef;
}

.vhx-btn-full {
  width: 100%;
}

.vhx-actions-filter {
  display: flex;
  align-items: end;
}

/* =========================
   TABLA
========================= */
.vhx-table-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
}

.vhx-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.vhx-table-scroll::-webkit-scrollbar {
  height: 10px;
}

.vhx-table-scroll::-webkit-scrollbar-thumb {
  background: #c7ced8;
  border-radius: 20px;
}

.vhx-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}

.vhx-table th {
  background: #f3f4f6;
  color: #111827;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  padding: 12px 14px;
  white-space: nowrap;
}

.vhx-table td {
  font-size: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f1f1;
  white-space: nowrap;
}

.vhx-table tbody tr:hover {
  background: #fafafa;
}

/* SOLO modo edición */
.vhx-table td input,
.vhx-table td select{
  width:100%;
  height:36px;
  padding:0 12px;
  border:1px solid #d1d5db;
  border-radius:8px;
  background:#fff;
  font-size:13px;
  color:#111827;
  box-sizing:border-box;
  transition:.2s ease;
}

/* focus elegante */
.vhx-table td input:focus,
.vhx-table td select:focus{
  outline:none;
  border-color:#2f56a6;
  box-shadow:0 0 0 3px rgba(47,86,166,.12);
}

/* fechas */
.vhx-table td input[type="date"]{
  min-width:140px;
}

/* select estado */
.vhx-table td select{
  min-width:110px;
}

/* =========================
   PANEL DERECHO
========================= */
.vhx-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =====================================
   ALERTAS ESTILO CARD MODERNO
   Reemplaza SOLO la sección alertas
===================================== */

.vhx-alert-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
  min-height: 420px;
}

.vhx-alert-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* botones resumen */
.vhx-alert-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.vhx-alert-actions button {
  border: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.vhx-alert-actions button:hover {
  transform: translateY(-1px);
}

/* vencidos */
#btnVencidos {
  background: #f9e0df;
  color: #df2c1d;
}

/* proximos */
#btnProximos {
  background: #f8efc9;
  color: #b88900;
}

/* contenedor lista */
.vhx-alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
}

/* quitar bullets */
.vhx-alert-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* item alerta */
.vhx-alert-list li {
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  line-height: 1.3;
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}

/* ALERTAS VENCIDAS */
.vhx-alert-list li.vencido{
  background:#f8eaea;
  border-left:4px solid #df2c1d;
}

/* ALERTAS POR VENCER */
.vhx-alert-list li.proximo{
  background:#fff8dc;
  border-left:4px solid #e0a100;
}

/* primera linea */
.vhx-alert-list li strong,
.vhx-alert-list li b {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

/* fecha */
.vhx-alert-list li small,
.vhx-alert-list li span {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

/* scrollbar bonita */
.vhx-alert-list::-webkit-scrollbar {
  width: 8px;
}

.vhx-alert-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 20px;
}

/* mobile */
@media (max-width: 768px) {
  .vhx-alert-actions {
    grid-template-columns: 1fr;
  }

  .vhx-alert-card {
    min-height: auto;
  }
}

/* =========================
   BADGES
========================= */
.badge-activo {
  background: #e7f6ea;
  color: #1e8e3e;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge-inactivo {
  background: #fdeaea;
  color: #c62828;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

/* =========================
   MODAL
========================= */
.vhx-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.hidden {
  display: none !important;
}

.vhx-modal-box {
  background: white;
  width: min(92vw, 480px);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

.vhx-modal-box h3 {
  margin: 0 0 18px;
  font-size: 24px;
}

.vhx-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* =====================================
   VEHICULOS - MODAL SIN BOTON CANCELAR
===================================== */

/* REEMPLAZA tu bloque actual */
.vhx-modal-actions {
  grid-column: span 2;
  display: flex;
  justify-content: stretch;
  margin-top: 8px;
}

.vhx-modal-actions .vhx-btn {
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .vhx-modal-actions {
    grid-column: span 1;
    display: flex;
  }

  .vhx-modal-actions .vhx-btn {
    width: 100%;
  }
}

/* =========================
   TOAST
========================= */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #16a34a;
  color: white;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 9999;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {
  .vhx-layout {
    grid-template-columns: 1fr;
  }

  .vhx-sidebar {
    order: 2;
  }

  .vhx-main {
    order: 1;
  }
}

@media (max-width: 768px) {
  .vhx-header h2 {
    font-size: 28px;
  }

  .vhx-filters-grid {
    grid-template-columns: 1fr;
  }

  .vhx-actions-filter {
    display: block;
  }

  .vhx-btn {
    width: 100%;
  }

  .vhx-alert-actions {
    grid-template-columns: 1fr;
  }

  .vhx-form-grid {
    grid-template-columns: 1fr;
  }

  .vhx-modal-actions {
    grid-column: span 1;
    flex-direction: column-reverse;
  }

  .vhx-table {
    min-width: 820px;
  }
}

@media (max-width: 480px) {
  .vhx-header h2 {
    font-size: 24px;
  }

  .vhx-filters-box,
  .vhx-table-card,
  .vhx-alert-card,
  .vhx-modal-box {
    padding: 14px;
  }
}

/* =====================================
   AJUSTE COMPACTO VEHICULOS (AGREGAR AL FINAL)
===================================== */

/* filtros más pequeños y en una fila */
.vhx-filters-box{
  padding:14px !important;
}

.vhx-filters-grid{
  grid-template-columns: 1.2fr 1.2fr .9fr .8fr !important;
  gap:8px !important;
}

.vhx-field label{
  font-size:11px !important;
  margin-bottom:4px !important;
}

.vhx-field input,
.vhx-field select{
  height:34px !important;
  font-size:12px !important;
  padding:0 10px !important;
  border-radius:9px !important;
}

.vhx-btn{
  height:34px !important;
  font-size:12px !important;
  padding:0 14px !important;
}

/* tabla compacta */
.vhx-table-card{
  padding:12px !important;
}

.vhx-table th{
  font-size:12px !important;
  padding:10px 12px !important;
}

.vhx-table td{
  font-size:12px !important;
  padding:10px 12px !important;
}

/* panel alertas más pequeño */
.vhx-alert-card{
  padding:14px !important;
  min-height:380px !important;
}

.vhx-alert-card h3{
  font-size:18px !important;
}

.vhx-alert-actions button{
  font-size:12px !important;
  padding:10px !important;
}

/* responsive */
@media (max-width: 768px){

  .vhx-filters-grid{
    grid-template-columns:1fr !important;
  }

  .vhx-btn{
    width:100% !important;
  }


}

/* =====================================
   VEHICULOS - INPUTS INLINE AÚN MÁS PEQUEÑOS
   REEMPLAZA EL BLOQUE ANTERIOR
===================================== */

.vhx-table td input,
.vhx-table td select{
  height:28px !important;
  min-height:28px !important;
  padding:0 6px !important;
  font-size:11px !important;
  border-radius:7px !important;
  max-width:100% !important;
}

/* placa */
.vhx-table td input[type="text"]{
  width:105px !important;
}

/* fechas */
.vhx-table td input[type="date"]{
  width:118px !important;
}

/* selects propietario / estado */
.vhx-table td select{
  width:160px !important;
}

/* alineación visual */
.vhx-table td{
  vertical-align:middle !important;
}

/* =====================================
   ESPACIADO Y HEADER COMO TRAILER
===================================== */

.vhx-layout{
  padding:14px !important;
  gap:16px !important;
}

.vhx-header{
  margin-bottom:14px !important;
}

.vhx-header h2{
  font-size:28px !important;
  font-weight:700 !important;
  line-height:1.1 !important;
}

/* =====================================
   VEHICULOS - ALERTAS MISMO TAMAÑO CONDUCTORES
===================================== */

/* layout exacto */
.vhx-layout{
  grid-template-columns:minmax(0,1fr) 290px !important;
  gap:16px !important;
}

/* card alertas */
.vhx-alert-card{
  padding:14px !important;
  min-height:360px !important;
}

/* titulo */
.vhx-alert-card h3{
  font-size:16px !important;
  margin-bottom:12px !important;
}

/* resumen superior */
.vhx-alert-actions{
  gap:8px !important;
  margin-bottom:12px !important;
}

.vhx-alert-actions button{
  padding:10px !important;
  font-size:12px !important;
  border-radius:10px !important;
}

/* lista */
.vhx-alert-list{
  max-height:340px !important;
  gap:8px !important;
}

/* items */
.vhx-alert-list li{
  padding:10px 12px !important;
  margin-bottom:8px !important;
  font-size:12px !important;
}

/* titulo item */
.vhx-alert-list li strong,
.vhx-alert-list li b{
  font-size:13px !important;
  margin-bottom:3px !important;
}

/* fecha */
.vhx-alert-list li small,
.vhx-alert-list li span{
  font-size:11px !important;
}