/* =============================================================
   Proscreen UI — ps.css  ("Modernist" reskin, 2026-09-04)
   Source: Claude Design mockup Customers-D-Modern. Inter (was Archivo until 24 Sep 2026), blue accent,
   white panels on warm grey. Class names unchanged from the first build.
   ============================================================= */

/* ---------- font ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-vietnamese.woff2") format("woff2"); unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokens ---------- */
:root {
  --ps-bg: #f4f3f2;
  --ps-surface: #ffffff;
  --ps-surface-2: #fbfbfa;
  --ps-surface-3: #f4f3f2;
  --ps-line: #e6e4e3;
  --ps-line-strong: #cfcccb;
  --ps-ink: #201e1d;
  --ps-ink-2: #605d5d;
  --ps-ink-3: #7d7979;
  --ps-ink-4: #9b9797;
  --ps-accent: #642c90;
  --ps-accent-2: #4b226c;
  --ps-accent-soft: #f4eef9;
  --ps-accent-soft-2: #e3d3ef;
  --ps-accent-mid: #4b226c;
  --ps-accent-deep: #36184e;
  --ps-ok: #4b226c;        --ps-ok-soft: #f4eef9;
  --ps-warn: #8a5a12;      --ps-warn-soft: #fdf3e3;   --ps-warn-dot: #e8a13a;
  --ps-bad: #b3260f;       --ps-bad-soft: #fdecea;    --ps-bad-strong: #ec3013;
  --ps-purple: #6f6bd8;
  --ps-focus: #642c90;

  --ps-s1: 4px; --ps-s2: 8px; --ps-s3: 12px; --ps-s4: 16px;
  --ps-s5: 20px; --ps-s6: 24px; --ps-s8: 32px; --ps-s10: 40px;

  --ps-r-lg: 14px; --ps-r-md: 10px; --ps-r-sm: 8px; --ps-r-pill: 999px;
  --ps-shadow-card: 0 1px 2px rgba(32,30,29,.04);
  --ps-shadow: 0 12px 32px rgba(32,30,29,.16);

  --ps-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ps-fs-xs: 12px; --ps-fs-sm: 13px; --ps-fs-md: 14px; --ps-fs-lg: 17px;
  --ps-fs-xl: 20px; --ps-fs-2xl: 23px; --ps-fs-3xl: 32px;

  --ps-sidebar-w: 252px; --ps-rail-w: 64px; --ps-topbar-h: 62px;
  --ps-control-h: 38px; --ps-control-h-sm: 32px; --ps-row-h: 54px;
  --ps-gutter: var(--ps-s6);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ps-bg); color: var(--ps-ink); font: 400 var(--ps-fs-md)/1.5 var(--ps-font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, canvas, iframe { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
/* Number boxes have no up/down arrows: people type the number themselves. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
a { color: var(--ps-accent-mid); text-decoration: none; }
a:hover { color: var(--ps-accent-deep); }
:focus-visible { outline: 2px solid var(--ps-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #dedbd9; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }

/* ---------- type ---------- */
.ps-h1 { font-size: var(--ps-fs-xl); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.ps-h2 { font-size: var(--ps-fs-lg); font-weight: 700; letter-spacing: -.01em; line-height: 1.3; }
.ps-h3 { font-size: 15px; font-weight: 700; line-height: 1.3; }
.ps-muted { color: var(--ps-ink-3); font-size: var(--ps-fs-sm); }
.ps-sub { color: var(--ps-ink-2); font-size: var(--ps-fs-sm); }
.ps-num { font-variant-numeric: tabular-nums; text-align: right; }
.ps-text-bad { color: var(--ps-bad); }
.ps-text-ok { color: var(--ps-ok); }
.ps-kicker { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ps-ink-4); }
.ps-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ps-skip { position: absolute; left: -999px; top: 8px; background: var(--ps-surface); padding: 8px 12px; border-radius: var(--ps-r-sm); z-index: 100; }
.ps-skip:focus { left: 8px; }

/* ---------- icon ---------- */
.ps-icon { width: 17px; height: 17px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ps-icon--sm { width: 15px; height: 15px; }
.ps-icon--lg { width: 22px; height: 22px; }

/* ---------- shell ---------- */
.ps-app { display: grid; grid-template-columns: var(--ps-sidebar-w) 1fr; min-height: 100vh; transition: grid-template-columns 180ms ease; }
.ps-app.is-rail { grid-template-columns: var(--ps-rail-w) 1fr; }
.ps-app--driver { grid-template-columns: 1fr; }
.ps-main { min-width: 0; display: flex; flex-direction: column; }
.ps-page { width: 100%; max-width: 1480px; margin: 0 auto; padding: var(--ps-s5) var(--ps-gutter) calc(var(--ps-s10) * 2); display: flex; flex-direction: column; gap: var(--ps-s4); }
.ps-page__body { display: flex; flex-direction: column; gap: var(--ps-s4); }
.ps-page__actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: var(--ps-s2); padding: var(--ps-s3) 0; margin-top: var(--ps-s2); background: linear-gradient(to top, var(--ps-bg) 70%, transparent); }

/* ---------- sidebar ---------- */
.ps-side { position: sticky; top: 0; height: 100vh; background: var(--ps-surface); border-right: 1px solid var(--ps-line); display: flex; flex-direction: column; min-width: 0; overflow: visible; }
.ps-side__brand { flex-shrink: 0; transition: padding 180ms ease; height: var(--ps-topbar-h); display: flex; align-items: center; padding: 0 18px; border-bottom: 1px solid var(--ps-line); }
.ps-side__brand a { display: flex; align-items: center; max-width: 100%; }
.ps-side__brand .ps-side__logo { display: block; width: auto; height: 52px; max-width: 100%; object-fit: contain; transition: max-width 180ms ease; }
.ps-side__nav { flex: 1; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: var(--ps-s2) 14px 64px; display: flex; flex-direction: column; gap: 14px; }
.ps-side__group { display: flex; flex-direction: column; gap: 2px; }
.ps-side__label { font-size: 10px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ps-ink-4); padding: 4px 10px 6px; }
.ps-side__link { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--ps-r-md); color: #444141; font-weight: 400; font-size: var(--ps-fs-md); white-space: nowrap; }
.ps-side__link .ps-icon { flex-shrink: 0; opacity: .75; width: 18px; height: 18px; stroke-width: 1.7; }
.ps-side__link:hover { background: var(--ps-surface-3); color: var(--ps-ink); }
.ps-side__link.is-active { background: var(--ps-accent-soft); color: var(--ps-accent-deep); font-weight: 600; }
.ps-side__link.is-active .ps-icon { opacity: 1; }
.ps-side__toggle { position: absolute; bottom: 18px; left: 18px; z-index: 31; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgb(255 255 255 / 80%); border-radius: 8px; background: rgb(255 255 255 / 12%); backdrop-filter: blur(3px) saturate(140%); -webkit-backdrop-filter: blur(3px) saturate(140%); box-shadow: 0 3px 10px rgb(22 33 28 / 8%), inset 0 1px 0 rgb(255 255 255 / 65%), 0 0 0 1px rgb(22 33 28 / 8%); color: var(--ps-ink-3); transition: background-color 180ms ease, color 180ms ease; }
.ps-side__toggle:hover { background: rgb(255 255 255 / 22%); color: var(--ps-ink); }
.ps-side__toggle .ps-icon { width: 16px; height: 16px; transition: transform 180ms ease; }
.ps-side__link { transition: padding 180ms ease, background-color 180ms ease, color 180ms ease; }
.is-rail .ps-side__brand { justify-content: center; padding: 0; }
.is-rail .ps-side__brand .ps-side__logo { max-width: 52px; }
.is-rail .ps-side__label, .is-rail .ps-side__text { display: none; }
.is-rail .ps-side__link { justify-content: center; padding: 0; height: 40px; }
.is-rail .ps-side__toggle .ps-icon { transform: rotate(180deg); }
.ps-side__scrim { display: none; }

/* ---------- topbar ---------- */
.ps-top { position: sticky; top: 0; z-index: 30; height: var(--ps-topbar-h); background: var(--ps-surface); border-bottom: 1px solid var(--ps-line); display: flex; align-items: center; gap: 14px; padding: 0 var(--ps-gutter); }
.ps-top__menu { display: none; }
.ps-top .ps-top__menu { display: none; }
.ps-top__crumbs { flex: 0 1 auto; min-width: 0; display: flex; align-items: center; }
.ps-top__title { font-size: var(--ps-fs-xl); font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-top__user { position: relative; margin-left: auto; display: flex; align-items: center; gap: 12px; }
.ps-top__who { display: none; }
.ps-top__avatar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px 0 4px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-pill); background: var(--ps-surface); color: var(--ps-ink); }
.ps-top__avatar:hover { background: var(--ps-surface-2); }
.ps-top__avatar .ps-top__initials { width: 26px; height: 26px; border-radius: 50%; background: var(--ps-accent-soft-2); color: var(--ps-accent-deep); display: grid; place-items: center; font-size: 10px; font-weight: 700; }
.ps-top__avatar .ps-icon { opacity: .5; width: 13px; height: 13px; }
.ps-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow); padding: 6px; z-index: 50; display: none; }
.ps-menu.is-open { display: block; }
.ps-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--ps-r-sm); color: var(--ps-ink); font-size: var(--ps-fs-sm); font-weight: 500; text-align: left; }
.ps-menu__item:hover { background: var(--ps-surface-3); color: var(--ps-ink); }
.ps-menu__item--bad { color: var(--ps-bad-strong); }
.ps-menu__item--bad:hover { background: var(--ps-bad-soft); color: var(--ps-bad-strong); }
.ps-menu__sep { height: 1px; background: var(--ps-line); margin: 4px 0; }

/* ---------- tab bar (phone) ---------- */
.ps-tabbar { display: none; }
.ps-more { display: none; }

