:root {
  --ink: #10131b;
  --muted: #5a6373;
  --border: #e2e6ee;
  --page: #f6f7fa;
  --white: #fff;
  --blue: #0847f7;
  --blue-soft: #e8f0ff;
  --green: #17634a;
  --green-soft: #e9f5ef;
  --red: #a23432;
  --red-soft: #fbeeed;
  --amber: #805213;
  --amber-soft: #fff3df;
  --sidebar: 218px;
  --font: Inter, "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.55 var(--font); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, dl, dd { margin: 0; }
h1 { font-size: clamp(29px, 3vw, 42px); line-height: 1.13; letter-spacing: -.045em; font-weight: 690; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 680; letter-spacing: -.025em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.skip { position: fixed; top: 10px; left: 10px; z-index: 10; background: white; padding: 6px 10px; transform: translateY(-170%); }
.skip:focus { transform: none; }

.workspace { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100dvh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; height: 100dvh; background: white; border-right: 1px solid var(--border); padding: 24px 15px 18px; }
.app-logo { display: inline-block; margin: 0 8px 24px; }
.app-logo img { width: 121px; }
.workspace-name { display: flex; align-items: center; gap: 9px; border: 1px solid var(--border); border-radius: 9px; padding: 9px 8px; margin-bottom: 24px; }
.workspace-name img { flex: 0 0 32px; border-radius: 7px; }
.workspace-name strong, .workspace-name span { display: block; }
.workspace-name strong { font-size: 12px; white-space: nowrap; }
.workspace-name span { font-size: 11px; color: var(--muted); }
.workspace-nav { display: grid; gap: 5px; }
.workspace-nav a { display: flex; align-items: center; gap: 9px; border-radius: 7px; padding: 10px 11px; color: #4b5363; font-weight: 540; }
.workspace-nav a:hover { background: var(--page); }
.workspace-nav a[aria-current] { color: #103cc1; background: var(--blue-soft); font-weight: 650; }
.nav-icon { display: grid; place-items: center; position: relative; width: 16px; height: 16px; }
.nav-icon::after, .nav-icon::before { content: ''; position: absolute; }
.overview-icon::before { inset: 2px; border: 1.4px solid currentColor; border-radius: 2px; }
.overview-icon::after { width: 8px; height: 4px; border: solid currentColor; border-width: 0 1px 1px; transform: translateY(-2px); }
.people-icon::before { height: 6px; width: 6px; top: 1px; border: 1.4px solid currentColor; border-radius: 50%; }
.people-icon::after { bottom: 1px; height: 6px; width: 12px; border: 1.4px solid currentColor; border-radius: 5px 5px 2px 2px; }
.data-icon::before { height: 12px; width: 12px; border: 1.4px solid currentColor; border-radius: 3px; }
.data-icon::after { height: 4px; width: 10px; border-block: 1.4px solid currentColor; }
.sidebar-foot { display: flex; align-items: start; gap: 8px; padding: 10px 7px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 12px; }
.sidebar-foot small { display: block; color: var(--muted); font-size: 11px; }
.demo-dot { width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; flex: none; background: var(--blue); }

.workspace-body { min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 64px; background: #fffffff2; backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 8px clamp(18px, 3vw, 39px); }
#crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
#crumbs strong { color: var(--ink); }
#crumbs a:hover { text-decoration: underline; }
.session-actions { display: flex; align-items: center; justify-content: end; gap: 9px; }
.role-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
#role-switch { background: #fff; border: 1px solid var(--border); color: var(--ink); border-radius: 6px; padding: 5px 7px; max-width: 127px; }
.text-button { appearance: none; border: 0; background: transparent; color: #1542c3; padding: 2px 0; font-weight: 560; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
#logout { color: #4d5767; font-size: 12px; }
.app-content { max-width: 1420px; margin-inline: auto; padding: 36px clamp(18px, 3vw, 39px) 56px; }
.app-content:focus { outline: none; }
.page-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 24px; }
.page-heading p { color: var(--muted); margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 13px; border: 1px solid transparent; border-radius: 7px; white-space: nowrap; line-height: 1.35; font-weight: 600; font-size: 13px; }
.primary { color: white; background: #0e1118; }
.primary:hover { background: #272b36; }
.secondary { color: var(--ink); background: white; border-color: #d9dee8; }
.secondary:hover { background: var(--page); border-color: #a9b3c7; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.metric-card, .panel { min-width: 0; border: 1px solid var(--border); border-radius: 11px; background: white; }
.metric-card { padding: 15px 17px 16px; }
.metric-label { color: #465064; font-size: 13px; font-weight: 580; }
.metric-card > strong { display: block; font: 680 35px/1.2 Inter, system-ui, sans-serif; letter-spacing: -.05em; color: var(--ink); margin-top: 8px; }
.metric-card > p { font-size: 12px; color: var(--muted); margin-top: 4px; }
.metric-today > strong { color: var(--amber); }
.metric-late > strong { color: var(--red); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); align-items: start; gap: 16px; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 11px; padding: 16px 19px 14px; border-bottom: 1px solid var(--border); }
.panel-head p { color: var(--muted); font-size: 12px; margin-top: 3px; }
.panel-head > .small { align-self: center; white-space: nowrap; }
.task-list, .stage-bars, .timeline, .audit-list { list-style: none; margin: 0; padding: 0; }
.task-list { padding: 0 19px; }
.task-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; }
.task-list li + li { border-top: 1px solid var(--border); }
.item-link { font-weight: 650; overflow-wrap: anywhere; }
.item-link:hover { color: var(--blue); text-decoration: underline; }
.task-item-text p { margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; justify-content: end; gap: 9px; flex-wrap: wrap; flex: none; }
.task-meta > span:first-child { color: var(--muted); font-size: 11px; white-space: nowrap; }
.chip { display: inline-flex; align-items: center; border-radius: 5px; padding: 3px 7px; background: #f0f2f6; color: #49556b; font-size: 11px; line-height: 1.45; font-weight: 620; white-space: nowrap; }
.chip.late { background: var(--red-soft); color: var(--red); }
.chip.today { background: var(--amber-soft); color: var(--amber); }
.chip.next { background: var(--green-soft); color: var(--green); }
.chip.stage { background: #eef2fa; color: #34415a; }
.due-late { color: var(--red) !important; }
.due-today { color: var(--amber) !important; }
.stage-bars { padding: 10px 19px 14px; }
.stage-bars a { display: grid; grid-template-columns: minmax(87px, .8fr) minmax(45px, 1.4fr) 24px; align-items: center; gap: 9px; min-height: 29px; border-radius: 4px; font-size: 12px; }
.stage-bars a:hover { background: var(--page); }
.stage-name { white-space: nowrap; }
.stage-name > span { font-variant-numeric: tabular-nums; color: var(--muted); margin-right: 3px; }
.track { display: block; height: 6px; overflow: hidden; background: #edf0f5; border-radius: 4px; }
.track > span { display: block; height: 100%; border-radius: inherit; background: var(--blue); }
.stage-count { text-align: right; font-weight: 620; font-variant-numeric: tabular-nums; }
.empty-state { display: grid; gap: 5px; color: var(--muted); padding: 27px 19px; font-size: 13px; }
.empty-state strong { font-size: 14px; color: var(--ink); }

.field { min-width: 0; }
.field label, .login-card label { display: block; font-size: 12px; font-weight: 650; margin-bottom: 5px; color: #3f485a; }
.field input, .field select, .field textarea, .login-card input { box-sizing: border-box; color: var(--ink); min-height: 38px; width: 100%; padding: 7px 9px; border: 1px solid #d5dbe6; border-radius: 6px; background: white; }
.field textarea { display: block; resize: vertical; }
.filters { display: grid; grid-template-columns: minmax(150px, 1.42fr) repeat(4, minmax(88px, 1fr)) auto; align-items: end; gap: 9px; padding: 16px 19px; border-bottom: 1px solid var(--border); }
.table-meta { display: flex; justify-content: space-between; gap: 7px; padding: 9px 19px; color: var(--muted); font-size: 12px; }
.table-meta p { color: #39435a; font-weight: 650; }
.table-scroll { width: 100%; overflow: auto; scrollbar-color: #a9b4c9 var(--page); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; }
.table thead { background: #f5f7fa; color: #465064; font-size: 12px; }
.table td, .table th { padding: 11px 12px; white-space: nowrap; text-align: left; border-bottom: 1px solid var(--border); }
.table thead th { font-weight: 650; }
.table tr > :first-child { padding-left: 19px; }
.table tr > :last-child { padding-right: 19px; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table tbody tr:hover { background: #f9fbff; }
.table tbody th { font-weight: 630; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; font-weight: 450; }
.cell-tier { color: var(--muted); font-size: 11px; margin-left: 3px; }
.score-cell { color: #163aa2; font-weight: 670; font-variant-numeric: tabular-nums; }

.account-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; padding: 13px 17px; }
.account-summary > div { display: grid; gap: 3px; padding-inline: 13px; align-content: start; }
.account-summary > div:first-child { padding-left: 0; }
.account-summary > div + div { border-left: 1px solid var(--border); }
.account-summary > div > span { color: var(--muted); font-size: 12px; }
.account-summary strong { font-weight: 650; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 14px; }
.detail-stack { display: grid; gap: 14px; min-width: 0; }
.fit-score { text-align: right; color: #1943be; white-space: nowrap; line-height: 1.1; }
.fit-score strong { display: block; font-size: 26px; }
.fit-score span { font-size: 10px; }
.fit-list { padding: 0 19px; }
.fit-list div { padding: 12px 0; }
.fit-list div + div { border-top: 1px solid var(--border); }
.fit-list dt { font-weight: 650; margin-bottom: 3px; }
.fit-list dd, .evidence blockquote { color: #4c586f; overflow-wrap: anywhere; }
.evidence { padding: 12px 19px; }
.evidence + .evidence { border-top: 1px solid var(--border); }
.evidence summary, .audit-panel summary, #metrics-panel summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.evidence summary .chip { float: right; }
.evidence p { padding-top: 8px; }
.evidence blockquote { margin: 7px 0 2px; border-left: 2px solid #bdcbeb; padding-left: 11px; }
.timeline { margin: 13px 19px 16px; }
.timeline li { border-left: 1px solid #d9e0ed; padding: 0 0 15px 14px; position: relative; overflow-wrap: anywhere; }
.timeline li::before { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); top: 6px; left: -4px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; }
.timeline time { color: var(--muted); font-size: 11px; }
.timeline p { margin: 4px 0; color: #334157; font-size: 13px; }
.timeline .timeline-next, .timeline .timeline-stage { font-size: 12px; color: var(--muted); }
.timeline .text-button { font-size: 12px; }
.notice { padding: 10px 13px; border: 1px solid var(--border); border-radius: 7px; background: var(--page); color: #36445d; }
.notice.success { background: var(--green-soft); color: var(--green); border-color: #bfdecf; }
.notice.error { background: var(--red-soft); color: var(--red); border-color: #ebc5c5; }
.save-notice { margin-bottom: 12px; }

.asset-panel { margin-top: 14px; }
.measurement-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.measurement-grid > div { padding: 13px 14px 15px 19px; }
.measurement-grid > div + div { border-left: 1px solid var(--border); }
.measurement-grid dt { color: var(--muted); font-size: 12px; }
.measurement-grid dd { font-weight: 670; font-size: 25px; }
.cost-total { font-size: 25px; font-weight: 670; }
.audit-panel summary { padding: 13px 19px; }
.audit-panel summary span { float: right; color: var(--muted); font-weight: 450; }
.audit-list { padding: 0 19px 13px; }
.audit-list li { display: grid; grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr) auto; gap: 12px; font-size: 12px; border-top: 1px solid var(--border); padding: 8px 0; color: #4c586f; }

.record-dialog { width: min(640px, calc(100% - 22px)); max-height: calc(100dvh - 26px); border: 1px solid var(--border); border-radius: 12px; padding: 0; box-shadow: 0 18px 70px #111e3d30; color: var(--ink); }
.record-dialog::backdrop { background: #12192876; }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: white; }
.dialog-head h2 { margin-bottom: 2px; }
.close-dialog { font-size: 20px; min-height: 31px; width: 32px; padding: 0; }
.record-form fieldset { display: grid; gap: 11px; border: 0; margin: 0; min-width: 0; padding: 14px 18px; }
.field-row { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 10px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.quick-actions button { border: 1px solid var(--border); background: var(--page); color: #465472; border-radius: 5px; padding: 3px 6px; font-size: 11px; }
.quick-actions button:hover { color: var(--blue); border-color: #b4c5f3; }
#metrics-panel { border: 1px solid var(--border); border-radius: 7px; padding: 8px 10px; }
#metrics-panel[open] summary { padding-bottom: 10px; }
.check-label { display: flex; gap: 6px; align-items: center; font-size: 12px; margin-top: 8px; }
.check-label input { accent-color: var(--blue); }
#material-error-field { margin-top: 8px; }
#record-error { margin: 0 18px 10px; }
.dialog-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 7px; padding: 11px 18px; background: white; border-top: 1px solid var(--border); position: sticky; bottom: 0; }
.dialog-actions > span { margin-right: auto; }

.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-content: center; align-items: start; gap: clamp(26px, 6vw, 77px); max-width: 930px; margin-inline: auto; padding: 38px 19px; }
.login-intro { align-self: center; }
.login-intro > img { width: 142px; margin-bottom: 34px; }
.login-intro > p { color: var(--muted); margin-top: 12px; }
.login-demo-note { display: flex; flex-wrap: wrap; gap: 5px 10px; align-items: baseline; margin-top: 22px; color: var(--muted); font-size: 12px; }
.login-demo-note strong { color: #163cae; }
.login-card { background: white; padding: 23px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 28px #232f4910; }
.login-card input { margin: 5px 0 8px; }
.login-button { width: 100%; margin-top: 7px; }
.code-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12px; }
.demo-roles { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 18px; }
.demo-roles p { font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.role-options { display: flex; gap: 5px; flex-wrap: wrap; }
.role-options .button { font-size: 12px; padding-inline: 8px; }
.login-card .notice { margin-top: 10px; }

@media (max-width: 1120px) {
  .task-meta { flex-direction: column; align-items: end; gap: 3px; }
  .filters { grid-template-columns: minmax(125px, 1.3fr) repeat(2, minmax(90px, 1fr)); }
  #reset-filters { justify-self: start; }
}
@media (max-width: 880px) {
  :root { --sidebar: 173px; }
  .sidebar { padding-inline: 10px; }
  .workspace-name { gap: 5px; }
  .workspace-name img { width: 26px; flex-basis: 26px; }
  .overview-grid, .detail-grid { grid-template-columns: 1fr; }
  .task-meta { flex-direction: row; align-items: center; gap: 8px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .measurement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .measurement-grid > div:nth-child(4) { border-left: 0; }
  .measurement-grid > div:nth-child(n+4) { border-top: 1px solid var(--border); }
}
@media (max-width: 620px) {
  .workspace { display: block; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 15px 8px; }
  .sidebar-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
  .app-logo { margin: 0; }
  .app-logo img { width: 120px; }
  .workspace-name { display: none; }
  .workspace-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .workspace-nav a { font-size: 12px; padding: 7px 6px; gap: 4px; }
  .nav-icon { width: 14px; }
  .sidebar-foot { padding: 3px 0 0; border: 0; }
  .sidebar-foot small { display: inline; margin-left: 4px; }
  .app-topbar { min-height: 49px; padding-inline: 15px; }
  .role-label { display: none; }
  .app-content { padding: 25px 15px 33px; }
  .page-heading { margin-bottom: 15px; }
  .page-heading p { font-size: 13px; }
  .metric-grid { gap: 7px; }
  .metric-card { padding: 11px 12px; }
  .metric-card > strong { font-size: 29px; }
  .filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 13px; }
  .search-field { grid-column: 1/-1; }
  .table-meta { padding-inline: 13px; }
  .table td, .table th { padding-inline: 9px; }
  .table tr > :first-child { padding-left: 13px; }
  .account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; padding: 10px 14px; }
  .account-summary > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .audit-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .audit-list li > span:nth-child(2) { grid-column: 1/-1; grid-row: 2; }
  .login-shell { grid-template-columns: 1fr; max-width: 410px; }
  .login-intro > img { margin-bottom: 20px; }
  .login-demo-note { margin-top: 14px; }
  .field-row { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  .task-meta { flex-direction: column; align-items: end; gap: 3px; }
  .app-logo img { width: 116px; }
}

/* Workbench navigation and header */
:root { --sidebar: 226px; }
.sidebar { overflow-y: auto; }
.workspace-nav a > span { min-width: 0; }
.workspace-nav a.nav-future, .workspace-nav a[data-role-locked] { color: #626d80; }
.workspace-nav a[aria-current] { color: #103cc1; }
.nav-phase { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: none; color: #59657a; font-size: 10px; font-weight: 600; }
.nav-phase::before, .module-lock::before { content: ''; width: 7px; height: 6px; border: 1px solid currentColor; background: linear-gradient(currentColor, currentColor) center / 1px 2px no-repeat; border-radius: 1px; }
.nav-phase::before { box-shadow: 0 -2px 0 -1px #6a778b; }
.nav-icon { flex: none; }
.search-icon::before { width: 9px; height: 9px; top: 2px; left: 2px; border: 1.4px solid currentColor; border-radius: 50%; }
.search-icon::after { width: 6px; height: 1.4px; top: 10px; left: 9px; background: currentColor; border-radius: 1px; transform: rotate(45deg); transform-origin: left; }
.review-icon::before { width: 11px; height: 13px; border: 1.4px solid currentColor; border-radius: 2px; }
.review-icon::after { width: 6px; height: 4px; border: solid currentColor; border-width: 0 0 1.4px 1.4px; transform: translateY(-1px) rotate(-45deg); }
.inbox-icon::before { width: 14px; height: 11px; border: 1.4px solid currentColor; border-radius: 2px; }
.inbox-icon::after { width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.4px 1.4px 0; transform: translateY(-3px) rotate(45deg); }
.fulfillment-icon::before { width: 13px; height: 12px; top: 2px; border: 1.4px solid currentColor; border-radius: 2px; }
.fulfillment-icon::after { width: 5px; height: 5px; top: 2px; border: solid currentColor; border-width: 0 1.4px 1.4px; }
.bell-icon::before { width: 10px; height: 10px; top: 2px; border: 1.4px solid currentColor; border-radius: 6px 6px 2px 2px; }
.bell-icon::after { width: 4px; height: 2px; bottom: 1px; border-radius: 1px; background: currentColor; }

.app-topbar { z-index: 4; }
.topbar-path { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nav-toggle { display: none; }
#crumbs { min-width: 0; overflow: hidden; }
#crumbs strong { overflow: hidden; text-overflow: ellipsis; }
.session-actions { gap: 8px; flex: none; }
.top-menu { position: relative; }
.top-trigger { display: flex; align-items: center; gap: 6px; min-height: 35px; padding: 4px 8px; color: #364158; list-style: none; font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: 7px; cursor: pointer; }
.top-trigger::-webkit-details-marker { display: none; }
.top-trigger:hover, .top-menu[open] > .top-trigger { background: var(--page); }
.search-trigger { min-width: 118px; border: 1px solid var(--border); color: var(--muted); }
.notice-count { min-width: 19px; text-align: center; padding: 1px 5px; border-radius: 10px; background: var(--blue-soft); color: #123db9; font-size: 10px; font-variant-numeric: tabular-nums; }
#role-switch { min-height: 35px; max-width: 150px; font-size: 12px; }
.profile-trigger { padding: 2px; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #e9edf5; color: #354768; font-size: 13px; }
.pop-panel { position: absolute; z-index: 5; top: calc(100% + 9px); right: 0; width: min(370px, calc(100vw - 28px)); max-height: min(405px, 78dvh); overflow: auto; border: 1px solid var(--border); border-radius: 11px; background: white; box-shadow: 0 12px 30px #22345422; }
.search-panel { padding: 14px; }
.global-search { display: flex; gap: 7px; }
.global-search input { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid #d5dbe6; border-radius: 7px; color: var(--ink); }
.search-groups { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 11px; }
.search-groups .chip { font-size: 10px; }
.search-groups .search-active { background: var(--blue-soft); color: #123db9; }
.pop-help { padding: 15px 1px 2px; color: var(--muted); font-size: 12px; }
.search-matches { list-style: none; padding: 0; margin: 10px 0 0; }
.search-matches li { padding: 8px 2px; border-top: 1px solid var(--border); }
.search-matches li > span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.pop-heading { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.notice-panel .task-list { padding-inline: 15px; }
.notice-panel .task-meta { flex-direction: column; align-items: end; gap: 3px; }
.profile-panel { width: 185px; padding: 4px; }
.profile-heading { display: grid; padding: 7px 9px; border-bottom: 1px solid var(--border); }
.profile-panel button { display: block; width: 100%; padding: 8px 9px; text-align: left; border: 0; border-radius: 6px; background: white; color: var(--ink); font-size: 13px; }
.profile-panel button:hover { background: var(--page); }
.profile-dialog { width: min(445px, calc(100% - 22px)); }
.profile-body { padding: 17px 19px 22px; color: var(--muted); }
.deferred-panel { display: grid; justify-items: start; gap: 9px; padding: clamp(24px, 4vw, 40px); max-width: 650px; }
.deferred-panel .button { margin-top: 5px; }
.module-lock { display: grid; position: relative; place-items: center; width: 31px; height: 31px; border-radius: 8px; background: var(--blue-soft); color: #123db9; }
.module-lock::before { width: 11px; height: 9px; margin-top: 4px; }
.module-lock::after { content: ''; position: absolute; top: 7px; width: 7px; height: 6px; border: solid currentColor; border-width: 1px 1px 0; border-radius: 4px 4px 0 0; }
.task-chips { display: flex; flex-wrap: wrap; justify-content: end; gap: 5px; }
.stage-bars a { grid-template-columns: minmax(125px, .95fr) minmax(35px, 1.3fr) 22px; }
.stage-name { overflow: hidden; text-overflow: ellipsis; }
.country-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; margin: 0; padding: 8px 18px; gap: 4px 14px; }
.country-list a { display: flex; align-items: center; justify-content: space-between; padding: 7px 4px; font-size: 13px; }
.country-list a:hover { color: var(--blue); }
.country-list strong { color: #113aa5; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 11px 19px 5px; gap: 8px; }
.result-metrics dt, .result-caption { color: var(--muted); font-size: 12px; }
.result-metrics dd { font-size: 21px; font-weight: 680; }
.result-caption { padding: 0 19px 13px; }
.account-summary > div > .chip { justify-self: start; }
#terminal-note { margin-top: 4px; }

@media (min-width: 621px) and (max-width: 880px) {
  :root { --sidebar: 194px; }
  .workspace-nav a { font-size: 12px; }
  .search-trigger { min-width: 0; }
}
@media (min-width: 621px) and (max-width: 1030px) {
  .topbar-path .crumb-root { display: none; }
  .session-actions { gap: 4px; }
  #role-switch { max-width: 115px; }
}
@media (max-width: 620px) {
  .sidebar { overflow: visible; }
  .sidebar-top { display: block; }
  .workspace-nav { display: none; padding-top: 9px; }
  .sidebar[data-open] .workspace-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
  .workspace-nav a { min-height: 37px; }
  .workspace-nav a > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sidebar-foot { margin-top: 3px; }
  .app-topbar { display: grid; grid-template-columns: 1fr; align-items: start; gap: 5px; padding-block: 6px; }
  .nav-toggle { display: inline-flex; min-height: 29px; padding: 3px 7px; }
  .session-actions { justify-content: start; flex-wrap: wrap; gap: 5px; }
  .top-menu { position: static; }
  .top-trigger { min-height: 32px; padding-inline: 5px; }
  .search-trigger { min-width: 0; }
  #role-switch { max-width: 96px; min-height: 32px; }
  .pop-panel { inset: calc(100% + 6px) 12px auto 12px; width: auto; }
  .profile-panel { left: auto; width: 185px; }
}
@media (max-width: 359px) {
  .top-trigger .toolbar-text { display: none; }
  .top-trigger { padding-inline: 8px; }
}
