:root {
  --ink: #15232b;
  --muted: #607078;
  --line: #d9e3e5;
  --paper: #ffffff;
  --ground: #f3f7f7;
  --soft: #eaf3f1;
  --teal: #087b70;
  --teal-dark: #05645c;
  --danger: #a1442d;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--ground); font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.siteHeader { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(20px, calc((100vw - 1440px) / 2)); background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 16px; font-weight: 700; text-decoration: none; }
.brandMark { display: grid; place-items: center; width: 27px; height: 27px; background: var(--teal); color: #fff; font-size: 13px; }
.headerActions { display: flex; align-items: center; gap: 14px; }
.publicLabel, .sectionLabel, .kicker { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.selectionButton, .textButton, .secondaryButton, .rowButton, .removeButton, .closeButton { border: 0; background: transparent; color: var(--ink); }
.selectionButton { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--paper); }
.selectionButton strong { color: var(--teal); }

.pageShell { width: min(1440px, calc(100vw - 40px)); margin: 0 auto; padding: 32px 0 44px; }
.intro { max-width: 760px; margin-bottom: 26px; padding-left: 2px; }
.kicker { margin: 0 0 9px; color: var(--teal); font-weight: 700; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 9px; font-size: 34px; line-height: 1.22; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.35; }
.introCopy { max-width: 600px; margin: 0; color: var(--muted); line-height: 1.75; }

.workspace { display: grid; grid-template-columns: 248px minmax(0, 1fr) 292px; align-items: start; gap: 16px; }
.filters, .results, .selectionPanel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.filters, .selectionPanel { padding: 18px; }
.panelHeading, .resultsHeader, .modalHeading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sectionLabel { margin: 0 0 5px; color: var(--teal); font-weight: 700; }
.textButton { padding: 2px 0; color: var(--teal); font-size: 13px; }
.filters label, .requestModal label { display: grid; gap: 7px; margin-top: 17px; color: #43545d; font-size: 13px; }
select, input, textarea { width: 100%; border: 1px solid #cbd9dc; border-radius: 4px; background: #fff; color: var(--ink); outline: none; }
select, input { height: 38px; padding: 0 10px; }
textarea { min-height: 94px; padding: 10px; resize: vertical; }
select:focus, input:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgb(8 123 112 / 12%); }
.primaryButton, .secondaryButton { min-height: 38px; padding: 0 14px; border-radius: 4px; font-weight: 700; }
.primaryButton { border: 1px solid var(--teal); background: var(--teal); color: #fff; }
.primaryButton:hover { background: var(--teal-dark); }
.secondaryButton { border: 1px solid var(--line); background: #fff; color: #31434b; }
.primaryButton:active, .secondaryButton:active, .selectionButton:active { transform: translateY(1px); }
.filterSubmit { width: 100%; margin-top: 20px; }

.results { overflow: hidden; }
.resultsHeader { min-height: 82px; padding: 17px 20px 14px; border-bottom: 1px solid var(--line); }
.resultActions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.resultMeta { color: var(--muted); font-size: 13px; text-align: right; }
.resultActions .secondaryButton { flex: 0 0 auto; white-space: nowrap; }
.tableScroll { overflow: auto; }
table { width: 100%; min-width: 840px; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: #f5f8f8; color: #53636b; font-size: 12px; font-weight: 700; white-space: nowrap; }
td { color: #27383f; line-height: 1.5; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.companyCell { min-width: 205px; color: #17262d; font-weight: 700; }
.statusText { color: #526d1a; font-size: 13px; }
.rowButton { min-width: 52px; padding: 5px 0; color: var(--teal); font-size: 13px; font-weight: 700; }
.rowButton.added { color: var(--muted); }
.empty { padding: 60px 20px; color: var(--muted); text-align: center; }
.empty.error { color: var(--danger); }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 13px 18px; }
.pagination span { min-width: 74px; color: var(--muted); text-align: center; font-size: 13px; }
.pagePicker { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.pagePicker select { width: 104px; min-height: 38px; }

.selectionPanel { position: sticky; top: 14px; }
.selectionList { max-height: 480px; margin: 16px -18px 0; overflow: auto; border-top: 1px solid var(--line); }
.selectionItem { display: flex; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.selectionItem strong, .selectionItem span { display: block; }
.selectionItem strong { line-height: 1.45; font-size: 13px; }
.selectionItem span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.removeButton { color: var(--muted); font-size: 12px; white-space: nowrap; }
.selectionEmpty { padding: 36px 18px; color: var(--muted); text-align: center; }
.submitButton { width: 100%; margin-top: 16px; }
.mobileOnly { display: none; }

.modalBackdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgb(15 31 36 / 42%); }
.modalBackdrop[hidden] { display: none; }
.requestModal { width: min(640px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 18px 54px rgb(20 35 42 / 20%); }
.closeButton { width: 32px; height: 32px; color: var(--muted); font-size: 27px; line-height: 1; }
.modalSummary { margin: 18px 0 0; padding: 11px 12px; color: #33524e; background: var(--soft); line-height: 1.5; }
.formGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
fieldset { margin: 18px 0 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; color: #45545c; font-size: 13px; }
.checkLabel { display: inline-flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 7px; margin: 0 15px 0 0 !important; color: var(--ink) !important; }
.checkLabel input { width: 15px; height: 15px; }
.noteLabel { margin-top: 18px !important; }
.formMessage { min-height: 20px; margin: 14px 0 0; color: var(--teal); }
.formMessage a { color: var(--teal); font-weight: 700; }
.formActions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }
body.modalOpen { overflow: hidden; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 230px minmax(0, 1fr); }
  .selectionPanel { grid-column: 1 / -1; position: static; }
  .selectionList { max-height: 220px; }
}

@media (max-width: 780px) {
  .siteHeader { min-height: 58px; padding: 0 16px; }
  .publicLabel { display: none; }
  .pageShell { width: min(100% - 28px, 680px); padding: 22px 0 34px; }
  .intro { margin-bottom: 18px; }
  h1 { font-size: 28px; }
  .workspace { grid-template-columns: 1fr; gap: 14px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .filters .panelHeading, .filters .filterSubmit { grid-column: 1 / -1; }
  .filters label { margin-top: 14px; }
  .selectionPanel { grid-column: auto; position: static; }
  .mobileOnly { display: block; padding: 0 16px 12px; }
  .mobileSelectionButton { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--teal); font-weight: 700; }
  .resultsHeader { min-height: 0; align-items: flex-start; flex-direction: column; }
  .resultActions { width: 100%; align-items: stretch; flex-direction: column; }
  .resultMeta { text-align: left; }
  .resultActions .secondaryButton { width: 100%; }
  .formGrid { grid-template-columns: 1fr; }
  .requestModal { padding: 20px; }
}

@media (max-width: 460px) {
  .brand { font-size: 15px; }
  .filters { grid-template-columns: 1fr; }
  .headerActions { gap: 0; }
  .selectionButton { padding: 0 8px; }
  .pagination { flex-wrap: wrap; justify-content: space-between; }
  .pagination span { order: -1; width: 100%; text-align: left; }
  .formActions { display: grid; grid-template-columns: 1fr; }
  .formActions button { width: 100%; }
}
