/* ═══════════════════════════════════════════════════════════════════
   /hoy — central de operación (búsqueda global + cinta del pipeline +
   bandeja + actividad). Mobile-first; breakpoints contrato 640/900/1280.
   ═══════════════════════════════════════════════════════════════════ */

.hoy { display: flex; flex-direction: column; gap: var(--space-5); }

/* ── A. Búsqueda global ─────────────────────────────────────────────── */
.global-search { display: flex; flex-direction: column; gap: var(--space-3); }

.gs-main { width: 100%; }
.gs-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 0.35rem 0.45rem 0.35rem 0.9rem;
  box-shadow: var(--shadow);
}
.gs-bar:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-bg); }
.gs-icon { color: var(--gray-400); flex-shrink: 0; }
.gs-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: var(--text-base);
  background: transparent;
  min-width: 0;
}
.gs-btn {
  background: var(--gray-900);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.5rem 1.1rem;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}
.gs-btn:hover { background: var(--gray-700); }

.gs-secondary { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.gs-secondary-form { flex: 1; min-width: 200px; }
.gs-label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.3rem;
}
.gs-secondary-bar {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
}
.gs-secondary-bar:focus-within { border-color: var(--c-primary); }
.gs-secondary-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.45rem 0.7rem;
  font-size: var(--text-sm);
  min-width: 0;
  background: transparent;
}
.gs-secondary-input--plate {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
  font-weight: 700;
}
.gs-secondary-input--vin {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}
.gs-secondary-btn {
  background: var(--gray-100);
  border: none;
  border-left: 1px solid var(--gray-200);
  padding: 0 0.7rem;
  cursor: pointer;
  color: var(--gray-600);
  display: flex;
  align-items: center;
}
.gs-secondary-btn:hover { background: var(--gray-200); color: var(--gray-900); }

/* ── B. Cinta del pipeline ──────────────────────────────────────────── */
.hoy-pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}
.hoy-node {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0;
  position: relative;
}
.hoy-node:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-300);
  font-size: 1.1rem;
  z-index: 1;
}
.hoy-node__head { display: flex; align-items: center; gap: var(--space-2); }
.hoy-node__step {
  width: 22px; height: 22px;
  border-radius: var(--radius-full);
  background: var(--gray-900);
  color: white;
  font-size: var(--text-xs);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hoy-node__title { font-size: var(--text-base); font-weight: 700; flex: 1; margin: 0; }
.hoy-node__icon { color: var(--gray-400); }
.hoy-node__figure {
  font-size: var(--text-xl);
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.1;
}
.hoy-node__figure span {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-500);
  margin-top: 2px;
}
.hoy-node__sub { font-size: var(--text-xs); color: var(--gray-500); }
.hoy-node__ok {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--c-success);
  font-size: var(--text-sm);
  font-weight: 600;
}
.hoy-node__rows { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; margin: 0; padding: 0; }
.hoy-node__more { font-size: var(--text-xs); color: var(--gray-500); text-decoration: none; margin-top: auto; }
.hoy-node__more:hover { color: var(--c-primary); }
.hoy-node__live {
  font-size: var(--text-xs);
  color: var(--c-cost);
  font-weight: 600;
  text-decoration: none;
}

.hoy-supplier {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: var(--text-sm);
  padding: 0.25rem 0;
  border-bottom: 1px dashed var(--gray-100);
}
.hoy-supplier__name { font-weight: 600; color: var(--color-text); text-decoration: none; }
.hoy-supplier__name:hover { color: var(--c-primary); }
.hoy-supplier__meta { display: inline-flex; align-items: center; gap: 0.3rem; font-size: var(--text-xs); color: var(--gray-500); flex: 1; }
.hoy-supplier--warn .hoy-supplier__name { color: var(--state-amber); }

