/* The search page's Table tab (static/js/pages/search_table.js). The table, the chips, the
   stage pills and the capture page are the portal's own classes (static/portal/css/app.css);
   this file only places what the sourcing table adds inside them — a cell that edits in
   place, and the capture page's foot. Every rule under html.ui-new. */

/* A cell that edits: the value itself is the button, so the cell reads like the portal's and
   still takes a click and a keyboard stop. */
html.ui-new .pst .pst-edit { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0;
  cursor: pointer; text-align: left; border-radius: var(--radius-sm); max-width: 100%; }
html.ui-new .pst .pst-edit:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
html.ui-new .pst .pst-text { padding: 2px 4px; margin: -2px -4px; }
html.ui-new .pst .pst-text:hover { background: var(--paper-100); }
html.ui-new .pst .pst-edit .stage { cursor: pointer; }
html.ui-new .pst .pst-edit:hover .stage { box-shadow: 0 0 0 1px var(--hr-purple-300); }
html.ui-new .pst .pst-mut { color: var(--ink-400); }
html.ui-new .pst .pst-late { color: #B3261E; font-weight: var(--fw-semibold); }
html.ui-new .pst .pst-notecol { max-width: 150px; }
html.ui-new .pst .pst-note { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; vertical-align: bottom; }
html.ui-new .pst .pst-field { font: inherit; font-size: var(--text-sm); padding: 5px 8px; min-width: 150px; }
html.ui-new .pst textarea.pst-field { min-width: 240px; white-space: normal; }
html.ui-new .pst .dtool a.chip { text-decoration: none; }
html.ui-new .pst .dtable tr.row-archived td { opacity: .55; }
html.ui-new .pst .dtable tr.row-archived td:last-child { opacity: 1; }
html.ui-new .pst .dtable-empty { text-align: center; color: var(--ink-500); padding: 22px; white-space: normal; }

/* The capture page: the portal's hire capture (a narrow column of .card, then the buttons). */
html.ui-new .pst-cap { padding: 0; }
html.ui-new .pst-cap .page-head h1 { margin: var(--space-2) 0 0; }
html.ui-new .pst-cap .card + .card { margin-top: var(--space-4); }
html.ui-new .pst-cap .lbl { display: block; font-size: var(--text-sm); font-weight: var(--fw-semibold); margin-bottom: 6px; }
/* The portal's field rule names text, email, number, select and textarea; the day and the
   time take the same box so the two fields read as the form's. */
html.ui-new .pst-cap input[type="date"], html.ui-new .pst-cap input[type="time"] { width: 100%;
  font-family: var(--font-sans); font-size: var(--text-sm); padding: 10px 14px;
  border: var(--border-width) solid var(--line-300); border-radius: var(--radius-md);
  background: var(--white); color: var(--ink-800); }
/* The four facts (board.js pqFormHtml, shared with the person drawer): a field and its
   "works?" answer on one line. */
html.ui-new .pst-cap .pq-row { margin-bottom: var(--space-3); }
html.ui-new .pst-cap .pq-inl { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; margin-top: 6px; white-space: nowrap; }
html.ui-new .pst-cap .pq-inl input { flex: 1 1 auto; width: auto; min-width: 0; }
html.ui-new .pst-cap .pq-inl select { width: auto; flex: none; }
html.ui-new .pst-cap .pq-inl .pq-short { flex: 0 1 160px; }
html.ui-new .pst-cap .pq-form textarea { min-height: 70px; }
html.ui-new .pst-cap .pq-form .bd-ctl { font: inherit; font-size: var(--text-sm); }
html.ui-new .pst-cap .pst-caperr { color: #B3261E; font-size: var(--text-sm); min-height: 1.2em; margin: var(--space-3) 0 0; }
html.ui-new .pst-cap .pst-capacts { display: flex; gap: 10px; align-items: center; margin-top: var(--space-3); }

/* The search box: the portal's .dsearch, guarded against this app's own input rules. */
html.ui-new .pst .dsearch input { border: 0; padding: 0; margin: 0; height: auto; min-height: 0; box-shadow: none;
  background: transparent; width: 190px; font-size: var(--text-sm); }

/* Fit the panel: the title line sits under the name, cut with an ellipsis (its full text is
   the tooltip), and a table still wider than the panel scrolls inside it instead of clipping
   the last columns (the portal's .dpanel hides overflow). */
html.ui-new .pst .cand small { display: block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
html.ui-new .pst .dpanel { overflow-x: auto; }
html.ui-new .pst table.dtable thead th, html.ui-new .pst table.dtable tbody td { padding-left: 10px; padding-right: 10px; }

/* Ticks and the bulk bar: the portal role table's .col-check / .cbx and its floating
   #table-bulkbar dark pill (internal/role_detail.html), as written there. */
html.ui-new .pst .dtable tr.is-ticked td { background: var(--hr-purple-100); }
html.ui-new .pst .pst-bulk { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 260; display: flex; flex-wrap: wrap; justify-content: center;
  align-items: center; gap: 12px; width: max-content; max-width: calc(100vw - 32px);
  background: var(--ink-900); color: var(--white);
  padding: 10px 18px; border-radius: 999px; font-size: var(--text-sm);
  box-shadow: var(--shadow-md); }
html.ui-new .pst .pst-bulk[hidden] { display: none; }
html.ui-new .pst .pst-bulk .bulk-count { font-variant-numeric: tabular-nums; font-weight: var(--fw-semibold); white-space: nowrap; }
html.ui-new .pst .pst-bulk .bb-btn { border: 1px solid rgba(255,255,255,.35); background: transparent;
  color: var(--white); border-radius: 999px; padding: 5px 14px; font: inherit;
  font-size: var(--text-sm); font-weight: var(--fw-semibold); cursor: pointer; }
html.ui-new .pst .pst-bulk .bb-btn:disabled { opacity: .4; cursor: default; }
html.ui-new .pst .pst-bulk .bb-move { background: var(--hr-purple); border-color: var(--hr-purple); }
html.ui-new .pst .pst-bulk .bb-danger { background: var(--danger); border-color: var(--danger); }
html.ui-new .pst .pst-bulk .bb-cancel { background: none; border: 0; color: rgba(255,255,255,.7);
  font: inherit; font-size: var(--text-sm); cursor: pointer; text-decoration: underline; }
/* Room under the last row so the bar never sits on it. */
html.ui-new .pst { padding-bottom: 72px; }

/* The campaign filter beside the search box: the portal's field, chip-sized. */
html.ui-new .pst .dtool select.pst-camp { font-family: var(--font-sans); font-size: var(--text-sm); color: var(--ink-800);
  padding: 5px 28px 5px 12px; border: var(--border-width) solid var(--line-300); border-radius: 999px;
  background-color: var(--white); width: auto; max-width: 220px; height: auto; min-height: 0; margin: 0; }

/* Editing in place, at a glance: an editable value shows a pencil on hover. */
html.ui-new .pst .pst-text { position: relative; }
html.ui-new .pst .pst-text:hover::after { content: "✎"; margin-left: 6px; color: var(--hr-purple-700); font-size: 12px; }
html.ui-new .pst .pst-field { border: var(--border-width) solid var(--hr-purple-300); border-radius: var(--radius-sm);
  box-shadow: 0 0 0 3px var(--focus-ring); }

/* Tags under the name (the portal's small chip), each with its own ×; a held card's word. */
html.ui-new .pst .pst-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; max-width: 220px; }
html.ui-new .pst .pst-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: var(--fw-semibold);
  color: var(--hr-purple-700); background: var(--hr-purple-100); border-radius: 999px; padding: 1px 4px 1px 8px; }
html.ui-new .pst .pst-untag { font: inherit; line-height: 1; color: var(--hr-purple-700); background: none; border: 0;
  padding: 0 3px; cursor: pointer; opacity: .6; }
html.ui-new .pst .pst-untag:hover { opacity: 1; }
html.ui-new .pst .pst-held { font-size: 11px; font-weight: var(--fw-semibold); color: var(--energy-yellow-800);
  background: var(--energy-yellow-100); border-radius: 999px; padding: 1px 8px; }

/* Red flags before the score: the portal's red below-bar badges (static/js/red_flags.js), a
   quiet green word for a clean one. */
html.ui-new .pst .pst-rfcol { max-width: 180px; white-space: normal; }
html.ui-new .pst .pst-rfcol .rf-chip { margin: 0 4px 3px 0; vertical-align: middle; max-width: 120px; }
html.ui-new .pst .pst-clean { color: var(--orbit-green-700); font-size: var(--text-sm); font-weight: var(--fw-semibold); white-space: nowrap; }