/* ---------- buttons ---------- */
.ps-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--ps-control-h); padding: 0 15px; border-radius: var(--ps-r-md); font-size: var(--ps-fs-sm); font-weight: 600; border: 1px solid transparent; white-space: nowrap; transition: background .12s, border-color .12s, color .12s; }
.ps-btn .ps-icon { width: 15px; height: 15px; }
.ps-btn:disabled { opacity: .5; cursor: not-allowed; }
.ps-btn--primary { background: var(--ps-accent); color: #fff; font-weight: 700; }
.ps-btn--primary:hover:not(:disabled) { background: var(--ps-accent-2); color: #fff; }
.ps-btn--secondary { background: var(--ps-surface); color: var(--ps-ink); border-color: var(--ps-line); padding: 0 13px; }
.ps-btn--secondary:hover:not(:disabled) { background: var(--ps-surface-2); color: var(--ps-ink); }
.ps-btn--ghost { background: transparent; color: var(--ps-ink-2); }
.ps-btn--ghost:hover:not(:disabled) { background: var(--ps-surface-3); color: var(--ps-ink); }
.ps-btn--danger { background: var(--ps-bad-soft); color: var(--ps-bad-strong); }
.ps-btn--danger:hover:not(:disabled) { background: var(--ps-bad-strong); color: #fff; }
.ps-btn--dark { background: var(--ps-ink); color: #fff; }
.ps-btn--dark:hover:not(:disabled) { background: #3a3736; color: #fff; }
.ps-btn--sm { height: var(--ps-control-h-sm); padding: 0 12px; font-size: var(--ps-fs-xs); }
.ps-btn--lg { height: 46px; font-size: var(--ps-fs-md); }
.ps-btn--icon { width: var(--ps-control-h); padding: 0; }
.ps-btn--icon.ps-btn--sm { width: var(--ps-control-h-sm); }
.ps-btn--block { width: 100%; }

/* ---------- forms ---------- */
.ps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--ps-s4); }
.ps-grid + .ps-grid { margin-top: var(--ps-s4); }
.ps-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ps-field--2 { grid-column: span 2; }
.ps-field--full { grid-column: 1 / -1; }
.ps-field__label { font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-2); }
.ps-field__req { color: var(--ps-bad-strong); margin-left: 2px; }
.ps-field__help { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); }
.ps-field__error { font-size: var(--ps-fs-xs); color: var(--ps-bad); font-weight: 600; }
.ps-input, .ps-select, .ps-textarea { width: 100%; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); padding: 0 var(--ps-s3); height: var(--ps-control-h); font-size: var(--ps-fs-sm); color: var(--ps-ink); caret-color: var(--ps-accent); transition: border-color .12s, box-shadow .12s; }
.ps-input::placeholder, .ps-textarea::placeholder { color: var(--ps-ink-4); }
.ps-input:hover, .ps-select:hover, .ps-textarea:hover { border-color: var(--ps-line-strong); }
.ps-input:focus, .ps-select:focus, .ps-textarea:focus { outline: none; border-color: var(--ps-accent); box-shadow: 0 0 0 3px var(--ps-accent-soft); }
.ps-input[readonly] { background: var(--ps-surface-2); color: var(--ps-ink-2); }
.ps-input[aria-invalid="true"], .ps-select[aria-invalid="true"], .ps-textarea[aria-invalid="true"] { border-color: var(--ps-bad-strong); }
.ps-input--num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23605d5d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.ps-textarea { height: auto; min-height: 96px; padding: 10px var(--ps-s3); resize: vertical; line-height: 1.5; }
.ps-detail__value { min-height: var(--ps-control-h); display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ps-line); font-size: var(--ps-fs-md); word-break: break-word; }
.ps-detail__value--num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.ps-switch { display: inline-flex; align-items: center; gap: 10px; height: var(--ps-control-h); cursor: pointer; }
.ps-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.ps-switch__track { width: 38px; height: 22px; border-radius: var(--ps-r-pill); background: var(--ps-line-strong); position: relative; transition: background .15s; }
.ps-switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.ps-switch input:checked + .ps-switch__track { background: var(--ps-accent); }
.ps-switch input:checked + .ps-switch__track::after { transform: translateX(16px); }
.ps-switch input:focus-visible + .ps-switch__track { outline: 2px solid var(--ps-focus); outline-offset: 2px; }
.ps-switch__text { font-size: var(--ps-fs-sm); color: var(--ps-ink-2); }
.ps-check { display: inline-flex; align-items: center; gap: var(--ps-s2); font-size: var(--ps-fs-sm); cursor: pointer; }
.ps-check input { width: 17px; height: 17px; accent-color: var(--ps-accent); margin: 0; }
.ps-inline { display: flex; align-items: center; gap: var(--ps-s3); min-height: var(--ps-control-h); }
.ps-inline--end { align-self: end; }
.ps-section-title { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ps-ink-4); margin: var(--ps-s6) 0 var(--ps-s3); padding-bottom: var(--ps-s2); border-bottom: 1px solid var(--ps-line); }
.ps-section-title:first-child { margin-top: 0; }
.ps-subcard { border: 1px solid var(--ps-line); border-radius: 12px; padding: var(--ps-s4); margin-bottom: var(--ps-s3); background: var(--ps-surface-2); }

/* ---------- searchable select ---------- */
.ps-ss { position: relative; }
.ps-ss__trigger { display: flex; align-items: center; justify-content: space-between; gap: var(--ps-s2); width: 100%; text-align: left; cursor: pointer; }
.ps-ss__trigger .is-placeholder { color: var(--ps-ink-4); }
.ps-ss__trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-ss__trigger .ps-icon { opacity: .5; width: 14px; height: 14px; }
.ps-ss__panel { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 60; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow); padding: var(--ps-s2); display: flex; flex-direction: column; gap: var(--ps-s2); }
.ps-ss__list { overflow-y: auto; max-height: 240px; display: flex; flex-direction: column; }
.ps-ss__opt { text-align: left; padding: 8px 10px; border-radius: var(--ps-r-sm); color: var(--ps-ink); font-size: var(--ps-fs-sm); }
.ps-ss__opt:hover, .ps-ss__opt:focus { background: var(--ps-surface-3); outline: none; }
.ps-ss__opt.is-selected { color: var(--ps-accent-deep); font-weight: 600; background: var(--ps-accent-soft); }
.ps-ss__opt.is-clear { color: var(--ps-ink-3); font-style: italic; }
.ps-ss__opt[disabled] { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ps-ink-4); cursor: not-allowed; }
.ps-ss__opt[disabled]:hover { background: none; }
.ps-ss__hint { flex: none; font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-3); background: var(--ps-surface-3); border-radius: var(--ps-r-pill); padding: 2px 8px; }
.ps-ss__create { text-align: left; padding: 8px 10px; border-top: 1px solid var(--ps-line); padding-top: 10px; color: var(--ps-accent-deep); font-weight: 600; font-size: var(--ps-fs-sm); border-radius: 0 0 var(--ps-r-sm) var(--ps-r-sm); overflow-wrap: anywhere; }
.ps-ss__create:hover, .ps-ss__create:focus-visible { background: var(--ps-accent-soft); outline: none; }
.ps-ss__create[hidden] { display: none; }
.ps-ss__new { display: flex; flex-direction: column; gap: var(--ps-s2); margin-top: 12px; padding: 12px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-sm); background: var(--ps-surface-2, var(--ps-surface)); }
.ps-ss__new[hidden] { display: none; }
.ps-ss__new-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-ss__new-row .ps-input { flex: 1 1 160px; min-width: 0; }
.ps-ss__empty { padding: 8px 10px; font-size: var(--ps-fs-sm); color: var(--ps-ink-3); }

/* ---------- panel (list container) ---------- */
.ps-panel { background: var(--ps-surface); background-clip: padding-box; border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow-card); }
.ps-panel__head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 14px; flex-wrap: wrap; }
.ps-panel__title { font-size: var(--ps-fs-lg); font-weight: 700; letter-spacing: -.01em; }
.ps-panel__sub { font-size: var(--ps-fs-sm); color: var(--ps-ink-3); margin-top: 3px; }
.ps-panel__actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.ps-panel > .ps-toolbar { padding: 0 20px 14px; }
.ps-panel > .ps-table { border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.ps-panel > .ps-table > .ps-table__foot { background: transparent; background-clip: padding-box; }
.ps-panel > .ps-table > :first-child, .ps-panel > .ps-table > :last-child { border-radius: 0; }
.ps-panel > .ps-empty { border-top: 1px solid var(--ps-line); }

/* ---------- tabs ---------- */
.ps-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--ps-line); overflow-x: auto; }
.ps-tabs__item { display: flex; align-items: center; gap: 7px; padding: 11px 12px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: 13.5px; font-weight: 500; color: var(--ps-ink-3); white-space: nowrap; }
.ps-tabs__item:hover { color: var(--ps-ink); }
.ps-tabs__item.is-active { color: var(--ps-ink); font-weight: 600; border-bottom-color: var(--ps-accent); }
.ps-tabs__count { font-size: 11px; font-variant-numeric: tabular-nums; background: var(--ps-surface-3); color: var(--ps-ink-3); padding: 1px 7px; border-radius: var(--ps-r-pill); }
.ps-tabs__item.is-active .ps-tabs__count { background: var(--ps-accent-soft-2); color: var(--ps-accent-deep); }

/* ---------- toolbar (filters) ---------- */
.ps-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps-toolbar .ps-select, .ps-toolbar .ps-input { width: auto; min-width: 150px; height: 34px; font-size: var(--ps-fs-sm); }
.ps-search { position: relative; flex: 0 1 290px; }
.ps-search .ps-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ps-ink); opacity: .45; pointer-events: none; }
.ps-search__input { width: 100%; height: 34px; padding: 0 12px 0 32px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface); font-size: var(--ps-fs-sm); color: var(--ps-ink); }
.ps-search__input::placeholder { color: var(--ps-ink-4); }
.ps-search__input:focus { outline: none; border-color: var(--ps-accent); }

/* ---------- sheet summary panel (Job Sheet View, Order & Receive): summary + page tabs, optional side ---------- */
.js-sheet-panel-head{background:var(--ps-surface);border:1px solid var(--ps-line);border-radius:var(--ps-r-lg);box-shadow:var(--ps-shadow-card);overflow:hidden}
.js-sheet-panel-head{container-type:inline-size}
.js-sheet-panel-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr auto;grid-template-areas:"summary side" "tabs side"}
.js-sheet-panel-summary{grid-area:summary;min-width:0;padding:20px 20px 8px}.js-sheet-panel-grid>.ps-page-tabs{grid-area:tabs;align-self:end}
.js-sheet-panel-side{grid-area:side;display:flex;flex-direction:column;align-items:flex-end;gap:12px;padding:16px}
.js-line-tag{margin-top:8px}
.js-sheet-panel-summary>strong{font-size:16px;font-weight:700}.js-sheet-panel-summary>p{margin:6px 0 0;font-size:13px;color:var(--ps-ink-3)}

