/* Shared Edubroker surfaces. The approved Agents and authentication layers follow. */
:root {
  --text: #293139;
  --muted: #626b74;
  --line: #e0e4e7;
  --line-dark: #cdd3d8;
  --red: #bd4029;
  --red-dark: #a53421;
  --accent: #bd4029;
  --shadow: none;
}
html { color-scheme: light; background: #f5f6f7; }
body {
  background: #f5f6f7;
  color: var(--text);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; letter-spacing: 0; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
button { transition: background-color 130ms, border-color 130ms, color 130ms; }
button:active:not(:disabled) { filter: brightness(.95); }
:where(button, summary, input, select, textarea, a):focus-visible {
  outline: 2px solid #1e6aa8;
  outline-offset: 2px;
}
.broker-shell { grid-template-columns: 220px minmax(0, 1fr); background: #f5f6f7; }
.broker-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  min-height: 100dvh;
  height: 100dvh;
  overflow-y: auto;
  color: #eef0f1;
  background: #232629;
  border: 0;
  box-shadow: none;
}
.broker-brand { min-height: 64px; padding: 18px 16px; border-color: #3c4044; gap: 10px; }
.broker-brand strong { font-size: 20px; font-weight: 650; letter-spacing: 0; }
.broker-brand > span { padding: 3px 6px; border: 1px solid #505559; border-radius: 4px; font-size: 10px; font-weight: 500; }
.broker-user { margin: 0 12px 14px; padding: 12px 4px; border: 0; border-bottom: 1px solid #3c4044; border-radius: 0; background: transparent; box-shadow: none; gap: 3px; }
.broker-user strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.broker-user span, .broker-user small { color: #b9bec2; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.broker-nav, html[lang="zh-CN"] .broker-nav { display: grid; grid-template-columns: 1fr; gap: 3px; padding: 0 10px 16px; }
.broker-nav button, html[lang="zh-CN"] .broker-nav button {
  min-height: 40px; padding: 10px 12px; border: 0; border-radius: 5px;
  color: #dce0e2; background: transparent; font-size: 13px; font-weight: 500;
  line-height: 1.35; box-shadow: none; transform: none; text-align: left;
}
.broker-nav button:hover { color: #fff; background: #34383b; transform: none; }
.broker-nav button.is-active { color: #fff; background: #a93a27; box-shadow: none; }
.broker-nav button[data-action="logout"] { margin-top: 14px; color: #b9bec2; }
.broker-main { min-width: 0; max-width: 100%; padding: 24px 28px; }
.page { min-width: 0; gap: 16px; }
.page-head { min-width: 0; align-items: center; gap: 12px; margin-bottom: 2px; flex-wrap: wrap; }
.page-title-line { min-width: 0; gap: 10px; }
.page-head h1, html[lang="zh-CN"] .page-head h1 { font-size: 23px; line-height: 1.25; letter-spacing: 0; font-weight: 650; overflow-wrap: anywhere; }
.page-actions { gap: 8px; flex-wrap: wrap; }
.page-nav-button { width: 34px; height: 34px; min-width: 34px; padding: 7px; border-radius: 5px; box-shadow: none; }
.broker-main :where(h2, h3, h4, p) { letter-spacing: 0; }
.broker-main h2 { font-size: 16px; font-weight: 650; line-height: 1.4; }
.broker-main h3 { font-size: 13px; font-weight: 650; line-height: 1.5; }
.broker-main .muted { color: var(--muted); font-size: 12px; font-weight: 400; }
.broker-main strong { font-weight: 600; }
.broker-main .panel { min-width: 0; max-width: 100%; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.broker-main .panel.pad { padding: 18px; }
.broker-main .panel-header, .broker-main .panel-header.compact {
  min-height: 0; padding: 14px 18px; gap: 10px; background: #fff;
  border-bottom: 1px solid var(--line); align-items: center;
}
.broker-main .panel-header h2 { margin: 0; }
.broker-main .panel > .panel-header { flex-direction: row; text-align: left; }
.broker-main .panel > .panel-header > div { width: auto; }
.broker-main .panel-header > div { min-width: 0; }
.broker-main .panel-header .muted { display: block; margin-top: 3px; }
.broker-main :where(.text-button, .primary-button, .mini),
.application-modal :where(.text-button, .primary-button) {
  min-width: 0; min-height: 36px; max-width: 100%; padding: 7px 11px;
  border-radius: 5px; font-size: 12px; font-weight: 600; line-height: 1.4;
  letter-spacing: 0; box-shadow: none; transform: none;
}
.broker-main .text-button, .application-modal .text-button { border-color: var(--line-dark); background: #fff; color: var(--text); }
.broker-main .text-button:hover, .application-modal .text-button:hover { border-color: #9da7b1; background: #f3f5f6; transform: none; }
.broker-main .primary-button, .application-modal .primary-button { color: #fff; border-color: #bd4029; background: #bd4029; }
.broker-main .primary-button:hover, .application-modal .primary-button:hover { color: #fff; background: #a53421; border-color: #a53421; transform: none; }
.broker-main .danger { color: #a8332e; }
.broker-main :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
.application-modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) {
  min-width: 0; max-width: 100%; min-height: 38px; padding: 8px 10px;
  color: var(--text); border: 1px solid var(--line-dark); border-radius: 5px;
  background-color: #fff; font-size: 13px; font-weight: 400; line-height: 1.4; box-shadow: none;
}
.broker-main input::placeholder, .broker-main textarea::placeholder { color: #747c84; font-weight: 400; opacity: 1; }
.broker-main :where(input[type="checkbox"], input[type="radio"]) { width: 16px; height: 16px; flex: 0 0 16px; accent-color: #bd4029; }
.broker-main :where(.field, .form-grid, .form-grid > div, .form-grid > label, .password-control) { min-width: 0; }
.broker-main .field { gap: 5px; }
.broker-main .field > label, .broker-main .field > span, .broker-main label.field {
  color: #505a63; font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0;
}
.broker-main .form-grid { gap: 14px 18px; }
.broker-main .form-grid input, .broker-main .form-grid select { width: 100%; }
.broker-main .form-grid input[type="checkbox"], .broker-main .form-grid input[type="radio"] { width: 16px; }
.broker-main .password-control input { padding-right: 42px; }
.broker-main .password-toggle { width: 36px; min-width: 36px; padding: 8px; }
.broker-shell .broker-main .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
.program-edit-dialog .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { font-size: 13px; font-weight: 400; min-height: 38px; border-radius: 5px; }
.program-edit-dialog .field > label, .program-edit-dialog :is(.win11-calendar small, .application-period-picker small) { font-size: 12px; font-weight: 500; text-transform: none; }
.broker-main .toolbar, .broker-main .search-toolbar {
  min-width: 0; gap: 8px; padding: 14px 18px; border: 0; border-radius: 0; background: #fff; box-shadow: none;
}
.broker-main .search-input { font-size: 13px; font-weight: 400; }
.broker-main .multi-choice > summary, .broker-main .filter-panel > summary,
.broker-main .intake-picker > summary {
  min-height: 38px; padding: 8px 10px; border-radius: 5px;
  color: var(--text); background: #fff; border-color: var(--line-dark); font-size: 12px; font-weight: 500;
}
.broker-main .filter-panel { border-radius: 5px; border-color: var(--line); }
.broker-main .filter-panel > summary > span { padding: 0; border-radius: 0; color: var(--text); background: none; font-size: 12px; font-weight: 500; text-transform: none; }
.broker-main .filter-panel > summary > small { font-size: 12px; font-weight: 400; color: var(--muted); }
.broker-main .multi-choice-menu { border-color: var(--line-dark); border-radius: 6px; box-shadow: 0 8px 24px #20262c18; }
.broker-main .multi-choice-menu label { font-size: 12px; font-weight: 400; }
.broker-main .multi-choice-dropdown > summary { min-height: 38px; padding: 8px 10px; border-radius: 5px; border-color: var(--line-dark); background: #fff; font-size: 12px; font-weight: 500; }
.broker-main .multi-choice-dropdown .multi-choice-menu { font-size: 12px; }
.broker-main .application-count, .broker-main .application-number-list { display: block; }
.broker-main .application-number-list { margin-top: 3px; }
.broker-main .mobile-record-card { padding: 14px; border-radius: 5px; border: 1px solid var(--line); box-shadow: none; background: #fff; }
.broker-main .mobile-card-field > span { font-size: 12px; color: var(--muted); font-weight: 400; text-transform: none; }
.broker-main .mobile-record-card .mobile-card-field { padding: 7px 0; }
.broker-main .flow-fill { background: #287a80; }
.broker-main .flow-track { height: 8px; background: #e9edf0; border-radius: 3px; }
.broker-main .statistics-bar-list { padding: 14px 18px; gap: 12px; }
.broker-main .statistics-bar-row strong { font-size: 12px; font-weight: 500; }
.broker-main .statistics-bar-row small { font-size: 11px; font-weight: 400; }
.broker-main .data-table { font-size: 13px; }
.broker-main .data-table th { padding: 11px 12px; background: #f7f8f9; color: #505a63; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.broker-main .data-table td { padding: 10px 12px; border-color: var(--line); line-height: 1.5; vertical-align: middle; }
.broker-main .table-wrap { min-width: 0; max-width: 100%; border-radius: 0; box-shadow: none; }
.broker-main .data-table tbody tr:hover { background: #fafbfc; }
.broker-main .data-table :where(.name-link, .candidate-name-link, .agent-name-link) { font-size: 13px; font-weight: 600; }
.broker-main .status, .application-modal .status { padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
.broker-main .empty-state { padding: 28px 18px; border-radius: 0; color: var(--muted); font-size: 13px; box-shadow: none; }
.broker-main .empty-state p { margin: 0; }
.broker-shell .page-head h1 { font-size: 23px; }
.broker-main .program-filter-control select { font-size: 13px; font-weight: 400; }
.broker-main .admin-dashboard-metric > span, .broker-main .admin-dashboard-metric > small,
.broker-main .stat-label, .broker-main .stat-foot { text-transform: none; white-space: normal; overflow: visible; font-weight: 400; }
.broker-main .admin-dashboard-metric > strong { font-size: 23px; font-weight: 600; }
.broker-main .admin-dashboard-metric > small { font-size: 11px; }
.broker-main .dashboard-queue-row.document-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
.dashboard-queue-row.document-row .queue-main { grid-row: 1 / 3; }
.dashboard-queue-row.document-row > span:nth-child(3) { display: none; }
.dashboard-queue-row.document-row .status { justify-self: end; }
.dashboard-queue-row > span { min-width: 0; overflow-wrap: anywhere; }
.broker-main .admin-account-layout { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); grid-template-areas: "profile facts" "actions actions" "editor editor"; padding: 18px; gap: 14px 18px; }
.broker-main .admin-profile-card { min-height: 0; padding: 0; border: 0; border-radius: 0; background: #fff; }
.broker-main .account-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 5px; background: #eef1f3; color: var(--text); font-size: 14px; font-weight: 600; }
.broker-main .admin-account-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.broker-main .admin-account-facts > div { padding: 0 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: #fff; }
.broker-main .admin-account-facts :where(strong, span) { font-size: 12px; overflow-wrap: anywhere; }
.broker-main .account-action-list { display: flex; flex-wrap: wrap; gap: 8px; }
.broker-main .account-action-button { display: inline-flex; width: auto; min-height: 36px; padding: 8px 12px; border: 1px solid var(--line-dark); border-radius: 5px; background: #fff; box-shadow: none; }
.broker-main .account-action-button strong { font-size: 12px; }
.broker-main .account-action-button.is-active { border-color: #bd4029; color: #a53421; background: #fcf5f3; }
.broker-main .account-editor-card { min-height: 0; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.broker-main .account-password-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 14px; }
.broker-main .account-editor-head { margin-bottom: 12px; }
.broker-main .agent-dashboard-profile-body { grid-template-columns: minmax(0, 1fr); }
.broker-main .agent-dashboard-profile-card { min-height: 0; }
.broker-main .agent-dashboard-facts { grid-column: 1; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; padding: 0; }
.broker-main .agent-dashboard-facts > div { padding: 10px 12px; border: 0; border-right: 1px solid var(--line); min-height: 0; }
.broker-main .agent-dashboard-facts :where(strong, span) { font-size: 12px; line-height: 1.45; text-transform: none; white-space: normal; overflow-wrap: anywhere; }
.broker-main .agent-profile-information { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 0; }
.broker-main .agent-profile-information span { text-transform: none; font-weight: 400; }
.broker-main .agent-dashboard-profile-card span:not(.account-avatar) { font-weight: 400; }
.broker-main .agent-profile-security-summary { border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; border-radius: 0; background: #fff; }
.broker-main .agent-page-footer { padding: 12px 0 0; margin-top: 18px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.broker-main .agent-page-footer span { font-size: 11px; }
.broker-sidebar .pm-workspace { margin: 0 10px 12px; }
.broker-sidebar .pm-switcher { padding: 3px; background: #34383b; border: 1px solid #505559; border-radius: 5px; }
.broker-sidebar .pm-switcher button { min-height: 36px; padding: 7px; border: 0; color: #dce0e2; background: transparent; font-size: 11px; }
.broker-sidebar .pm-switcher button[aria-pressed="true"] { color: #293139; background: #fff; }
.broker-main .bottom-bar { min-width: 0; padding: 12px 0; gap: 8px; border-radius: 0; box-shadow: none; background: #fff; }

/* Horizontal totals use the same quiet treatment as the Agent detail metrics. */
.broker-main .stats-grid, .admin-dashboard-metrics, .broker-main .pm-metrics {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  grid-template-columns: none; gap: 0; border-block: 1px solid var(--line); background: #fff; overflow-x: auto;
}
.broker-main .stat, .admin-dashboard-metric, .broker-main .pm-metrics > button {
  min-width: 0; min-height: 80px; padding: 12px 16px; border: 0;
  border-right: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; transform: none;
}
.broker-main .stat:last-child, .admin-dashboard-metric:last-child { border-right: 0; }
.broker-main .stat-label, .admin-dashboard-metric-label { color: var(--muted); font-size: 12px; font-weight: 500; }
.broker-main .stat-value, .admin-dashboard-metric-value { color: var(--text); font-size: 23px; line-height: 1.3; font-weight: 600; }
.broker-main .stat-foot, .admin-dashboard-metric-foot { color: var(--muted); font-size: 11px; font-weight: 400; }
.broker-main .stat::before, .admin-dashboard-metric::before, .admin-dashboard-metric::after { content: none; }
.admin-dashboard-metric:hover { background: #f6f8f9; transform: none; box-shadow: none; }
.admin-dashboard-hero.admin-dashboard-hero-v2 { display: block; padding: 0; min-height: 0; background: none; border: 0; border-radius: 0; box-shadow: none; }
.admin-dashboard-hero::before, .admin-dashboard-hero::after { content: none; }
.admin-dashboard-command-panel { padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.admin-dashboard-command-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.dashboard-command, .dashboard-command.is-primary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 12px; color: var(--text); background: #fff; border: 1px solid var(--line-dark); border-radius: 5px; box-shadow: none; transform: none; }
.dashboard-command strong { color: inherit; font-size: 12px; }
.dashboard-command span { color: var(--muted); font-size: 11px; }
.dashboard-command.is-primary { color: #fff; background: #bd4029; border-color: #bd4029; }
.dashboard-command.is-primary span { color: #fff; }
.dashboard-command:hover { background: #f2f4f5; transform: none; box-shadow: none; }
.dashboard-command.is-primary:hover { background: #a53421; }
.admin-pipeline-grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(100px, 1fr); grid-template-columns: none; overflow-x: auto; gap: 0; padding: 0; }
.admin-pipeline-stage { min-width: 0; min-height: 80px; padding: 12px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; transform: none; }
.admin-pipeline-stage strong { font-size: 22px; color: var(--text); }
.admin-pipeline-stage small { font-size: 12px; font-weight: 500; }
.admin-pipeline-stage em, .pipeline-stage-kicker { display: none; }
.admin-dashboard-grid { grid-template-columns: minmax(0, 1.7fr) minmax(270px, 1fr); gap: 16px; }
.dashboard-side-stack { gap: 16px; }
.dashboard-list, .dashboard-agent-list { padding: 0; gap: 0; }
.dashboard-queue-row, .dashboard-agent-row, .dashboard-document-row { min-height: 52px; padding: 10px 16px; gap: 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; transform: none; }
.dashboard-queue-row:hover, .dashboard-agent-row:hover { background: #f7f8f9; transform: none; }
.dashboard-queue-row :where(strong, span), .dashboard-agent-row :where(strong, span) { font-size: 12px; }
.dashboard-privacy-grid { padding: 14px 18px; gap: 8px; font-size: 12px; }

/* Details and profile sections are flat, aligned information rows. */
.broker-main .detail-grid { gap: 16px; }
.broker-main .detail-list { gap: 8px 14px; padding: 16px 18px; font-size: 13px; }
.broker-main .detail-list dt { color: var(--muted); font-size: 12px; font-weight: 400; }
.broker-main .detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.agent-dashboard-profile-body { padding: 18px; gap: 16px; }
.agent-dashboard-profile-card { padding: 0 0 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.agent-dashboard-profile-card h2 { font-size: 16px; }
.agent-dashboard-profile-card .agent-profile-avatar { width: 40px; height: 40px; font-size: 16px; background: #f0f2f4; color: var(--text); box-shadow: none; }
.agent-dashboard-facts, .agent-profile-information { gap: 0; border-block: 1px solid var(--line); }
.agent-dashboard-facts > div, .agent-profile-information > div { min-height: 0; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.agent-profile-information strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.agent-profile-information span, .agent-dashboard-facts span { font-size: 12px; color: var(--muted); }
.agent-dashboard-profile-grid, .agent-dashboard-security-grid { gap: 14px 18px; }
.agent-dashboard-security-panel { padding: 14px 0; background: #fff; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.agent-footer { border-top: 1px solid var(--line); padding: 16px 0 0; margin-top: 20px; font-size: 11px; }

/* Form steps keep stable dimensions without desktop table-shaped inputs. */
.agent-application-workflow { gap: 14px; }
.wizard-progress, .agent-shell .wizard-progress, html[lang="zh-CN"] .wizard-progress {
  display: flex; gap: 0; grid-template-columns: none; padding: 0 0 4px; background: #fff; overflow-x: auto; border-bottom: 1px solid var(--line);
}
.wizard-progress button, .agent-shell .wizard-progress button, html[lang="zh-CN"] .wizard-progress button {
  display: flex; flex: 1 0 116px; align-items: center; gap: 7px; min-height: 52px; padding: 8px 10px;
  border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: #fff; color: var(--muted);
  font-size: 12px; font-weight: 500; line-height: 1.3; box-shadow: none;
}
.wizard-progress button span, html[lang="zh-CN"] .wizard-progress button span { flex: 0 0 22px; width: 22px; height: 22px; font-size: 11px; background: #f0f2f4; color: #59626b; }
.wizard-progress button.is-active, html[lang="zh-CN"] .wizard-progress button.is-active { background: #fff; color: #a53421; border-bottom-color: #bd4029; }
.wizard-progress button.is-active span { color: #fff; background: #bd4029; }
.wizard-progress button.is-complete span { color: #276852; background: #e8f3ed; }
.agent-application-workflow .form-section-title { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 650; color: var(--text); background: #fff; }
.agent-application-workflow .candidate-contact-line { display: grid; grid-template-columns: 180px minmax(0, 480px); align-items: center; gap: 12px; padding: 14px 18px; background: #fff; font-size: 12px; }
.agent-application-workflow .candidate-info-table { width: 100%; table-layout: fixed; }
.agent-application-workflow .candidate-info-table :where(th, td) { padding: 8px 18px; border: 0; background: #fff; }
.agent-application-workflow .candidate-info-table th { width: 210px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: left; text-transform: none; }
.agent-application-workflow .candidate-info-table td input, .agent-application-workflow .candidate-info-table td select { width: min(100%, 480px); }
.agent-application-workflow .candidate-info-table tr:last-child :where(th, td) { padding-bottom: 18px; }
.broker-main .agent-application-workflow .candidate-info-table th,
.broker-main .agent-application-workflow .candidate-info-table td { min-height: 0; height: auto; border: 0; background: #fff; }
@media (min-width: 761px) {
  .agent-application-workflow .candidate-info-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding: 16px 18px; }
  .agent-application-workflow .candidate-info-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; background: #fff; }
  .broker-main .agent-application-workflow .candidate-info-table th,
  .broker-main .agent-application-workflow .candidate-info-table td,
  .broker-main .agent-application-workflow .candidate-info-table tr:last-child :is(th, td) { display: block; width: 100%; padding: 0; }
  .broker-main .agent-application-workflow .candidate-info-table td :is(input, select) { width: 100%; max-width: none; }
  .agent-application-workflow .candidate-contact-line { grid-template-columns: minmax(0, 1fr); gap: 5px; width: calc(50% + 8px); max-width: 100%; }
}
.agent-application-workflow .dossier-section-head { padding: 14px 18px; gap: 12px; background: #fff; border-bottom: 1px solid var(--line); }
.agent-application-workflow .dossier-section-head h2 { margin: 0; font-size: 16px; }
.agent-application-workflow .dossier-section-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.agent-application-workflow .record-stack { gap: 14px; padding: 16px 18px; }
.agent-application-workflow .record-entry.table-wrap { padding: 12px; border: 1px solid var(--line); border-radius: 5px; overflow: visible; }
.agent-application-workflow .dossier-entry-table, .agent-application-workflow .dossier-entry-table tbody { display: block; width: 100%; min-width: 0; }
.agent-application-workflow .dossier-entry-table thead { display: none; }
.agent-application-workflow .dossier-entry-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.agent-application-workflow .dossier-entry-table td { display: grid; gap: 5px; min-width: 0; width: auto; padding: 0; border: 0; background: none; }
.agent-application-workflow .dossier-entry-table td::before { display: block; content: attr(data-label); font-size: 12px; color: var(--muted); font-weight: 500; text-transform: none; }
.agent-application-workflow .dossier-entry-table :where(input, select) { width: 100%; }
.agent-application-workflow .wizard-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); background: #f5f6f7; }
.agent-application-workflow .wizard-actions [data-action="new-step-back"], .agent-application-workflow .wizard-actions [data-action="new-step-next"] { min-width: 88px; }

/* Program configuration and access retain their existing nested disclosure logic. */
.program-manager-layout { gap: 16px; }
.program-editor-details > summary, .program-doc-editor-details > summary { padding: 12px 0; color: var(--text); font-size: 15px; font-weight: 600; }
.program-editor-grid, .program-editor-dialog .form-grid { gap: 14px 18px; }
.program-option-section, .program-assignment-section, .program-doc-editor { padding: 14px 0; margin-top: 14px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.program-intake-section .program-option-content { margin-top: 12px; }
.program-list-toolbar { display: grid; grid-template-columns: minmax(230px, .8fr) minmax(0, 2fr); align-items: start; }
.program-search-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; min-width: 0; }
.program-filter-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.program-list-table .program-title-cell { font-size: 13px; }
.agent-program-access-toolbar, .program-agent-assignment-toolbar { gap: 8px; padding: 14px 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
.agent-program-form-card { padding: 14px 0; margin: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.agent-program-intake-details, .agent-program-intake-card, .program-agent-assignment-card { border-radius: 5px; box-shadow: none; }
.agent-program-form-card h3 { font-size: 14px; }
.program-edit-dialog { border-radius: 7px; box-shadow: 0 12px 48px #20262c24; }
.program-edit-dialog-header { padding: 14px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.program-edit-dialog-header h2 { font-size: 18px; }
.program-edit-dialog-body { padding: 18px; }
.program-edit-dialog-footer { padding: 12px 18px; background: #fff; }
.program-edit-intake-bar { padding: 12px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: #fff; }
.program-edit-intake-meta { padding: 8px 12px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: #fff; }
.program-edit-intake-meta span { font-size: 11px; font-weight: 400; text-transform: none; }
.program-edit-intake-meta :is(strong, code) { font-size: 12px; font-weight: 500; }
.program-edit-dialog :is(.win11-calendar, .application-period-picker) { padding: 0; border: 0; border-radius: 0; background: #fff; }
.program-edit-dialog .intake-calendar-picker { padding: 0; border: 0; border-radius: 0; background: #fff; }
.program-edit-dialog .intake-calendar-picker small { font-size: 12px; font-weight: 500; text-transform: none; }

/* Record registers, files, workflows and chat share type and controls, not state. */
.register-toolbar { padding: 14px 0; gap: 8px; }
.register-search input { height: 38px; }
.register-summary { color: var(--muted); font-size: 12px; }
.register-table th { font-weight: 600; }
.register-table td { padding-block: 10px; }
.register-filter-popover { color: var(--text); font-size: 13px; }
.fm-toolbar { gap: 8px; }
.fm-table tbody tr { height: 48px; }
.fm-table th { color: #505a63; font-size: 12px; }
.fm-table .fm-empty { text-align: left; padding: 28px 16px; }
.fm-preview, .wf-dialog, .pm-modal, .pm-grant-dialog { border-radius: 7px; }
.pm { font-size: 13px; }
.pm .pm-button { font-size: 12px; }
.pm-button.pm-primary { background: #bd4029; border-color: #bd4029; }
.pm-button.pm-primary:hover:not(:disabled) { background: #a53421; border-color: #a53421; }
.fm-metrics dd { font-size: 23px; }
.cc-shell { height: min(820px, calc(100dvh - 48px)); color: var(--text); }
.cc-toolbar h1 { font-size: 23px; font-weight: 650; }
.cc-contact { min-height: 72px; }
.cc-contact strong, .cc-person-name { font-size: 13px; }
.cc-composer button[type="submit"] { background: #bd4029; border-color: #bd4029; border-radius: 5px; }
.cc-system { border-radius: 5px; }
.application-modal { border-radius: 7px; box-shadow: 0 12px 48px #20262c24; color: var(--text); }
.application-modal h1 { font-size: 20px; font-weight: 650; line-height: 1.35; }
.application-modal .modal-box { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: #fff; box-shadow: none; }
.application-modal .modal-box:last-child { border-right: 0; }
.application-modal .modal-box header { padding: 10px 12px; background: #f6f7f8; color: var(--text); font-size: 13px; font-weight: 600; }
.application-modal .modal-box dl { padding: 12px; gap: 5px 10px; font-size: 13px; }
.application-modal .modal-box dt { color: var(--muted); font-weight: 400; }
.application-modal .modal-box dd { min-width: 0; overflow-wrap: anywhere; }
.application-modal .modal-tabs { gap: 4px; }
.application-modal .modal-tabs button { min-height: 36px; padding: 8px 12px; border-radius: 5px 5px 0 0; font-size: 12px; font-weight: 600; background: #f6f7f8; }
.application-modal .modal-tabs button.is-active { color: #a53421; background: #fff; }
.application-modal .application-document-table { font-size: 13px; }
.application-modal .application-document-table th { color: #505a63; font-size: 12px; font-weight: 600; background: #f7f8f9; text-transform: none; }
.application-modal .application-decision-field span { font-weight: 500; }

@media (max-width: 1100px) {
  .broker-shell { grid-template-columns: 200px minmax(0, 1fr); }
  .broker-main { padding: 20px; }
  .program-list-toolbar, .admin-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-dashboard-metrics { grid-auto-columns: minmax(110px, 1fr); }
  .agent-application-workflow .dossier-entry-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .broker-shell { display: block; }
  .broker-sidebar { position: relative; height: auto; min-height: 0; overflow: visible; padding: 0; }
  .broker-brand { min-height: 48px; padding: 10px 14px; border-bottom: 0; }
  .broker-brand strong { font-size: 18px; }
  .broker-brand > span { font-size: 10px; }
  .broker-user { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0 14px 8px; border: 0; }
  .broker-user strong { font-size: 12px; }
  .broker-user span, .broker-user small { font-size: 10px; }
  .broker-user small { flex-basis: 100%; }
  .broker-nav, html[lang="zh-CN"] .broker-nav { display: flex; gap: 4px; padding: 0 10px 8px; max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .broker-nav button, html[lang="zh-CN"] .broker-nav button { flex: 0 0 auto; min-height: 40px; padding: 10px; font-size: 12px; white-space: nowrap; }
  .broker-nav button, html[lang="zh-CN"] .broker-nav button { width: auto; }
  .broker-nav button[data-action="logout"] { margin-top: 0; }
  .broker-main { padding: 18px 12px; }
  .page, .page:has(> .admin-agents) { gap: 12px; }
  .page-head { gap: 10px; align-items: center; }
  .page-head h1, html[lang="zh-CN"] .page-head h1 { font-size: 21px; }
  .broker-shell .page-head h1 { font-size: 21px; }
  .page-head .page-actions:empty { display: none; }
  .page-actions { max-width: 100%; }
  .broker-main .panel.pad, .agent-dashboard-profile-body { padding: 14px; }
  .broker-main .panel-header, .broker-main .panel-header.compact { padding: 12px 14px; }
  .broker-main .toolbar, .broker-main .search-toolbar { padding: 12px; }
  .broker-main :where(.text-button, .primary-button) { min-height: 40px; padding: 9px 11px; }
  .broker-main :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
  .application-modal :where(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { min-height: 44px; font-size: 16px; }
  .broker-shell .broker-main .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea),
  .program-edit-dialog .field :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { font-size: 16px; min-height: 44px; }
  .broker-main .multi-choice > summary, .broker-main .filter-panel > summary { min-height: 40px; }
  .broker-main .multi-choice-dropdown > summary { min-height: 40px; }
  .broker-main .stats-grid { grid-auto-columns: minmax(100px, 1fr); }
  .broker-main .stat, .admin-dashboard-metric { min-height: 76px; padding: 10px 12px; }
  .broker-main .stat-value, .admin-dashboard-metric-value { font-size: 21px; }
  .admin-dashboard-command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-command { min-height: 44px; flex-wrap: wrap; gap: 3px 6px; }
  .admin-pipeline-grid { grid-auto-columns: minmax(110px, 1fr); }
  .broker-main .detail-grid, .broker-main .form-grid, .agent-dashboard-profile-grid, .agent-dashboard-security-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .broker-main .admin-account-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "profile" "facts" "actions" "editor"; padding: 14px; }
  .broker-main .admin-account-facts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .broker-main .admin-account-facts > div { display: grid; grid-template-columns: 70px minmax(0, 1fr); padding: 6px 0; border: 0; border-bottom: 1px solid var(--line); }
  .broker-main .account-password-grid { grid-template-columns: minmax(0, 1fr); }
  .broker-main .agent-dashboard-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .broker-main .agent-dashboard-facts > div { padding: 8px; }
  .broker-main .agent-profile-information { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .broker-main .agent-dashboard-profile-panel > .panel-header { display: flex; flex-wrap: nowrap; text-align: left; justify-content: space-between; }
  .broker-main .agent-dashboard-profile-panel > .panel-header > div { flex: 0 1 auto; }
  .agent-profile-actions { width: auto; }
  .agent-profile-actions > button { width: auto; }
  .broker-main .detail-list { grid-template-columns: minmax(90px, .7fr) minmax(0, 1.4fr); padding: 14px; }
  .agent-profile-information { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-profile-information > div { padding: 10px 8px; }
  .agent-shell .wizard-progress button, .wizard-progress button, html[lang="zh-CN"] .agent-shell .wizard-progress button { flex: 0 0 138px; min-height: 48px; font-size: 12px; }
  .agent-application-workflow .form-section-title { font-size: 16px; padding: 12px 14px; }
  .agent-application-workflow .candidate-contact-line { grid-template-columns: minmax(0, 1fr); padding: 12px 14px; gap: 5px; }
  .agent-application-workflow .candidate-info-table, .agent-application-workflow .candidate-info-table tbody { display: block; }
  .agent-application-workflow .candidate-info-table tr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 8px 14px; border: 0; }
  .agent-application-workflow .candidate-info-table :where(th, td),
  html[lang="zh-CN"] .agent-application-workflow .candidate-info-table :where(th, td) { display: block; width: 100%; padding: 0; font-weight: 500; text-transform: none; }
  .agent-application-workflow .candidate-info-table th { font-size: 12px; }
  .agent-application-workflow .candidate-info-table tr:last-child :where(th, td) { padding-bottom: 0; }
  .agent-application-workflow .candidate-info-table tr:last-child { padding-bottom: 14px; }
  .agent-application-workflow .candidate-info-table td input, .agent-application-workflow .candidate-info-table td select { width: 100%; min-height: 44px; font-size: 16px; }
  .agent-application-workflow .dossier-section-head { padding: 12px 14px; flex-wrap: wrap; }
  .agent-application-workflow .record-stack { padding: 12px 14px; }
  .agent-application-workflow .dossier-entry-table tr { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .agent-application-workflow .wizard-actions { position: relative; grid-template-columns: none; }
  .agent-application-workflow .wizard-actions > button { flex: 1 1 auto; }
  .agent-application-workflow .wizard-actions > button { width: auto; flex: 1 1 calc(50% - 8px); margin: 0; }
  .program-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .program-filter-control:has([data-program-filter="language"]) { grid-column: 1 / -1; }
  .program-edit-dialog-header, .program-edit-dialog-footer { padding: 12px 14px; }
  .program-edit-dialog-body { padding: 14px; }
  .cc-shell { height: calc(100dvh - 168px); min-height: 460px; }
  .cc-toolbar h1 { font-size: 21px; }
  .broker-main .cc-shell :is(.cc-search input, .cc-compose-row textarea, .cc-context-label select) { font-size: 16px; min-height: 44px; }
  .application-modal h1 { font-size: 17px; }
  .application-modal .modal-box { flex-basis: min(82vw, 290px); }
  .application-modal .modal-box dl { padding: 10px; font-size: 12px; }
  .application-modal .modal-tabs button { min-height: 40px; }
  .application-modal .modal-box header { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
