/* ============================================================
   DANGOFE OS LIQUID V2 — rutas.css
   MÓDULO RUTAS / VEHÍCULOS / COMBUSTIBLE (DANGOFE-RUTAS-046 · v1.0.46)
   Vehículos, rutas con costo estimado y precio de combustible
   validado a diario. Estética Liquid Glass (prefijo ru-).
   ============================================================ */

.ru-wrap { display: flex; flex-direction: column; gap: 16px; }

/* ---------- encabezado ---------- */
.ru-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; }
.ru-sub { margin: 4px 0 0; opacity: .75; font-size: .92rem; line-height: 1.45; }

/* ---------- tarjetas ---------- */
.ru-card {
  border-radius: 18px; padding: 16px 18px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  display: flex; flex-direction: column; gap: 14px;
}
.ru-card h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.1rem; }
.ru-card h4 { margin: 0 0 4px; font-size: .98rem; opacity: .9; }

.ru-badge {
  display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; margin-left: 6px;
  background: rgba(56,189,248,.2); border: 1px solid rgba(56,189,248,.5);
}

/* ---------- precios de combustible ---------- */
.ru-precios { display: flex; flex-wrap: wrap; gap: 12px; }
.ru-precio {
  flex: 1 1 220px; min-width: 200px; padding: 12px 14px; border-radius: 14px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 6px;
}
.ru-precio--ok   { border-color: rgba(74,222,128,.3); }
.ru-precio--pend { border-color: rgba(250,204,21,.35); background: rgba(250,204,21,.06); }
.ru-precio__tipo { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9rem; }
.ru-precio__valor { font-size: 1.3rem; font-weight: 700; }
.ru-precio__valor .ru-uni { font-size: .75rem; font-weight: 400; opacity: .7; }
.ru-precio__meta { font-size: .76rem; opacity: .72; display: flex; align-items: center; gap: 4px; }
.ru-sinprecio { opacity: .6; font-size: 1rem; font-weight: 500; }

/* ---------- cron ---------- */
.ru-cron {
  padding: 12px 14px; border-radius: 14px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 8px;
}
.ru-cron__estado { font-size: .88rem; display: flex; align-items: center; gap: 6px; }
.ru-cron__ultimo { font-size: .78rem; opacity: .72; }
.ru-hint { font-size: .8rem; opacity: .8; margin: 0; line-height: 1.5; }
.ru-url {
  display: inline-block; margin-top: 4px; padding: 6px 10px; border-radius: 8px;
  background: rgba(0,0,0,.28); border: 1px solid var(--glass-border);
  font-family: ui-monospace, monospace; font-size: .76rem; word-break: break-all;
}

/* ---------- vehículos ---------- */
.ru-vehs { display: flex; flex-wrap: wrap; gap: 14px; }
.ru-veh {
  flex: 1 1 260px; min-width: 240px; padding: 14px 16px; border-radius: 16px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 10px;
}
.ru-veh--off { opacity: .58; }
.ru-veh__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ru-veh__nombre { font-weight: 700; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.ru-veh__rend { text-align: right; font-weight: 700; white-space: nowrap; }
.ru-origen {
  display: block; font-size: .68rem; font-weight: 500; opacity: .7; text-transform: uppercase; letter-spacing: .04em;
}
.ru-veh__meta { font-size: .82rem; opacity: .72; }
.ru-veh__acc { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- formularios ---------- */
.ru-form {
  padding: 14px 16px; border-radius: 14px; margin-bottom: 4px;
  background: var(--glass-bg-soft); border: 1px solid var(--glass-border);
  display: flex; flex-direction: column; gap: 12px;
}
.ru-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.ru-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 180px; min-width: 150px; }
.ru-field span { font-size: .82rem; opacity: .78; }
.ru-field em { font-style: normal; font-size: .72rem; opacity: .7; }
.ru-field input, .ru-field select, .ru-field textarea {
  padding: 9px 12px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; font: inherit; font-size: .9rem;
  outline: none; transition: border-color .15s ease; width: 100%; box-sizing: border-box;
}
.ru-field input:focus, .ru-field select:focus, .ru-field textarea:focus { border-color: rgba(99,132,255,.65); }
.ru-check { display: flex; align-items: center; gap: 8px; font-size: .86rem; opacity: .88; }
.ru-check input { width: auto; }
.ru-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- estimación / cálculo ---------- */
.ru-estim__box, .ru-calc__box {
  padding: 10px 14px; border-radius: 12px; font-size: .84rem; line-height: 1.5;
  background: rgba(56,189,248,.1); border: 1px solid rgba(56,189,248,.32);
  display: flex; align-items: flex-start; gap: 6px;
}
.ru-calc__box--warn { background: rgba(250,204,21,.12); border-color: rgba(250,204,21,.4); }

/* ---------- botones ---------- */
.ru-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 15px; border-radius: 12px; border: 1px solid var(--glass-border);
  background: var(--glass-bg-input); color: inherit; cursor: pointer;
  font: inherit; font-size: .9rem; transition: all .18s ease;
}
.ru-btn:hover { background: var(--glass-bg-active); }
.ru-btn--primary { background: rgba(99,132,255,.28); border-color: rgba(99,132,255,.55); font-weight: 600; }
.ru-btn--primary:hover { background: rgba(99,132,255,.4); }
.ru-btn--xs { padding: 5px 10px; font-size: .78rem; border-radius: 9px; }
.ru-btn:disabled { opacity: .6; cursor: default; }

/* ---------- tabla de rutas ---------- */
.ru-tablewrap { overflow-x: auto; }
.ru-tabla { width: 100%; border-collapse: collapse; font-size: .86rem; }
.ru-tabla th, .ru-tabla td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--glass-border); }
.ru-tabla th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; opacity: .68; font-weight: 600; }
.ru-tabla td.ru-r, .ru-tabla th.ru-r { text-align: right; white-space: nowrap; }
.ru-tabla tr.ru-anulada { opacity: .5; text-decoration: line-through; }

/* ---------- distintivos ---------- */
.ru-tag {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
  border: 1px solid var(--glass-border); background: var(--glass-bg-strong);
}
.ru-tag--ok { background: rgba(74,222,128,.18); border-color: rgba(74,222,128,.45); }

/* ---------- modal ---------- */
.ru-modal {
  position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); padding: 16px;
}
.ru-modal__box {
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
  border-radius: 18px; padding: 20px; background: rgba(30,32,46,.96);
  border: 1px solid var(--glass-border); display: flex; flex-direction: column; gap: 12px;
}
.ru-modal__box h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.12rem; }

/* ---------- utilidades ---------- */
.ru-error { color: #ff8f8f; font-size: .9rem; display: flex; align-items: center; gap: 6px; padding: 14px; }
.ru-nomas { opacity: .6; font-size: .82rem; text-align: center; padding: 14px; }



/* ---------- rutas automáticas (v1.0.48) ---------- */
.ru-autocfg {
  border-radius: 14px; padding: 12px 14px;
  background: var(--bg-input, rgba(255,255,255,.04));
  border: 1px solid var(--border-soft, rgba(255,255,255,.1));
  display: flex; flex-direction: column; gap: 10px;
}
.ru-autotec {
  border-radius: 14px; padding: 12px 14px; margin-top: 12px;
  background: var(--bg-elevated, rgba(255,255,255,.03));
  border: 1px solid var(--border-soft, rgba(255,255,255,.08));
  display: flex; flex-direction: column; gap: 8px;
}
.ru-autotec h4 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