/* ---------- quantities: the full amount ordered = blue bold, the full amount received = green bold (everywhere) ---------- */
.ps-qty-ordered-full { color: var(--ps-accent); font-weight: 700; }
.ps-qty-received-full { color: #15803d; font-weight: 700; }

/* ---------- tables ---------- */
.ps-table { background: var(--ps-surface); background-clip: padding-box; border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); overflow: visible; box-shadow: var(--ps-shadow-card); }
.ps-table > :first-child { border-top-left-radius: var(--ps-r-lg); border-top-right-radius: var(--ps-r-lg); }
.ps-table > :last-child { border-bottom-left-radius: var(--ps-r-lg); border-bottom-right-radius: var(--ps-r-lg); }
.ps-card--flush .ps-table > :first-child, .ps-card--flush .ps-table > :last-child, .ps-table--sub > :first-child, .ps-table--sub > :last-child { border-radius: 0; }
.ps-card--flush > .ps-table:last-child > :last-child { border-bottom-left-radius: var(--ps-r-lg); border-bottom-right-radius: var(--ps-r-lg); }
/* A table at the bottom of a card follows the card's rounded corners instead of covering them. */
.ps-card--flush > .ps-table:last-child, .ps-card--flush > :last-child > .ps-table:last-child { border-bottom-left-radius: calc(var(--ps-r-lg) - 1px); border-bottom-right-radius: calc(var(--ps-r-lg) - 1px); }
.ps-table__head, .ps-table__row { display: flex; align-items: center; min-height: var(--ps-row-h); padding: 0 20px; gap: 12px; }
/* Rows keep space above and below tall content; the last row never draws a line on the container's edge. */
.ps-table__row { padding-top: 10px; padding-bottom: 10px; }
.ps-table > .ps-table__record:last-child .ps-table__row { border-bottom: 0; }
.ps-table__head { background: var(--ps-surface-2); background-clip: padding-box; border-bottom: 1px solid var(--ps-line); font-size: var(--ps-fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ps-ink-2); min-height: 40px; }
.ps-table__row { border-bottom: 1px solid var(--ps-line); font-size: 13.5px; }
.ps-table__row > .ps-table__cell:first-child { font-weight: 600; }
.ps-table__record:has(+ .ps-table__foot) .ps-table__row, .ps-table > .ps-table__row:last-child { border-bottom: 0; }
.ps-table__record[data-href] .ps-table__row { cursor: pointer; }
.ps-table__record[data-href] .ps-table__row:hover { background: var(--ps-surface-2); }
.ps-table__cell { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-table__cell--wrap { white-space: normal; }
.ps-table__cell--grow { flex: 2 1 0; }
.ps-table__cell--num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-table__cell--actions { flex: 0 0 104px; display: flex; justify-content: flex-end; overflow: visible; }
.ps-table__head .ps-table__cell--actions { visibility: visible; text-align: right; justify-content: flex-end; }
.ps-table__cell--id { flex: 0 0 110px; font-variant-numeric: tabular-nums; color: var(--ps-ink-2); font-weight: 500 !important; }
.ps-table__cell--tight { flex: 0 0 130px; }
.ps-table__who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ps-table__who > span:last-child { min-width: 0; }
.ps-table__who strong { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-table__who small { display: block; font-size: var(--ps-fs-xs); color: var(--ps-ink-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--ps-accent-soft-2); color: var(--ps-accent-deep); }
.ps-avatar--1 { background: #e8e6f7; color: #413a7a; }
.ps-avatar--2 { background: #fce9dd; color: #8a4416; }
.ps-avatar--3 { background: #e2eef7; color: #1f4c6b; }
.ps-avatar--4 { background: #f4f3f2; color: #444141; }
.ps-table--sub { border-radius: var(--ps-r-sm); box-shadow: none; }
.ps-table--sub .ps-table__head, .ps-table--sub .ps-table__row { padding-left: var(--ps-s4); padding-right: var(--ps-s4); }
.ps-table__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; font-size: var(--ps-fs-sm); color: var(--ps-ink-3); background: var(--ps-surface); background-clip: padding-box; border-top: 1px solid var(--ps-line); flex-wrap: wrap; }
.ps-table__foot strong { color: var(--ps-ink); font-weight: 700; }
/* A footer inside a card or panel never paints its own background: the box behind it already has one, and a
   square footer background covered the box's rounded bottom border. This holds however the footer is nested,
   so new pages do not need their own fix. */
.ps-card .ps-table__foot, .ps-panel .ps-table__foot { background: transparent; }
.ps-rcard { display: none; }

/* ---------- badges ---------- */
.ps-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--ps-r-pill); font-size: var(--ps-fs-xs); font-weight: 600; white-space: nowrap; }
.ps-badge--ok { background: var(--ps-accent-soft); color: var(--ps-accent-mid); }
.ps-badge--accent { background: var(--ps-accent-soft); color: var(--ps-accent-mid); }
.ps-badge--warn { background: var(--ps-warn-soft); color: var(--ps-warn); }
.ps-badge--bad { background: var(--ps-bad-soft); color: var(--ps-bad); }
.ps-badge--neutral { background: var(--ps-surface-3); color: #444141; }
.ps-badge--muted { background: var(--ps-surface-3); color: var(--ps-ink-3); }
.ps-chip { display: inline-flex; align-items: center; font-size: var(--ps-fs-xs); padding: 3px 9px; border-radius: var(--ps-r-pill); background: var(--ps-surface-3); color: #444141; white-space: nowrap; }

/* ---------- action menu (inline icons + more) ---------- */
.ps-actions { position: relative; display: inline-flex; gap: 4px; justify-content: flex-end; color: var(--ps-ink-3); }
.ps-actions form { margin: 0; display: contents; }
.ps-actions__btn { width: 28px; height: 28px; border-radius: var(--ps-r-sm); display: grid; place-items: center; color: inherit; }
.ps-actions__btn .ps-icon { width: 15px; height: 15px; }
.ps-actions__btn:hover { background: #f0efee; color: var(--ps-ink); }
.ps-actions__btn--bad:hover { background: var(--ps-bad-soft); color: var(--ps-bad-strong); }
.ps-actions .ps-menu { top: calc(100% + 4px); }
.ps-actions .ps-menu form { display: block; }

/* ---------- breadcrumb ---------- */
.ps-crumbs { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; font-size: var(--ps-fs-sm); color: var(--ps-ink-4); white-space: nowrap; }
.ps-crumbs a { color: var(--ps-ink-3); }
.ps-crumbs a:hover { color: var(--ps-accent); }
.ps-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ps-line-strong); }
.ps-crumbs [aria-current] { color: var(--ps-ink); font-weight: 600; }

/* ---------- page header ---------- */
.ps-phead { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.ps-phead__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ps-phead__back { width: 34px; height: 34px; border-radius: var(--ps-r-md); display: grid; place-items: center; color: var(--ps-ink-2); border: 1px solid var(--ps-line); background: var(--ps-surface); }
.ps-phead__back:hover { background: var(--ps-surface-2); color: var(--ps-ink); }
.ps-phead__title { font-size: var(--ps-fs-xl); font-weight: 700; letter-spacing: -.01em; line-height: 1.2; overflow-wrap: anywhere; }
.ps-phead__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- cards ---------- */
.ps-card { background: var(--ps-surface); background-clip: padding-box; border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow-card); padding: 20px; }
.ps-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ps-card__title { font-size: var(--ps-fs-lg); font-weight: 700; letter-spacing: -.01em; }
.ps-card--flush { padding: 0; }
.ps-card--flush .ps-card__head { padding: 18px 20px 0; }
.ps-card--flush .ps-table { border: 0; border-radius: 0; box-shadow: none; }
.ps-card--warn { border-color: var(--ps-warn-dot); background: var(--ps-warn-soft); }
.ps-card--bad { border-color: var(--ps-bad-strong); background: var(--ps-bad-soft); }
.ps-note { padding: 10px 14px; border-radius: var(--ps-r-md); font-size: var(--ps-fs-sm); font-weight: 500; }
.ps-note--bad { background: var(--ps-bad-soft); color: var(--ps-bad); }
.ps-note--ok { background: var(--ps-accent-soft); color: var(--ps-accent-mid); }
.ps-note--warn { background: var(--ps-warn-soft); color: var(--ps-warn); }
.ps-note--info { background: var(--ps-accent-soft); color: var(--ps-accent-mid); }
.ps-promo { border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); padding: 14px; background: var(--ps-surface-2); }
.ps-promo__title { font-size: var(--ps-fs-sm); font-weight: 600; }
.ps-promo__text { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); margin-top: 4px; line-height: 1.45; }

/* ---------- stats ---------- */
.ps-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.ps-stat { display: block; border: 1px solid var(--ps-line); border-radius: 12px; padding: 13px 15px; min-width: 0; background: var(--ps-surface); color: inherit; transition: border-color .12s; }
.ps-stat:hover { border-color: var(--ps-accent-soft-2); color: inherit; }
.ps-stat__top { display: flex; align-items: center; gap: 7px; }
.ps-stat__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ps-accent); flex: none; }
.ps-stat__dot--warn { background: var(--ps-warn-dot); }
.ps-stat__dot--bad { background: var(--ps-bad-strong); }
.ps-stat__dot--purple { background: var(--ps-purple); }
.ps-stat__label { font-size: var(--ps-fs-xs); color: var(--ps-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-stat__value { font-size: var(--ps-fs-2xl); font-weight: 700; letter-spacing: -.02em; margin-top: 7px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ps-stat__note { font-size: var(--ps-fs-xs); color: var(--ps-ink-4); margin-top: 2px; }
.ps-stat__icon { display: none; }

/* ---------- toast ---------- */
/* Toasts (look from the SolarEdge app): white card with a soft tint top-left, round status icon, grey X.
   Top right, just below the header. Glyphs are Lucide paths. */
.ps-toasts { position: fixed; top: calc(var(--ps-topbar-h, 62px) + 12px); right: 24px; z-index: 90; display: flex; flex-direction: column; gap: 12px; width: min(380px, calc(100vw - 32px)); }
.ps-toast {
  --t-accent: #64748b; --t-tint: #f1f5f9;
  --t-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 17v-6'/%3E%3Cpath d='M12 7h.01'/%3E%3C/svg%3E");
  position: relative; display: block; padding: 16px 48px 16px 52px;
  border: 1px solid rgb(226 232 240 / .9); border-radius: 16px;
  background: linear-gradient(115deg, var(--t-tint) 0%, #fff 55%);
  box-shadow: 0 1px 2px rgb(15 23 42 / .04), 0 12px 32px -16px rgb(15 23 42 / .22);
  color: #0f172a; font-size: 15px; font-weight: 500; line-height: 22px; animation: ps-in .18s ease;
}
.ps-toast::before { content: ''; position: absolute; top: 17px; left: 18px; width: 20px; height: 20px; border-radius: 50%; background: var(--t-accent); }
.ps-toast::after { content: ''; position: absolute; top: 21px; left: 22px; width: 12px; height: 12px; background: #fff; -webkit-mask: var(--t-glyph) center / contain no-repeat; mask: var(--t-glyph) center / contain no-repeat; }
.ps-toast--ok {
  --t-accent: #059669; --t-tint: #ecfdf5;
  --t-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.ps-toast--bad {
  --t-accent: #ef4444; --t-tint: #fef2f2;
  --t-glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 7 7 17'/%3E%3Cpath d='m7 7 10 10'/%3E%3C/svg%3E");
}
.ps-toast.is-dismissing { opacity: 0; transform: translateY(-6px); transition: all .25s; }
.ps-toast__x { position: absolute; top: 14px; right: 12px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 0; color: transparent; }
.ps-toast__x::before { content: ''; width: 18px; height: 18px; background: #94a3b8; transition: background-color .15s;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E") center / contain no-repeat; }
.ps-toast__x:hover::before, .ps-toast__x:focus-visible::before { background: #334155; }
@media (max-width: 640px) { .ps-toasts { right: 16px; left: 16px; width: auto; top: 68px; } }
@keyframes ps-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- pagination ---------- */
.ps-pager { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.ps-pager__btn { min-width: 34px; height: 34px; padding: 0 8px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--ps-fs-sm); font-weight: 500; color: var(--ps-ink); font-variant-numeric: tabular-nums; }
.ps-pager__btn--arrow { padding: 0; } /* Previous / Next: arrow only, same square as the page numbers. */
.ps-pager__btn .ps-icon { width: 14px; height: 14px; }
.ps-pager__btn:hover:not(:disabled):not(.is-active) { border-color: #a9c4f4; color: var(--ps-ink); background: var(--ps-surface-2); }
.ps-pager__btn.is-active { background: var(--ps-accent); border-color: var(--ps-accent-2); color: #fff; font-weight: 700; }
.ps-pager__btn:disabled { color: var(--ps-ink-4); cursor: not-allowed; }
.ps-pager__gap { min-width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); color: var(--ps-ink-3); background: var(--ps-surface); }

/* ---------- empty ---------- */
.ps-empty { display: flex; flex-direction: column; align-items: center; gap: var(--ps-s2); padding: var(--ps-s10) var(--ps-s4); text-align: center; color: var(--ps-ink-3); font-size: var(--ps-fs-sm); }
.ps-empty .ps-icon { width: 28px; height: 28px; color: var(--ps-line-strong); }
.ps-empty--compact { padding: var(--ps-s5) var(--ps-s4); }

/* ---------- login (frosted glass over photo) ---------- */
.ps-login { position: relative; isolation: isolate; min-height: 100vh; display: grid; place-items: center; padding: var(--ps-s4); background-color: #0b1512; background-image: linear-gradient(135deg, rgba(2, 6, 23, .62) 0%, rgba(15, 23, 42, .48) 46%, rgba(2, 6, 23, .60) 100%), url("../images/login-background.jpg"); background-size: cover; background-position: center; background-repeat: no-repeat; overflow: hidden; }
.ps-login__card { position: relative; width: 100%; max-width: 430px; padding: var(--ps-s8); border-radius: 28px; border: 1px solid rgba(255,255,255,.22); background: rgba(15,23,42,.28); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); box-shadow: 0 28px 80px rgba(2,6,23,.42), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.08); color: #fff; display: flex; flex-direction: column; gap: var(--ps-s5); animation: ps-login-in .52s ease-out both; }
.ps-login__card::before { content: ""; position: absolute; inset: 1px; border-radius: 27px; background: linear-gradient(180deg, rgba(255,255,255,.16), transparent 38%); pointer-events: none; }
.ps-login__card > * { position: relative; }
.ps-login__head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--ps-s2); }
.ps-login__tile { width: 72px; height: 72px; border-radius: 18px; background: rgba(255,255,255,.92); display: grid; place-items: center; padding: 10px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 8px 24px rgba(2,6,23,.25); margin-bottom: var(--ps-s2); }
.ps-login__tile img { width: 100%; height: 100%; object-fit: contain; }
.ps-login__title { font-size: var(--ps-fs-2xl); font-weight: 800; line-height: 1.2; color: #fff; text-shadow: 0 2px 18px rgba(2,6,23,.24); }
.ps-login__sub { font-size: var(--ps-fs-sm); font-weight: 500; color: rgba(226,232,240,.80); }
.ps-login__form { display: flex; flex-direction: column; gap: var(--ps-s5); }
.ps-login__field { display: flex; flex-direction: column; gap: var(--ps-s2); }
.ps-login__label { font-size: var(--ps-fs-sm); font-weight: 600; color: rgba(248,250,252,.90); }
.ps-login__label span { color: #fda4af; margin-left: 2px; }
.ps-login__input { width: 100%; min-height: 48px; padding: 12px var(--ps-s4); border-radius: 16px; border: 1px solid rgba(255,255,255,.20); background: rgba(255,255,255,.12); color: #fff; font-size: var(--ps-fs-sm); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: all .2s; outline: none; }
.ps-login__input::placeholder { color: rgba(226,232,240,.65); }
.ps-login__input:hover { border-color: rgba(255,255,255,.30); background: rgba(255,255,255,.16); }
.ps-login__input:focus { transform: translateY(-1px); border-color: rgba(255,255,255,.60); background: rgba(255,255,255,.18); box-shadow: 0 0 0 4px rgba(255,255,255,.14), 0 12px 28px rgba(2,6,23,.18); }
.ps-login__input:-webkit-autofill { -webkit-text-fill-color: #fff; -webkit-box-shadow: 0 0 0 1000px rgba(30,41,59,.9) inset; }
.ps-login__remember { display: inline-flex; width: max-content; align-items: center; gap: var(--ps-s2); font-size: var(--ps-fs-sm); font-weight: 500; color: rgba(255,255,255,.90); cursor: pointer; }
.ps-login__remember input { width: 16px; height: 16px; margin: 0; cursor: pointer; accent-color: #dbeafe; border-radius: 4px; }
.ps-login__remember input:focus-visible { outline: 2px solid rgba(255,255,255,.6); outline-offset: 2px; }
.ps-login__btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; padding: 12px var(--ps-s5); border-radius: 16px; border: 1px solid rgba(255,255,255,.30); background: rgba(255,255,255,.18); color: #fff; font-size: var(--ps-fs-sm); font-weight: 700; box-shadow: 0 16px 36px rgba(2,6,23,.25), inset 0 1px 0 rgba(255,255,255,.20); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: all .2s; cursor: pointer; }
.ps-login__btn:hover { transform: translateY(-2px) scale(1.01); border-color: rgba(255,255,255,.45); background: rgba(255,255,255,.26); box-shadow: 0 20px 42px rgba(2,6,23,.30), inset 0 1px 0 rgba(255,255,255,.28); }
.ps-login__btn:active { transform: none scale(.99); }
.ps-login__btn:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; }
.ps-login__error { padding: 12px var(--ps-s4); border-radius: 18px; border: 1px solid rgba(254,205,211,.35); background: rgba(244,63,94,.15); color: #fff1f2; font-size: var(--ps-fs-sm); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes ps-login-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ps-login__card { animation: none; } }


/* ---------- driver ---------- */
.ps-dhead { position: sticky; top: 0; z-index: 30; background: var(--ps-surface); border-bottom: 1px solid var(--ps-line); display: flex; align-items: center; justify-content: space-between; gap: var(--ps-s3); height: 56px; padding: 0 var(--ps-s4); }
.ps-dhead img { height: 32px; width: auto; }
.ps-lang { display: inline-flex; border: 1px solid var(--ps-line); border-radius: var(--ps-r-pill); overflow: hidden; }
.ps-lang form { display: contents; }
.ps-lang button { height: 30px; padding: 0 12px; font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-ink-2); }
.ps-lang button.is-active { background: var(--ps-accent); color: #fff; }
.ps-dsum { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--ps-s2); }
.ps-dsum div { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); padding: var(--ps-s3); display: flex; flex-direction: column; gap: 2px; }
.ps-dsum span { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); font-weight: 600; }
.ps-dsum strong { font-size: var(--ps-fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--ps-s4); }
.ps-dcard { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow-card); padding: var(--ps-s5); display: flex; flex-direction: column; gap: var(--ps-s3); }
.ps-dcard__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--ps-s3); }
.ps-dcard__num { font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-ink-3); letter-spacing: .04em; }
.ps-dcard__title { font-size: var(--ps-fs-lg); font-weight: 800; line-height: 1.25; }
.ps-dcard__addr { color: var(--ps-ink-2); font-size: var(--ps-fs-sm); }
.ps-dcard__actions { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ps-s2); margin-top: var(--ps-s1); }
.ps-dcard__actions .ps-btn { height: 44px; }
.ps-dmap { border-radius: var(--ps-r-lg); overflow: hidden; border: 1px solid var(--ps-line); background: var(--ps-surface); }
.ps-dmap iframe { width: 100%; height: 200px; border: 0; }
.ps-dmap__sheet { padding: var(--ps-s4); display: flex; flex-direction: column; gap: var(--ps-s3); }
.ps-dmap__sheet > div { display: flex; flex-direction: column; gap: 2px; }
.ps-dmap__sheet strong { font-size: var(--ps-fs-md); font-weight: 700; }
.ps-dmap__sheet a.ps-muted { display: inline-flex; align-items: center; gap: 4px; margin-top: 2px; }
.ps-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--ps-s2); }
.ps-steps li { display: flex; flex-direction: column; gap: var(--ps-s2); font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-ink-3); text-align: center; }
.ps-steps li span { height: 6px; border-radius: 3px; background: var(--ps-line); }
.ps-steps li.is-complete { color: var(--ps-ok); }
.ps-steps li.is-complete span { background: var(--ps-ok); }
.ps-steps li.is-active { color: var(--ps-accent); }
.ps-steps li.is-active span { background: var(--ps-accent); }
.ps-dsection { background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); padding: var(--ps-s5); display: flex; flex-direction: column; gap: var(--ps-s4); }
.ps-dsection__head { display: flex; align-items: center; justify-content: space-between; gap: var(--ps-s3); }
.ps-dsection__title { font-size: var(--ps-fs-lg); font-weight: 800; }
.ps-dlines { display: flex; flex-direction: column; gap: var(--ps-s2); }
.ps-dline { display: flex; gap: var(--ps-s3); padding: var(--ps-s3); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); background: var(--ps-bg); flex-wrap: wrap; }
.ps-dline__idx { font-weight: 800; color: var(--ps-ink-3); font-variant-numeric: tabular-nums; }
.ps-dline__body { flex: 1 1 200px; display: flex; flex-direction: column; gap: var(--ps-s1); min-width: 0; }
.ps-dline__body strong { font-size: var(--ps-fs-md); }
.ps-dline__qty { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ps-s3); margin-top: var(--ps-s2); }
.ps-dline__qty label { display: flex; flex-direction: column; gap: 4px; font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-ink-2); }
.ps-dline__qty .ps-input { height: 46px; font-size: var(--ps-fs-lg); font-weight: 700; }
.ps-dline__damage { margin-top: var(--ps-s2); padding: var(--ps-s3); border: 1px dashed var(--ps-bad); border-radius: var(--ps-r-lg); background: var(--ps-bad-soft); display: flex; flex-direction: column; gap: var(--ps-s3); }
.ps-dline__proofbtns { display: flex; flex-wrap: wrap; gap: var(--ps-s2); }
.ps-dline__proofbtns .ps-btn { flex: 1 1 140px; flex-direction: row; gap: var(--ps-s2); font-size: var(--ps-fs-sm); justify-content: center; padding-block: 12px; min-height: 44px; }
.ps-dline__damage label { font-size: var(--ps-fs-xs); font-weight: 700; color: var(--ps-ink-2); display: flex; flex-direction: column; gap: 4px; }
.ps-done { position: sticky; bottom: calc(var(--ps-s4) + 64px); display: flex; flex-direction: column; gap: var(--ps-s2); padding: var(--ps-s3); background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow); }
.ps-done .ps-btn { height: 52px; font-size: var(--ps-fs-md); }
.ps-busy { display: flex; align-items: center; gap: var(--ps-s2); font-size: var(--ps-fs-sm); color: var(--ps-ink-2); }
.ps-busy__spin { width: 16px; height: 16px; border: 2px solid var(--ps-line-strong); border-top-color: var(--ps-accent); border-radius: 50%; animation: ps-spin .8s linear infinite; }
@keyframes ps-spin { to { transform: rotate(360deg); } }
.ps-pc { display: flex; flex-direction: column; gap: var(--ps-s3); }
.ps-pc__head { display: flex; justify-content: space-between; gap: var(--ps-s3); align-items: flex-start; }
.ps-pc__head h3 { font-size: var(--ps-fs-md); font-weight: 800; }
.ps-pc__head p { font-size: var(--ps-fs-sm); color: var(--ps-ink-3); }
.ps-pc__limit { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); white-space: nowrap; }
.ps-pc__src { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ps-s2); }
.ps-pc__src .ps-btn { height: 48px; }
.ps-pc__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: var(--ps-s2); }
.ps-pc__tile { position: relative; aspect-ratio: 1; border-radius: var(--ps-r-lg); overflow: hidden; background: var(--ps-surface-2); border: 1px solid var(--ps-line); }
.ps-pc__media { width: 100%; height: 100%; object-fit: cover; }
.ps-pc__media.ps-pc__media--fallback { display: grid; place-items: center; color: var(--ps-ink-3); }
.ps-pc__media img, .ps-pc__media video { width: 100%; height: 100%; object-fit: cover; }
.ps-pc__video { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: var(--ps-surface-2); }
.ps-pc__name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10px; color: #fff; background: rgba(22,33,28,.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-pc__rm { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(22,33,28,.75); color: #fff; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.ps-pc__add { aspect-ratio: 1; border: 2px dashed var(--ps-line-strong); border-radius: var(--ps-r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ps-ink-3); font-size: var(--ps-fs-xs); font-weight: 700; }
.ps-pc__add span { font-size: 28px; line-height: 1; }
.ps-pc__add:hover { border-color: var(--ps-accent); color: var(--ps-accent); }
.ps-pc__help { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); }
.ps-pc__msg { font-size: var(--ps-fs-sm); color: var(--ps-bad); font-weight: 600; }
.ps-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: var(--ps-s2); }
.ps-gallery__item { aspect-ratio: 16/10; border-radius: var(--ps-r-lg); overflow: hidden; border: 1px solid var(--ps-line); background: var(--ps-surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ps-ink-2); font-size: var(--ps-fs-xs); text-align: center; padding: var(--ps-s2); }
.ps-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.ps-gallery__item--img { padding: 0; }
.ps-sig { border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); background: var(--ps-surface); position: relative; overflow: hidden; }
.ps-sig canvas { width: 100%; height: 180px; touch-action: none; }
.ps-sig__hint { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ps-ink-3); font-size: var(--ps-fs-sm); pointer-events: none; }
.ps-sig.is-signed .ps-sig__hint { display: none; }
.ps-sig__bar { display: flex; justify-content: flex-end; padding: var(--ps-s2); border-top: 1px solid var(--ps-line); }
.ps-sig-thumb { border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); background: #fff; max-width: 320px; }
/* Photo viewer (image-viewer.js): just the picture, fitted to the screen, nothing to scroll. */
img[data-zoom], img.ps-zoomable { cursor: zoom-in; } /* ps-zoomable: set by image-viewer.js on photos that open big; a logo link keeps the pointer */
.ps-zoom { border: 0; padding: 0; margin: 0; background: transparent; width: 100vw; height: 100dvh; max-width: none; max-height: none; overflow: hidden; }
.ps-zoom[open] { display: flex; align-items: center; justify-content: center; }
.ps-zoom::backdrop { background: rgba(10, 16, 13, .88); }
.ps-zoom img { display: block; width: auto; height: auto; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); object-fit: contain; background: #fff; cursor: zoom-out; }
html.ps-zoom-open { overflow: hidden; }
/* Video proofs (client, 4 Oct 2026): a thumbnail with a play sign; a tap plays it in the same full-screen pop-up. */
.ps-vthumb { position: relative; cursor: pointer; }
.ps-vthumb img { cursor: pointer; }
.ps-vthumb__play { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: grid; place-items: center; border-radius: 50%; background: rgba(10, 16, 13, .62); color: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); pointer-events: none; }
.ps-vthumb__play svg { margin-left: 3px; }
.ps-zoom video { display: block; max-width: calc(100vw - 32px); max-height: calc(100dvh - 96px); background: #000; border-radius: var(--ps-r-md); }
.ps-zoom__close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #111; font-size: 26px; line-height: 1; cursor: pointer; }

/* ---------- utilities ---------- */
.ps-row { display: flex; align-items: center; gap: var(--ps-s3); flex-wrap: wrap; }
.ps-row--end { justify-content: flex-end; }
.ps-row--between { justify-content: space-between; }
.ps-stack { display: flex; flex-direction: column; gap: var(--ps-s3); }
.ps-mt { margin-top: var(--ps-s4); }
.ps-mb { margin-bottom: var(--ps-s4); }
.ps-w-auto { width: auto; }
.ps-audit { margin: 6px 0 0; padding-left: 16px; font-size: var(--ps-fs-xs); list-style: disc; }
.ps-audit__old { color: var(--ps-bad); text-decoration: line-through; }
.ps-audit__new { color: var(--ps-ok); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .ps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --ps-gutter: var(--ps-s4); }
  .ps-app, .ps-app.is-rail { grid-template-columns: 1fr; }
  .ps-side { position: fixed; inset: 0 auto 0 0; width: var(--ps-sidebar-w); z-index: 60; transform: translateX(-100%); transition: transform .2s ease; }
  .ps-app.is-drawer .ps-side { transform: none; }
  .ps-side__scrim { display: block; position: fixed; inset: 0; background: rgba(22,33,28,.4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
  .ps-app.is-drawer .ps-side__scrim { opacity: 1; pointer-events: auto; }
  .ps-side__toggle { display: none; }
  .is-rail .ps-side__label, .is-rail .ps-side__text { display: initial; }
  .is-rail .ps-side__link { justify-content: flex-start; padding: 0 var(--ps-s3); }
  .is-rail .ps-side__brand { justify-content: flex-start; padding: 0 18px; }
  .is-rail .ps-side__brand .ps-side__logo { max-width: 100%; }
  .ps-top .ps-top__menu { display: inline-flex; }

  .ps-page { padding-bottom: 96px; }
  .ps-tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; height: 64px; background: var(--ps-surface); border-top: 1px solid var(--ps-line); z-index: 40; padding-bottom: env(safe-area-inset-bottom); }
  .ps-tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ps-ink-3); }
  .ps-tabbar__item.is-active { color: var(--ps-accent); }
  .ps-more { display: flex; flex-direction: column; position: fixed; left: var(--ps-s3); right: var(--ps-s3); bottom: 76px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow); padding: var(--ps-s2); z-index: 45; }
  .ps-more[hidden] { display: none !important; }
  .ps-more a { padding: 10px var(--ps-s3); border-radius: var(--ps-r-sm); color: var(--ps-ink); font-size: var(--ps-fs-sm); font-weight: 500; }
  .ps-more a:hover { background: var(--ps-surface-2); }
  .ps-page__actions { bottom: calc(64px + env(safe-area-inset-bottom)); }
  .ps-done { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .ps-dsum { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .ps-grid { grid-template-columns: 1fr; }
  .ps-field--2, .ps-field--full { grid-column: 1 / -1; }
  .ps-phead__title { font-size: var(--ps-fs-xl); }
  .ps-card { padding: var(--ps-s4); }
  .ps-table__head, .ps-table__row { display: none; }
  .ps-table { background: transparent; border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  .ps-table__foot { border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); background: var(--ps-surface); margin-top: var(--ps-s3); }
  .ps-table--sub .ps-table__row { display: flex; flex-direction: column; align-items: stretch; padding: var(--ps-s3) var(--ps-s4); gap: 4px; min-height: 0; }
  .ps-table--sub .ps-table__head { display: none; }
  /* Stacked cells size to their content (a zero flex-basis with overflow hidden collapsed them to nothing). */
  .ps-table--sub .ps-table__cell { white-space: normal; flex: none; }
  .ps-table--sub .ps-table__cell[data-label]::before { content: attr(data-label) ": "; color: var(--ps-ink-3); font-size: var(--ps-fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
  .ps-rcard { display: block; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); padding: var(--ps-s4); margin-bottom: var(--ps-s2); }
  .ps-rcard__head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--ps-s3); margin-bottom: var(--ps-s2); }
  .ps-rcard__head strong { font-size: var(--ps-fs-md); font-weight: 700; }
  .ps-rcard__head span { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); }
  .ps-rcard__meta { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ps-s2) var(--ps-s3); }
  .ps-rcard__meta dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ps-ink-3); }
  .ps-rcard__meta dd { font-size: var(--ps-fs-sm); }
  .ps-rcard__actions { display: flex; gap: var(--ps-s2); margin-top: var(--ps-s3); }
  .ps-rcard__actions .ps-btn { flex: 1; }
  .ps-toolbar .ps-select, .ps-toolbar .ps-input { width: 100%; }
  .ps-panel__head { padding: 16px 16px 12px; }
  .ps-panel > .ps-toolbar { padding: 0 16px 12px; }
  .ps-tabs { padding: 0 16px; }
  .ps-panel > .ps-table { background: transparent; }
  .ps-panel .ps-rcard { margin: 0 16px 8px; }
  .ps-panel .ps-rcard:first-of-type { margin-top: 12px; }
  .ps-panel > .ps-table > .ps-table__foot { border-radius: 0 0 var(--ps-r-lg) var(--ps-r-lg); margin-top: 0; border: 0; border-top: 1px solid var(--ps-line); }
  .ps-search { max-width: none; }
  .ps-pc__src, .ps-dcard__actions { grid-template-columns: 1fr; }
  .ps-login__card { padding: var(--ps-s6) var(--ps-s5); border-radius: 22px; }
}

