/* Pull Forward Deliveries (merchandising) view — js/views/pull_forward.js.
   Reuses the portal design tokens (navy, ashley-orange, table-border, the
   font stack, signal colors). Only the bits unique to this view live here:
   the preliminary banner, the summary tiles, the Ready/Partial tabs, and
   the call-list table. Customer-level data; the nav item is role-gated. */

.pf-empty {
  padding: 40px; text-align: center; color: var(--text-caption, #6b7280);
  font-family: var(--font-stack); font-size: 14px;
}
.pf-empty code { background: #f1f3f5; padding: 1px 5px; border-radius: 4px; }

/* ── Run-context meta line (the PRELIMINARY banner was retired after
   Whitney's 2026-07-10 sign-off; this keeps the run context on-screen). ── */
.pf-meta {
  background: var(--surface-muted, #f4f6fa);
  border: 1px solid var(--table-border, #d9dfe8);
  border-left: 3px solid var(--ashley-orange, #e87722);
  border-radius: var(--radius, 8px);
  padding: 8px 14px; margin: 4px 0 16px;
  font-family: var(--font-stack); font-size: 12px; color: #4b5563;
}
.pf-meta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.pf-meta-row strong { color: var(--navy, #1b2a4a); }
.pf-meta-sub { margin-top: 4px; font-size: 11px; color: #6b7280; }
.pf-mode {
  display: inline-block; background: var(--navy, #1b2a4a); color: #fff;
  border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.4px;
}

/* ── Pulled-forward tracking (daily breakdown line under the tiles) ── */
.pf-track {
  font-family: var(--font-stack); font-size: 12.5px; color: #4b5563;
  margin: -6px 0 16px; padding: 6px 2px;
}
.pf-track-win {
  font-weight: 700; color: var(--signal-green, #1a7f37);
}
.pf-track-seg { color: #6b7280; }
.pf-track-seg + .pf-track-seg, .pf-track-win + .pf-track-seg { margin-left: 2px; }

/* ── Summary tiles (ENGINE run summary verbatim; not recomputed) ── */
.pf-tiles {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin: 0 0 16px;
}
.pf-tile {
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-top: 3px solid var(--ashley-orange, #e87722);
  border-radius: var(--radius, 8px); padding: 12px 16px;
  box-shadow: var(--shadow, 0 1px 2px rgba(0,0,0,.05));
}
.pf-tile-v {
  font-size: 26px; font-weight: 800; color: var(--navy, #1b2a4a);
  font-family: var(--font-stack); line-height: 1.1;
}
.pf-tile-sub { font-size: 15px; font-weight: 700; color: #6b7280; }
.pf-tile-note { font-size: 12px; font-weight: 700; color: var(--ashley-orange, #e87722); margin-top: 2px; }
.pf-tile-l {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-caption, #6b7280); margin-top: 4px; font-weight: 600;
}

/* ── Controls (search + dropdown filters) ── */
.pf-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-radius: var(--radius, 8px); padding: 10px 14px; margin: 0 0 12px;
}
.pf-controls select, .pf-search {
  padding: 6px 10px; font-size: 12px; font-family: var(--font-stack);
  border: 1px solid var(--table-border, #d9dfe8); border-radius: 6px;
  background: #fff; color: var(--navy, #1b2a4a); font-weight: 600;
}
.pf-search { min-width: 260px; flex: 1; }
.pf-chk {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--navy, #1b2a4a);
  font-family: var(--font-stack);
}

/* ── Ready / Partial tabs ── */
.pf-tabs { display: flex; gap: 0; margin-bottom: -1px; align-items: flex-end; }
/* CSV button rides the tabs row, right-aligned next to the data it exports
   (the top-bar CSV is off for this view; Wayne 2026-07-10). */
.pf-csv { margin-left: auto; margin-bottom: 6px; }
.pf-tab {
  border: 1px solid var(--table-border, #d9dfe8); border-bottom: none;
  background: #e8ecf3; color: #4b5563;
  padding: 8px 18px; font: inherit; font-weight: 700; cursor: pointer;
  border-radius: 8px 8px 0 0;
}
.pf-tab.on { background: #fff; color: var(--navy, #1b2a4a); }

/* ── Filtered count line ── */
.pf-count {
  font-size: 12.5px; color: var(--text-caption, #6b7280);
  font-family: var(--font-stack); margin: 10px 2px 8px;
}
.pf-count strong { color: var(--navy, #1b2a4a); }

/* ── Table ── */
.pf-table-wrap {
  background: #fff; border: 1px solid var(--table-border, #d9dfe8);
  border-radius: 0 8px 8px 8px; overflow-x: auto;
}
.pf-table { border-collapse: collapse; width: 100%; font-size: 13px; font-family: var(--font-stack); }
.pf-table th {
  background: var(--navy, #1b2a4a); color: #fff; text-align: left;
  padding: 7px 10px; position: sticky; top: 0; cursor: pointer;
  white-space: nowrap; user-select: none; font-weight: 600;
}
.pf-table td {
  padding: 6px 10px; border-bottom: 1px solid #eef1f6; white-space: nowrap;
  color: var(--text-body, #1f2937);
}
.pf-table tbody tr:hover td, .pf-table tbody tr:hover td { background: #f6f8fc; }
.pf-table td.pf-num, .pf-table th.pf-num { text-align: right; }
.pf-none { padding: 30px; text-align: center; color: #6b7280; }

.pf-src-onhand { color: var(--success-green, #1a7f37); font-weight: 700; }
.pf-src-inb { color: var(--ashley-orange, #b34700); font-weight: 700; }
.pf-src-com { color: #4b5563; font-weight: 700; }
.pf-src-svc { color: #6b7280; font-weight: 600; }
.pf-short { color: #b34700; }
.pf-wf {
  background: var(--ashley-orange, #e87722); color: #fff; border-radius: 3px;
  padding: 1px 6px; font-size: 11px; font-weight: 700;
}

/* ── Footnote (population + tie-out + rules + notes) ── */
.pf-foot {
  color: var(--text-caption, #6b7280); font-size: 12px;
  font-family: var(--font-stack); margin-top: 14px; line-height: 1.5;
}

@media (max-width: 1100px) {
  .pf-tiles { grid-template-columns: repeat(2, 1fr); }
}
