/* ==========================================================================
   User panel — Support tab ("ps"). Built on the pv design system (pv-panel.css):
   tinted boxes, one thin border, no gradients/glows, tokens only, logical properties.
   Only what the Overview / Wallet / Profile do not already provide lives here.
   Everything reacts to the person's appearance settings: theme, accent, radius, density, fonts, direction.
   ========================================================================== */

.ps > [data-ps-root] { display: flex; flex-direction: column; gap: var(--pv-gap); min-width: 0; }
.ps.is-loading { opacity: .6; pointer-events: none; }
.ps [hidden], .ps-modal [hidden] { display: none !important; }

/* header */
.ps-head-actions { display: flex; align-items: center; flex-wrap: wrap; gap: var(--pv-s2); max-width: 100%; }
.ps-head-actions .pv-btn.is-primary { padding-block: 7px; padding-inline: 16px; }
.ps-ibtn { width: 34px; height: 34px; opacity: 1; color: var(--pv-mute); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-sm); }
.ps-ibtn:hover { color: var(--pv-ink); background: var(--pv-soft); }
.ps-ibtn.is-muted { color: var(--pv-orange-tx); background: var(--pv-orange-bg); border-color: var(--pv-orange-bd); }
.ps-ibtn svg { width: 16px; height: 16px; }
.ps-dash { opacity: .5; }

/* alert strip */
.ps .pv-strip .pv-btn { flex: none; }

/* KPIs: no sparkline here, so they are plain tiles */
.ps-kpis .pv-kpi { padding-bottom: var(--pv-s5); }
.ps-kpis .pv-kpi-val { font-size: 24px; }

/* main grid: ticket list + help column */
.ps-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--pv-gap); align-items: start; }
.ps-main > .pv-skel { min-height: 320px; }
.ps-side { display: flex; flex-direction: column; gap: var(--pv-gap); min-width: 0; }

/* ---------- ticket list ---------- */
.ps-list { min-height: 360px; }
.ps-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--pv-s3); padding: var(--pv-s4) var(--pv-s5) var(--pv-s3); }
.ps-tabs button { display: inline-flex; align-items: center; gap: 6px; }
.ps-n { display: inline-block; min-width: 18px; padding: 0 6px; font-size: 10.5px; font-weight: 700; line-height: 1.6; text-align: center; color: var(--pv-mute); background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-r-pill); }
.ps-tabs button.is-active .ps-n { color: var(--pv-accent-tx); background: var(--pv-accent-bg); border-color: var(--pv-accent-bd); }
.ps-search { display: flex; align-items: center; gap: 6px; flex: 1 1 200px; max-width: 280px; min-width: 0; padding-inline: 10px 4px; background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); color: var(--pv-mute); transition: border-color .12s, box-shadow .12s; }
.ps-search:focus-within { border-color: var(--pv-accent-bd); box-shadow: 0 0 0 3px var(--pv-accent-bg); }
.ps-search > svg { width: 14px; height: 14px; }
.ps-search input { flex: 1; min-width: 0; padding: 6px 0; font: inherit; font-size: 13px; color: var(--pv-ink); background: none; border: 0; box-shadow: none; outline: 0; }
.ps-search input::-webkit-search-cancel-button { display: none; }
.ps-search input::placeholder { color: var(--pv-mute); opacity: .7; }
.ps-search .pv-icon-btn { width: 24px; height: 24px; }