/* ---- Job Sheet line editor ---- */
.ps-door-panel { display: grid; grid-template-columns: 1fr auto; gap: var(--ps-s4); margin-top: var(--ps-s3); padding: var(--ps-s3); border: 1px dashed var(--ps-line); border-radius: 10px; }
.ps-door-panel__controls { display: grid; gap: var(--ps-s2); }
.ps-radio-row { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; min-height: var(--ps-control-h); }
.ps-radio, .ps-check { display: inline-flex; gap: 6px; align-items: center; font-size: var(--ps-fs-sm); min-height: var(--ps-control-h); }
.ps-input--xs { width: 64px; }
.ps-door-panel__preview { text-align: center; min-width: 120px; }
.ps-door-panel__in { font-size: var(--ps-fs-sm); color: var(--ps-ink-3); }
.ps-door-panel__glass { font-size: var(--ps-fs-sm); color: var(--ps-bad); font-weight: 600; }
.ps-attach { justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--ps-line); }
.ps-attach:last-of-type { border-bottom: 0; }
.ps-attach__link { display: inline-flex; align-items: center; gap: 8px; }
.ps-attach__thumb { height: 40px; border-radius: 4px; }
.ps-attach__upload { margin-top: var(--ps-s3); }
@media (max-width: 700px) { .ps-door-panel { grid-template-columns: 1fr; } }

