/* The Portal: the app's tokens and components (/app/styles.css), laid out for employees: a quiet top bar
   with a few destinations, roomy cards, plain lists. Light and dark follow the app's tokens. */

.pt-body { background: var(--canvas); }
.pt-skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; border-radius: 8px; background: var(--surface); color: var(--ink); }
.pt-skip:focus { left: 12px; }
.pt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.pt-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.pt-top-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 14px; padding: 12px 24px 8px; }
.pt-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 750; font-size: 15px; text-decoration: none; }
.pt-brand .brand-mark { width: 30px; height: 30px; font-size: 13px; }
.pt-company .select { min-height: 34px; padding: 5px 10px; font-size: 12.5px; }
.pt-company-name { color: var(--muted); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pt-top-actions form { margin: 0; }
.pt-console { min-height: 34px; }
.pt-bell { position: relative; }
.pt-count { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; font-weight: 750; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--surface); }

.pt-nav { overflow-x: auto; scrollbar-width: none; }
.pt-nav-inner { max-width: 1180px; margin: 0 auto; display: flex; gap: 4px; padding: 0 18px; }
.pt-nav-item { display: inline-flex; align-items: center; gap: 7px; padding: 9px 11px 11px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.pt-nav-item:hover { color: var(--ink); }
.pt-nav-item.active { color: var(--ink); border-bottom-color: var(--accent); }
.pt-nav-item.active .icon { color: var(--accent); }

.pt-page { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.pt-page:focus, .pt-page:focus-visible { outline: none; }
.pt-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.pt-head h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.03em; }
.pt-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; max-width: 680px; }
.pt-back { color: var(--muted); font-size: 13px; text-decoration: none; }
.pt-back:hover { color: var(--ink); }

.pt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pt-grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.pt-section { margin-bottom: 16px; }
.pt-grid .pt-section { margin-bottom: 0; }
.pt-section .card-head h2 { font-size: 14px; }
.pt-quiet { margin: 0; color: var(--muted); font-size: 13px; }
.pt-text { margin: 0 0 10px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.pt-sub { margin: 16px 0 6px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.pt-list { margin: 0; padding: 0; list-style: none; }
.pt-row { border-bottom: 1px solid var(--line); }
.pt-row:last-child { border-bottom: 0; }
.pt-row > a, .pt-row > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 2px; color: var(--ink); text-decoration: none; }
.pt-row > a:hover { background: var(--surface-soft); }
.pt-row-main { display: grid; gap: 2px; min-width: 0; }
.pt-row-main strong { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.pt-row-main small, .pt-when { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }

.pt-tabs { display: flex; gap: 6px; margin: 0 0 14px; }
.pt-tabs a { padding: 7px 12px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 600; text-decoration: none; background: var(--surface); border: 1px solid var(--line); }
.pt-tabs a.active { color: var(--accent-dark); background: var(--accent-soft); border-color: transparent; }

.pt-form { max-width: none; }
.pt-thread { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 10px; }
.pt-entry { padding: 10px 12px; border-radius: 10px; background: var(--surface-soft); }
.pt-entry-note { background: transparent; padding: 2px 12px; }
.pt-entry-note .pt-entry-body { color: var(--muted); font-size: 12.5px; }
.pt-entry-result { border-left: 3px solid var(--green); }
.pt-entry-head { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.pt-entry-head small { color: var(--muted); }
.pt-entry-body { margin-top: 4px; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.pt-facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 0; font-size: 13px; }
.pt-facts dt { color: var(--muted); }
.pt-facts dd { margin: 0; overflow-wrap: anywhere; }
.pt-args { max-height: 420px; overflow: auto; margin: 0; padding: 12px; border-radius: 10px; background: var(--surface-soft); white-space: pre-wrap; overflow-wrap: anywhere; }

.pt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pt-agent { padding: 18px; display: grid; gap: 10px; align-content: start; }
.pt-agent-head { display: flex; align-items: center; gap: 12px; }
.pt-agent-head h2 { margin: 0; font-size: 15px; }
.pt-agent-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.pt-agent-head .badge { margin-left: auto; }
.pt-avatar { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 750; }
.pt-bullets { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.55; }

.pt-search { max-width: 420px; margin-bottom: 14px; }
.pt-people { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pt-person { display: grid; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; overflow-wrap: anywhere; }
.pt-person span { color: var(--ink); }
.pt-person small { color: var(--muted); }
.pt-person .pt-bullets { margin-top: 6px; color: var(--muted); font-size: 12px; }
.pt-tree, .pt-tree ul { margin: 0; padding-left: 20px; list-style: none; }
.pt-tree { padding-left: 0; }
.pt-tree li { position: relative; margin: 6px 0; }
.pt-tree ul { border-left: 1px solid var(--line-strong); margin-left: 10px; }
.pt-node { display: inline-grid; gap: 1px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; font-weight: 600; }
.pt-node small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.pt-node-agent { border-style: dashed; }

.pt-dialog h2.pt-dialog-title { margin: 0; font-size: 16px; }
.pt-choices { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.pt-choices legend { margin-bottom: 8px; font-size: 12px; font-weight: 650; }
.pt-choice { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line-strong); border-radius: 99px; font-size: 13px; cursor: pointer; }

.pt-folio-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.pt-stage { position: relative; display: grid; overflow: hidden; }
.pt-stage .folio-frame { display: block; width: 100%; height: min(78vh, 900px); min-height: 420px; border: 0; background: var(--surface); }
.pt-stage:fullscreen { border-radius: 0; }
.pt-stage:fullscreen .folio-frame { height: 100vh; }
.pt-stage .notice { margin: 12px; }
.pt-url { overflow-wrap: anywhere; }

.pt-updates { position: fixed; top: 108px; right: 20px; z-index: 60; width: min(400px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 130px)); overflow-y: auto; box-shadow: var(--shadow-md); }
.pt-updates .pt-quiet { padding: 18px; }
.pt-update-list { margin: 0; padding: 0; list-style: none; }
.pt-update-list li { border-bottom: 1px solid var(--line); }
.pt-update-list li:last-child { border-bottom: 0; }
.pt-update-list a, .pt-update-list div { display: grid; gap: 2px; padding: 11px 16px; color: var(--ink); text-decoration: none; font-size: 12.5px; }
.pt-update-list a:hover { background: var(--surface-soft); }
.pt-update-list span, .pt-update-list small { color: var(--muted); overflow-wrap: anywhere; }
.pt-update-list li.unread strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }

@media (max-width: 900px) {
  .pt-grid, .pt-grid-wide { grid-template-columns: minmax(0, 1fr); }
  .pt-top-inner { padding: 10px 16px 6px; flex-wrap: wrap; }
  .pt-page { padding: 20px 16px 48px; }
  .pt-head { flex-direction: column; }
  .pt-signout .btn { padding: 8px 9px; }
}
@media (max-width: 560px) {
  .pt-company-name, .pt-console { display: none; }
  .pt-updates { top: 120px; left: 12px; right: 12px; width: auto; }
}

/* A row's status badge keeps its own width beside the row's text. */
.pt-row .badge { flex: 0 0 auto; white-space: nowrap; }