.ps-rows-wrap { flex: 1 1 auto; min-width: 0; }
.ps-rows { list-style: none; margin: 0; padding: 0 var(--pv-s3) var(--pv-s2); display: flex; flex-direction: column; }
.ps-rows li + li { border-top: 1px solid var(--pv-line); }
.ps-row { appearance: none; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; column-gap: var(--pv-s3); width: 100%; padding: var(--pv-s3) var(--pv-s2); font: inherit; color: inherit; text-align: start; background: none; border: 0; border-radius: var(--pv-r-md); cursor: pointer; transition: background .12s; }
.ps-row:hover { background: var(--pv-soft); }
.ps-row:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: -2px; }
.ps-row.is-waiting { background: var(--pv-accent-bg); }
.ps-row.is-waiting:hover { background: color-mix(in srgb, var(--pv-accent) 22%, var(--pv-surface)); }
.ps-row-ico { width: 34px; height: 34px; }
.ps-row-ico.pv-t-slate { color: var(--pv-mute); }
.ps-row-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ps-row-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ps-row-top b { flex: 0 1 auto; min-width: 0; font-size: 13.5px; font-weight: 650; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-id { flex: none; font-size: 11.5px; font-weight: 600; color: var(--pv-mute); font-variant-numeric: tabular-nums; }
.ps-chip-n { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--pv-mute); }
.ps-chip-n svg { width: 12px; height: 12px; }
.ps-flag { flex: none; padding-block: 0; font-size: 11px; }
.ps-flag svg { width: 11px; height: 11px; }
.ps-row-pv { font-size: 12.5px; line-height: 1.5; color: var(--pv-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-row-pv strong { font-weight: 650; color: var(--pv-ink); opacity: .8; }
.ps-row-m { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ps-row-pills { display: flex; align-items: center; gap: 6px; }
.ps-row-pills .pv-pill { padding-block: 0; font-size: 11px; }
.ps-row-pills .pv-pill svg { width: 11px; height: 11px; }
.ps-row-m small { font-size: 11px; white-space: nowrap; }
.ps-more { display: flex; justify-content: center; padding: var(--pv-s2) var(--pv-s4) var(--pv-s4); }
.ps-more:empty { display: none; }

.ps-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 44px var(--pv-s5) 48px; text-align: center; }
.ps-empty .pv-ico { width: 44px; height: 44px; margin-bottom: 4px; border-radius: var(--pv-r-pill); color: var(--pv-mute); }
.ps-empty .pv-ico svg { width: 20px; height: 20px; }
.ps-empty b { font-size: 14px; font-weight: 700; }
.ps-empty p { max-width: 36ch; margin-bottom: var(--pv-s2); font-size: 12.5px; line-height: 1.6; color: var(--pv-mute); }

/* ---------- help column ---------- */
.ps-topics { display: flex; flex-direction: column; gap: 6px; padding: 0 var(--pv-s3) var(--pv-s3); }
.ps-topic { appearance: none; display: flex; align-items: center; gap: 10px; width: 100%; padding: var(--pv-s2) var(--pv-s3); font: inherit; font-size: 13px; font-weight: 600; text-align: start; color: var(--pv-ink); background: var(--pv-soft); border: 1px solid transparent; border-radius: var(--pv-r-md); cursor: pointer; transition: border-color .12s, background .12s; }
.ps-topic:hover { border-color: var(--pv-line); background: var(--pv-surface); }
.ps-topic:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }
.ps-topic .pv-ico { width: 28px; height: 28px; }
.ps-topic .pv-ico svg { width: 14px; height: 14px; }
.ps-good { display: flex; flex-direction: column; gap: var(--pv-s3); padding: 0 var(--pv-s5) var(--pv-s5); }
.ps-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; line-height: 1.6; color: var(--pv-mute); }
.ps-rules li { display: flex; align-items: flex-start; gap: 8px; }
.ps-rules svg { width: 13px; height: 13px; margin-top: 4px; color: var(--pv-green-tx); }
.ps-auto { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: var(--pv-s3); font-size: 12px; line-height: 1.6; color: var(--pv-slate-tx); background: var(--pv-slate-bg); border: 1px solid var(--pv-slate-bd); border-radius: var(--pv-r-md); }
.ps-auto svg { width: 14px; height: 14px; margin-top: 3px; }
.ps-docs { flex-direction: row; align-items: center; gap: var(--pv-s3); padding: var(--pv-s4) var(--pv-s5); color: inherit; text-decoration: none; transition: border-color .12s; }
.ps-docs:hover { border-color: color-mix(in srgb, var(--pv-line) 50%, var(--pv-mute)); }
.ps-docs:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }
.ps-docs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ps-docs-t b { font-size: 13.5px; font-weight: 650; }
.ps-docs-t small { line-height: 1.5; }
.ps-docs > svg { width: 15px; height: 15px; color: var(--pv-mute); }

/* ---------- dialogs ---------- */
.ps-modal .pv-modal-box { width: min(600px, 100%); max-height: min(90vh, 820px); }
.ps-modal.is-conv .pv-modal-box { width: min(700px, 100%); height: min(88vh, 800px); max-height: 94vh; }
.ps-modal .pv-modal-head .pv-ico { width: 30px; height: 30px; flex: none; }
.ps-modal .pv-modal-head h3 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-modal .pv-modal-head .pv-pill { padding-block: 0; font-size: 11px; }
.ps-modal.is-conv .pv-modal-body { flex: 1 1 auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; }
.ps-modal .pv-empty { padding-block: 60px; }
.ps-foot { flex: none; padding: var(--pv-s3) var(--pv-s5) var(--pv-s4); background: var(--pv-surface); border-top: 1px solid var(--pv-line); }