/* ---- Driver vehicle picker ---- */
/* Lead's list (/driver/orders): day bar, vehicle, trip cards. */
.ps-dday { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; }
.ps-dday__pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ps-dday__driver { width: auto; min-width: 200px; }
.ps-dday__sum { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.ps-dday__sum div { display: flex; flex-direction: column; gap: 2px; }
.ps-dday__sum dt { font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-3); }
.ps-dday__sum dd { font-size: var(--ps-fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-vpick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 20px; }
.ps-vpick--warn { border-color: var(--ps-warn-dot); background: var(--ps-warn-soft); }
.ps-vpick__icon { color: var(--ps-ink-3); }
.ps-vpick--warn .ps-vpick__icon { color: var(--ps-warn); }
.ps-vpick__text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 200px; }
.ps-vpick__text span { font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-3); }
.ps-vpick__text strong { font-size: var(--ps-fs-md); font-weight: 700; }
.ps-vpick__field { display: flex; flex-direction: column; gap: 6px; flex: 0 1 300px; min-width: 200px; }
.ps-vpick__edit { margin-left: auto; align-self: flex-start; }
.ps-dday__today { display: flex; flex-direction: column; gap: 2px; }
.ps-dday__today span { font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-3); }
.ps-dday__today strong { font-size: var(--ps-fs-lg); font-weight: 800; font-variant-numeric: tabular-nums; }
.ps-vdlg { border: 0; border-radius: var(--ps-r-lg); padding: 0; width: min(440px, calc(100vw - 32px)); box-shadow: var(--ps-shadow); }
.ps-vdlg::backdrop { background: rgb(20 20 20 / .45); }
.ps-vdlg__body { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.ps-vdlg__title { font-size: var(--ps-fs-lg); font-weight: 800; }
.ps-vdlg__foot { display: flex; justify-content: flex-end; gap: 8px; }
.ps-dlist .ps-dcard__title a { color: inherit; }
.ps-dlist .ps-dcard__title a:hover { color: var(--ps-accent); }
.ps-dlist .ps-dcard__addr { display: flex; align-items: flex-start; gap: 8px; }
.ps-dlist .ps-dcard__addr .ps-icon { flex: none; margin-top: 2px; color: var(--ps-ink-3); }
.ps-dcard__facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding: 12px 0; border-top: 1px solid var(--ps-line); border-bottom: 1px solid var(--ps-line); }
.ps-dcard__facts div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-dcard__facts dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ps-ink-3); }
.ps-dcard__facts dd { font-size: var(--ps-fs-sm); overflow-wrap: anywhere; }
.ps-dcard__wide { grid-column: 1 / -1; }
.ps-dlist .ps-dcard { gap: 14px; }
.ps-dlist .ps-dcard__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.ps-dlist .ps-dcard__actions .ps-btn { flex: 1 1 0; }
.ps-dlist .ps-dcard__open { flex: 1 1 100% !important; }
@media (max-width: 640px) {
  .ps-dday, .ps-vpick { padding: 14px 16px; }
  .ps-dday__pick { width: 100%; }
  .ps-dday__pick .ps-day-picker { flex: 1; justify-content: space-between; }
  .ps-dday__driver { flex: 1 1 100%; }
  .ps-dday__sum { width: 100%; justify-content: space-between; gap: 12px; }
  .ps-vpick__field { flex: 1 1 100%; }
  .ps-vpick__text { flex: 1 1 0; }
  .ps-vdlg__body { padding: 20px 16px; }
  .ps-vdlg__foot .ps-btn { flex: 1; }
}
/* Pickup on a Pending card: one button (no photos since 2 Oct 2026). */
.ps-pick { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ps-pick__save { height: 48px; }
/* Pickup All above the cards: the button, then the note / message under it. */
.ps-pickall { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 20px; }
.ps-pickall__btn { height: 48px; padding-left: 24px; padding-right: 24px; }
.ps-pickall__count { font-size: var(--ps-fs-sm); color: var(--ps-ink-2); }
.ps-pickall .ps-field__error, .ps-pickall .ps-pick__note { margin: 0; }
@media (max-width: 640px) {
  .ps-pickall { align-items: stretch; padding: 14px 16px; }
}
.ps-pick__note, .ps-pc .ps-pick__note { font-size: var(--ps-fs-sm); font-weight: 600; color: var(--ps-warn); }
.ps-dcard__facts:last-child { border-bottom: 0; padding-bottom: 0; }
/* Account Settings */
.ps-account .ps-page__body { max-width: 880px; }
.ps-account__who { display: flex; align-items: center; gap: 16px; padding: 20px; }
.ps-account__avatar { width: 52px; height: 52px; font-size: 18px; }
.ps-account__id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-account__name { font-size: var(--ps-fs-lg); font-weight: 800; }
.ps-account__mail { font-size: var(--ps-fs-sm); color: var(--ps-ink-3); overflow-wrap: anywhere; }
.ps-account__foot { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--ps-line); }
@media (max-width: 640px) {
  .ps-account__who { padding: 16px; flex-wrap: wrap; }
  .ps-account__foot .ps-btn { width: 100%; }
}

