/* pnl.css — additions on top of ap-kpi.css for the Weekly Production KPI page. Cards, filters, banners,
   tablewrap, buttons and tokens come from ap-kpi.css; this file only adds what the page needs. */

#viewApp > .card { margin-bottom: 16px; }
/* Summary · Enter data · Setup (Steve 2026-11-01: the main page holds only summaries). */
.pl-subnav { display: flex; gap: 4px; margin: 0 0 10px; border-bottom: 1px solid var(--ring); }
.pl-subnav a { padding: 6px 12px; color: var(--ink2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pl-subnav a.active { color: var(--ink); font-weight: 700; border-bottom-color: var(--seq450); }
.filters input[type=month] { border: none; outline: none; background: transparent; color: var(--ink); font: inherit; }

.pl-table td, .pl-table th { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-table td:first-child, .pl-table th:first-child { text-align: left; }
.pl-table.pl-narrow { min-width: 0; }
.pl-table tr.pl-total td { font-weight: 700; border-top: 1px solid var(--axis); }
.pl-table tr.pl-pct td { color: var(--ink2); font-style: italic; }
.pl-table tr.pl-gap td { height: 8px; border: none; }
.pl-table th small { display: block; font-weight: 400; color: var(--muted); }
.pl-neg { color: var(--critical); }
.pl-table tr.pl-missing td { color: var(--critical); font-weight: 700; }
.pl-src-balance { color: var(--seq550); }
.pl-src-manual { font-weight: 700; }
.pl-src-ke24 { color: color-mix(in srgb, var(--good) 70%, var(--ink)); }
.pl-table tr.pl-optional td { font-weight: 400; color: var(--ink2); }
/* Month-end forecast columns and their legend swatch. */
.pl-table td.pl-fc, .pl-table th.pl-fc, .pl-fc-key { background: color-mix(in srgb, var(--seq450) 9%, transparent); }
.pl-table td.pl-fc { font-style: italic; }
.pl-fc-key { padding: 0 4px; border-radius: 3px; }
.pl-fc-note div { margin-top: 2px; }
.pl-table th.pl-cc-head { text-align: center; border-bottom: 1px solid var(--axis); }
.pl-table th small { white-space: normal; }
.pl-weeks-toggle { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12.5px; color: var(--ink2); margin: 6px 0; }
.pl-weeks-toggle label { display: inline-flex; gap: 6px; align-items: center; }
.pl-weeks-toggle select { font: inherit; padding: 2px 6px; border: 1px solid var(--ring); border-radius: 5px; background: var(--surface); color: var(--ink); }
.pl-table tr.pl-optional td small { display: block; color: var(--muted); font-style: italic; }
.pl-num { width: 110px; text-align: right; font: inherit; padding: 3px 6px; border: 1px solid var(--ring); border-radius: 5px; background: var(--surface); color: var(--ink); }
.pl-table input.pl-num { width: 96px; }

.pl-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 6px 0; }
.pl-form label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink2); }
.pl-form input[type=date], .pl-form select { font: inherit; padding: 4px 6px; border: 1px solid var(--ring); border-radius: 5px; background: var(--surface); color: var(--ink); }
.pl-check { cursor: pointer; }
.pl-h4 { font-size: 12.5px; margin: 16px 0 6px; }

.pl-accts { font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: var(--ink2); white-space: normal; text-align: left !important; max-width: 640px; }
.pl-accts summary { cursor: pointer; color: var(--seq450); }
.pl-acct { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 3px 0; }
.pl-acct select, .pl-group-move select { font: inherit; font-size: 12px; padding: 1px 4px; border: 1px solid var(--ring); border-radius: 4px; background: var(--surface); color: var(--ink); }
.pl-desc { width: 260px; font: inherit; font-size: 12px; padding: 2px 6px; border: 1px solid var(--ring); border-radius: 5px; background: var(--surface); color: var(--ink); }
.pl-group-move { display: block; margin-top: 4px; font-size: 12px; color: var(--ink2); }
.pl-changed { background: color-mix(in srgb, var(--seq450) 10%, transparent); }
.pl-hol { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pl-chip { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--ring); border-radius: 12px; padding: 2px 10px; font-size: 12.5px; }
.pl-chip button { border: none; background: transparent; color: var(--critical); cursor: pointer; font: inherit; padding: 0; }
.pl-small { border: 1px solid var(--ring); background: transparent; color: var(--ink2); border-radius: 5px; padding: 3px 8px; font: inherit; font-size: 12px; cursor: pointer; }

@media (max-width: 640px) {
  .pl-num { width: 84px; }
}

/* Copy for SAP: off-screen buffer for the classic copy; visible fallback box when the browser blocks both. */
.pl-copybuf { position: fixed; left: -9999px; top: 0; opacity: 0; }
.pl-copy-result { white-space: normal; text-align: left; margin-top: 4px; }
.pl-copybox { display: block; width: 140px; margin-top: 4px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.pl-fc1-list { margin: 4px 0 8px 18px; padding: 0; font-size: 12px; color: var(--ink2); }
.pl-hidden { display: none !important; }

/* Enter data: the grid stays within the card — balance boxes first, report line last and allowed to wrap. */
#tblEntry { min-width: 0; width: auto; }
#tblEntry td.pl-line { text-align: left; white-space: normal; color: var(--muted); }
#tblEntry th small { display: block; font-weight: 400; color: var(--muted); }

/* Enter data fits one screen: instructions folded, tighter rows. */
.pl-how { margin: 2px 0 6px; font-size: 12px; }
.pl-how summary { cursor: pointer; color: var(--seq450); }
#tblEntry td, #tblEntry th { padding-top: 3px; padding-bottom: 3px; }
#tblEntry input.pl-num { padding: 2px 6px; }
#tblEntry .pl-small { padding: 2px 6px; }
