/* ============================================================
   NLG SMARTFABX — ORDERED MATERIALS   ordered_materials.css
   Page-specific styles (imports main_inventory.css as base)
   ============================================================ */

/* ── PO Two-Panel Layout ───────────────── */
.po-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 10px;
}
.po-list-panel,
.po-detail-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* ── PO List Items ─────────────────────── */
.po-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.po-item:hover { background: var(--bg-raised); }
.po-item.active {
  background: rgba(217,119,6,0.06);
  border-left: 3px solid var(--amber);
}
.po-item.active .po-number { color: var(--amber); }
.po-number {
  font-weight: 700;
  font-size: 0.88rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}
.po-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }
.po-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 0.82rem; }

/* ── PO Detail Panel ───────────────────── */
.detail-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── PO Table ──────────────────────────── */
.po-table-container { overflow-x: auto; }
.po-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.po-table th {
  background: var(--bg-card);
  color: var(--text-secondary);
  padding: 9px 11px;
  text-align: left;
  font-weight: 600;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.po-table td {
  padding: 9px 11px;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  vertical-align: middle;
}
.po-table tbody tr:hover { background: var(--bg-raised); }
.po-table tbody tr:nth-child(even) { background: var(--bg-card); }

/* ── Line Items Grid (PO modal) ────────── */
.line-header {
  grid-template-columns: 110px 1fr 70px 80px 90px 30px;
}
.line-row {
  grid-template-columns: 110px 1fr 70px 80px 90px 30px;
}

/* ── Overdue highlight ─────────────────── */
.po-overdue { background: rgba(220,38,38,0.04); }
.po-overdue .po-number { color: var(--red); }

/* ── Responsive ────────────────────────── */
@media (max-width: 900px) {
  .po-layout { grid-template-columns: 1fr; }
}