/* ---- Job Sheet progress steps ---- */
.ps-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ps-steps__item { padding: 10px 12px; border-radius: 10px; border: 1px solid var(--ps-line); background: var(--ps-surface-2); }
.ps-steps__item.is-done { border-color: var(--ps-ok); }
.ps-steps__item.is-current { border-color: var(--ps-accent); box-shadow: inset 0 0 0 1px var(--ps-accent); }
.ps-steps__item.is-skipped { opacity: .55; }
.ps-steps__label { font-weight: 600; font-size: var(--ps-fs-sm); }
.ps-steps__meta { font-size: var(--ps-fs-sm); color: var(--ps-ink-3); min-height: 1.2em; }
.ps-pipeline-actions { flex-wrap: wrap; gap: 10px; }
.ps-select--sm { min-height: 32px; padding-top: 2px; padding-bottom: 2px; }
@media (max-width: 900px) { .ps-steps { grid-template-columns: 1fr; } }

/* ---- Floor: my jobs ---- */
.ps-complete { text-align: center; }
.ps-btn--xl { font-size: 1.15rem; padding: 16px 28px; width: 100%; max-width: 420px; }
.ps-jobline { display: flex; gap: 12px; align-items: flex-start; }
.ps-jobline__draw { flex: 0 0 auto; }
.ps-jobline__body { flex: 1 1 auto; display: grid; gap: 2px; }
.ps-steps { grid-template-columns: repeat(6, 1fr); }

/* ---- Dashboard ---- */
.ps-stats--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ps-dash-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--ps-s4); align-items: start; }
.ps-dash-row > * { min-width: 0; }
.ps-dash .ps-card--flush .ps-card__head { padding: 16px 20px 12px; margin-bottom: 0; border-bottom: 1px solid var(--ps-line); }
.ps-card__link { font-size: var(--ps-fs-sm); font-weight: 600; color: var(--ps-accent); white-space: nowrap; }
.ps-card__link:hover { color: var(--ps-accent-2); }

.ps-pipe { display: flex; min-height: 76px; }
.ps-pipe__seg { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 12px 16px; border-right: 1px solid var(--ps-line); color: inherit; position: relative; transition: background .12s; }
.ps-pipe__seg:last-child { border-right: 0; }
.ps-pipe__seg::before { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: var(--ps-line-strong); }
.ps-pipe__seg--0::before { background: var(--ps-ink-4); }
.ps-pipe__seg--1::before { background: var(--ps-warn-dot); }
.ps-pipe__seg--2::before, .ps-pipe__seg--3::before, .ps-pipe__seg--4::before { background: var(--ps-accent); }
.ps-pipe__seg--5::before { background: var(--ps-purple); }
.ps-pipe__seg--6::before { background: var(--ps-accent-mid); }
.ps-pipe__seg:hover { background: var(--ps-surface-2); color: inherit; }
.ps-pipe__seg.is-zero .ps-pipe__n { color: var(--ps-ink-4); }
.ps-pipe__seg.is-zero::before { opacity: .35; }
.ps-pipe__n { font-size: var(--ps-fs-2xl); font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ps-pipe__l { font-size: var(--ps-fs-xs); color: var(--ps-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ps-attn__item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--ps-line); color: inherit; font-size: var(--ps-fs-sm); font-weight: 500; }
.ps-attn li:last-child .ps-attn__item { border-bottom: 0; }
.ps-attn__item:hover { background: var(--ps-surface-2); color: inherit; }
.ps-attn__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ps-warn-dot); }
.ps-attn__item--bad .ps-attn__dot { background: var(--ps-bad-strong); }
.ps-attn__item--neutral .ps-attn__dot { background: var(--ps-ink-4); }
.ps-attn__text { flex: 1 1 auto; }
.ps-attn__item .ps-icon { color: var(--ps-ink-4); }

.ps-feed__item, .ps-road__item { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--ps-line); font-size: var(--ps-fs-sm); }
.ps-feed li:last-child .ps-feed__item, .ps-road li:last-child .ps-road__item { border-bottom: 0; }
.ps-feed__body, .ps-road__body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ps-feed__body strong, .ps-road__body strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-feed__what { color: var(--ps-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-feed__when { color: var(--ps-ink-4); font-size: var(--ps-fs-xs); white-space: nowrap; }
.ps-road__stops { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ps-ink-2); white-space: nowrap; }
.ps-road__stops.is-done { color: var(--ps-accent-mid); }

@media (max-width: 1100px) { .ps-stats--5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .ps-dash-row { grid-template-columns: 1fr; }
  .ps-pipe { flex-wrap: wrap; }
  .ps-pipe__seg { flex-basis: 33.33%; border-bottom: 1px solid var(--ps-line); }
}
@media (max-width: 640px) { .ps-stats--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ps-pipe__seg { flex-basis: 50%; } }

@media (prefers-reduced-motion: reduce) {
  .ps-app, .ps-side, .ps-side__brand, .ps-side__logo, .ps-side__link, .ps-side__toggle, .ps-side__toggle .ps-icon { transition: none !important; }
}

/* Full addresses (x-ps.addr): wrap between parts, so a part that does not fit moves down whole. */
.ps-addr-text { white-space: normal; }
.ps-addr-part { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }

/* Searchable select: a note line under each option (x-ps.searchable-select / -multi with notes). */
.ps-ss__opt--noted { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.ps-ss__opt--noted[disabled] { flex-direction: column; align-items: flex-start; }
.ps-ss__opt-name { font-weight: 600; }
.ps-ss__note { font-size: var(--ps-fs-xs); font-weight: 400; color: var(--ps-ink-3); }
.ps-ss__note:empty { display: none; }
.ps-ss__note.is-busy { color: var(--ps-accent-deep); }
.ps-ss__note.is-off { color: var(--ps-bad); font-weight: 600; }
/* Multi-select: chips inside the box; the box grows with them. */
.ps-ss--multi .ps-ss__trigger { height: auto; min-height: var(--ps-control-h); padding-top: 4px; padding-bottom: 4px; }
.ps-ss--multi .ps-ss__trigger > .ps-ss__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1; min-width: 0; overflow: visible; white-space: normal; }
.ps-ss__chip { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 4px 0 10px; border-radius: var(--ps-r-pill); background: var(--ps-accent-soft); color: var(--ps-accent-deep); font-size: var(--ps-fs-sm); font-weight: 600; }
.ps-ss__chip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.ps-ss__chip-x:hover, .ps-ss__chip-x:focus-visible { background: rgba(0, 0, 0, .08); outline: none; }
.ps-ss__chip-x .ps-icon { width: 12px; height: 12px; opacity: 1; }
.ps-ss--multi .ps-ss__opt.is-selected::after { content: "✓"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
.ps-ss--multi .ps-ss__opt { position: relative; padding-right: 28px; }

/* Type-ahead text box (x-ps.suggest-input). */
.ps-suggest { position: relative; }
.ps-suggest__panel { position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; padding: 6px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); box-shadow: var(--ps-shadow); }
.ps-suggest__panel[hidden] { display: none; }
.ps-suggest__opt { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--ps-r-sm); background: transparent; text-align: left; font-size: var(--ps-fs-sm); color: var(--ps-ink); cursor: pointer; }
.ps-suggest__opt:hover, .ps-suggest__opt.is-active { background: var(--ps-accent-soft); color: var(--ps-accent-deep); }
.ps-suggest__opt--create { margin-top: 4px; border-top: 1px solid var(--ps-line); border-radius: 0 0 var(--ps-r-sm) var(--ps-r-sm); color: var(--ps-accent); font-weight: 600; }
.ps-suggest__opt--create:first-child { margin-top: 0; border-top: 0; border-radius: var(--ps-r-sm); }