/* form */
.ps-form { display: flex; flex-direction: column; gap: var(--pv-s4); }
.ps-field { position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ps-label { font-size: 12.5px; font-weight: 650; }
.ps-modal small { font-size: 11.5px; line-height: 1.6; color: var(--pv-mute); }
.ps-input { width: 100%; padding: 8px 12px; font: inherit; font-size: 13px; line-height: 1.6; color: var(--pv-ink); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); box-shadow: none; transition: border-color .12s, box-shadow .12s; }
.ps-input:hover { border-color: color-mix(in srgb, var(--pv-line) 55%, var(--pv-mute)); }
.ps-input:focus, .ps-input:focus-visible { outline: 0; border-color: var(--pv-accent-bd); box-shadow: 0 0 0 3px var(--pv-accent-bg); }
.ps-input.is-bad { border-color: var(--pv-rose-bd); background: var(--pv-rose-bg); }
.ps-input::placeholder { color: var(--pv-mute); opacity: .65; }
.ps-ta { resize: vertical; min-height: 56px; }
.ps-counter { align-self: flex-end; font-variant-numeric: tabular-nums; }
.ps-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ps-chip { appearance: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--pv-ink); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-pill); cursor: pointer; transition: border-color .12s, background .12s; }
.ps-chip:hover { border-color: color-mix(in srgb, var(--pv-line) 50%, var(--pv-mute)); }
.ps-chip.is-active { color: var(--pv-accent-tx); background: var(--pv-accent-bg); border-color: var(--pv-accent-bd); }
.ps-chip svg { width: 13px; height: 13px; }
.ps-chip:focus-visible, .ps-opt:focus-visible { outline: 2px solid var(--pv-accent); outline-offset: 2px; }

.ps-prio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--pv-s2); }
.ps-opt { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 6px 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--pv-ink); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); cursor: pointer; transition: border-color .12s, background .12s; }
.ps-opt:hover { border-color: color-mix(in srgb, var(--pv-line) 50%, var(--pv-mute)); }
.ps-opt.is-active { color: var(--x); background: var(--b); border-color: var(--d); font-weight: 700; }
.ps-opt svg { width: 13px; height: 13px; }
.ps-opt > i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.ps-opt.is-active > i { opacity: 1; }
.ps-prio-d { min-height: 18px; }

.ps-note, .ps-tip { display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; font-size: 12px; line-height: 1.65; border-radius: var(--pv-r-md); }
.ps-note { align-items: center; color: var(--pv-blue-tx); background: var(--pv-blue-bg); border: 1px solid var(--pv-blue-bd); }
.ps-note > span { flex: 1; min-width: 0; }
.ps-note .pv-btn { flex: none; padding-block: 2px; }
.ps-tip { color: var(--pv-accent-tx); background: var(--pv-accent-bg); border: 1px solid var(--pv-accent-bd); }
.ps-note svg, .ps-tip svg { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.ps-note svg { margin-top: 0; }
.ps-err { padding: 9px 12px; font-size: 12.5px; line-height: 1.6; color: var(--pv-rose-tx); background: var(--pv-rose-bg); border: 1px solid var(--pv-rose-bd); border-radius: var(--pv-r-md); }
.ps-submit { width: 100%; padding-block: 10px; font-size: 13.5px; }
.ps-submit svg { width: 15px; height: 15px; }

/* attachment: drop zone + chosen file */
.ps-dz { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--pv-s4); text-align: center; background: var(--pv-soft); border: 1px dashed color-mix(in srgb, var(--pv-line) 55%, var(--pv-mute)); border-radius: var(--pv-r-md); cursor: pointer; transition: border-color .12s, background .12s; }
.ps-dz:hover, .ps-dz:focus-visible, [data-ps-drop].is-over .ps-dz { border-color: var(--pv-accent-bd); background: var(--pv-accent-bg); outline: 0; }
.ps-dz b { font-size: 13px; font-weight: 650; }
.ps-dz .pv-ico { width: 34px; height: 34px; margin-bottom: 2px; border-radius: var(--pv-r-pill); }
.ps-file { display: flex; align-items: center; gap: var(--pv-s3); padding: var(--pv-s2) var(--pv-s3); background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); }
.ps-file img { width: 40px; height: 40px; flex: none; object-fit: cover; border-radius: var(--pv-r-sm); border: 1px solid var(--pv-line); }
.ps-file .pv-ico { width: 40px; height: 40px; }
.ps-file-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ps-file-t b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- conversation ---------- */
.ps-conv-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--pv-s2) var(--pv-s3); }
.ps-conv-facts { display: flex; align-items: center; flex-wrap: wrap; gap: 6px var(--pv-s3); min-width: 0; }
.ps-conv-facts .pv-pill { padding-block: 0; font-size: 11px; }
.ps-conv-facts .pv-pill svg { width: 11px; height: 11px; }
.ps-fact { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--pv-mute); }
.ps-fact svg { width: 13px; height: 13px; }
.ps-conv-meta .pv-btn { padding-block: 3px; }
.ps-confirm { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.ps-confirm > span { margin-inline-end: 4px; color: var(--pv-mute); }
.ps-confirm .pv-btn { padding-block: 2px; }

.ps-stages { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; }
.ps-stage { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 5px 8px; min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--pv-mute); background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-r-sm); }
.ps-stage svg { width: 12px; height: 12px; }
.ps-stage span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-stage.is-current { color: var(--x); background: var(--b); border-color: var(--d); font-weight: 700; }

