/* NN_PURCHASES_LIFECYCLE_v1 — Purchases module overlay */
.nn-po-root { font-family: inherit; color: inherit; }
.nn-po-root * { box-sizing: border-box; }
.nn-po-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.nn-po-header h1 { font-size:1.5rem; font-weight:700; margin:0; }
.nn-po-toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.nn-po-toolbar input, .nn-po-toolbar select { min-width:140px; }
.nn-po-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; overflow:hidden; }
.nn-po-table { width:100%; border-collapse:collapse; font-size:0.875rem; }
.nn-po-table th { text-align:left; padding:10px 12px; background:#f9fafb; font-weight:600; color:#374151; border-bottom:1px solid #e5e7eb; }
.nn-po-table td { padding:10px 12px; border-bottom:1px solid #f3f4f6; vertical-align:middle; }
.nn-po-table tr { cursor:pointer; }
.nn-po-table tr:hover { background:#f9fafb; }
.nn-po-badge { display:inline-block; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; text-transform:capitalize; white-space:nowrap; }
.nn-po-badge.draft,.nn-po-badge.unpaid { background:#f3f4f6; color:#374151; }
.nn-po-badge.ordered,.nn-po-badge.partially_paid,.nn-po-badge.partially_received { background:#fef3c7; color:#92400e; }
.nn-po-badge.received,.nn-po-badge.paid { background:#d1fae5; color:#065f46; }
.nn-po-badge.cancelled,.nn-po-badge.refunded { background:#fee2e2; color:#991b1b; }
.nn-po-badge.returned { background:#e0e7ff; color:#3730a3; }
.nn-po-modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:80; display:flex; align-items:flex-start; justify-content:center; padding:24px 12px; overflow:auto; }
.nn-po-modal { background:#fff; border-radius:12px; width:min(960px,100%); max-height:calc(100vh - 48px); overflow:auto; box-shadow:0 20px 50px rgba(0,0,0,.2); }
.nn-po-modal header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #e5e7eb; position:sticky; top:0; background:#fff; z-index:1; }
.nn-po-modal header h2 { margin:0; font-size:1.15rem; }
.nn-po-modal .body { padding:16px 20px 24px; }
.nn-po-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.nn-po-grid.three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.nn-po-field label { display:block; font-size:12px; font-weight:600; color:#4b5563; margin-bottom:4px; }
.nn-po-field input,.nn-po-field select,.nn-po-field textarea { width:100%; border:1px solid #d1d5db; border-radius:8px; padding:8px 10px; font-size:14px; }
.nn-po-field textarea { min-height:70px; resize:vertical; }
.nn-po-actions { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
.nn-po-btn { border:1px solid #d1d5db; background:#fff; color:#111827; border-radius:8px; padding:8px 12px; font-size:13px; font-weight:600; cursor:pointer; }
.nn-po-btn:disabled { opacity:.45; cursor:not-allowed; }
.nn-po-btn.primary { background:#0f766e; border-color:#0f766e; color:#fff; }
.nn-po-btn.danger { background:#b91c1c; border-color:#b91c1c; color:#fff; }
.nn-po-btn.ghost { background:transparent; }
.nn-po-totals { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:12px; }
.nn-po-totals .tile { background:#f9fafb; border-radius:8px; padding:10px 12px; }
.nn-po-totals .tile span { display:block; font-size:11px; color:#6b7280; }
.nn-po-totals .tile strong { font-size:15px; }
.nn-po-line-tools { display:flex; gap:6px; margin:8px 0; }
.nn-po-empty { text-align:center; padding:40px 16px; color:#6b7280; }
.nn-po-section-title { font-size:14px; font-weight:700; margin:18px 0 8px; }
.nn-po-muted { color:#6b7280; font-size:12px; }
.nn-po-error { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; padding:8px 12px; border-radius:8px; margin-bottom:10px; font-size:13px; }
.nn-po-success { background:#ecfdf5; color:#065f46; border:1px solid #a7f3d0; padding:8px 12px; border-radius:8px; margin-bottom:10px; font-size:13px; }
@media (max-width:720px) {
  .nn-po-grid,.nn-po-grid.three,.nn-po-totals { grid-template-columns:1fr; }
}