/* Sticky white footer bar with the form's buttons (Job Sheet Create style), e.g. Dispatch Assign. */
.ps-sticky-foot { position: fixed; bottom: 0; right: 0; left: var(--ps-sidebar-w); z-index: 32; margin: 0; padding: 16px var(--ps-gutter); background: #fff; border-top: 1px solid var(--ps-line); box-shadow: 0 -4px 20px #00000008; align-items: center; }
.ps-app.is-rail .ps-sticky-foot { left: var(--ps-rail-w); }
.ps-page--sticky-foot { padding-bottom: 96px; }
/* Master View pages (Items, Suppliers, Product Types, Services, Vehicles, Users): laid out like the Job Sheet View. */
.ps-view-head { padding: 20px; }
.ps-view-summary { padding: 24px; }
.ps-view-summary__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.ps-view-summary__columns--one { grid-template-columns: minmax(0, 1fr); }
.ps-view-summary__section { min-width: 0; }
.ps-view-summary__section + section { border-left: 1px solid var(--ps-line); padding-left: 32px; }
.ps-view-summary h2 { margin: 0 0 20px; font-size: 14px; font-weight: 700; }
.ps-view-summary dl { margin: 0; }
.ps-view-summary__values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.ps-view-summary__columns--one .ps-view-summary__values { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-view-summary__wide { grid-column: 1 / -1; }
.ps-view-summary dt { font-size: 11px; font-weight: 600; color: var(--ps-ink-3); margin-bottom: 5px; }
.ps-view-summary dd { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-line; color: var(--ps-ink); }
@media (max-width: 760px) {
  .ps-view-summary { padding: 20px; }
  .ps-view-summary__columns { grid-template-columns: 1fr; gap: 24px; }
  .ps-view-summary__section + section { border-left: 0; border-top: 1px solid var(--ps-line); padding: 20px 0 0; }
  .ps-view-summary__columns--one .ps-view-summary__values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) { .ps-view-summary__values, .ps-view-summary__columns--one .ps-view-summary__values { grid-template-columns: 1fr; } }
/* Forms split into boxes, like the Customer form: one box per section. */
.ps-form-sections { display: grid; gap: 24px; }
.ps-form-section > .ps-card__title { margin: 0 0 20px; }
.ps-form-section[hidden] { display: none; }
.ps-user-note { margin: 16px 0 0; }
.ps-user-note[hidden] { display: none; }
@media (max-width: 900px) { .ps-sticky-foot, .ps-app.is-rail .ps-sticky-foot { left: 0; padding: 12px; bottom: calc(64px + env(safe-area-inset-bottom)); } .ps-page--sticky-foot { padding-bottom: 170px; } }

/* Every clickable table row shows the hand cursor. */
.ps-table__record[data-href] { cursor: pointer; }
/* Actions column (whole system): icon buttons have no fixed height, so each icon sits on the same line as the
   text in the other columns instead of being pushed down by a tall button. */
.ps-table__cell--actions .ps-actions, .ps-table__cell--actions .ps-row-actions { align-items: flex-start; }
.ps-table__cell--actions .ps-actions__btn, .ps-table__cell--actions .ps-jobinfo__btn { height: auto; min-height: 0; padding: 2px 0; }

/* A Job Sheet number that opens the Job Sheet: underlined so it reads as a link (Daily Done, Assign modal, trip page). */
.ps-js-link { color: var(--ps-accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ps-js-link:hover { text-decoration-thickness: 2px; }
.ps-type-pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--ps-r-pill); background: var(--ps-surface-2); border: 1px solid var(--ps-line); color: var(--ps-ink-2); font-size: 12px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }

/* Proof photo groups (Daily Done, trip page): each group is as wide as its photos, so a group with many
   photos widens up to the full row and then wraps onto new lines, instead of stretching one narrow column. */
.ps-photo-groups { display: flex; flex-wrap: wrap; gap: 16px 40px; }
.ps-photo-groups > div { min-width: 0; max-width: 100%; }
.ps-photo-groups .ps-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.ps-photo-groups .ps-gallery__item { width: 112px; }
/* Admin on a finished trip: Remove under each tile (10 Oct 2026). */
.ps-gallery__cell { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.ps-gallery__cell form { display: flex; }
.ps-gallery__remove { width: 100%; justify-content: center; color: var(--ps-bad); }
.ps-trip__addto { max-width: 360px; }

/* <x-ps.day-picker>: 23/09/2026 (Wed) with the calendar icon beside it. */
.ps-day-picker { position: relative; display: inline-flex; align-items: center; gap: 8px; height: var(--ps-control-h); padding: 0 12px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface); font-size: var(--ps-fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.ps-day-picker:focus-within { border-color: var(--ps-accent); box-shadow: 0 0 0 3px var(--ps-accent-soft); } /* same as .ps-input:focus */
.ps-day-picker .ps-icon { color: var(--ps-ink-3); }
/* Fixed width, so the box does not grow or shrink from one day to the next. */
.ps-day-picker__text { display: inline-block; width: 16ch; }
/* The real date input sits over the label, invisible, so a click anywhere opens the calendar. */
.ps-day-picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: 0; padding: 0; outline: none; }

/* <x-ps.month-picker>: "Sep 2026" button like the day picker; a pop-up with the year and a 12-month grid. */
.ps-month-picker { position: relative; display: inline-block; }
.ps-month-picker__trigger { display: inline-flex; align-items: center; gap: 8px; height: var(--ps-control-h); padding: 0 12px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface); color: var(--ps-ink); font-size: var(--ps-fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.ps-month-picker__trigger:focus-visible, .ps-month-picker__trigger[aria-expanded="true"] { border-color: var(--ps-accent); box-shadow: 0 0 0 3px var(--ps-accent-soft); outline: none; }
.ps-month-picker__trigger .ps-icon { color: var(--ps-ink-3); }
.ps-month-picker__text { display: inline-block; min-width: 8ch; text-align: left; }
.ps-month-picker__pop { position: absolute; top: calc(100% + 8px); left: 0; width: 248px; background: var(--ps-surface); border: 1px solid var(--ps-line); border-radius: var(--ps-r-lg); box-shadow: var(--ps-shadow); padding: 12px; z-index: 60; }
.ps-month-picker__pop[hidden] { display: none; }
.ps-month-picker__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.ps-month-picker__nav { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface); color: var(--ps-ink-2); cursor: pointer; }
.ps-month-picker__nav:hover:not(:disabled) { background: var(--ps-surface-3); }
.ps-month-picker__nav:disabled { opacity: .4; cursor: default; }
.ps-month-picker__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ps-month-picker__opt { height: 36px; border: 1px solid transparent; border-radius: var(--ps-r-md); background: none; color: var(--ps-ink); font-size: var(--ps-fs-sm); font-weight: 500; cursor: pointer; }
.ps-month-picker__opt:hover:not(:disabled) { background: var(--ps-surface-3); }
.ps-month-picker__opt:disabled { color: var(--ps-ink-4); cursor: default; }
.ps-month-picker__opt.is-selected { background: var(--ps-accent); color: #fff; font-weight: 600; }

/* Trip lines laid out like the Job Sheet (Daily Done, trip page): No. · Item · then the number columns. */
.ps-items-table { width: 100%; border-collapse: collapse; font-size: var(--ps-fs-sm); }
.ps-items-table th { padding: 8px 12px; text-align: left; font-size: var(--ps-fs-xs); font-weight: 600; color: var(--ps-ink-3); border-bottom: 1px solid var(--ps-line); }
.ps-items-table td { padding: 10px 12px; border-bottom: 1px solid var(--ps-line); vertical-align: top; }
.ps-items-table tr:last-child td { border-bottom: 0; }
.ps-items-table th:nth-child(n+3), .ps-items-table td:nth-child(n+3) { width: 88px; text-align: right; font-variant-numeric: tabular-nums; }
.ps-items-table th:first-child, .ps-items-table td:first-child { width: 48px; color: var(--ps-ink-3); font-variant-numeric: tabular-nums; }
.ps-items-table__group td { font-weight: 700; background: var(--ps-surface-2); }
.ps-items-table__group td:first-child { color: var(--ps-ink); }
.ps-items-table .is-full { color: #15803d; font-weight: 700; } /* every piece done; a short line stays plain */
.ps-items-table .is-bad { color: var(--ps-bad); font-weight: 700; }
@media (max-width: 640px) {
  .ps-items-table th:nth-child(n+3), .ps-items-table td:nth-child(n+3) { width: 56px; }
  .ps-items-table th:first-child, .ps-items-table td:first-child { width: 36px; }
  .ps-items-table th, .ps-items-table td { padding-left: 8px; padding-right: 8px; }
}

/* Choice pop-up with three buttons (e.g. Switch to Trading + Supply / Keep / Cancel). */
.ps-choice-dialog{border:0;border-radius:var(--ps-r-lg);padding:20px;width:min(480px,calc(100vw - 32px));box-shadow:var(--ps-shadow);color:var(--ps-ink)}
.ps-choice-dialog::backdrop{background:rgba(32,30,29,.4)}
.ps-choice-dialog__title{font-size:var(--ps-fs-lg);margin:0 0 12px}
.ps-choice-dialog__text{margin:0 0 16px;line-height:1.5}
.ps-choice-dialog__actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
/* New Helper pop-up (Assign → Helpers → Create), built by helper-create.js. */
.js-helper-dialog .ps-field{margin-bottom:16px}.js-helper-dialog .ps-field__error{display:block;margin-top:6px}.js-helper-dialog .ps-field__error[hidden]{display:none}.js-helper-dialog p.ps-field__error{margin:0 0 16px}
.ps-inline--wrap{flex-wrap:wrap;gap:8px}

/* Flow tabs (Supervisor page, 29 Sep 2026): the tabs are the steps of one flow, drawn as chevron segments. */
.ps-tabs--flow { gap: 4px; padding: 12px 20px; }
.ps-tabs--flow .ps-tabs__item { flex: 1 0 auto; justify-content: center; gap: 10px; min-height: 48px; margin: 0 0 0 -10px; padding: 8px 24px 8px 30px; border: 0; background: var(--ps-surface-2); color: var(--ps-ink-3);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 14px 50%); }
.ps-tabs--flow .ps-tabs__item:first-child { margin-left: 0; padding-left: 20px; border-radius: var(--ps-r-md) 0 0 var(--ps-r-md); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); }
.ps-tabs--flow .ps-tabs__item:last-child { padding-right: 20px; border-radius: 0 var(--ps-r-md) var(--ps-r-md) 0; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 14px 50%); }
.ps-tabs--flow .ps-tabs__item:hover { color: var(--ps-ink); background: var(--ps-surface-3); }
.ps-tabs--flow .ps-tabs__item.is-active { background: var(--ps-accent-soft); color: var(--ps-accent-deep); }
.ps-tabs__step { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border: 1.5px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ps-tabs__step .ps-icon { width: 14px; height: 14px; }
.ps-tabs--flow .ps-tabs__item.is-active .ps-tabs__step { background: var(--ps-accent); border-color: var(--ps-accent); color: #fff; }
@media (max-width: 900px) { .ps-tabs--flow { padding: 12px 16px; } .ps-tabs--flow .ps-tabs__item { flex: 0 0 auto; } }

/* Job Type chips: one colour per type, the same everywhere (29 Sep 2026). */
.ps-type-pill--trading-supply { background: #f1ecfd; border-color: #d9ccf7; color: #5b3cc4; }
.ps-type-pill--trading { background: #fdf4e3; border-color: #f0d9a8; color: #8a5a00; }
.ps-type-pill--supply { background: var(--ps-accent-soft); border-color: var(--ps-accent-soft-2); color: #1d4ed8; }
/* Supply / Install chips (the Job Sheet's Job Type, `supply_install_type`; 5 Oct 2026), x-ps.job-type-pill. Not the Trading /
   Production chips above (`ps-type-pill--supply` there means Production): their own colours, teal for Install and rose for
   Supply, unused by the Trading (amber), Production (blue), Trading + Production (purple) and stage chips. */
.ps-jobtype-pill--install { background: #e3f6f2; border-color: #a8dfd2; color: #0f766e; }
.ps-jobtype-pill--supply { background: #fdeef4; border-color: #f6c6d8; color: #b3245f; }
/* Tick-box filter (x-ps.filter-multi): its list opens under its box on every page that uses it. */
.ps-fm { position: relative; }
.ps-fm > summary { list-style: none; }
.ps-fm .ps-ss__list { max-height: 300px; }
.ps-fm > summary::-webkit-details-marker { display: none; }
.ps-fm__opt { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--ps-r-sm); font-size: var(--ps-fs-sm); cursor: pointer; }
.ps-fm__opt:hover { background: var(--ps-surface-3); }
.ps-fm__opt[hidden] { display: none; }
.ps-fm__opt input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--ps-accent); }
/* Tick list options with a hint ("1 of 3", Dashboard → Stuck jobs) and a read-only list (5 Oct 2026). */
.ps-fm__opt[data-hint]::after { content: attr(data-hint); margin-left: auto; padding-left: 8px; color: var(--ps-ink-3); font-size: var(--ps-fs-xs); white-space: nowrap; }
.ps-fm--wrap > summary.ps-ss__trigger { height: auto; min-height: var(--ps-control-h); align-items: flex-start; padding-top: 9px; padding-bottom: 9px; line-height: 18px; }
.ps-fm--wrap > summary.ps-ss__trigger > span { white-space: normal; overflow: visible; overflow-wrap: anywhere; }
.ps-fm--wrap > summary.ps-ss__trigger .ps-icon { flex: none; margin-top: 2px; }
.ps-fm.is-disabled > summary { cursor: default; background: var(--ps-surface-2); color: var(--ps-ink-2, var(--ps-ink)); }

/* Call the customer (2 Oct 2026): a round button level with the first line of the name / address beside it. */
.ps-call-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ps-call-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-top: -9px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-pill); background: var(--ps-surface); color: var(--ps-accent); }
.ps-call-btn:hover { background: var(--ps-accent-soft, #eef3fc); }
.ps-call-btn .ps-icon { width: 20px; height: 20px; }
.ps-dlist .ps-dcard__addrtext { flex: 1 1 auto; min-width: 0; }

/* Tooltip (2 Oct 2026): <button class="ps-tip" data-tip="Reassign" aria-label="…">. Shows on hover and keyboard focus,
   above the control, in the system's dark chip style (no browser title pop-up). */
.ps-tip { position: relative; }
.ps-tip::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 70; transform: translate(-50%, 4px); padding: 6px 10px; border-radius: var(--ps-r-sm); background: var(--ps-ink); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: var(--ps-shadow); opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease; }
.ps-tip::before { content: ""; position: absolute; left: 50%; bottom: calc(100% + 3px); z-index: 70; transform: translate(-50%, 4px); border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ps-ink); opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease; }
.ps-tip:hover::after, .ps-tip:focus-visible::after, .ps-tip:hover::before, .ps-tip:focus-visible::before { opacity: 1; transform: translate(-50%, 0); }
body.ps-sched-dragging .ps-tip::after, body.ps-sched-dragging .ps-tip::before { display: none; }

/* My Deliveries sections (2 Oct 2026): On the truck / To pick up / Done, and the new-job pop-up. */
.ps-dsec { display: grid; gap: 12px; }
.ps-dsec + .ps-dsec { margin-top: 8px; }
.ps-dsec__title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--ps-fs-md); font-weight: 800; }
.ps-dsec__count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--ps-r-pill); background: var(--ps-surface-2); color: var(--ps-ink-2); font-size: 12px; font-weight: 700; }
.ps-dsec__title { flex-wrap: wrap; }
/* Trips on the office view of My Deliveries (8 Oct 2026): the Trip's state beside its name. */
.ps-dsec__state { margin-left: auto; padding: 2px 10px; border-radius: var(--ps-r-pill); font-size: 12px; font-weight: 700; background: var(--ps-surface-2); color: var(--ps-ink-2); }
.ps-dsec__state--on_truck { background: var(--ps-accent-soft, #e8f0fe); color: var(--ps-accent); }
.ps-dsec__state--to_pick_up { background: var(--ps-warn-soft, #fff4e5); color: var(--ps-warn, #b45309); }
.ps-dsec--trip + .ps-dsec--trip { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--ps-line); }
.ps-live__list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-weight: 700; }
.ps-live__list:empty { display: none; }
.ps-live__note { margin: 0; color: var(--ps-ink-2); line-height: 1.5; }

/* Location Link (3 Oct 2026): orange check-the-link text. */
.ps-field__warn { font-size: var(--ps-fs-xs); color: var(--ps-warn); font-weight: 600; }
.ps-location > .ps-field__error, .ps-location > .ps-field__help, .ps-location > .ps-field__warn { margin-top: 8px; }
.ps-location__warn:not([hidden]) { display: flex; align-items: flex-start; gap: 6px; line-height: 1.45; } /* orange "no exact pin" line with a warning sign (6 Oct 2026) */
.ps-location__warn svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; }
.ps-location [hidden] { display: none; }
/* Minimap (client, 4 Oct 2026): under the Location Link a small map that only shows the pin; a tap opens the pin pop-up. */
.ps-location > .ps-location__place { margin-top: 12px; display: flex; }
.ps-location > .ps-minimap { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ps-minimap__map { height: 260px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface-2); position: relative; z-index: 0; cursor: pointer; }
.ps-minimap__map .leaflet-interactive, .ps-minimap__map.leaflet-container { cursor: pointer; }
.ps-minimap__map:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }
.ps-minimap .ps-field__help, .ps-minimap .ps-field__warn, .ps-minimap .ps-field__error { margin: 0; }
.ps-pinmap { width: min(960px, calc(100vw - 32px)); }
.ps-pinmap .ps-vdlg__body { max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); } /* vh first: older phones */
.ps-pinmap__map { height: min(60vh, 560px); min-height: 280px; border: 1px solid var(--ps-line); border-radius: var(--ps-r-md); background: var(--ps-surface-2); position: relative; z-index: 0; }
.ps-pinmap .ps-field__help, .ps-pinmap .ps-field__warn { margin: 0; }
.ps-pinmap__reset { margin-right: auto; }
.ps-pinmap__pin { background: none; border: 0; }
.ps-pinmap__pin svg { display: block; filter: drop-shadow(0 2px 2px rgb(0 0 0 / .35)); }
@media (max-width: 640px) {
  .ps-minimap__map { height: 220px; }
  .ps-pinmap { width: calc(100vw - 16px); max-width: none; }
  .ps-pinmap .ps-vdlg__body { max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 16px 12px; gap: 12px; }
  .ps-pinmap__map { height: calc(100vh - 250px); height: calc(100dvh - 250px); }
  .ps-pinmap__reset { margin-right: 0; }
}