.ps-thread { display: flex; flex-direction: column; gap: var(--pv-s4); padding-top: var(--pv-s2); }
.ps-msg { display: flex; align-items: flex-end; gap: 8px; max-width: 92%; }
.ps-msg.is-user { align-self: flex-end; flex-direction: row-reverse; }
.ps-msg.is-admin { align-self: flex-start; }
.ps-av { position: relative; flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; overflow: hidden; font-size: 12px; font-weight: 700; color: var(--pv-accent-tx); background: var(--pv-accent-bg); border: 1px solid var(--pv-accent-bd); border-radius: var(--pv-r-pill); }
.ps-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--pv-surface); }
.ps-av svg { width: 14px; height: 14px; }
.ps-av.is-admin { color: var(--pv-slate-tx); background: var(--pv-slate-bg); border-color: var(--pv-slate-bd); }
.ps-av.is-ai { color: var(--pv-violet-tx); background: var(--pv-violet-bg); border-color: var(--pv-violet-bd); }
.aiapi-shell[data-pv-radius="none"] .ps-av { border-radius: 0; }
.ps-bub { min-width: 0; padding: 9px 13px 10px; background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-r); }
.ps-msg.is-user .ps-bub { background: var(--pv-accent-bg); border-color: var(--pv-accent-bd); }
.ps-msg.is-ai .ps-bub { background: var(--pv-violet-bg); border-color: var(--pv-violet-bd); }
.ps-bub header { display: flex; align-items: baseline; justify-content: space-between; gap: var(--pv-s3); margin-bottom: 3px; }
.ps-bub header b { font-size: 12px; font-weight: 700; }
.ps-bub header time { font-size: 11px; color: var(--pv-mute); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ps-msg.is-ai .ps-bub header b { color: var(--pv-violet-tx); }
.ps-body { font-size: 13px; line-height: 1.75; overflow-wrap: anywhere; word-break: break-word; }
.ps-body > :first-child { margin-top: 0; }
.ps-body > :last-child { margin-bottom: 0; }
.ps-body p { margin: 0 0 .6em; }
.ps-body ul, .ps-body ol { margin: 0 0 .6em; padding-inline-start: 1.4em; }
.ps-body li { margin: 0 0 .2em; }
.ps-body a { color: var(--pv-accent-tx); text-decoration: underline; text-underline-offset: 2px; }
.ps-body strong { font-weight: 700; }
.ps-body code { padding: 1px 6px; font: 12px/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; direction: ltr; unicode-bidi: isolate; color: var(--pv-ink); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-sm); }
.ps-body pre { margin: 0 0 .6em; padding: 10px 12px; overflow-x: auto; direction: ltr; text-align: left; font: 12px/1.65 ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); }
.ps-body pre code { padding: 0; background: none; border: 0; }
.ps-body blockquote { margin: 0 0 .6em; padding-inline-start: 10px; border-inline-start: 2px solid var(--pv-line); color: var(--pv-mute); }

.ps-att { display: inline-flex; flex-direction: column; gap: 6px; max-width: 100%; margin-top: 8px; color: inherit; text-decoration: none; }
.ps-att img { display: block; max-width: min(260px, 100%); max-height: 180px; object-fit: cover; border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); background: var(--pv-surface); }
.ps-att-l { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 2px 10px; font-size: 12px; font-weight: 600; color: var(--pv-ink); background: var(--pv-surface); border: 1px solid var(--pv-line); border-radius: var(--pv-r-pill); }
.ps-att:hover .ps-att-l { border-color: color-mix(in srgb, var(--pv-line) 50%, var(--pv-mute)); }
.ps-att-l svg { width: 13px; height: 13px; }
.ps-att-l em { margin: 0; font-size: 10.5px; opacity: .6; }

