/* mod-pipeline-board.css — unified pipeline board (redesign 2026-09-21).
 * Design system (matches app): 8px base grid, Fraunces display for headings,
 * light cards on a deep-green background, teal focus accent #2d7a67.
 * All interactive elements keyboard-focusable; nothing action-critical is
 * hover-only; targets >= 44px where feasible. */

.plb-wrap { max-width: 1720px; margin: 0 auto; padding: 0 1rem 6rem; }
.plb { margin-top: 1rem; }

/* toolbar */
.plb-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .75rem 0; }
.plb-search { flex: 1 1 220px; min-width: 200px; padding: .6rem .8rem; border: 1px solid #cfd8d3; border-radius: 10px; font-size: 1rem; background: #fff; }
.plb-seg { display: inline-flex; border: 1px solid #cfd8d3; border-radius: 10px; overflow: hidden; background: #fff; }
.plb-seg button { border: 0; background: transparent; padding: .6rem .9rem; font-size: .95rem; cursor: pointer; color: #1f3d2b; min-height: 44px; }
.plb-seg button.on { background: #1f3d2b; color: #fff; }
.plb-toggle { border: 1px solid #cfd8d3; background: #fff; color: #1f3d2b; border-radius: 10px; padding: .6rem .9rem; font-size: .95rem; cursor: pointer; min-height: 44px; }
.plb-toggle.on { background: #2d7a67; border-color: #2d7a67; color: #fff; }
.plb-toggle:focus-visible, .plb-seg button:focus-visible, .plb-search:focus-visible { outline: 3px solid #2d7a67; outline-offset: 2px; }

/* saved views + chips */
.plb-views { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .25rem 0 .5rem; }
.plb-viewtab { display: inline-flex; border: 1px solid #cfd8d3; border-radius: 999px; background: #f4f1e8; overflow: hidden; }
.plb-viewlink { background: none; border: 0; color: #1f3d2b; cursor: pointer; font-size: .9rem; padding: .35rem .7rem; text-decoration: underline; min-height: 36px; }
.plb-viewx { background: none; border: 0; cursor: pointer; color: #7a6f5f; padding: .35rem .6rem; font-size: .85rem; min-width: 36px; min-height: 36px; }
.plb-chipsrow { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .25rem 0 .5rem; min-height: 1.5rem; }
.plb-chipx { border: 1px solid #2d7a67; background: #eaf4f0; color: #1f3d2b; border-radius: 999px; padding: .3rem .65rem; font-size: .85rem; cursor: pointer; min-height: 36px; }

/* stats strip (no charts, per spec) */
.plb-stats { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.plb-stat { background: #fff; border: 1px solid #e3ddd0; border-radius: 12px; padding: .55rem .9rem; min-width: 110px; }
.plb-stat-n { display: block; font-family: Fraunces, Georgia, serif; font-size: 1.35rem; color: #1f3d2b; }
.plb-stat-n.plb-warn { color: #b3261e; }
.plb-stat-l { font-size: .78rem; color: #6b6257; }

/* kanban */
.plb-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 320px); gap: .75rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.plb-col { background: #f4f1e8; border: 1px solid #e3ddd0; border-radius: 14px; display: flex; flex-direction: column; max-height: calc(100vh - 320px); min-height: 160px; }
.plb-colhead { display: flex; align-items: baseline; gap: .5rem; padding: .7rem .8rem; cursor: pointer; border-radius: 14px 14px 0 0; }
.plb-colhead:focus-visible { outline: 3px solid #2d7a67; outline-offset: -3px; }
.plb-colname { font-weight: 700; color: #1f3d2b; font-size: .95rem; }
.plb-colcount { background: #1f3d2b; color: #fff; border-radius: 999px; font-size: .78rem; padding: .1rem .5rem; }
.plb-colval { margin-left: auto; font-size: .82rem; color: #6b6257; }
.plb-colchev { color: #6b6257; }
.plb-colbody { padding: .25rem .6rem .8rem; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem; min-height: 90px; border-radius: 0 0 14px 14px; }
.plb-col.is-collapsed .plb-colbody { display: none; }
.plb-col.can-drop .plb-colbody { outline: 3px dashed #2d7a67; outline-offset: -6px; background: #eaf4f0; }
.plb-col.no-drop .plb-colbody { outline: 3px dashed #b3261e; outline-offset: -6px; }

/* cards */
.plb-card { background: #fff; border: 1px solid #e3ddd0; border-radius: 12px; padding: .65rem .75rem; cursor: pointer; }
.plb-card:hover { border-color: #2d7a67; }
.plb-card:focus-visible { outline: 3px solid #2d7a67; outline-offset: 2px; }
.plb-card.is-sel { outline: 3px solid #2d7a67; outline-offset: 2px; }
.plb-card.is-drag { opacity: .95; box-shadow: 0 8px 24px rgba(31,61,43,.25); }
.plb-card.is-ghost { opacity: .35; }
.plb-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.plb-card-top strong { flex: 1; }
.plb-cardsel { width: 22px; height: 22px; margin-top: 1px; accent-color: #2d7a67; flex: none; cursor: pointer; }
.plb-card-top strong { font-size: 1rem; color: #1f3d2b; }
.plb-row { display: inline-flex; align-items: center; gap: .35rem; }
.plb-consent { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.plb-consent.ok { background: #2d7a67; }
.plb-consent.part { background: #c98a1b; }
.plb-consent.none { background: #b9b2a4; }
.plb-consent.sm { width: 9px; height: 9px; }
.plb-kebab { border: 0; background: #f4f1e8; border-radius: 8px; width: 36px; height: 36px; font-size: 1.1rem; line-height: 1; cursor: pointer; color: #1f3d2b; }
.plb-kebab:hover { background: #e7e0d0; }
.plb-stagechip { display: inline-block; margin-top: .35rem; font-size: .78rem; font-weight: 600; color: #1f3d2b; background: #eef3ee; border: 1px solid #cfd8d3; border-radius: 999px; padding: .15rem .55rem; }
.plb-meta { font-size: .82rem; color: #6b6257; margin-top: .3rem; }
.plb-next { font-size: .85rem; margin-top: .35rem; color: #1f3d2b; }
.plb-next.over { color: #b3261e; font-weight: 600; }
.plb-overdue { background: #fbe7e5; border-radius: 6px; padding: .05rem .4rem; font-size: .78rem; }
.plb-flags { font-size: .8rem; color: #6b6257; margin-top: .25rem; }
.plb-unpaid { color: #b3261e; font-weight: 700; }
.plb-stale { color: #c98a1b; font-weight: 600; }
.plb-money { font-size: .85rem; margin-top: .3rem; color: #1f3d2b; font-weight: 600; }
.plb-empty { padding: 1rem .5rem; color: #6b6257; font-size: .88rem; text-align: center; }

/* card menu */
.plb-menu { position: absolute; z-index: 1200; background: #fff; border: 1px solid #cfd8d3; border-radius: 12px; box-shadow: 0 10px 30px rgba(31,61,43,.2); padding: .35rem; }
.plb-menuitem { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .7rem .8rem; font-size: .95rem; color: #1f3d2b; border-radius: 8px; cursor: pointer; min-height: 44px; }
.plb-menuitem:hover, .plb-menuitem:focus-visible { background: #eaf4f0; outline: none; }
.plb-menusep { border-top: 1px solid #e3ddd0; margin: .3rem 0; }

/* missing-requirements list + undo toast */
.plb-missing { margin: .5rem 0; padding-left: 1.2rem; }
.plb-missing li { margin: .25rem 0; }
.plb-undobox { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 1300; background: #1f3d2b; color: #fff; border-radius: 12px; padding: .6rem .8rem .6rem 1rem; display: flex; gap: .8rem; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); max-width: calc(100vw - 2rem); }
.plb-undobox .btn { background: #fff; color: #1f3d2b; border: 0; border-radius: 8px; padding: .5rem .9rem; cursor: pointer; font-weight: 700; }

/* list view */
.plb-tablewrap { overflow-x: auto; background: #fff; border: 1px solid #e3ddd0; border-radius: 14px; }
.plb-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.plb-table th, .plb-table td { text-align: left; padding: .6rem .7rem; border-bottom: 1px solid #efe9db; vertical-align: top; }
.plb-table thead th { background: #f4f1e8; position: sticky; top: 0; }
.plb-sort { background: none; border: 0; font: inherit; font-weight: 700; color: #1f3d2b; cursor: pointer; padding: .2rem; }
.plb-row { cursor: pointer; }
.plb-row:hover { background: #faf8f2; }
.plb-row.is-sel { background: #eaf4f0; }
.plb-namelink { color: #1f3d2b; font-weight: 700; }

/* bulk bar */
.plb-bulk { position: sticky; bottom: 0; z-index: 500; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; background: #1f3d2b; color: #fff; border-radius: 14px; padding: .6rem .9rem; margin-top: .75rem; }
.plb-bulk .btn { background: #fff; color: #1f3d2b; border: 0; }

/* filter panel */
.plb-panel { background: #fff; border: 1px solid #e3ddd0; border-radius: 14px; padding: .9rem 1rem; margin-bottom: .75rem; }
.plb-panelgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem 1.2rem; }
.plb-flabel { display: block; font-weight: 700; font-size: .85rem; color: #1f3d2b; margin-bottom: .3rem; }
.plb-checks { display: flex; flex-direction: column; gap: .25rem; max-height: 170px; overflow-y: auto; }
.plb-checks label { display: flex; gap: .45rem; align-items: center; font-size: .9rem; min-height: 32px; }
.plb-daterow { display: flex; flex-wrap: wrap; gap: .4rem; }
.plb-daterow select, .plb-daterow input { padding: .45rem .5rem; border: 1px solid #cfd8d3; border-radius: 8px; font-size: .9rem; background: #fff; }
.plb-presets { margin-top: .4rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.plb-presets button { background: #f4f1e8; border: 1px solid #e3ddd0; border-radius: 8px; padding: .3rem .6rem; font-size: .82rem; cursor: pointer; min-height: 36px; }
.plb-panelactions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: .8rem; }

/* keyboard overlay */
.plb-keys div { padding: .4rem 0; font-size: .95rem; }
kbd { background: #f4f1e8; border: 1px solid #cfd8d3; border-bottom-width: 3px; border-radius: 6px; padding: .1rem .45rem; font-family: inherit; }

/* responsive */
@media (max-width: 900px) {
  .plb-board { grid-auto-columns: minmax(240px, 78vw); }
}
@media (max-width: 480px) {
  .plb-cardsel { display: none; }
  .plb-board { scroll-snap-type: x mandatory; grid-auto-columns: 84vw; }
  .plb-col { scroll-snap-align: start; max-height: calc(100vh - 300px); }
  .plb-card { padding: .55rem .6rem; }
  .plb-card-top strong { font-size: .95rem; }
  .plb-panelgrid { grid-template-columns: 1fr; }
  .plb-stats { gap: .35rem; }
  .plb-stat { min-width: 96px; padding: .45rem .65rem; }
  .plb-stat-n { font-size: 1.15rem; }
  .plb-toolbar .plb-search { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .plb-card { scroll-behavior: auto; }
}