/* Place name + Pinned tag on the driver address (3 Oct 2026). */
.ps-dcard__place { display: block; color: var(--ps-ink); font-weight: 700; }
.ps-dcard__place--plain { font-weight: 400; }
.ps-dcard__locname { display: block; color: var(--ps-ink); font-weight: 700; margin-bottom: 4px; } /* Location Name on top (5 Oct 2026) */
.ps-dcard__locname ~ .ps-dcard__place { font-weight: 400; color: var(--ps-ink-2); }
.ps-dcard__locname ~ * { display: block; font-weight: 400; color: var(--ps-ink-2); }
.ps-tag--pin { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: var(--ps-r-pill); background: var(--ps-accent-soft, #eef3fc); color: var(--ps-accent); font-size: var(--ps-fs-xs); font-weight: 700; vertical-align: 1px; white-space: nowrap; }

/* Waze button + "Waze: search only" tag (client, 3 Oct 2026): the tag sits 8px under the button. */
.ps-navwaze { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ps-navwaze > .ps-btn, .ps-dlist .ps-dcard__actions .ps-navwaze > .ps-btn { flex: 0 0 auto; width: 100%; height: 44px; }
.ps-navwaze__tag { font-size: var(--ps-fs-xs); color: var(--ps-ink-3); text-align: center; line-height: 1.3; white-space: nowrap; }
.ps-dlist .ps-dcard__actions > .ps-navwaze { flex: 1 1 0; }
/* Job Sheet → Contact → + Add New (client, 5 Oct 2026): the customer's numbers and contact persons. */
.ps-contact-dialog{width:min(640px,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow-y:auto}
.ps-contact-dialog__phones{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:16px}
.ps-contact-dialog__sub{font-size:var(--ps-fs-md,1rem);margin:0 0 8px}
.ps-contact-dialog__rows{display:flex;flex-direction:column;gap:12px;margin-bottom:12px}
.ps-contact-dialog__row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:12px;align-items:start}
.ps-contact-dialog__remove{margin-top:26px}
.ps-contact-dialog [data-contact-form-error]{margin:12px 0 0}
.ps-contact-dialog .ps-choice-dialog__actions{margin-top:16px}
@media (max-width:640px){
  .ps-contact-dialog__phones{grid-template-columns:1fr}
  .ps-contact-dialog__row{grid-template-columns:minmax(0,1fr) auto;padding-bottom:12px;border-bottom:1px solid var(--ps-line)}
  .ps-contact-dialog__row>.ps-field:nth-child(2){grid-column:1;grid-row:2}
  .ps-contact-dialog__remove{grid-column:2;grid-row:1}
}
/* Location Name → + Add New (client, 6 Oct 2026): each place has Name | Link, Area | Default, then Address. */
.ps-location-dialog{width:min(760px,calc(100vw - 32px))}
.ps-location-dialog__row{padding-bottom:16px;border-bottom:1px solid var(--ps-line)}
.ps-location-dialog__address{grid-column:1 / 3}
.ps-location-dialog__address .ps-textarea{min-height:64px}
.ps-location-dialog__default .ps-check{min-height:var(--ps-control-h)}
.ps-ss__tag{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:999px;background:var(--ps-accent-soft);color:var(--ps-accent-mid);font-size:var(--ps-fs-xs);font-weight:600}
@media (max-width:640px){
  .ps-location-dialog__row>*:not(.ps-contact-dialog__remove){grid-column:1}
  .ps-location-dialog__row>.ps-contact-dialog__remove{grid-column:2;grid-row:1}
}