.hoy-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: var(--text-sm);
}
.hoy-mini-row a, .hoy-mini-row__label { color: var(--gray-600); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoy-mini-row a:hover { color: var(--c-primary); }
.hoy-mini-row__n { font-family: var(--font-mono); font-weight: 600; font-size: var(--text-xs); color: var(--gray-700); }
.hoy-mini-row--zero { opacity: 0.45; }
.hoy-mini-row--danger a, .hoy-mini-row--danger .hoy-mini-row__n { color: var(--c-danger); }

.hoy-budget { display: flex; flex-direction: column; gap: 0.25rem; }
.hoy-budget__bar { height: 6px; background: var(--gray-100); border-radius: var(--radius-full); overflow: hidden; }
.hoy-budget__fill { height: 100%; background: var(--c-cost); border-radius: var(--radius-full); }
.hoy-budget__fill--warn { background: var(--state-amber); }
.hoy-budget__label { font-size: var(--text-xs); color: var(--gray-500); font-family: var(--font-mono); }

.hoy-signals { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.hoy-signal { font-size: var(--text-xs); color: var(--gray-500); text-decoration: none; }
.hoy-signal:hover { color: var(--c-primary); }
.hoy-signal--warn { color: var(--state-amber); font-weight: 600; }

/* ── C/D. Columnas: bandeja + actividad ─────────────────────────────── */
.hoy-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}
.hoy-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.hoy-section-count {
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--gray-900);
  color: white;
  border-radius: var(--radius-full);
  padding: 0.1rem 0.5rem;
}

.hoy-queue-list { display: flex; flex-direction: column; gap: var(--space-2); }
.hoy-queue {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--gray-300);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.hoy-queue--danger { border-left-color: var(--c-danger); }
.hoy-queue--warn { border-left-color: var(--state-amber); }
.hoy-queue--info { border-left-color: var(--c-info); }
.hoy-queue__icon { color: var(--gray-400); flex-shrink: 0; }
.hoy-queue--danger .hoy-queue__icon { color: var(--c-danger); }
.hoy-queue--warn .hoy-queue__icon { color: var(--state-amber); }
.hoy-queue--info .hoy-queue__icon { color: var(--c-info); }
.hoy-queue__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hoy-queue__body strong { font-size: var(--text-sm); }
.hoy-queue__meta { font-size: var(--text-xs); color: var(--gray-500); }

.hoy-activity {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.hoy-activity__sub {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin: var(--space-3) 0 var(--space-2);
}
.hoy-activity__sub:first-child { margin-top: 0; }
.hoy-activity__sub--live { color: var(--c-cost); }
.hoy-activity__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.hoy-activity__row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px dashed var(--gray-100);
  font-size: var(--text-sm);
}
.hoy-activity__row:hover .hoy-activity__name { color: var(--c-primary); }
.hoy-activity__name { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hoy-activity__meta { font-size: var(--text-xs); color: var(--gray-500); margin-left: auto; flex-shrink: 0; }
.hoy-activity__empty { font-size: var(--text-xs); color: var(--gray-400); padding: 0.35rem 0; }

.hoy-live { margin-bottom: var(--space-2); }
.hoy-live__row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: 0.35rem 0;
  font-size: var(--text-sm);
  border-bottom: 1px dashed var(--gray-100);
}
.hoy-live__row strong { display: block; font-size: var(--text-sm); }
.hoy-live__symbol { color: var(--c-cost); font-weight: 700; flex-shrink: 0; }
.hoy-live__meta { font-size: var(--text-xs); color: var(--gray-500); font-family: var(--font-mono); }

/* ── E. Acciones rápidas ────────────────────────────────────────────── */
.hoy-quick {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.hoy-kbd-hint { font-size: var(--text-xs); color: var(--gray-400); margin-left: auto; }
.hoy-kbd-hint kbd {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  padding: 0 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ── Responsive (contrato 640/900/1280) ─────────────────────────────── */
@media (max-width: 1279px) {
  .hoy-pipeline { grid-template-columns: repeat(2, 1fr); }
  .hoy-node:not(:last-child)::after { content: none; }
}
@media (max-width: 900px) {
  .hoy-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hoy-pipeline { grid-template-columns: 1fr; }
  .gs-secondary { flex-direction: column; }
  .hoy-queue { flex-wrap: wrap; }
}
