.pb-workspace, .pb-dialog {
  --pb-ink: #142c40;
  --pb-muted: #506477;
  --pb-rule: #d6dfe6;
  --pb-light: #f3f6f8;
  color: var(--pb-ink);
  min-width: 0;
}
.pb-workspace { border: 1px solid var(--pb-rule); background: #fff; }
.pb-nav, .pb-actions, .pb-head, .pb-filters, .pb-dialog-head, .pb-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.pb-nav { padding: .45rem .7rem; background: var(--pb-light); border-bottom: 1px solid var(--pb-rule); }
.pb-nav-item, .pb-button { font: inherit; font-size: .86rem; line-height: 1.25; font-weight: 650; cursor: pointer; }
.pb-button, .pb-nav-item {
  border: 1px solid var(--pb-rule); border-radius: .35rem; color: var(--pb-ink);
  background: #fff; padding: .48rem .72rem; min-height: 38px; max-width: 100%;
}
.pb-button:disabled { opacity: .55; cursor: default; }
.pb-button:hover:not(:disabled), .pb-nav-item:hover { background: #edf3f7; border-color: #8c9ead; }
.pb-primary, .pb-primary:hover:not(:disabled), .pb-nav-item[aria-current="page"] { color: #fff; background: #193a50; border-color: #193a50; }
.pb-primary:hover:not(:disabled) { background: #28536c; }
.pb-nav-item { border-color: transparent; background: transparent; }
.pb-badge { display: inline-block; margin-left: .4em; border-radius: 2em; background: #f9d9ac; color: #573913; min-width: 1.5em; padding: .08em .25em; }
.pb-workspace :focus-visible, .pb-dialog :focus-visible { outline: 3px solid #25749b; outline-offset: 2px; }
.pb-update { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: .65rem; padding: .65rem; background: #fff2dc; color: #573913; font-size: .85rem; }
.pb-panel { padding: clamp(.85rem,2vw,1.5rem); }
.pb-head { justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.pb-head h3, .pb-dialog-head h2 { line-height: 1.18; font-size: clamp(1.12rem,2vw,1.42rem); font-weight: 740; margin: 0; }
.pb-panel h4 { font-size: 1rem; margin: 1.25rem 0 .65rem; }
.pb-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,130px),1fr)); gap: .65rem; margin: 0 0 1.1rem; padding: 0; }
.pb-metric { min-width: 0; padding: .75rem; border: 1px solid var(--pb-rule); border-radius: .35rem; background: #f8fafb; }
.pb-metric dt { font-size: .775rem; color: var(--pb-muted); font-weight: 650; margin: 0 0 .32rem; }
.pb-metric dd { font-size: clamp(.99rem,1.7vw,1.35rem); line-height: 1.22; margin: 0; font-weight: 720; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.pb-warning { color: #873a27; border-color: #e3b8a8; background: #fff4ed; }
.pb-filters { margin: .75rem 0 1rem; }
.pb-filter { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .8rem; font-weight: 650; color: var(--pb-muted); }
.pb-filter select, .pb-field :is(input,textarea,select) {
  min-width: 0; width: 100%; min-height: 40px; border: 1px solid #9aadb9; border-radius: .3rem;
  padding: .45rem .55rem; font: inherit; color: var(--pb-ink); background: #fff; box-sizing: border-box;
}
.pb-filter select { width: auto; max-width: min(100%,22rem); }
.pb-group { border: 1px solid var(--pb-rule); border-radius: .3rem; margin: .45rem 0; overflow: clip; }
.pb-group-summary { display: flex; align-items: center; gap: .55rem; padding: .68rem .8rem; cursor: pointer; line-height: 1.3; }
.pb-group-summary::-webkit-details-marker { display: none; }
.pb-group-summary::before { content: "+"; font-size: 1.1rem; font-weight: 700; color: #48627a; }
.pb-group[open] > .pb-group-summary { border-bottom: 1px solid var(--pb-rule); background: var(--pb-light); }
.pb-group[open] > .pb-group-summary::before { content: "−"; }
.pb-group-name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: .94rem; font-weight: 650; }
.pb-group-total { font-size: .9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pb-list { margin: 0; padding: 0; list-style: none; }
.pb-row { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem .9rem; padding: .75rem .05rem; border-bottom: 1px solid var(--pb-rule); }
.pb-group .pb-row { padding-inline: .8rem; }
.pb-list > :last-child { border-bottom: 0; }
.pb-row-main { flex: 1 1 17rem; min-width: 0; overflow-wrap: anywhere; }
.pb-row-main strong { display: block; font-size: .92rem; }
.pb-detail, .pb-empty, .pb-hint { font-size: .82rem; line-height: 1.5; color: var(--pb-muted); }
.pb-detail { display: block; margin-top: .24rem; }
.pb-empty { background: var(--pb-light); margin: .65rem 0; border-radius: .3rem; padding: .8rem; }
.pb-hint { margin: .2rem 0 .55rem; }
.pb-error { color: #922f25; background: #fff1eb; border: 1px solid #dfb8a9; padding: .6rem .75rem; font-size: .87rem; overflow-wrap: anywhere; }
.pb-dialog {
  position: fixed; inset: 0; margin: auto; width: min(37rem, calc(100vw - 1.6rem)); max-width: calc(100vw - 1.6rem);
  max-height: calc(100dvh - 2rem); padding: 0; overflow-y: auto; border: 1px solid var(--pb-rule);
  border-radius: .55rem; background: #fff; box-shadow: 0 16px 50px #12253438; color-scheme: light;
}
.pb-dialog::backdrop { background: #12263875; }
.pb-dialog[open] { display: block; }
.pb-dialog-head { flex-wrap: nowrap; justify-content: space-between; padding: 1rem 1.1rem; border-bottom: 1px solid var(--pb-rule); }
.pb-dialog-head h2 { overflow-wrap: anywhere; }
.pb-form { padding: 1rem 1.1rem; }
.pb-form-body { display: grid; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: .85rem .8rem; }
.pb-field { display: grid; gap: .35rem; min-width: 0; font-size: .87rem; font-weight: 580; }
.pb-field textarea { resize: vertical; }
.pb-field :disabled { background: #f0f3f5; }
.pb-wide { grid-column: 1 / -1; }
.pb-line-links { margin: 0; }
.pb-line-link-fields { padding: .8rem; }
.pb-line-link-fields .pb-hint { margin: 0; }

.pb-check { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; font-weight: 530; }
.pb-check input { width: 1.1rem; height: 1.1rem; min-height: unset; accent-color: #25455c; flex: none; }
.pb-preview { background: #eaf2f2; color: #183f45; padding: .65rem; border-radius: .3rem; font-size: .9rem; font-weight: 650; }
.pb-dialog-actions { margin-top: 1rem; justify-content: flex-end; }
.pb-dialog [hidden], .pb-workspace [hidden] { display: none !important; }
@media (max-width: 620px) {
  .pb-nav { gap: .15rem; padding: .4rem; }
  .pb-nav-item { padding: .4rem .48rem; }
  .pb-head { align-items: flex-start; }
  .pb-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
  .pb-filter { flex-wrap: wrap; }
  .pb-filter select { max-width: 100%; }
  .pb-actions { gap: .35rem; }
  .pb-group-summary { flex-wrap: wrap; }
  .pb-group-total { margin-left: auto; }
  .pb-form-body { grid-template-columns: 1fr; }
  .pb-button, .pb-nav-item { min-height: 42px; }
}
@media (forced-colors: active) {
  .pb-nav-item[aria-current] { border: 2px solid Highlight; }
}
