:root {
  --blue: #2658db;
  --ink: #182b4b;
  --muted: #566780;
  --line: #e5ebf4;
  --bg: #f5f7fb;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 system-ui, sans-serif; }
#sidebar { position: fixed; inset: 0 auto 0 0; width: 198px; background: white; border-right: 1px solid var(--line); padding: 22px 12px 18px; }
#sidebar a { text-decoration: none; }
main { margin-left: 198px; }
header, .heading, .actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
header { border-bottom: 1px solid var(--line); padding-bottom: 12px; }
h1, h2 { margin: 0; }
h1 { font-size: 28px; }
h2 { font-size: 18px; }
p, dt, header { color: var(--muted); }
.heading { margin: 12px 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: white; }
.raw-read-ledger { margin-top: 16px; }
.badge { border-radius: 100px; padding: 4px 9px; color: #825314; background: #fff4e5; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; }
dd { margin: 0; overflow-wrap: anywhere; }
.actions { justify-content: flex-start; }
button, input, select { font: inherit; border: 1px solid #ccd6e7; border-radius: 7px; padding: 8px 10px; background: white; color: var(--ink); }
button { cursor: pointer; }
button.primary { color: white; background: var(--blue); border-color: var(--blue); }
button:disabled { cursor: wait; opacity: .55; }
label { display: grid; gap: 5px; margin: 10px 0; }
input, select { min-width: 0; }
#status, #dialog-status, #login-status { background: #eef3ff; padding: 10px; border-radius: 7px; overflow-wrap: anywhere; }
.binding { border-top: 1px solid var(--line); overflow-wrap: anywhere; }
@media (max-width: 760px) {
  main { margin: 0; }
  .grid { grid-template-columns: 1fr; }
}
body:has(#workspace[hidden]) > aside { display: none; }
body:has(#workspace[hidden]) > main { margin: 0; padding: 0; }
.login-shell {
  display: grid;
  grid-template-columns: 43fr 57fr;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fdfdfd;
}
.login-art {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  overflow: hidden;
  background: linear-gradient(145deg, #2044a8, #3561dc);
  color: white;
  padding: clamp(28px, 2.35vw, 45px);
}
.login-art::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -180px;
  bottom: -210px;
  width: 550px;
  aspect-ratio: 1;
  border: 65px solid #ffffff0b;
  border-radius: 50%;
}
.login-brand { display: flex; align-items: center; align-self: start; gap: 11px; }
.login-brand strong { font-size: 16px; }
.login-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 11px;
  background: #ffffff1c;
}
.login-mark svg { width: 23px; height: 23px; }
.login-brand-caption, .login-eyebrow { display: block; text-transform: uppercase; font-weight: 700; letter-spacing: .18em; }
.login-brand-caption { margin-top: 3px; font-size: 7px; color: #d2ddfc; }
.login-message { margin-top: 24px; }
.login-art p { color: #d2ddfc; }
.login-eyebrow { margin: 0 0 22px; font-size: 10px; }
.login-message h1 { white-space: pre-wrap; overflow-wrap: anywhere; font-size: clamp(31px, 2.1vw, 40px); line-height: 1.65; font-weight: 800; }
.login-message h1 + p { margin: 24px 0 0; overflow-wrap: anywhere; }
.login-environment { align-self: end; margin: 0; font-size: 11px; }
.login-form {
  align-self: center;
  justify-self: center;
  width: min(calc(100% - 48px), 390px);
  min-width: 0;
}
.login-form h2 { font-size: 28px; font-weight: 750; }
.login-form > p:first-of-type { margin: 8px 0 34px; color: #7183a3; }
.login-form label { margin: 0 0 18px; gap: 7px; font-weight: 600; }
.login-form input { height: 44px; background: #fdfdfd; font-weight: 400; }
.login-form button { width: 100%; min-height: 45px; font-weight: 700; box-shadow: 0 3px 6px #2658db18; }
.account-table { overflow-x: auto; }
.account-table table { width: 100%; border-collapse: collapse; text-align: left; }
.account-table th, .account-table td { padding: 10px; border-bottom: 1px solid var(--line); }
.account-table button { margin: 3px; }
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-art { grid-template-rows: auto; gap: 18px; padding: 24px; }
  .login-message { margin-top: 0; }
  .login-eyebrow { margin-bottom: 8px; }
  .login-message h1 { line-height: 1.35; }
  .login-message h1 + p { margin-top: 10px; }
  .login-form { margin-block: 24px; }
}
.credential-form { margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.credential-form fieldset { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 0 12px; border: 0; padding: 0; margin: 0 0 8px; }
.credential-form input:disabled { background: #edf0f5; color: #54647a; cursor: default; }
.credential-form input:disabled::placeholder { color: #54647a; opacity: 1; }
.tencent-sheet-scope {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 0 12px;
}
.binding { overflow-wrap: anywhere; }
#dialog-body textarea { font: inherit; width: 100%; resize: vertical; border: 1px solid #ccd6e7; border-radius: 7px; padding: 8px 10px; }
#dialog-body details { padding: 8px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }

/* P1.3 workspace and API source card dimensions. */
#workspace { --workspace-inset: 34px; }
#workspace > header {
  min-height: 76px;
  background: white;
  padding: 12px var(--workspace-inset);
  gap: 20px;
}
#workspace > header .account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
#workspace > section { padding: 29px var(--workspace-inset) 40px; }
#sources-page > .heading { gap: 18px; margin: 0 0 23px; }
#sources-page > .heading h1 { font-size: 25px; line-height: 1.6; }
#sources-page > .heading p { margin: 6px 0 0; font-size: 12px; }
#sources-page > .grid { gap: 20px; }
.source-card { padding: 23px; border-radius: 10px; }
.source-card .heading { margin: 0; }
.source-card h2 { font-size: 16px; line-height: 1.6; }
.source-card p, .source-card dl { font-size: 12px; }
.source-card dl { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; margin: 20px 0; }
.source-card .actions button { padding: 8px 14px; font-size: 12px; line-height: 1.6; }
@media (max-width: 1200px) {
}
@media (max-width: 1100px) {
  #workspace { --workspace-inset: 24px; }
  #workspace > section { padding-block: 24px; }
}
@media (max-width: 760px) {
  #workspace { --workspace-inset: 16px; }
  #workspace > section { padding-block: 22px; }
  #sources-page > .heading h1 { font-size: 23px; }
}

/* P1.3 sidebar brand and desktop collapsed dimensions. */
#sidebar { z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 0 3px 14px; }
.sidebar-brand strong { font-size: 13px; letter-spacing: .5px; }
.sidebar-brand small { display: block; font-size: 9px; letter-spacing: 2px; color: #718098; }
.sidebar-brand .login-mark { width: 33px; height: 33px; border-radius: 9px; flex-shrink: 0; background: #2658db; color: white; }
.sidebar-brand .login-mark svg { width: 19px; height: 19px; }
#sidebar-toggle { position: absolute; right: -12px; top: 112px; width: 25px; height: 27px; padding: 0; border-color: #dce4f1; color: var(--blue); box-shadow: 0 3px 8px #182b4b10; }
#system-navigation :is(a,#system-nav) { display: flex; align-items: center; gap: 8px; }
#system-navigation svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
@media (min-width: 761px) {
  body.nav-collapsed:has(#workspace:not([hidden])) > aside { width: 68px; padding-inline: 9px; }
  body.nav-collapsed:has(#workspace:not([hidden])) > main { margin-left: 68px; }
  .nav-collapsed .sidebar-brand { justify-content: center; }
  .nav-collapsed .sidebar-brand > div, .nav-collapsed #sidebar > p, .nav-collapsed #system-navigation a span { display: none; }
  .nav-collapsed #system-navigation a { justify-content: center; padding: 9px 0; }
}
@media (max-width: 760px) {
  #sidebar-toggle { display: none; }
}

.attendance-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.source-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-top: 12px; padding: 8px 10px; border-radius: 7px; background: #eef3ff; color: var(--muted); font-size: 12px; }
.source-notice button { border: 0; padding: 0 5px; background: transparent; font-size: 16px; line-height: 1.2; }
#business-navigation :is(a,.workspace-nav-group) { display: flex; align-items: center; gap: 8px; }
#business-navigation svg { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; }
#data-page .account-table { margin-top: 12px; }
#data-page .account-table td { white-space: nowrap; }
@media (min-width: 761px) {
  .nav-collapsed #business-navigation :is(a,.workspace-nav-group) span { display: none; }
  .nav-collapsed #business-navigation :is(a,.workspace-nav-group) { justify-content: center; padding: 9px 0; }
}
#data-page .batch-controls, .batch-controls { white-space: normal; }
.batch-controls > a { display: inline-block; margin: 4px 5px; padding: 7px 10px; border: 1px solid #ccd6e7; border-radius: 7px; color: var(--blue); text-decoration: none; }
.batch-controls > button { margin: 4px 5px 4px 0; }
.history-line { padding: 9px 0; border-bottom: 1px solid var(--line); }
.plan-preview-table { margin: 10px 0; }
.plan-preview-table th { white-space: nowrap; }
.plan-preview-table table { width: max-content; min-width: 100%; }
.plan-preview-value { vertical-align: middle; }
.plan-preview-value > span { display: block; white-space: pre; }
.plan-preview-table details { min-width: 110px; }
.plan-preview-toolbar { align-items: flex-end; }
.plan-preview-toolbar select,
.plan-preview-toolbar > a { height: 40px; }
.plan-preview-toolbar > a {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
#dialog-heading-actions {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  min-width: 0;
}
.plan-preview-summary { color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  #dialog-heading-actions { flex-basis: 100%; order: 1; }
  #dialog-heading-actions select { max-width: 100%; }
}
#data-page [data-batch-kind][aria-current="page"] {
  background: #eef3ff;
  color: var(--blue);
  border-color: #b8cbfb;
  font-weight: 650;
}
#data-page .batch-verification {
  background: #fff4e5;
  border-color: #efdbba;
  color: #825314;
  padding: 4px 9px;
}

.people-heading { margin: 0 0 23px; gap: 20px; }
.people-eyebrow { font-size: 10px; letter-spacing: 2px; color: #8a9ab4; margin-bottom: 3px; }
.people-download { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; text-decoration: none; }
.people-heading h1 { font-size: 25px; line-height: 1.6; }
.people-heading p { margin: 6px 0 0; font-size: 12px; }
.people-fields { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.people-metrics { display: flex; flex: 1; justify-content: center; gap: 22px; }
.people-metrics section { min-width: 80px; border-left: 1px solid #dfe6f1; padding-left: 16px; }
.people-metrics span { display: block; color: #718098; font-size: 10px; white-space: nowrap; }
.people-metrics strong { display: block; margin-top: 2px; font-size: 20px; }
@media (max-width: 1200px) {
  .people-metrics { justify-content: flex-start; order: 3; flex-basis: 100%; }
  .people-metrics section { flex: 1; }
}
.people-filters { margin-bottom: 14px; }
.people-sort { background: transparent; border: 0; font-weight: 600; padding: 0; }
.people-card td button { margin: 2px; }
@media (max-width: 760px) {
  .people-heading h1 { font-size: 23px; }
  .people-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people-metrics { flex-wrap: wrap; gap: 8px; }
  .people-metrics section { min-width: 40%; padding-left: 10px; }
  .people-metrics strong { font-size: 18px; }
}
.people-detail-tabs { border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.people-detail-tabs button { border: 0; border-radius: 0; }
.people-detail-tabs button[aria-pressed="true"] { color: var(--blue); box-shadow: inset 0 -2px var(--blue); }
.people-fields dd { margin: 6px 0 0; }
.standards-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 17px; margin-bottom: 20px; }
.standards-card { padding: 21px; border: 1px solid var(--line); border-radius: 9px; background: white; text-align: left; }
.standards-card[aria-pressed="true"] { border-color: #7b9de9; background: #f7faff; }
.standards-card h3 { font-size: 15px; margin: 9px 0 8px; }
.standards-card p { font-size: 11px; color: #8a99af; margin: 0; }
.standards-card-state { margin-top: 10px; }
.standards-date { font-size: 10px; letter-spacing: 1px; color: #7794ca; }
.standard-matrix td, .standard-matrix th { white-space: nowrap; }
.standard-matrix input { width: 90px; min-width: 80px; margin: 0; padding: 6px; border-radius: 6px; font-size: 12px; color: #52647e; }
.standards-table-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 20px; color: #95a0b2; font-size: 11px;
}
.standards-table-footer > div { display: flex; gap: 6px; align-items: center; }
.standards-page-number { padding: 2px 8px; border-radius: 4px; color: var(--blue); background: #eef3ff; }
.standards-subheading { margin: 1px 0 19px; font-size: 13px; font-weight: 600; }
.standards-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 18px; padding: 12px 15px; border-radius: 7px;
  background: #f0f5ff; color: #6681ae; font-size: 12px; line-height: 1.8;
}
.standards-note svg { width: 16px; height: 16px; margin-top: 2px; flex: none; }
.standards-metadata label { display: block; margin: 0; color: #9aa6b9; font-size: 11px; }
.standards-metadata input { width: 100%; min-width: 0; margin-top: 7px; padding: 8px 11px; border-radius: 6px; border-color: #e0e6f0; font-size: 12px; color: #52647e; }
.standards-metadata { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin-bottom: 22px; }
.standards-formulas { margin-top: 22px; }
@media (max-width: 760px) {
  .standards-metadata { grid-template-columns: 1fr; }
}

/* Shared P1.3 workspace. */
body.p13-workspace {
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sub: #718098;
}
.p13-workspace #workspace > section { padding-block: 29px 40px; }
.p13-workspace #workspace > header .account-actions button,
.p13-workspace .people-heading button,
.p13-workspace .people-download,
.p13-workspace .people-profile-header button,
.p13-workspace .people-filters button,
.p13-workspace .people-row-actions button {
  border: 1px solid #dfe5ee; border-radius: 7px; background: white; padding: 8px 14px;
  color: #50617a; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; white-space: nowrap; line-height: 1.6;
}
.p13-workspace .people-heading button.primary {
  background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 3px 8px #2658db17;
}
.p13-workspace #breadcrumb { display: flex; align-items: center; gap: 10px; color: #8a96a8; font-size: 12px; }
.p13-workspace #breadcrumb span:nth-child(2) { color: #c2cbd9; }
.p13-workspace #breadcrumb b { color: #51627b; font-weight: 500; }
.workspace-crumb { display: flex; align-items: center; gap: 9px; }
#workspace-mobile-nav { display: none; }
#workspace-preview-banner {
  display: flex; align-items: center; gap: 10px; background: #f0f4fc; color: #667996;
  border-bottom: 1px solid #e5ebf5; padding: 7px var(--workspace-inset); font-size: 11px;
}
#workspace-preview-banner strong { color: #365a9d; }
.p13-workspace #sidebar { display: flex; flex-direction: column; }
.p13-workspace #sidebar > p {
  margin: 0; padding: 11px 14px 9px; font-size: 11px; color: #99a4b6; letter-spacing: 1.5px;
}
.p13-workspace #sidebar nav :is(a,#system-nav,.workspace-nav-group) {
  padding: 8px 10px; gap: 9px; border-radius: 8px; font-size: 12px; background: transparent; color: #607087;
}
.p13-workspace #sidebar nav :is(a,#system-nav,.workspace-nav-group):hover { background: #f5f7fc; }
.p13-workspace #sidebar nav :is(a,#system-nav,.workspace-nav-group)[aria-current="page"] { background: #eef3ff; color: var(--blue); font-weight: 650; }
#workspace-preview-footer { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 10px 0; font-size: 11px; color: #718098; }
.p13-workspace .people-heading h1 { letter-spacing: .4px; font-weight: 650; }
.p13-workspace .people-heading p { color: var(--sub); }
.p13-workspace .people-heading .actions { gap: 9px; }
.people-metrics strong { font-weight: 650; font-variant-numeric: tabular-nums; }
.people-metrics strong small { font-size: 10px; font-weight: 400; margin-left: 5px; color: #8b97ab; }
#people-page .people-card {
  padding: 0; border-radius: 11px; box-shadow: 0 12px 36px #1c376c0b; overflow: hidden;
}
:is(#people-page, #payroll-page) .people-filters {
  padding: 17px 20px; gap: 12px; margin: 0; border-bottom: 1px solid var(--line);
}
:is(#people-page, #payroll-page) .people-filters :is(input, select) {
  border: 1px solid #e0e6f0; border-radius: 6px; padding: 8px 11px; min-width: 120px;
  font-size: 12px; background: white; color: #52647e;
}
:is(#people-page, #payroll-page) .people-filters input { min-width: 230px; }
:is(#people-page, #payroll-page) .people-filters input::placeholder { color: #99a4b6; }
.people-sort-hint { margin-left: auto; color: #718098; font-size: 11px; }
#people-page .people-card table { white-space: nowrap; }
#people-page .people-card th {
  background: #f8fafe; color: #8a96aa; font-size: 11px; font-weight: 500;
  padding: 12px 18px; border-bottom: 1px solid var(--line);
}
#people-page .people-card td { padding: 15px 18px; border-bottom: 1px solid #eff2f7; font-size: 12px; color: #53647d; }
#people-page .people-card:not(.people-detail-card) tbody tr:last-child td { border-bottom: 0; }
#people-page .people-card td strong { color: #30425e; font-weight: 550; }
#people-page .people-sort { font-weight: inherit; color: inherit; border-radius: 0; }
.p13-workspace :is(#people-page, #payroll-page) .people-filters button,
.p13-workspace #people-page .people-row-actions button { padding: 5px 10px; font-size: 11px; margin: 0; }
#people-page .people-row-actions { gap: 9px; flex-wrap: nowrap; }
.p13-workspace #people-page .people-row-actions .people-danger { color: #d04d5b; }
.people-table-footer { padding: 13px 20px; color: #95a0b2; font-size: 11px; }
.people-person { display: flex; align-items: center; gap: 10px; }
.people-initial {
  display: grid; place-items: center; width: 33px; height: 33px; flex: none; border-radius: 10px;
  background: #edf2ff; color: #6483c2; font-size: 12px;
}
.people-person small { display: block; font-size: 10px; color: #9aa6b8; margin-top: 2px; }
.people-badge { display: inline-flex; align-items: center; border-radius: 4px; padding: 3px 7px; font-size: 10px; background: #f1f3f7; color: #8b96a6; white-space: nowrap; }
.people-badge.active { background: #ebf7f1; color: #298365; }
.people-badge.inactive { background: #fff6e8; color: #b9893a; }
.people-badge.scheme { background: #edf3ff; color: #4776ce; }
.people-profile-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 21px; }
.people-profile { gap: 18px; }
.people-profile .people-initial { flex: 0 1 auto; width: 58px; height: 58px; border-radius: 15px; font-size: 22px; }
.people-profile h2 { margin: 0; font-size: 21px; font-weight: 650; overflow-wrap: anywhere; }
.people-profile-employment { vertical-align: middle; }
.people-profile p { margin: 5px 0 0; font-size: 11px; color: #91a0b7; }
.p13-workspace .people-profile-header .actions { gap: 9px; }
.p13-workspace .people-profile-header .actions button:not(.people-profile-edit) { padding: 5px 10px; font-size: 11px; }
.people-heading .people-download > span { margin-right: 7px; }
#people-page .people-detail-tabs { flex-wrap: nowrap; overflow: auto; gap: 25px; padding: 0 21px; margin: 0; }
#people-page .people-detail-tabs button { padding: 15px 1px 13px; border: 0; border-bottom: 2px solid transparent; font-size: 12px; color: #8a96a9; white-space: nowrap; }
#people-page .people-detail-tabs button[aria-pressed="true"] { color: var(--blue); border-color: var(--blue); box-shadow: none; font-weight: 600; }
.people-detail-content { padding: 22px; }
.people-detail-content h3 { margin: 1px 0 19px; font-size: 13px; font-weight: 600; }
.people-detail-content .people-fields { margin: 0; gap: 23px 30px; }
.people-detail-content .people-fields dt { margin-bottom: 7px; font-size: 11px; color: #9aa6b9; }
.people-detail-content .people-fields dd { margin: 0; font-size: 13px; color: #4b5f7c; }
.people-detail-identities { margin-top: 30px; }
.people-detail-note {
  border-radius: 7px; padding: 12px 15px; display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; line-height: 1.8; background: #f0f5ff; color: #6681ae; margin-bottom: 18px;
}
.people-detail-table-footer + .people-detail-note { margin-bottom: 0; }
.people-detail-note svg {
  flex: 0 0 16px; width: 16px; height: 16px; margin-top: 2px;
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
:is(#people-page, #modal.p13-form-dialog) td.people-detail-empty { padding: 15px 18px; color: #53647d; }
:is(.people-detail-empty-content, .workspace-table-empty) { padding: 48px 20px; color: #8c9bb3; text-align: center; }
.people-detail-table .people-detail-change { min-width: 150px; white-space: normal; overflow-wrap: anywhere; }
.people-detail-history small { font-size: 10px; color: #718098; }
.people-detail-table-footer { display: flex; align-items: center; justify-content: space-between; }
.people-detail-table-footer > span:last-child { display: flex; align-items: center; gap: 6px; }
.people-detail-page { padding: 2px 8px; border-radius: 4px; color: var(--blue); background: #eef3ff; }
.people-detail-actions { margin-top: 13px; gap: 9px; }
.people-detail-table-footer + .people-detail-actions { margin-top: 0; }
#people-page .people-detail-content :is(.people-detail-table, .people-detail-actions) :is(button, .people-download) {
  border: 1px solid #dfe5ee; border-radius: 7px; background: #fff; padding: 8px 14px; margin: 0;
  color: #50617a; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12px; line-height: 1.6; white-space: nowrap;
}
#people-page .people-detail-content .people-detail-table :is(button, .people-download) { padding: 5px 10px; font-size: 11px; }
#people-page .people-detail-content :is(.people-detail-table, .people-detail-actions) :is(button, .people-download):hover {
  border-color: #adc0ed; color: var(--blue);
}
#people-page .people-detail-content .people-detail-actions .people-detail-soft {
  background: #eef3ff; border-color: transparent; color: var(--blue);
}
.people-detail-formula {
  background: #f7f9fd; padding: 14px 17px; border-radius: 7px; font-size: 12px; color: #5c7498; margin: 13px 0;
}
.people-compensation-pending {
  border-left: 3px solid var(--blue); padding: 10px 15px; background: #f4f7ff; margin-bottom: 18px;
  overflow-wrap: anywhere;
}
.people-compensation-pending p { margin: 5px 0; font-size: 12px; color: inherit; }
.people-detail-versions { margin-top: 13px; font-size: 12px; color: #53647d; }
.personnel-dialog-grid.personnel-status-form { grid-template-columns: minmax(0, 1fr); gap: 22px; }
.people-status-note { background: #fff8ed; color: #a47b40; }
.people-status-person { color: var(--ink); }
#dialog-form-footer .people-danger { color: #d04d5b; }
@media (max-width: 760px) {
  .people-detail-content .people-fields { gap: 18px; }
}
@media (min-width: 761px) {
  .p13-workspace.nav-collapsed #workspace-preview-footer, .p13-workspace.nav-collapsed #sidebar > p { display: none; }
}
@media (max-width: 1100px) {
  .p13-workspace #workspace > section { padding-block: 24px 40px; }
  .people-detail-content .people-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .p13-workspace #workspace > section { padding-block: 22px 40px; }
  .p13-workspace #sidebar { position: fixed; inset: 0 auto 0 0; width: 198px; padding: 22px 12px 18px;
    transform: translateX(-100%); transition: transform .2s; box-shadow: 10px 0 40px #182b4b20; }
  .p13-workspace.workspace-nav-open #sidebar { transform: translateX(0); }
  .p13-workspace #sidebar > p { display: block; }
  .p13-workspace #workspace-mobile-nav { display: inline-flex; padding: 5px 10px; font-size: 11px; }
  #workspace-preview-banner { padding-block: 8px; font-size: 10px; }
  #workspace-preview-banner span { display: none; }
  :is(#people-page, #payroll-page) .people-filters input { min-width: 170px; }
  #people-page .people-detail-tabs { gap: 20px; }
}
#people-page .people-card .people-sort { display: flex; align-items: center; gap: 9px; margin: 0; }
#people-page .people-sort span { color: #9aaed0; }

/* Shared P1.3 components for the isolated workspace pages. */
.workspace-eyebrow, .workspace-source-note { display: none; }
.p13-workspace .workspace-eyebrow {
  display: block; font-size: 10px; letter-spacing: 2px; color: #8a9ab4; margin-bottom: 3px;
}
.workspace-user { order: 1; display: flex; align-items: center; gap: 9px; min-width: 0; color: #4776ce; font-size: 12px; }
.workspace-user > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #eaf0ff; flex: none; }
.workspace-user > div { min-width: 0; overflow-wrap: anywhere; }
.workspace-user small { display: block; color: var(--sub); font-size: 10px; }
.p13-workspace #workspace > header .account-actions button { padding: 5px 10px; font-size: 11px; }
.p13-workspace :is(#data-page,#system-page,#account-landing) > .heading { margin: 0 0 23px; gap: 18px; }
.p13-workspace :is(#data-page,#system-page,#account-landing) > .heading h1 {
  font-size: 25px; line-height: 1.6; letter-spacing: .4px; font-weight: 650;
}
.p13-workspace :is(#data-page,#system-page,#account-landing) > .heading p { margin: 6px 0 0; color: var(--sub); font-size: 12px; }
.p13-workspace :is(#data-page,#system-page,#sources-page,#standards-page) .card {
  border-radius: 11px; box-shadow: 0 12px 36px #1c376c0b;
}
.p13-workspace #data-page > .card,
.p13-workspace #system-page .system-layout > section,
.p13-workspace #sources-page .raw-read-ledger { padding: 0; overflow: hidden; }
.p13-workspace #data-page > .card > nav {
  display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 25px; padding: 0 21px;
  border-bottom: 1px solid var(--line);
}
.p13-workspace #data-page > .card > nav button {
  padding: 15px 1px 13px; border: 0; border-bottom: 2px solid transparent;
  border-radius: 0; background: transparent; font-size: 12px; color: #8a96a9; white-space: nowrap;
}
.p13-workspace #data-page > .card > nav button[aria-current="page"] { color: var(--blue); border-color: var(--blue); font-weight: 600; }
.workspace-batch-filters { padding: 17px 20px; gap: 12px; border-bottom: 1px solid var(--line); }
.workspace-batch-filters select {
  min-width: 120px; padding: 8px 11px; border: 1px solid #e0e6f0; border-radius: 6px; font-size: 12px; color: #52647e;
}
.workspace-batch-filters span { margin-left: auto; color: var(--sub); font-size: 11px; }
.p13-workspace #attendance-batches { margin-top: 0; }
.p13-workspace :is(#attendance-batches,#account-list,#audit-list,#raw-read-list,#standards-page) table { white-space: nowrap; }
.p13-workspace :is(#attendance-batches,#account-list,#audit-list,#raw-read-list,#standards-page) th {
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: #f8fafe; color: #8a96aa;
  font-size: 11px; font-weight: 500;
}
.p13-workspace :is(#attendance-batches,#account-list,#audit-list,#raw-read-list,#standards-page) td {
  padding: 15px 18px; border-bottom: 1px solid #eff2f7; color: #53647d; font-size: 12px;
}
.p13-workspace :is(#attendance-batches,#account-list,#audit-list,#raw-read-list,#standards-page) tbody tr:last-child td { border-bottom: 0; }
.p13-workspace :is(#data-page,#system-page,#sources-page) .account-table button,
.p13-workspace :is(#data-page,#system-page,#sources-page) .account-table a {
  padding: 5px 10px; margin: 0 4px 0 0; font-size: 11px;
}
.p13-workspace .workspace-empty, .p13-workspace #raw-read-list > p { margin: 0; padding: 18px 21px; font-size: 12px; }
.p13-workspace #data-page button.batch-verification { padding: 3px 7px; font-size: 10px; border: 0; border-radius: 4px; }
.p13-workspace #data-page button.batch-verification[data-status="已发布"] { background: #ebf7f1; color: #298365; }
.p13-workspace :is(#system-page .system-layout > section,#sources-page .raw-read-ledger) > .heading {
  margin: 0; padding: 18px 21px; gap: 15px;
}
.p13-workspace :is(#system-page .system-layout > section,#sources-page .raw-read-ledger) > .heading h2 {
  font-size: 14px; font-weight: 650;
}
.p13-workspace .workspace-source-note {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; padding: 12px 15px;
  border-radius: 7px; background: #fff8ed; color: #a47b40; font-size: 12px; line-height: 1.8;
}
.p13-workspace .workspace-source-note::before { content: "⚠"; flex: 0 0 16px; }
.p13-workspace #sources-page > .heading h1 { letter-spacing: .4px; font-weight: 650; }
.p13-workspace #sources-page .source-card { border-radius: 10px; box-shadow: none; }
.p13-workspace #sources-page .source-card > p { color: #8c9ab0; }
.p13-workspace #sources-page .source-card dt { color: #9ba7b9; }
.p13-workspace #sources-page .source-card dd { color: #5e718e; }
.p13-workspace #sources-page .source-card .badge { padding: 3px 7px; border-radius: 4px; font-size: 10px; }
.p13-workspace :is(#data-page,#system-page,#sources-page) > .heading button,
.p13-workspace :is(#system-page .system-layout > section,#sources-page .raw-read-ledger) > .heading button {
  padding: 8px 14px; font-size: 12px; white-space: nowrap;
}
.p13-workspace #standards-page .standards-panel { padding: 0; }
.standards-card-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 18px 21px; }
.standards-card-header h2 { margin: 0; font-size: 14px; font-weight: 650; }
.standards-badge { display: inline-flex; padding: 3px 7px; border-radius: 4px; white-space: nowrap; font-size: 10px; }
.standards-badge.muted { background: #f1f3f7; color: #8b96a6; }
.standards-badge.blue { background: #edf3ff; color: #4776ce; }
.standards-tab-body { padding: 22px; }
.standards-formula-body { padding: 0 21px 21px; }
.standards-formula-body p:not(.standards-formula) { font-size: 11px; color: var(--sub); }
.standards-formula { margin: 13px 0; padding: 14px 17px; border-radius: 7px; font-size: 12px; color: #5c7498; background: #f7f9fd; }
.standards-draft { margin-bottom: 18px; padding: 10px 15px; border-left: 3px solid var(--blue); background: #f4f7ff; font-size: 11px; }
.standards-draft p { margin: 5px 0; font-size: 12px; overflow-wrap: anywhere; }
.standards-draft-actions { margin-top: 13px; }
#standards-page .people-heading { gap: 18px; }
.standards-tab-body details { color: var(--sub); font-size: 11px; }
@media (max-width: 480px) {
  .p13-workspace #workspace > header { min-height: 157.6px; row-gap: 12px; }
  .p13-workspace #workspace > header .account-actions {
    flex-basis: 100%; justify-content: flex-start; margin-left: 0;
  }
  .p13-workspace #workspace > header .workspace-user { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .p13-workspace #standards-page .people-heading h1 { font-size: 23px; }
}
/* P1.3 shared dialog shell with a scrollable body and a fixed action area. */
#modal.p13-form-dialog {
  width: min(700px, calc(100% - 34px)); max-height: calc(100dvh - 24px); padding: 0;
  border: 0; border-radius: 13px; background: white; color: inherit; box-shadow: 0 24px 100px #122d5940;
}
#modal.p13-form-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
#modal.p13-form-dialog.config-wide {
  width: calc(100vw - 48px); max-width: 1680px;
  height: calc(100dvh - 48px); max-height: calc(100dvh - 48px);
}
#modal.p13-form-dialog::backdrop { background: #152c4c55; backdrop-filter: blur(3px); }
.p13-workspace #modal.p13-form-dialog > .heading {
  margin: 0; gap: 12px; border-bottom: 1px solid var(--line); padding: 21px 25px; flex-shrink: 0; flex-wrap: nowrap;
}
.p13-workspace #modal.p13-form-dialog > .heading:has(#dialog-heading-actions:not([hidden])) { flex-wrap: wrap; }
.p13-workspace #modal.p13-form-dialog > .heading #close { margin-left: auto; }
.p13-workspace #modal.p13-form-dialog #dialog-title { font-size: 17px; font-weight: 700; }
.p13-workspace #modal.p13-form-dialog #close {
  border: 0; background: #f2f5fa; color: #7e8da3;
  border-radius: 6px; padding: 4px 8px; font-size: 14px;
}
.p13-workspace #modal.p13-form-dialog #dialog-body {
  flex: 1; min-height: 0; overflow: auto; padding: 24px 25px;
}
#modal.p13-form-dialog #dialog-status { margin: 0 25px 12px; }
.personnel-dialog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 23px 30px; }
.config-wide .personnel-dialog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.personnel-dialog-grid label { display: block; margin: 0; font-size: 11px; color: #9aa6b9; }
.personnel-dialog-grid :is(input, select), #modal.p13-form-dialog #personnel-dialog-form input[name="code"] {
  display: block; width: 100%; min-width: 0; margin-top: 7px; padding: 8px 11px;
  border-color: #e0e6f0; border-radius: 6px; color: #52647e; font-size: 12px;
}
.p13-form-dialog #personnel-dialog-form > .people-download { margin: 13px 0; }
.p13-form-dialog #personnel-dialog-form .people-detail-table td { max-width: 220px; white-space: normal; overflow-wrap: anywhere; }
.p13-form-dialog #personnel-dialog-form:not(.personnel-dialog-grid) > label { font-size: 12px; }
.p13-form-dialog .personnel-purge-check { display: flex; align-items: center; gap: 8px; }
#dialog-form-footer {
  display: flex; justify-content: flex-end; align-items: center; flex-shrink: 0; gap: 10px;
  padding: 15px 25px; border-top: 1px solid var(--line);
}
#dialog-form-footer button {
  padding: 8px 14px; border-color: #dfe5ee; color: #50617a; font-size: 12px; line-height: 1.6;
}
#dialog-form-footer .primary {
  border-color: var(--blue); color: white; box-shadow: 0 3px 8px #2658db17;
}
.workspace-dialog-content > :first-child { margin-top: 0; }
.workspace-dialog-content :is(button, input, select) { font-size: 12px; border-color: #e0e6f0; color: #52647e; }
.workspace-dialog-content button { border-color: #dfe5ee; padding: 8px 14px; }
.workspace-dialog-content button.primary { color: white; border-color: var(--blue); }
.workspace-dialog-content :is(input, select) { padding: 8px 11px; border-radius: 6px; }
.workspace-dialog-content label { gap: 7px; font-size: 11px; color: #667892; }
.workspace-dialog-content .account-table { border: 1px solid var(--line); border-radius: 7px; }
.workspace-dialog-content .workspace-dialog-form { max-width: 920px; }
.workspace-dialog-content .workspace-dialog-form .actions { margin: 14px 0; }
.workspace-dialog-content .credential-form { border-bottom: 0; }
.workspace-workbook-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 20px; }
.workspace-workbook-fields > label:only-child { grid-column: 1 / -1; }
.workspace-dialog-content .tencent-sheet-scope { padding: 4px 0; border-top: 1px solid var(--line); }
.attendance-scope-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 0 20px; }
.attendance-scope-fields > .actions { grid-column: 1 / -1; }
.workspace-dialog-content > input[readonly] { width: 100%; }
@media (max-width: 1100px) {
  .config-wide .personnel-dialog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #modal.p13-form-dialog.config-wide {
    width: calc(100vw - 16px); height: calc(100dvh - 16px); max-height: calc(100dvh - 16px);
  }
  .personnel-dialog-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  :is(.workspace-workbook-fields,.attendance-scope-fields) { grid-template-columns: minmax(0, 1fr); }
  #dialog-form-footer { flex-wrap: wrap; }
  .workspace-dialog-content .attendance-dates { grid-template-columns: minmax(0, 1fr); }
  .p13-workspace #modal.p13-form-dialog .plan-preview-toolbar { min-width: 0; }
  .p13-workspace #modal.p13-form-dialog .plan-preview-toolbar select { min-width: 0; max-width: min(100%, 205px); }
}
@media (max-width: 760px) {
  .p13-workspace :is(#data-page,#system-page,#account-landing) > .heading h1 { font-size: 23px; }
  .p13-workspace #data-page > .card > nav { gap: 20px; }
}

#payroll-page .payroll-panel { padding: 0; overflow: hidden; border-radius: 11px; }
.payroll-panel-heading { margin: 0; padding: 18px 21px; }
.payroll-panel-heading h2 { font-size: 14px; }
.payroll-panel-heading p { margin: 5px 0 0; font-size: 11px; }
:is(#payroll-page,.p13-form-dialog) .account-table table { white-space: nowrap; }
:is(#payroll-page,.p13-form-dialog) .account-table th {
  padding: 12px 18px; background: #f8fafe; color: #8a96aa; font-size: 11px; font-weight: 500;
}
:is(#payroll-page,.p13-form-dialog) .account-table td {
  padding: 15px 18px; border-color: #eff2f7; color: #53647d; font-size: 12px;
}
#payroll-page .payroll-empty { padding: 48px 20px; color: #8c9bb3; text-align: center; }
.payroll-month { display: flex; align-items: center; gap: 10px; margin: 0 0 15px; color: #718098; font-size: 12px; }
:is(#payroll-page,.p13-form-dialog) select[aria-label] {
  padding: 8px 11px; border-color: #e0e6f0; border-radius: 6px; color: #52647e; font-size: 12px;
}

#payroll-page .payroll-panel { padding: 0; overflow: hidden; border-radius: 11px; }
.payroll-panel-heading { margin: 0; padding: 18px 21px; }
.payroll-panel-heading h2 { font-size: 14px; }
.payroll-panel-heading p { margin: 4px 0 0; font-size: 11px; }
.payroll-tabbar { display: flex; gap: 25px; border-bottom: 1px solid var(--line); }
.payroll-tabbar button {
  padding: 15px 1px 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: #8a96a9; font-size: 12px; white-space: nowrap;
}
.payroll-tabbar button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
#certificates-page .certificate-class-tabs { padding: 0 21px; margin: 0; gap: 20px; overflow-x: auto; flex-wrap: nowrap; }
#certificates-page .certificate-class-tabs button { background: transparent; }
#certificates-page .certificate-class-content { padding: 20px; }
#certificates-page .certificate-class-content .usage-filters { padding: 0 0 18px; }
#certificates-page .certificate-class-content .people-detail-table table { min-width: 0; }
#certificates-page .certificate-class-content .people-detail-table td { border-bottom-color: #eff2f7; }
#certificates-page .certificate-class-content .people-detail-table tr:last-child td { border-bottom: 0; }
.payroll-link {
  border: 0; background: transparent; color: var(--blue); padding: 3px 2px; font-size: 12px;
  white-space: nowrap;
}
#payroll-page .payroll-sections {
  margin: 0 0 20px; background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 21px 1px; overflow: auto;
}
#payroll-page .payroll-sections button { white-space: nowrap; }
#payroll-page > .people-detail-note { margin: 0 0 18px; }
#payroll-page > .heading:has(.payroll-stats) { flex-wrap: wrap; align-items: center; }
#payroll-page .payroll-stat > span { display: block; }
#payroll-page .payroll-stat strong { white-space: nowrap; }
#payroll-page > .heading .actions svg {
  width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round;
}
@media (min-width: 1201px) {
  #payroll-page .payroll-stat:nth-child(1), #payroll-page .payroll-stat:nth-child(3) { min-width: 120px; }
  #payroll-page .payroll-stat:nth-child(4) { min-width: 100px; }
}
@media (max-width: 1200px) {
  #payroll-page > .heading:has(.payroll-stats) > .actions { margin-left: auto; }
}
#payroll-page .payroll-detail-tabs { padding: 0 21px; margin: 0; overflow-x: auto; white-space: nowrap; }
#payroll-page td small { display: block; color: #91a0b5; margin-top: 2px; }
#payroll-page [role="tabpanel"] > .people-detail-note { margin: 16px 21px; }
:is(#payroll-page,#dialog-body.payroll-dialog) .account-table table { white-space: nowrap; }
:is(#payroll-page,#dialog-body.payroll-dialog) .account-table th {
  padding: 12px 18px; background: #f8fafe; color: #8a96aa; font-size: 11px; font-weight: 500;
}
:is(#payroll-page,#dialog-body.payroll-dialog) .account-table td {
  padding: 15px 18px; border-color: #eff2f7; color: #53647d; font-size: 12px;
}
#payroll-page .payroll-empty { padding: 48px 20px; color: #8c9bb3; text-align: center; }
.payroll-table-footer { padding: 13px 20px; color: #95a0b2; font-size: 11px; }
.payroll-run-list .account-table table { min-width: 1080px; table-layout: fixed; }
.payroll-run-list th:nth-child(1) { width: 7.5%; }
.payroll-run-list th:nth-child(2) { width: 9%; }
.payroll-run-list th:nth-child(3) { width: 13.5%; }
.payroll-run-list th:nth-child(4), .payroll-run-list th:nth-child(5) { width: 11%; }
.payroll-run-list th:nth-child(6) { width: 8%; }
.payroll-run-list th:nth-child(7) { width: 17%; }
.payroll-run-list th:nth-child(8) { width: 23%; }
#payroll-page .payroll-run-list .account-table :is(th,td) { padding-inline: 12px; }
#payroll-page .payroll-run-list .account-table td { padding-block: 12px; }
.payroll-run-list td:last-child .actions { flex-wrap: nowrap; gap: 8px; }
.payroll-run-list td:last-child button { white-space: nowrap; }
.payroll-month { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--sub); font-size: 11px; }
.payroll-create-selectors { margin-bottom: 15px; }
.payroll-create .account-table { border: 1px solid var(--line); border-radius: 7px; }
.p13-workspace #dialog-body.payroll-create .account-table td { padding-top: 7px; padding-bottom: 7px; }
.payroll-create .payroll-batch-hash { font-variant-numeric: tabular-nums; }
.payroll-create-hint { font-size: 11px; color: var(--sub); }
:is(#payroll-page,#dialog-body.payroll-dialog) select[aria-label] {
  padding: 8px 11px; border-color: #e0e6f0; border-radius: 6px; color: #52647e; font-size: 12px;
}
.payroll-create-selectors label:first-child select,
#payroll-page > .heading select { min-width: 120px; }
.payroll-run-title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; }
.payroll-source-strip {
  display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 10px; color: #8191a9;
}
.payroll-source-strip b { font-weight: 500; color: #5575aa; }
.payroll-person-cell { display: flex; align-items: center; gap: 10px; }
.payroll-tab-inset { padding: 20px; }
#payroll-page .payroll-tab-inset > .people-detail-note { margin: 0 0 18px; }
.payroll-fields { gap: 23px 30px; margin: 18px 0; }
.payroll-fields dt { font-size: 11px; color: #9aa6b9; }
.payroll-fields dd { margin: 6px 0 0; overflow-wrap: anywhere; font-size: 13px; color: #4b5f7c; }
#modal.p13-form-dialog:has(.payroll-drawer) {
  margin: 0 0 0 auto; width: min(780px,95vw); max-width: 95vw;
  height: 100dvh; max-height: 100dvh; border-radius: 13px 0 0 13px;
}
#modal.p13-form-dialog[open]:has(.payroll-drawer) { display: block; overflow: auto; }
.p13-workspace #modal.p13-form-dialog:has(.payroll-drawer) > .heading {
  position: sticky; top: 0; z-index: 1; background: white;
}
.p13-workspace #modal.p13-form-dialog #dialog-body.payroll-drawer { overflow: visible; }
:is(.payroll-drawer, .payroll-preview) .account-table { border: 1px solid var(--line); border-radius: 7px; margin-bottom: 18px; }
.payroll-preview .payroll-fee-basis { white-space: normal; min-width: 140px; overflow-wrap: anywhere; }
.payroll-preview .payroll-fee-basis small { display: block; }
.payroll-report-tabs { overflow-x: auto; }
.payroll-report-panel { padding-top: 18px; }
.payroll-report-panel h3 { margin: 0 0 12px; font-size: 13px; }
.payroll-report-panel p, .payroll-report-basis summary { color: var(--sub); font-size: 12px; }
.payroll-report-basis summary { margin-bottom: 12px; cursor: pointer; }
.payroll-report-company { min-width: 145px; max-width: 260px; white-space: normal; overflow-wrap: anywhere; }
.payroll-report-company .payroll-link { display: block; margin: 2px 0 0; }
.payroll-report-table tfoot td { background: #f8fafe; font-weight: 600; }
.payroll-preview .payroll-empty { text-align: center; }
.payroll-run-detail {
  container-type: inline-size;
  --payroll-detail-inset: clamp(12px, 1.5cqw, 21px);
  --payroll-detail-gap: clamp(8px, 1.25cqw, 18px);
  --payroll-cell-inset: clamp(5px, calc(3cqw - 26px), 18px);
}
#payroll-page .payroll-column-controls { gap: 6px; margin-inline-start: auto; color: var(--sub); font-size: 11px; }
#payroll-page .payroll-column-controls button { min-width: 30px; }
#payroll-summary-scroll:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.payroll-summary-scrollable :is(th, td):first-child:not([colspan]) {
  position: sticky; inset-inline-start: 0; z-index: 1; box-shadow: 1px 0 var(--line);
}
.payroll-summary-scrollable tbody td:first-child:not([colspan]) { background: white; }
#payroll-page .payroll-summary-scrollable .payroll-empty { text-align: start; }
@container (max-width: 1560px) {
  .payroll-run-detail .payroll-panel-heading { padding: var(--payroll-detail-gap) var(--payroll-detail-inset); }
  .payroll-run-detail :is(.payroll-run-title, .payroll-source-strip) { gap: 6px var(--payroll-detail-gap); }
  #payroll-page .payroll-run-detail :is(.payroll-detail-tabs, .people-filters, .payroll-table-footer) {
    padding-inline: var(--payroll-detail-inset);
  }
  #payroll-page .payroll-run-detail .people-filters { padding-block: var(--payroll-detail-gap); }
  #payroll-page .payroll-run-detail .people-filters :is(input, select) { max-width: 100%; }
  #payroll-page .payroll-filter-results .account-table :is(th, td) {
    padding-inline: var(--payroll-cell-inset);
  }
  #payroll-page .payroll-filter-results .account-table th {
    min-width: calc(3.25em + 2 * var(--payroll-cell-inset));
    padding-block: clamp(8px, 0.85cqw, 12px); white-space: normal;
  }
  #payroll-page .payroll-filter-results .account-table td:not(.payroll-empty) {
    padding-block: clamp(8px, 1.05cqw, 15px);
  }
  .payroll-run-detail .payroll-person-cell { gap: clamp(6px, 0.7cqw, 10px); }
  .payroll-run-detail .payroll-person-cell > div { min-width: 116px; white-space: nowrap; overflow-wrap: normal; }
  #payroll-page .payroll-filter-results td button { margin-inline: 0; padding-inline: 8px; }
}
@container (max-width: 640px) {
  #payroll-page .payroll-run-detail .payroll-detail-tabs { flex-wrap: wrap; gap: 0 var(--payroll-detail-gap); }
  .payroll-run-detail .payroll-detail-tabs button { padding-block: 10px 9px; }
  #payroll-page .payroll-run-detail .people-filters { gap: var(--payroll-detail-gap); }
  #payroll-page .payroll-run-detail .people-filters input { flex: 1 0 100%; min-width: 0; }
  #payroll-page .payroll-run-detail .people-filters select { flex: 1 1 105px; min-width: 0; }
  #payroll-page .payroll-run-detail .payroll-table-footer { flex-wrap: wrap; }
}
/* The full nineteen-column payroll summary keeps P1.3 text size. */
#payroll-page .payroll-filter-results .account-table table { min-width: 1600px; table-layout: fixed; }
#payroll-page .payroll-filter-results .account-table th:first-child { width: 148px; }
#payroll-page .payroll-filter-results .account-table th:nth-child(14) { width: 68px; }
#payroll-page .payroll-filter-results .account-table th:last-child { width: 88px; }
#payroll-page .payroll-filter-results .account-table :is(th,td) { padding-inline: 2px; }
#payroll-page .payroll-filter-results .account-table th { white-space: normal; overflow-wrap: anywhere; }
#payroll-page .payroll-filter-results .account-table td:not(.payroll-empty) { white-space: nowrap; }
#payroll-page .payroll-filter-results .payroll-person-cell { gap: 6px; }
#payroll-page .payroll-filter-results .payroll-person-cell > div { min-width: 0; }

@media (max-width: 760px) {
  #payroll-page .payroll-sections, #payroll-page .payroll-detail-tabs { gap: 20px; }
  .payroll-source-strip { gap: 7px; }
  .payroll-create-selectors label:last-child select { width: 62px; padding-inline: 6px; }
  .payroll-create .account-table select { width: 118px; padding-inline: 6px; }
  .payroll-create .payroll-stage-options .account-table select { width: 146px; }
}


.usage-summary { color: var(--sub); font-size: 11px; }
.people-badge.usage-red { background: #fff0f1; color: #cb5a66; }
.people-badge.usage-yellow { background: #fff6e8; color: #9a691e; }
.usage-chart {
  display: flex; align-items: flex-end; gap: 12px; height: 170px;
  padding-top: 20px; margin-bottom: 22px; overflow-x: auto;
}
.usage-chart > div { flex: 1; min-width: 18px; text-align: center; }
.usage-chart span { display: block; margin-bottom: 4px; font-size: 9px; color: #8092ad; }
.usage-chart small { display: block; margin-top: 9px; font-size: 10px; color: #8b9ab1; }
.usage-chart-bar { width: 65%; max-width: 34px; min-height: 2px; margin: auto; border-radius: 4px 4px 0 0; background: #9eb8f1; }
.usage-detail-tabs { display: flex; gap: 25px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.usage-detail-tabs button {
  padding: 15px 1px 13px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: #8a96a9; font-size: 12px;
}
.usage-detail-tabs button[aria-selected="true"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }
.usage-overview-card { padding: 0; overflow: hidden; border-radius: 11px; }
.usage-overview-card > .people-detail-note { margin: 18px 21px; }
.usage-filters { padding: 17px 20px; gap: 12px; border-bottom: 1px solid var(--line); }
.usage-filters input, .usage-filters select, #usage-page > .heading select, .certificate-ledger-heading select {
  border: 1px solid #e0e6f0; border-radius: 6px; padding: 8px 11px; min-width: 120px;
  font-size: 12px; background: white; color: #52647e;
}
.usage-filters input { width: 230px; }
.usage-filters input::placeholder { color: #99a4b6; }
.usage-filters .usage-link { margin-left: auto; }
.usage-link { border: 0; background: none; color: var(--blue); padding: 3px 2px; font-size: 12px; white-space: nowrap; text-decoration: none; }
#usage-page > .heading .people-download svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
:is(#usage-page, #certificates-page) .people-detail-table table { min-width: 733px; white-space: nowrap; }
:is(#usage-page, #certificates-page) .people-detail-table th {
  padding: 12px 18px; color: #8a96aa; background: #f8fafe; font-size: 11px; font-weight: 500;
}
:is(#usage-page, #certificates-page) .people-detail-table td { padding: 15px 18px; color: #53647d; font-size: 12px; white-space: nowrap; }
#usage-page > .usage-overview-card { container-type: inline-size; overflow: clip; }
#usage-page .usage-overview-card > .people-detail-table { overflow: visible; }
#usage-page .usage-overview-card > .people-detail-table thead {
  position: sticky; top: 0; z-index: 1;
}
#usage-page .usage-overview-card > .people-detail-table th { box-shadow: inset 0 -1px var(--line); }
@container (max-width: 900px) {
  #usage-page .usage-overview-card > .people-detail-table { max-height: max(16rem, 70dvh); overflow: auto; }
}
.usage-run-fields { margin-top: 18px; }
.usage-run-fields .account-table td:last-child { max-width: 150px; white-space: normal; overflow-wrap: anywhere; }
.usage-run-fields select { max-width: 100%; }
#personnel-dialog-form:has(.usage-run-fields) > .people-detail-note { margin: 14px 0 0; }
.personnel-workspace #workspace > header { color: var(--ink); }
.personnel-workspace #dialog-form-footer .people-download { margin: 0; }
@media (max-width: 480px) {
  .usage-chart { gap: 5px; }
}
@media (max-width: 480px) {
  #people-page > .people-heading > .actions { margin-left: auto; }
  #people-page .people-row-actions { flex-direction: column; align-items: flex-start; }
  #usage-page > .people-heading > .actions { flex-basis: 100%; }
  #people-page > .people-heading:has(> .people-download) { gap: 18px; }
  .usage-filters input { width: 170px; }
  .usage-filters .usage-run-picker { order: -1; width: 132px; }
  .usage-filters input { order: -2; }
}

#branding-settings > .heading { flex-wrap: nowrap; }
#branding-settings > .heading p { margin: 4px 0 0; color: var(--sub); font-size: 11px; }
.branding-badge {
  padding: 3px 7px; border-radius: 4px; font-size: 10px; white-space: nowrap;
  background: #edf3ff; color: #4776ce;
}
.branding-body { padding: 22px; }
.branding-note {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 18px; padding: 12px 15px; border-radius: 7px;
  background: #f0f5ff; color: #6681ae; font-size: 12px; line-height: 1.8;
}
.branding-note::before { content: "⚠"; flex: 0 0 16px; }
#branding-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.branding-logo { display: flex; align-items: center; gap: 20px; }
.branding-logo > div { width: 383px; min-width: 0; }
.branding-logo .login-mark {
  width: 64px; height: 64px; flex: none; border-radius: 12px;
  background: var(--blue); color: white; box-shadow: 0 5px 12px #2658db30;
}
#branding-form label { display: block; margin: 0; font-size: 11px; }
#branding-form .branding-field label { margin-bottom: 7px; color: #9aa6b9; }
#branding-form :is(input,textarea) { width: 100%; border-color: #e0e6f0; }
#branding-form input { font-size: 12px; color: #52647e; border-radius: 6px; padding: 8px 11px; }
#branding-form input[type="file"] { margin-top: 5px; }
#branding-form textarea {
  font: inherit; border: 1px solid #e0e6f0; border-radius: 7px;
  padding: 10px; color: var(--ink); resize: vertical;
}
.branding-caption { margin-top: 7px; color: var(--sub); font-size: 11px; }
#branding-form .actions { gap: 9px; }
#branding-form button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; font-size: 12px; border-color: #dfe5ee; color: #50617a; }
#branding-form button.primary { border-color: var(--blue); color: white; box-shadow: 0 3px 8px #2658db17; }
#branding-form #reset-brand-logo { padding: 5px 10px; font-size: 11px; }
.login-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }

#close-brand-preview { position: fixed; z-index: 2; top: 12px; right: 12px; }
#dialog-body.usage-basis .people-detail-table table { min-width: 536px; white-space: nowrap; }

/* P1.3 professional-code list and approved standard import dialog. */
.professional-code-table table { min-width:1120px; white-space:nowrap; }
.professional-code-table input[type="radio"] { min-width:0; width:auto; }
#modal.p13-form-dialog:has(.professional-code-import) { height:min(617px,calc(100dvh - 24px)); }
.config-wide .personnel-dialog-grid.professional-code-form { grid-template-columns:repeat(4,minmax(0,1fr));gap:18px; }
@media(max-width:600px){
#modal.p13-form-dialog:has(.professional-code-import){height:min(638px,calc(100dvh - 24px));}
.config-wide .personnel-dialog-grid.professional-code-form {grid-template-columns:repeat(2,minmax(0,1fr));}
}

/* Professional-code content follows the P1.3 code-grid and filter specifications. */
.professional-code-actions{margin-bottom:16px;gap:9px;}
.professional-code-plus{display:inline-grid;place-items:center;width:19px;height:19px;font-size:20px;line-height:1;}
.professional-code-actions button.primary{display:inline-flex;gap:7px;align-items:center;}
.professional-code-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:0 0 18px;}
.professional-code-filters :is(input,select){margin:0;font-size:12px;padding:8px 11px;border:1px solid #e0e6f0;border-radius:6px;color:#52647e;}
.professional-code-filters input{min-width:100px;width:125px;}
.professional-code-filters .professional-code-search{width:230px;}
.professional-code-filters select{width:120px;}
.professional-code-list .professional-code-table{max-height:calc(100dvh - 340px);overflow:auto;border-radius:7px;}
.professional-code-list .professional-code-table table{min-width:1360px;}
.professional-code-list .professional-code-table thead{position:sticky;top:0;z-index:1;}
#dialog-body.professional-code-list .professional-code-table :is(th,td){padding:11px 14px;}
.professional-code-list .professional-code-table tbody tr:nth-child(even){background:#fbfcff;}
.professional-code-count{margin:16px 0 0;font-size:11px;color:#718098;}
.professional-code-note{border-radius:7px;padding:12px 15px;font-size:12px;line-height:1.8;background:#f0f5ff;color:#6681ae;margin-bottom:18px;}
@media(max-width:760px){.professional-code-filters input{width:100%;}.professional-code-list .professional-code-table{max-height:50dvh;}}

.professional-code-access{margin-left:auto;font-size:11px;line-height:1.6;color:#718098;}
.professional-code-actions .people-download{min-height:0;line-height:1.6;}

.professional-code-actions :is(.professional-code-import-button,.people-download){min-width:108px;}

@media(max-width:760px){.config-wide .personnel-dialog-grid.professional-code-form{grid-template-columns:repeat(2,minmax(0,1fr));}}

:is(.professional-code-form,.professional-code-toggle) label {color:#9aa6b9;}

#branches-page .branch-card table { min-width: 760px; }
#branches-page .branch-card :is(th, td) { white-space: nowrap; }
#branches-page .branch-card th {
  background: #f8fafe; color: #8a96aa; font-size: 11px; font-weight: 500; padding: 12px 18px;
}
#branches-page .branch-card td { padding: 15px 18px; font-size: 12px; color: #53647d; }
#branches-page .branch-card td button { font-size: 11px; min-height: 29px; padding: 5px 9px; }
:is(#certificates-page, #branches-page) > .people-detail-note { margin: 0 0 18px; }
#branches-page .branch-card > .heading { margin: 0; padding: 18px 21px; }
.branch-support-choices { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.branch-support-choices label { display: flex; align-items: center; gap: 6px; }
.branch-support-choices input[type="radio"] { width: auto; margin: 0; }

#dashboard-page .certificate-boards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: stretch; }
#dashboard-page .certificate-board-chart {height:170px;display:flex;gap:12px;align-items:flex-end;padding:20px 21px 0;}
#dashboard-page .certificate-board-chart > :is(a,span) {flex:1;text-align:center;position:relative;min-width:18px;color:#53647d;text-decoration:none;}
#dashboard-page .certificate-chart-bar {width:65%;max-width:34px;margin:0 auto;background:#9eb8f1;border-radius:4px 4px 0 0;min-height:2px;}
#dashboard-page .certificate-board-chart > :nth-child(10) .certificate-chart-bar {background:#386be0;}
#dashboard-page .certificate-board-chart small {display:block;font-size:10px;color:#8b9ab1;margin-top:9px;white-space:nowrap;}
#dashboard-page .certificate-chart-count {font-size:10px;color:#8092ad;display:block;margin-bottom:4px;}
#dashboard-page .dashboard-branch-bar {margin:14px 0 22px;}
#dashboard-page .dashboard-branch-bar > div:first-child {display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px;gap:12px;}
@media(max-width:760px){#dashboard-page .certificate-board-chart {gap:5px;}}
#dashboard-page .certificate-boards select { width: auto; margin-bottom: 12px; }
@media (max-width: 760px) {
  #dashboard-page .certificate-boards { grid-template-columns: minmax(0,1fr); }
}

#branches-page .branch-card {padding:0; border-radius:11px; box-shadow:0 12px 36px #1c376c0b; overflow:hidden;}
/* P1.3 dashboard cards: scope to new modules, never alter existing/API pages. */
#dashboard-page .card { padding:0; overflow:hidden; border-radius:11px; box-shadow:0 12px 36px #1c376c0b; }
#dashboard-page .dashboard-card-head {display:flex;justify-content:space-between;align-items:center;padding:18px 21px;gap:15px;}
#dashboard-page .dashboard-card-head h2 {font-size:14px;font-weight:650;margin:0;}
#dashboard-page .dashboard-card-head p {margin:4px 0 0;font-size:11px;color:var(--sub);}
#dashboard-page .dashboard-card-body {padding:0 21px 21px;}
#dashboard-page :is(.dashboard-card-head a,.dashboard-todo a) {font-size:11px;color:var(--blue);text-decoration:none;}
#dashboard-page .certificate-boards {margin-bottom:22px;}
#dashboard-page .dashboard-overview {grid-template-columns:minmax(0,1.7fr) minmax(300px,1fr);}
#dashboard-page .account-table,
#certificates-page .certificate-period-card .account-table {border:0;border-radius:0;}
#dashboard-page th,
#certificates-page .certificate-period-card th {background:#f8fafe;color:#8a96aa;font-size:11px;font-weight:500;padding:12px 18px;border-bottom:1px solid var(--line);}
#dashboard-page td,
#certificates-page .certificate-period-card td {padding:15px 18px;border-bottom:1px solid #eff2f7;font-size:12px;color:#53647d;}
#dashboard-page tbody tr:last-child td,
#certificates-page .certificate-period-card tbody tr:last-child td {border-bottom:0;}
#certificates-page .certificate-period-card td {padding-block:10px;}
#dashboard-page .card > p {font-size:11px;color:var(--sub);margin:0 21px 12px;}
#dashboard-page .card > select {margin:0 21px 12px;font-size:11px;padding:6px 8px;}

#dashboard-page .dashboard-progress {height:5px;background:#edf1f7;border-radius:5px;overflow:hidden;min-width:90px;}
#dashboard-page .dashboard-progress i {display:block;height:100%;background:#5e86e5;border-radius:5px;}
#dashboard-page .dashboard-progress i.yellow {background:#e6b368;}
#dashboard-page .dashboard-progress i.red {background:#da737f;}
#dashboard-page .dashboard-progress-label {font-size:11px;margin-bottom:6px;}
#dashboard-page .dashboard-todo {display:flex;align-items:center;gap:12px;padding:15px 0;border-bottom:1px solid #edf1f7;}
#dashboard-page .dashboard-todo:last-child {border:0;}
#dashboard-page .dashboard-todo-icon {width:33px;height:33px;border-radius:8px;display:grid;place-items:center;background:#f1f5ff;color:#718dda;flex-shrink:0;}
#dashboard-page .dashboard-todo .grow {flex:1;}
#dashboard-page .dashboard-todo strong {font-size:12px;font-weight:500;display:block;}
#dashboard-page .dashboard-todo small {display:block;font-size:10px;color:#96a2b5;margin-top:3px;}
@media(max-width:760px){#dashboard-page .dashboard-overview {grid-template-columns:minmax(0,1fr);}}

/* Approved P1.3 finance form keeps the three-column desktop grid. */
.payroll-income-form {grid-template-columns:repeat(3,minmax(0,1fr));}
@media(max-width:760px){.payroll-income-form {grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}}

/* P1.3 branch content: match labels and section typography without touching API forms. */
#modal .branch-configuration-form h3 {font-size:13px;font-weight:600;line-height:1.6;margin:1px 0 19px;}
#modal .branch-configuration-form .branch-field > label {display:block;font-size:11px;font-weight:400;line-height:1.6;color:#9aa6b9;margin:0 0 7px;}
#modal .branch-configuration-form .branch-field > input {display:block;width:100%;min-width:0;margin-top:0;}
#modal .branch-configuration-form > .branch-field {margin-top:22px;}
#modal .branch-configuration-form .branch-support-choices {gap:20px;}
#modal .branch-configuration-form .branch-support-choices label {padding:10px 14px;border:1px solid var(--line);border-radius:7px;font-size:12px;}
@media(max-width:760px){#modal .branch-configuration-form .branch-support-choices {flex-direction:column;}}

.certificate-arrangement-form .arrangement-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 23px 30px; }
.certificate-arrangement-form .arrangement-field label { display: block; font-size: 11px; color: #9aa6b9; margin: 0 0 7px; }
.certificate-arrangement-form .arrangement-field select,
.certificate-arrangement-form .arrangement-field input:not([type=checkbox]) { width: 100%; }
.certificate-arrangement-form .arrangement-field input[type=checkbox] { width: auto; min-width: 0; }
.certificate-arrangement-form .arrangement-subheading { font-size: 13px; margin: 1px 0 19px; font-weight: 600; }
.certificate-arrangement-form .arrangement-hint { font-size: 11px; color: #718098; }
.certificate-arrangement-form .arrangement-section { margin-top: 22px; }
@media(max-width:1100px) { .certificate-arrangement-form .arrangement-fields { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:760px) { .certificate-arrangement-form .arrangement-fields { gap: 18px; } }

.payroll-finance-form .finance-fields {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:23px 30px;}
.payroll-finance-form .finance-field label {display:block;font-size:11px;color:#9aa6b9;margin:0 0 7px;}
.payroll-finance-form .finance-field input {width:100%;}
.payroll-finance-form .finance-basis {margin-top:22px;}
@media(max-width:1100px){.payroll-finance-form .finance-fields{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){.payroll-finance-form .finance-fields{gap:18px;}}

/* Historical finance uses the approved P1.3 standard form and table. */
.payroll-finance-form .finance-field select {width:100%;}
.history-preflight {margin-top:22px;}
.history-preflight table {min-width:980px;}
.history-preflight input:not([type=checkbox]) {width:145px;}
.history-preflight input[type=date] {width:130px;}
.history-confirm {display:flex;align-items:center;margin-top:22px;}
.history-confirm input[type=checkbox] {width:auto;}

.history-finance .finance-fields {grid-template-columns:repeat(3,1fr);}
.history-finance .finance-field :is(input,select) {min-width:auto;}
@media(max-width:1100px){.history-finance .finance-fields{grid-template-columns:repeat(2,1fr);}}

/* History tables use the P1.3 final-row boundary; the wrapper owns the outer border. */
#modal.p13-form-dialog .history-table tbody tr:last-child td {border-bottom:0;}

/* Match native P1.3 standard-dialog viewport clearance for the approved history forms. */
#modal.p13-form-dialog:has(#dialog-body.history-dialog) {max-height:calc(100% - 2em - 6px);}

.organization-grant-choices { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 30px; margin: 0; padding: 0; border: 0; min-width: 0; }
.organization-grant-choices legend { font-size: 11px; color: #667892; margin-bottom: 14px; }
.workspace-dialog-content .organization-grant-choices label { display: flex; align-items: center; }
.workspace-dialog-content .organization-grant-choices input { width: auto; margin: 0 8px 0 0; }
@media(max-width:600px) { .organization-grant-choices { grid-template-columns: minmax(0,1fr); } }

/* P1.3 dictionary card header and configuration tile; no page-heading spacing. */
.p13-workspace #dictionary-settings > .heading h2 { margin: 0; }
.p13-workspace #dictionary-settings > .heading p { margin: 4px 0 0; font-size: 11px; color: var(--sub); }
.p13-workspace #dictionary-settings .dictionary-config-tile { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 21px; border-bottom:1px solid var(--line); }
.p13-workspace #dictionary-settings .dictionary-config-tile:last-child { border-bottom:0; }
.p13-workspace #dictionary-category[aria-current="page"] { font-weight:600; }
.p13-workspace #dictionary-settings > .heading > .people-badge { background:#edf3ff; color:#4776ce; }
.p13-workspace #dictionary-settings .dictionary-config-tile h3 { margin: 0 0 5px; font-size: 14px; }
.p13-workspace #dictionary-settings .dictionary-config-tile p { margin: 0; font-size: 11px; color: var(--sub); }
.p13-workspace #dictionary-settings .dictionary-config-tile button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border: 1px solid #dfe5ee; border-radius: 7px;
  background: #fff; color: #50617a; font: inherit; font-size: 12px; white-space: nowrap;
}
.p13-workspace #dictionary-settings .dictionary-config-tile button:hover { border-color: #adc0ed; color: var(--blue); }
.p13-workspace #dictionary-settings .dictionary-config-tile button.primary {
  background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 3px 8px #2658db17;
}
@media(max-width:760px) { .p13-workspace #dictionary-settings .dictionary-config-tile { align-items: flex-start; flex-direction: column; } }

/* Confirmed source dictionary form: P1.3 standard dialog, two columns/one narrow. */
.source-dictionary-form .source-dictionary-evidence { grid-column: 1 / -1; }

/* Approved certificate refresh review: local form only, shared modal unchanged. */
.certificate-refresh-form {display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:18px 0}
.certificate-refresh-form label {display:grid;gap:8px;font-size:11px;color:var(--sub)}
.certificate-refresh-form select,.certificate-refresh-form input {width:100%;min-width:0}
@media(max-width:760px){.certificate-refresh-form{grid-template-columns:1fr}}

.certificate-period-card {grid-column:1 / -1}

/* Certificate ledger reuses the approved 180-day/person table actions. */
#certificates-page .certificate-ledger-card .people-detail-table button,
body:has(#certificates-page:not([hidden])) #dialog-body .people-detail-table button {
  border:1px solid #dfe5ee; border-radius:7px; background:#fff; margin:0;
  color:#50617a; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  padding:5px 10px; font-size:11px; line-height:1.6; white-space:nowrap;
}
body:has(:is(#dashboard-page,#certificates-page,#system-page):not([hidden])) #dialog-form-footer .people-download {
  margin:0;
}
body:has(:is(#dashboard-page,#certificates-page,#system-page):not([hidden])) #dialog-form-footer :is(button,.people-download) {
  font-family:inherit; font-weight:400; line-height:1.6;
}
#certificates-page .people-detail-table .usage-link {margin:0;}

/* Approved P1.3 qualification-capacity entry and read-only wide dialog. */
.p13-workspace #certificates-page .certificate-capacity-entry { border-color: var(--blue); color: var(--blue); }
.p13-workspace #modal.p13-form-dialog:has(#dialog-body.certificate-capacity) > .heading { background: white; }
#dialog-body.certificate-capacity .capacity-status { margin-bottom: 18px; color: #607da9; background: #f0f4fe; border-radius: 7px; padding: 12px 16px; font-size: 12px; }
#dialog-body.certificate-capacity .capacity-basis { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; margin: 14px 0 20px; }
#dialog-body.certificate-capacity .capacity-basis dt { font-size: 11px; color: #9aa6b9; margin-bottom: 7px; }
#dialog-body.certificate-capacity .capacity-basis dd { font-size: 12px; margin: 0; color: #53647d; }
#dialog-body.certificate-capacity .capacity-metrics { display: flex; justify-content: flex-start; margin: 0 0 22px; gap: 22px; }
#dialog-body.certificate-capacity .capacity-stat { flex: 1; min-width: 80px; padding: 0 0 0 16px; border-left: 1px solid #dfe6f1; }
#dialog-body.certificate-capacity .capacity-label { color: var(--sub); font-size: 10px; white-space: nowrap; }
#dialog-body.certificate-capacity .capacity-value { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; margin: 2px 0 0; white-space: nowrap; }
#dialog-body.certificate-capacity .capacity-value small { font-size: 10px; font-weight: 400; margin-left: 5px; color: #8b97ab; }
#dialog-body.certificate-capacity .capacity-filters { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
#dialog-body.certificate-capacity .capacity-filters input { width: 230px; min-width: 0; }
#dialog-body.certificate-capacity .capacity-filters select { max-width: 100%; min-width: 125px; }
#dialog-body.certificate-capacity .capacity-filters input::placeholder { color: #a3adbd; }
#dialog-body.certificate-capacity .capacity-table { min-width: 1320px; white-space: nowrap; }
#dialog-body.certificate-capacity .capacity-table th { font-size: 11px; font-weight: 500; padding: 12px 18px; }
#dialog-body.certificate-capacity .capacity-table td { font-size: 12px; padding: 15px 18px; }
#dialog-body.certificate-capacity .capacity-table tr:last-child td { border-bottom: 0; }
#dialog-body.certificate-capacity .capacity-table .people-badge { display: inline-block; border-radius: 5px; background: #f0f3f8; color: #718098; font-size: 10px; padding: 3px 7px; }

/* Confirmed P1.3 personnel private fields; existing grid/dialog breakpoints stay shared. */
.personnel-private-section, .personnel-private-editor { margin-top: 30px; }
.personnel-private-value { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; min-width: 0; }
.personnel-private-mask { white-space: nowrap; font-variant-numeric: tabular-nums; }
.personnel-private-view { display: inline-flex; border: 0; border-radius: 0; background: transparent; color: var(--blue); padding: 0; font-size: 11px; line-height: 1.6; white-space: nowrap; }
.personnel-private-empty { color: #9aa6b9; font-size: 12px; }
.personnel-private-copy { margin: 16px 0 0; font-size: 11px; line-height: 1.8; color: #8a96a9; }
.personnel-private-editor h3, #dialog-body > .personnel-private-heading { margin: 1px 0 19px; font-size: 13px; font-weight: 600; }
.personnel-private-field-hint, .personnel-qualification-source-level { display: block; margin-top: 6px; color: #8a96a9; font-size: 10px; line-height: 1.6; }
.personnel-private-reason { margin-top: 23px; }
.personnel-private-reason label { display: block; margin: 0; color: #9aa6b9; font-size: 11px; }
.personnel-private-reason input { display: block; width: 100%; margin-top: 7px; padding: 8px 11px; border: 1px solid #e0e6f0; border-radius: 6px; font-size: 12px; color: #52647e; }
.personnel-private-full-label { color: #9aa6b9; font-size: 11px; margin-bottom: 7px; }
.personnel-private-full-value { padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; color: #718098; background: #f8fafe; font-size: 13px; overflow-wrap: anywhere; }
.personnel-private-full-copy { margin: 15px 0 0; color: #718098; font-size: 12px; line-height: 1.8; }
.personnel-qualification-source { grid-column: 1 / -1; }
#modal.p13-form-dialog #personnel-dialog-form .personnel-qualification-preview table { width: max-content; min-width: 100%; }
#modal.p13-form-dialog #personnel-dialog-form .personnel-qualification-preview .people-detail-table :is(th, td) { white-space: nowrap; }
@media (max-width: 760px) {
  .personnel-private-copy { margin-top: 14px; }
}
#dialog-body.certificate-capacity .capacity-qual-cell { max-width: 180px; white-space: normal; overflow-wrap: anywhere; }
#dialog-body.certificate-capacity .capacity-qual-cell > div + div { margin-top: 12px; }
#dialog-body.certificate-capacity .capacity-qual-cell small { display: block; font-size: 11px; color: var(--sub); margin-top: 4px; }
#dialog-body.certificate-capacity .capacity-table-footer { font-size: 11px; padding: 14px 0; color: var(--sub); }
#dialog-body.certificate-capacity .capacity-empty { padding: 48px 20px; color: #8c9bb3; text-align: center; }
#modal:has(#dialog-body.certificate-capacity) #dialog-form-footer .certificate-capacity-feedback { font-size: 11px; color: #966118; margin-right: auto; align-self: center; max-width: 55%; }
@media(max-width:760px) {
  #dialog-body.certificate-capacity .capacity-basis { grid-template-columns: 1fr; gap: 14px; }
  #dialog-body.certificate-capacity .capacity-metrics { flex-wrap: wrap; gap: 15px; }
  #dialog-body.certificate-capacity .capacity-stat { min-width: 40%; padding-left: 10px; }
  #dialog-body.certificate-capacity .capacity-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  #dialog-body.certificate-capacity .capacity-filters input { width: 100%; grid-column: 1 / -1; }
  #dialog-body.certificate-capacity .capacity-filters select { min-width: 0; width: 100%; }
  #modal:has(#dialog-body.certificate-capacity) #dialog-form-footer .certificate-capacity-feedback { max-width: none; flex-basis: 100%; text-align: left; }
}

/* Approved certificate overview placement; keep the workbench card rules unchanged. */
#certificates-page .certificate-overview-panels {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;margin-bottom:18px;}
@media(min-width:761px){
  #certificates-page .certificate-overview-panels:not(:has(button[aria-expanded="false"])) {align-items:stretch;}
}
#certificates-page .certificate-overview-card {padding:0;overflow:hidden;border-radius:11px;box-shadow:0 12px 36px #1c376c0b;}
#certificates-page .certificate-overview-card .dashboard-card-head {display:flex;justify-content:space-between;align-items:center;padding:18px 21px;gap:15px;}
#certificates-page .certificate-overview-card .dashboard-card-head h2 {font-size:14px;font-weight:650;margin:0;}
#certificates-page .certificate-overview-card .dashboard-card-head p {margin:4px 0 0;font-size:11px;color:var(--sub);}
#certificates-page .certificate-overview-content > p {font-size:11px;color:var(--sub);margin:0 21px 12px;}
#certificates-page .certificate-overview-card .certificate-board-chart {height:170px;display:flex;gap:12px;align-items:flex-end;padding:20px 21px 0;}
#certificates-page .certificate-overview-card .certificate-board-chart > :is(a,span) {flex:1;text-align:center;position:relative;min-width:18px;color:#53647d;text-decoration:none;}
#certificates-page .certificate-overview-card .certificate-chart-bar {width:65%;max-width:34px;margin:0 auto;background:#9eb8f1;border-radius:4px 4px 0 0;min-height:2px;}
#certificates-page .certificate-overview-card .certificate-chart-accent {background:#386be0;}
#certificates-page .certificate-overview-card .certificate-board-chart small {display:block;font-size:10px;color:#8b9ab1;margin-top:9px;white-space:nowrap;}
#certificates-page .certificate-overview-card .certificate-chart-count {font-size:10px;color:#8092ad;display:block;margin-bottom:4px;}
#certificates-page .certificate-overview-toggle {border:1px solid #dfe5ee;border-radius:7px;background:#fff;padding:8px 14px;color:#50617a;font-size:12px;line-height:1.6;white-space:nowrap;flex:none;}
@media(max-width:760px){
  #certificates-page .certificate-overview-panels {grid-template-columns:minmax(0,1fr);}
  #certificates-page .certificate-overview-card .certificate-board-chart {gap:5px;}
}

/* Approved right-side branch panel; reuse the workbench panel dimensions locally. */
#certificates-page .certificate-branch-overview-card {padding:0;overflow:hidden;border-radius:11px;box-shadow:0 12px 36px #1c376c0b;}
#certificates-page .certificate-branch-overview-card .dashboard-card-head {display:flex;justify-content:space-between;align-items:center;padding:18px 21px;gap:15px;}
#certificates-page .certificate-branch-overview-card .dashboard-card-head > div {min-width:0;}
#certificates-page .certificate-branch-overview-card .dashboard-card-head h2 {font-size:14px;font-weight:650;margin:0;}
#certificates-page .certificate-branch-overview-card .dashboard-card-head select {width:auto;margin-bottom:12px;flex:none;}
#certificates-page .certificate-branch-overview-card .dashboard-card-body {padding:0 21px 21px;}
#certificates-page .certificate-branch-overview-card .dashboard-branch-bar {margin:14px 0 22px;}
#certificates-page .certificate-branch-overview-card .dashboard-branch-bar > div:first-child {display:flex;justify-content:space-between;font-size:12px;margin-bottom:8px;gap:12px;}
#certificates-page .certificate-branch-overview-card .dashboard-progress {height:5px;background:#edf1f7;border-radius:5px;overflow:hidden;min-width:90px;}
#certificates-page .certificate-branch-overview-card .dashboard-progress i {display:block;height:100%;background:#5e86e5;border-radius:5px;}
#certificates-page .certificate-branch-overview-card .account-table {border:0;border-radius:0;}
#certificates-page .certificate-branch-overview-card th {background:#f8fafe;color:#8a96aa;font-size:11px;font-weight:500;padding:12px 18px;border-bottom:1px solid var(--line);}
#certificates-page .certificate-branch-overview-card td {padding:15px 18px;border-bottom:1px solid #eff2f7;font-size:12px;color:#53647d;}
#certificates-page .certificate-branch-overview-card tbody tr:last-child td {border-bottom:0;}
#certificates-page .certificate-branch-overview-card .certificate-branch-overview-toggle {border:1px solid #dfe5ee;border-radius:7px;background:#fff;padding:8px 14px;color:#50617a;font-size:12px;line-height:1.6;white-space:nowrap;flex:none;}
@media(max-width:760px){
  #certificates-page .certificate-branch-overview-card .dashboard-card-head {flex-wrap:wrap;}
  #certificates-page .certificate-branch-overview-card .dashboard-card-head > div {flex-basis:100%;}
  #certificates-page .certificate-branch-overview-card .dashboard-card-head select {margin-bottom:0;}
  #certificates-page .certificate-branch-overview-card .certificate-branch-overview-toggle {margin-left:auto;}
}

/* Professional capability selection reuses the personnel form; checkbox rows retain native size. */
.professional-capability-choices { grid-column: 1 / -1; }
.professional-capability-choices label { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.professional-capability-choices input[type=checkbox] { width: auto; min-width: 0; margin: 0; }
#certificates-page .certificate-period-card {grid-column:auto;min-width:0;padding:0;border-radius:11px;box-shadow:0 12px 36px #1c376c0b;}
#certificates-page .certificate-period-card .dashboard-card-head {flex-wrap:wrap;}
#certificates-page .certificate-period-card .dashboard-card-head {display:flex;justify-content:space-between;align-items:center;padding:18px 21px;gap:15px;}
#certificates-page .certificate-period-card .dashboard-card-head h2 {font-size:14px;font-weight:650;margin:0;}
#certificates-page .certificate-period-card .dashboard-card-head .actions {gap:9px;}
#certificates-page .certificate-period-card .dashboard-card-head select {font-family:inherit;font-size:12px;font-weight:400;line-height:1.6;padding:8px 11px;border:1px solid #e0e6f0;border-radius:6px;color:#52647e;}
#certificates-page .certificate-period-card .dashboard-card-head button {font-family:inherit;font-size:12px;font-weight:400;line-height:1.6;padding:8px 14px;border:1px solid #dfe5ee;border-radius:7px;color:#50617a;}
#certificates-page .certificate-period-card .dashboard-card-body {padding:0 21px 20px;}
#certificates-page .certificate-period-card .dashboard-card-body > p {font-size:11px;color:var(--sub);margin:0 0 12px;}
#certificates-page .certificate-period-card .dashboard-card-body > .people-download {margin-top:12px;}

/* P1.3 management fee list and filters. */
#management-fees-page > .card {padding:0;overflow:hidden;border-radius:11px;box-shadow:0 12px 36px #1c376c0b;}
#management-fees-page > .card > p {margin:0;padding:18px 21px;font-size:12px;color:var(--sub);}
#management-fees-page .account-table table {min-width:760px;white-space:nowrap;}
#management-fees-page .account-table th {padding:12px 18px;background:#f8fafe;color:#8a96aa;font-size:11px;font-weight:500;}
#management-fees-page .account-table td {padding:15px 18px;border-color:#eff2f7;color:#53647d;font-size:12px;}
#management-fees-page .account-table tbody tr:last-child td {border-bottom:0;}
#management-fees-page .account-table td button {border:1px solid #dfe5ee;border-radius:7px;padding:5px 10px;margin:0;color:#50617a;font-size:11px;line-height:1.6;}
#management-fees-page .people-heading .actions {gap:9px;flex-wrap:wrap;}
#management-fees-page .people-heading :is(input,select) {min-width:120px;padding:8px 11px;border:1px solid #e0e6f0;border-radius:6px;color:#52647e;font-size:12px;}

/* Disclosed groups use the existing P1.3 sidebar treatment. */
#sidebar nav { min-height: 0; overflow-y: auto; scrollbar-width: thin; }
#workspace-preview-footer { flex-shrink: 0; }
:is(#system-nav,.workspace-nav-group) { width: 100%; border: 0; text-align: left; }
:is(#system-nav,.workspace-nav-group)::after { content: "▸"; margin-left: auto; }
:is(#system-nav,.workspace-nav-group)[aria-expanded="true"]::after { content: "▾"; }
#sidebar :is(#system-subnavigation,.workspace-subnavigation) { display: grid; padding-left: 15px; }
.p13-workspace #sidebar nav .workspace-nav-group[data-active] { background: #f5f7fc; color: var(--blue); font-weight: 650; }
#system-subnavigation button { border: 0; background: transparent; text-align: left; color: var(--sub); font-size: 12px; padding: 8px 10px; cursor: default; }
@media (min-width: 761px) {
  .nav-collapsed #system-nav { justify-content: center; }
  .nav-collapsed #system-nav span, .nav-collapsed :is(#system-nav,.workspace-nav-group)::after,
  .nav-collapsed #sidebar :is(#system-subnavigation,.workspace-subnavigation) { display: none; }
}