/* composer + closed footer */
.ps-composer { display: flex; flex-direction: column; gap: var(--pv-s2); }
.ps-composer .ps-ta { min-height: 56px; max-height: 220px; resize: none; }
.ps-comp-row { display: flex; align-items: center; gap: var(--pv-s2); }
.ps-comp-row .pv-btn.is-primary { padding-block: 6px; padding-inline: 18px; }
.ps-comp-row .ps-ibtn { width: 32px; height: 32px; }
.ps-hint { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ps-spacer { flex: 1; }
.ps-closed { display: flex; flex-direction: column; gap: var(--pv-s2); }
.ps-closed-n { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 12.5px; font-weight: 600; color: var(--pv-green-tx); }
.ps-closed-n svg { width: 14px; height: 14px; }
.ps-closed-r { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--pv-s2) var(--pv-s3); font-size: 12.5px; color: var(--pv-mute); }
.ps-closed-r .pv-btn { flex: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
	.ps-main { grid-template-columns: minmax(0, 1fr); }
	.ps-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
	.ps-docs { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
	.ps-head-actions { width: 100%; }
	.ps-head-actions .pv-btn.is-primary { flex: 1 1 auto; }
	.ps-search { flex: 1 1 100%; max-width: none; }
	.ps-toolbar { padding-inline: var(--pv-s4); }
	.ps-tabs { max-width: 100%; }
}
@media (max-width: 720px) {
	.ps-rows { padding-inline: var(--pv-s2); }
	.ps-row { grid-template-columns: 34px minmax(0, 1fr); row-gap: 6px; }
	.ps-row-m { grid-column: 2; flex-direction: row-reverse; align-items: center; justify-content: space-between; }
	.ps-prio { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ps-modal .pv-modal-box { max-height: 92vh; }
	.ps-modal.is-conv .pv-modal-box { width: 100%; height: 92vh; }
	.ps-msg { max-width: 100%; }
	.ps-foot { padding-inline: var(--pv-s4); }
	.ps-hint { display: none; }
	.ps-note { flex-wrap: wrap; }
}
@media (max-width: 480px) {
	.ps-stage svg { display: none; }
	.ps-kpis .pv-kpi-val { font-size: 21px; }
}

/* refresh button spins while a reload is running */
@keyframes ps-spin { to { transform: rotate(360deg); } }
.ps-ibtn.is-spin svg { animation: ps-spin .7s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ps-ibtn.is-spin svg { animation: none; } }

/* ---------- refinements ---------- */

/* closed tickets: a quiet tinted row, so finished work reads apart from active work */
.ps-row.is-closed { background: var(--pv-soft); }
.ps-row.is-closed:hover { background: color-mix(in srgb, var(--pv-soft) 82%, var(--pv-mute) 18%); }
.ps-row.is-closed .ps-row-top b { color: var(--pv-mute); }
.ps-rows li:has( > .ps-row.is-closed ) { border-top-color: transparent; }
.ps-rows li:has( > .ps-row.is-closed ) + li:has( > .ps-row.is-closed ) { margin-top: 4px; }
.ps-rows li:has( > .ps-row.is-closed ) { margin-bottom: 4px; }
.ps-rows li:has( > .ps-row.is-closed ) + li { border-top-color: transparent; }

/* `.pv-ov p { padding: 0; margin: 0 }` outranks single-class rules: lift the paragraphs that need their own spacing */
.ps p.ps-auto { padding: var(--pv-s3) var(--pv-s4); }
.ps p.ps-empty-d, .ps .ps-empty p { margin-bottom: var(--pv-s2); }

/* conversation header: one tidy tinted panel (facts + action, then the three stages) */
[data-ps-meta] { display: flex; flex-direction: column; gap: var(--pv-s3); padding: var(--pv-s3) var(--pv-s4); background: var(--pv-soft); border: 1px solid var(--pv-line); border-radius: var(--pv-r-md); }
.ps-conv-meta { gap: var(--pv-s3); }
.ps-conv-facts { gap: 8px var(--pv-s4); }
.ps-conv-meta .pv-btn { padding-block: 4px; padding-inline: 12px; }
.ps-conv-meta .pv-btn:not(.is-primary):not(.is-tint) { background: var(--pv-surface); }
.ps-stage { background: var(--pv-surface); }
.ps-stage.is-current { background: var(--b); }
.ps-thread { padding-top: var(--pv-s3); }
