:root {
  --ink: #183d3d;
  --muted: #798782;
  --line: #e3e9e5;
  --paper: #f5f7f4;
  --green: #235f52;
  --amber: #a46a24;
  --red: #b44236;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Inter, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #263934;
  background: var(--paper);
  font-size: 14px;
}
button,
input,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--green);
  border-radius: 7px;
  background: var(--green);
  padding: 10px 16px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.secondary {
  background: #fff;
  color: var(--ink);
  border-color: #d4ded7;
}
.hidden {
  display: none !important;
}
.muted {
  color: var(--muted);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
h3 {
  font-size: 15px;
  margin-bottom: 8px;
}
small,
.footnote {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.eyebrow {
  display: block;
  letter-spacing: 2px;
  font-size: 10px;
  font-weight: 700;
  color: #698277;
  margin-bottom: 12px;
}
.login-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}
.login-story {
  background: #163d36;
  color: #f4f3e6;
  padding: 58px 60px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-story:after {
  content: "";
  position: absolute;
  right: -180px;
  bottom: -250px;
  width: 600px;
  height: 600px;
  border: 1px solid #45665b;
  border-radius: 50%;
  box-shadow:
    0 0 0 75px #24483e,
    0 0 0 76px #45665b;
  opacity: 0.35;
  pointer-events: none;
}
.wordmark {
  font-weight: 600;
  letter-spacing: 1px;
}
.login-story h1 {
  margin-top: 120px;
  font-size: 48px;
  line-height: 1.45;
  letter-spacing: 0;
}
.login-story p {
  color: #b4c6bc;
  line-height: 1.8;
}
.story-bottom {
  margin-top: auto;
  font-size: 10px;
  letter-spacing: 2px;
  z-index: 1;
}
.story-bottom span {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0;
}
.login-form {
  align-self: center;
  width: 360px;
  max-width: 85%;
  margin: 60px auto;
}
.login-form h2 {
  font-size: 28px;
  margin-bottom: 12px;
}
.login-form .muted {
  margin-bottom: 35px;
}
.login-form label {
  display: block;
  font-size: 13px;
  margin: 20px 0 8px;
  font-weight: 500;
}
input,
textarea {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid #ccd7ce;
  border-radius: 6px;
  padding: 12px;
  margin-top: 10px;
  outline: none;
}
input:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px #235f5215;
}
.login-form button {
  width: 100%;
  margin-top: 20px;
}
.error-text {
  color: var(--red);
  margin-top: 16px;
  line-height: 1.6;
}
.workspace {
  display: grid;
  grid-template-columns: 218px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 218px;
  height: 100vh;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  margin: 4px 10px 52px;
  font-size: 17px;
  font-weight: 700;
}
.brand b {
  display: grid;
  place-items: center;
  width: 35px;
  height: 40px;
  background: var(--ink);
  color: white;
  border-radius: 8px;
  font-size: 24px;
  font-family: Georgia, serif;
}
.brand small {
  display: block;
  font-weight: 400;
  font-size: 10px;
  letter-spacing: 2px;
}
.nav-label {
  font-size: 10px;
  color: #95a29a;
  margin: 0 15px 16px;
  letter-spacing: 2px;
}
.nav-button {
  width: 100%;
  justify-content: flex-start;
  background: none;
  color: #74827a;
  border: none;
  padding: 13px 16px;
  margin-bottom: 7px;
  font-size: 15px;
  gap: 13px;
  font-weight: 400;
}
.nav-button.active {
  color: #1e5d4f;
  background: #eaf0e9;
  font-weight: 600;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 20px 12px 0;
  font-size: 11px;
  color: #6d8076;
  border-top: 1px solid var(--line);
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #458366;
  margin-right: 6px;
}
.sidebar-bottom p {
  margin-top: 9px;
  font-size: 10px;
}
.text-button {
  color: #668174;
  border: 0;
  background: none;
  padding: 0;
  font-size: 12px;
}
.badge {
  font-size: 10px;
  border-radius: 4px;
  background: #e6e5d5;
  padding: 2px 5px;
  margin-left: auto;
}
.workspace main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 66px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 36px;
  background: #fff;
  font-size: 12px;
  color: #87958c;
}
.main-content {
  padding: 34px 36px;
  max-width: 1600px;
  margin: auto;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 28px;
}
.page-heading p {
  font-size: 13px;
  margin-bottom: 0;
}
.mode-control {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: #e8eee6;
  padding: 7px 10px;
  border-radius: 5px;
  color: #496553;
}
.mode-control button {
  font-size: 12px;
  padding: 8px 10px;
}
.mode-control {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auto-hour-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.auto-hour-field input {
  width: 86px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  min-height: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metrics article {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 19px 22px;
}
.metrics span {
  display: block;
  color: #65776b;
  font-size: 12px;
}
.metrics strong {
  display: block;
  font-size: 32px;
  font-weight: 600;
  margin: 13px 0 8px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.metrics small {
  font-size: 10px;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  margin-bottom: 22px;
  overflow: hidden;
}
.upload-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: #fdfefd;
  border-style: dashed;
  border-color: #bbcdbf;
}
.upload-symbol {
  background: #eaf0e7;
  border-radius: 9px;
  width: 46px;
  height: 48px;
  display: grid;
  place-items: center;
  font-size: 27px;
  color: #6b8b74;
  flex-shrink: 0;
}
.upload-panel div:nth-child(2) {
  flex: 1;
}
.upload-panel p {
  font-size: 12px;
  color: #7b897e;
  margin-bottom: 4px;
}
.upload-panel small {
  font-size: 10px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.panel-heading {
  padding: 21px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.panel-heading h3 {
  margin-bottom: 7px;
}
.panel-heading span {
  font-size: 11px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.actions button,
.actions .button {
  font-size: 11px;
  padding: 9px 11px;
}
.table-scroll {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
th {
  padding: 13px 20px;
  background: #f8faf7;
  color: #7b8a7e;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
td {
  padding: 21px 20px;
  vertical-align: top;
  border-top: 1px solid #edf0eb;
  font-size: 12px;
  min-width: 140px;
  line-height: 1.8;
}
td pre {
  font: inherit;
  white-space: pre-wrap;
  margin: 0;
  color: #57695d;
  line-height: 1.85;
  min-width: 205px;
}
td strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 8px;
}
td small {
  display: block;
  font-size: 10px;
  overflow-wrap: anywhere;
  max-width: 300px;
}
.tag {
  display: inline-block;
  font-size: 10px;
  color: #42755a;
  background: #edf3e9;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
}
.tag.warn {
  color: var(--amber);
  background: #faf1df;
}
.tag.error {
  color: var(--red);
  background: #fbece7;
}
.tag.muted {
  color: #879387;
  background: #f1f3ef;
}
.tag.paused {
  color: #66708a;
  background: #eceff5;
}
.empty {
  text-align: center;
  padding: 60px 25px;
  color: #88968a;
  font-size: 13px;
}
.notice {
  padding: 13px 16px;
  border: 1px solid #d4dfcf;
  border-radius: 7px;
  background: #edf4e6;
  margin-bottom: 22px;
  color: #487046;
  line-height: 1.6;
}
.notice.error {
  border-color: #e9cec3;
  background: #fff0eb;
  color: var(--red);
}
.footnote {
  margin-top: 10px;
}
.command-help {
  padding: 25px;
}
.command-help p,
.command-help li {
  color: #617968;
  font-size: 12px;
  line-height: 1.8;
}
.command-help li {
  margin-bottom: 8px;
}
td button {
  padding: 5px 9px;
  font-size: 11px;
}
td a {
  color: var(--green);
}
@media (min-width: 1500px) {
  .main-content {
    padding-top: 45px;
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 180px 1fr;
  }
  .sidebar {
    width: 180px;
  }
  .main-content {
    padding: 26px 20px;
  }
  .metrics {
    gap: 10px;
  }
  .metrics article {
    padding: 16px;
  }
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading {
    align-items: flex-start;
  }
  .mode-control {
    justify-content: flex-start;
    width: 100%;
  }
  #page-reports > .page-heading {
    flex-wrap: wrap;
  }
  .login-story {
    padding: 40px;
  }
  .login-story h1 {
    font-size: 38px;
  }
}
@media (max-width: 700px) {
  .workspace {
    display: block;
  }
  .sidebar {
    position: static;
    width: auto;
    height: auto;
    padding: 14px;
  }
  .brand {
    margin: 0 0 16px;
  }
  .sidebar nav {
    display: flex;
    overflow: auto;
  }
  .nav-button {
    white-space: nowrap;
    width: auto;
    font-size: 12px;
    padding: 10px;
    gap: 6px;
  }
  .nav-label {
    display: none;
  }
  .sidebar-bottom {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 0;
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
  }
  .workspace main {
    width: 100%;
  }
  .topbar {
    padding: 0 20px;
    height: 48px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-heading {
    gap: 10px;
  }
  h1 {
    font-size: 25px;
  }
  .upload-panel {
    flex-wrap: wrap;
    padding: 16px;
  }
  .upload-panel div:nth-child(2) {
    min-width: 180px;
  }
  .actions {
    gap: 6px;
  }
  .login-wrap {
    grid-template-columns: 1fr;
  }
  .login-story {
    min-height: 250px;
    padding: 28px;
  }
  .login-story h1 {
    font-size: 30px;
    margin-top: 30px;
  }
  .story-bottom {
    display: none;
  }
  .login-form {
    margin: 45px auto;
  }
  .main-content {
    padding: 24px 14px;
  }
}
.group-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 16px 24px; background: #fafcf9; border-bottom: 1px solid #edf1eb; }
.group-search { display: flex; align-items: center; flex: 1 1 600px; gap: 10px; margin: 0; }
.group-search select, .group-search input { box-sizing: border-box; height: 42px; margin: 0; padding: 0 12px; border: 1px solid #ccd7ce; border-radius: 8px; color: var(--ink); background: #fff; }
#group-filter-field, #report-filter-field { flex: 0 0 160px; }
#group-filter-text, #group-filter-status, #report-filter-text { flex: 1 1 220px; min-width: 0; }
.group-search button { flex: 0 0 auto; white-space: nowrap; }
.group-toolbar > .muted { margin-left: auto; font-size: 13px; white-space: nowrap; }
.group-active-filters { display: flex; flex: 1 0 100%; flex-wrap: wrap; align-items: center; gap: 8px; }
.group-filter-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px 6px 12px; border: 1px solid #cbded7; border-radius: 20px; color: #164a40; background: #eaf4ef; font-size: 13px; }
.group-filter-chip button { padding: 0 3px; border: 0; color: inherit; background: transparent; font-size: 18px; line-height: 1; }
.group-filter-chip button:hover { background: transparent; color: #0c2e28; }
.group-filter-error { flex: 1 0 100%; margin: 0; color: #a12929; font-size: 13px; }
.group-toolbar [hidden], #directory-import-file[hidden] { display: none !important; }
.groups-pager { justify-content: flex-end; padding: 14px 24px; margin: 0; border-top: 1px solid #edf1eb; }
@media (max-width: 700px) {
  .group-toolbar { padding: 14px; }
  .group-search { flex-wrap: wrap; }
  #group-filter-field, #report-filter-field { flex: 1 1 100%; }
  #group-filter-text, #group-filter-status, #report-filter-text { flex: 1 1 100%; }
  .group-toolbar > .muted { margin-left: 0; }
  .groups-pager { padding: 14px; }
}
.binding-status-list { display: grid; gap: 5px; min-width: 125px; }

.help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 24px;
}
.help-link {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary, #256355);
  font: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.help-link:hover { background: transparent; color: #183f37; }
.directory-import-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.directory-import-bar .muted { margin: 0; }
.help-dialog {
  box-sizing: border-box;
  width: min(800px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  padding: 32px;
  border: 1px solid #dce5e1;
  border-radius: 16px;
  color: inherit;
  background: #fff;
  box-shadow: 0 24px 80px #183f3733;
  overflow-y: auto;
}
.help-dialog:focus, .help-dialog:focus-visible { outline: none; }
.help-dialog::backdrop { background: #142e2966; }
.help-dialog h2 { margin: 0 36px 24px 0; font-size: 22px; }
.help-dialog code { white-space: normal; overflow-wrap: anywhere; }
#report-summary-form { display: grid; gap: 16px; }
#report-summary-form[hidden] { display: none; }
#page-summary button[hidden], #page-summary th[hidden], #page-summary select[hidden], #report-summary-reference-options[hidden] { display: none; }
#report-summary-form .panel { min-width: 0; margin: 0; padding: 22px; }
#report-summary-form h2 { margin: 0; }
#report-summary-form h2 { font-size: 17px; }
#report-summary-ratios { display: grid; gap: 12px; margin: 0 0 16px; padding: 0; border: 0; }
#report-summary-ratios label, #report-summary-range-form label { display: grid; gap: 6px; }
.summary-phrase-header { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.summary-phrase-header > :first-child { margin-right: auto !important; }
.summary-phrase-selectors { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 24px; margin: 16px 0 22px; padding: 13px 15px; border: 1px solid #e2ebe3; border-radius: 12px; background: #f7faf7; }
.summary-filter-intro { flex-basis: 100%; }
.summary-filter-intro strong { color: var(--ink); font-size: 14px; }
.summary-filter-intro span { margin-left: 8px; color: #6b8479; font-size: 12px; font-weight: 500; }
.summary-brand-filter, .summary-tier-filter, .summary-tag-filter { display: grid; gap: 6px; color: #486356; font-size: 13px; font-weight: 650; }
.summary-brand-filter { width: min(100%, 235px); }
.summary-tag-filter { width: min(100%, 160px); }
#report-summary-toggle { margin-inline-start: auto; min-height: 40px; gap: 8px; white-space: nowrap; }
.summary-toggle-track { display: inline-flex; align-items: center; width: 32px; height: 18px; padding: 2px; border-radius: 10px; background: #74877b; }
.summary-toggle-track::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: #fff; }
#report-summary-toggle[aria-checked="true"] .summary-toggle-track { justify-content: flex-end; background: #235f52; }
#report-summary-pager[hidden] { display: none; }
.summary-brand-filter select, .summary-tag-filter select, #report-summary-range-form select {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 32px 8px 12px; color: var(--ink);
  border: 1px solid #cfded3; border-radius: 8px; appearance: none;
  background: linear-gradient(45deg, transparent 50%, #426758 50%) right 17px center / 5px 5px no-repeat,
    linear-gradient(135deg, #426758 50%, transparent 50%) right 12px center / 5px 5px no-repeat #fff;
}
.summary-tier-buttons { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border: 1px solid #dbe7dd; border-radius: 9px; background: #eaf1eb; }
.summary-tier-buttons button { min-height: 32px; padding: 5px 13px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #486356; font-size: 13px; }
.summary-tier-buttons button[aria-pressed="true"] { background: #fff; border-color: #d2e2d6; color: #205a4c; box-shadow: 0 1px 2px #213c2920; }
.summary-tier-buttons button[aria-pressed="false"]:hover { background: #f5f9f5; color: #205a4c; }
.summary-phrase-list { border: 1px solid #e6ede7; border-radius: 10px; }
.summary-phrase-list table { width: 100%; min-width: 620px; }
.summary-phrase-list th, .summary-phrase-list td { padding: 14px 18px; text-align: left; vertical-align: middle; }
.summary-phrase-list thead th { background: #eef4ef; color: #627d6c; }
.summary-phrase-list tbody tr:nth-child(odd) { background: #f6f9f6; }
.summary-phrase-list tbody tr:hover { background: #f0f6f1; }
.summary-phrase-text { line-height: 1.65; overflow-wrap: anywhere; }
.summary-phrase-fields { display: block; margin-top: 4px; font-size: 12px; }
.summary-phrase-inactive { color: #8b5422; }
.summary-phrase-tag { width: 1%; white-space: nowrap; color: var(--ink); font-weight: 600; }
.summary-phrase-range { width: 24%; min-width: 145px; }
.summary-phrase-range small { display: block; margin-top: 3px; }
#report-summary-range-form { display: grid; gap: 12px; }
#report-summary-range-form textarea { width: 100%; resize: vertical; }
#summary-edit-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; margin: 0; padding: 10px 12px; border: 1px solid #e2ebe3; border-radius: 9px; }
.summary-reference-options { padding-top: 12px; border-top: 1px solid #e2ebe3; }
.summary-reference-options p { margin: 0 0 7px; }
.summary-phrase-actions { width: 1%; white-space: nowrap; }
.summary-phrase-actions button { padding: 5px 9px; font-size: 12px; }
.summary-phrase-actions button + button { margin-left: 5px; }
#report-summary-form .form-actions, #report-summary-rule-form .form-actions, #report-summary-range-form .form-actions { display: flex; justify-content: flex-end; }
.summary-legend { display: grid; gap: 12px; margin: 6px 0 18px; }
.summary-legend-bar { display: flex; height: 34px; overflow: hidden; border-radius: 9px; border: 1px solid #dbe6de; }
.summary-legend-segment { display: flex; flex: 1; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 650; letter-spacing: .5px; }
.summary-legend-segment.is-low, .summary-legend-key.is-low .dot { background: #4a8a63; }
.summary-legend-segment.is-normal, .summary-legend-key.is-normal .dot { background: #8b9c92; }
.summary-legend-segment.is-high, .summary-legend-key.is-high .dot { background: #bf5b43; }
.summary-legend-keys { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.summary-legend-key { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; }
.summary-legend-key .dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 3px; flex: none; }
.summary-legend-key strong { display: block; color: var(--ink); font-size: 13px; }
.summary-legend-key small { display: block; margin-top: 2px; }
.summary-legend-basis { display: grid; gap: 6px; max-width: 320px; margin-bottom: 16px; color: #486356; font-size: 13px; font-weight: 650; }
.summary-legend-basis select { min-height: 38px; padding: 8px 12px; border: 1px solid #cfded3; border-radius: 8px; background: #fff; color: var(--ink); }
.summary-legend-hint { margin: -6px 0 16px; font-size: 12px; }
.summary-legend-inherit { margin: -6px 0 16px; padding: 6px 12px; font-size: 12px; }
#report-summary-legend-note.error { color: #a4342a; }
.summary-slot-editor { display: grid; gap: 8px; margin-bottom: 14px; }
.summary-slot-edit { display: flex; align-items: center; gap: 8px; }
.summary-slot-edit input { flex: 1; min-width: 0; min-height: 38px; padding: 8px 12px; border: 1px solid #cfded3; border-radius: 8px; }
.summary-slot-edit button { padding: 6px 10px; font-size: 12px; }
.summary-slot-edit button[aria-label="上移标签"], .summary-slot-edit button[aria-label="下移标签"] { min-width: 36px; padding: 6px 0; }
#report-summary-slot-form .form-actions { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
#report-summary-slot-form .form-actions button[type="submit"] { margin-left: auto; }
@media (max-width: 650px) {
  #report-summary-form .panel { padding: 14px; }
  .summary-phrase-list th, .summary-phrase-list td { padding: 10px 12px; }
}
.report-summary-review { flex-basis: 100%; min-width: 0; }
.report-summary-review pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  background: transparent;
  color: inherit;
  border: 0;
  font-size: 26px;
  line-height: 1;
}

#group-editor label { display:block; margin-top:18px; font-weight:600; }
#group-editor input, #group-editor select { box-sizing:border-box; width:100%; margin-top:8px; padding:12px; border:1px solid #dce5e1; border-radius:8px; background:#fff; color:inherit; }
#group-editor .edit-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; }
#edit-load-members { margin-top:10px; }
#edit-error:empty { display:none; }

#review-editor label { display:block; margin-top:18px; font-weight:600; }
#review-editor textarea { box-sizing:border-box; width:100%; margin-top:8px; padding:12px; border:1px solid #dce5e1; border-radius:8px; background:#fff; color:inherit; resize:vertical; }
#review-editor .edit-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; }
#review-error:empty { display:none; }
.review-rows { margin-top:16px; display:flex; flex-direction:column; gap:12px; max-height:40vh; overflow-y:auto; }

#bot-editor label { display:block; margin-top:18px; font-weight:600; }
#bot-editor input[type="text"], #bot-editor input[type="password"] { box-sizing:border-box; width:100%; margin-top:8px; padding:12px; border:1px solid #dce5e1; border-radius:8px; background:#fff; color:inherit; }
#bot-editor .switch-line { display:flex; align-items:center; gap:8px; margin-top:14px; font-weight:600; }
#bot-editor .switch-line input[type="checkbox"] { width:auto; margin:0; }
#bot-editor .edit-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:24px; }
#bot-error:empty { display:none; }
.review-company { border:1px solid #dce5e1; border-radius:8px; padding:12px 14px; }
.review-company-head { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.review-company ul { margin:8px 0 0; padding-left:18px; }
.review-company li { margin:2px 0; font-size:13px; }
.review-banner { margin-bottom:12px; }

.issue-tabs { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
.report-type-switch { display:flex; gap:8px; margin-bottom:16px; }
.report-type-switch button { padding:10px 20px; border-radius:999px; border:1px solid #dce5e1; background:#fff; color:#24443d; font-weight:600; cursor:pointer; }
.report-type-switch button.active { background:#183f37; color:#fff; border-color:#183f37; }
.report-type-switch button.hidden { display:none; }

/* 日报管理页：类型切换并入标题行，减少标题与队列之间的空白。 */
.page-heading-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#page-reports .page-heading { margin-bottom: 20px; }
#page-reports .page-heading .report-type-switch { margin-bottom: 0; }
#page-reports .group-search { flex-basis: 480px; }
@media (max-width: 900px) {
  .page-heading-side { align-items: flex-start; }
}
.sending-panel { padding:24px; }
.sending-panel h3 { margin:0 0 12px; }
.sending-panel p { margin:10px 0; overflow-wrap:anywhere; }
#send-status { font-weight:600; }
#send-queue { max-height:260px; overflow:auto; }
#send-queue p { padding:10px 12px; border-radius:8px; background:#f4f7f5; }
#issues-count { margin-bottom:16px; }

.company-picker { position:relative; }
.company-options { position:absolute; z-index:5; top:calc(100% + 4px); left:0; right:0; max-height:220px; overflow:auto; padding:6px; background:#fff; border:1px solid #dce5e1; border-radius:10px; box-shadow:0 8px 24px #183f3718; }
.company-options button { display:block; width:100%; padding:10px 12px; text-align:left; color:#24443d; background:#fff; border:0; border-radius:6px; white-space:normal; overflow-wrap:anywhere; }
.company-options button:hover, .company-options button:focus-visible { background:#edf5f1; }
.company-options p { margin:8px; color:#71817b; }
.operator-summary { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:10px; padding:12px 16px; border:1px solid #dce5e1; border-radius:10px; background:#f7faf8; }
.member-panel { margin-top:12px; padding:0 16px 12px; border:1px solid #dce5e1; border-radius:10px; }
.company-options[hidden], .member-panel[hidden] { display:none; }

.overview-status { display:flex; flex-wrap:wrap; gap:12px; margin-bottom:24px; }
.overview-status span { flex:1; min-width:150px; padding:12px 16px; background:#fff; border:1px solid var(--line); border-radius:9px; }
.overview-status b { display:block; margin-bottom:6px; font-size:11px; font-weight:500; color:#65776b; }
.overview-status i { font-style:normal; font-size:14px; font-weight:600; color:var(--ink); overflow-wrap:anywhere; }
.overview-status i.ok { color:#2f7d4f; }
.overview-status i.warn { color:#b4530a; }
.overview-progress { padding:20px 22px 22px; }
.progress-track { display:flex; height:12px; border-radius:6px; overflow:hidden; background:#eef1ee; }
.progress-track.empty { background:transparent; }
.progress-track i { display:block; height:100%; }
.progress-legend { display:flex; flex-wrap:wrap; gap:10px 20px; margin-top:14px; font-size:12px; color:#496553; }
.progress-legend .dot { display:inline-block; width:9px; height:9px; margin-right:6px; border-radius:3px; vertical-align:middle; }
.queue-lines { margin-top:14px; max-height:220px; overflow:auto; }
.queue-lines p { max-height:180px; overflow:auto; margin:0 0 6px; padding:9px 12px; border-radius:8px; background:#f4f7f5; font-size:12px; color:#65776b; overflow-wrap:anywhere; }
.overview-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-bottom:22px; }
@media (max-width: 1100px) { .overview-grid { grid-template-columns:1fr; } }
.mini-list { padding:6px 22px 16px; }
.mini-item { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; padding:12px 0; border-bottom:1px solid #e8eee6; }
.mini-item:last-of-type { border-bottom:0; }
.mini-main { min-width:0; }
.mini-main strong { display:block; margin-bottom:4px; font-size:13px; overflow-wrap:anywhere; }
.mini-main small { display:block; margin-top:2px; font-size:11px; color:#7b897e; overflow-wrap:anywhere; }
.mini-item .badge { flex-shrink:0; white-space:nowrap; }
.mini-empty { margin:14px 0 0; font-size:12px; color:#7b897e; }

#edit-delete { margin-right:auto; background:#fff5f3; color:#ad3028; border:1px solid #e8b8b2; }
#group-editor .edit-actions { flex-wrap:wrap; }

/* 短视频日报沿用工作台卡片、表格和按钮，仅限定本页布局。 */
#sv-panel { min-width: 0; }
#sv-panel .panel-heading h3 { margin-bottom: 7px; }
.sv-content { padding: 22px; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.sv-content > p:last-child { margin-bottom: 0; }
.sv-upload-actions { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; max-width: 420px; }
.sv-file { position: absolute; top: 0; left: 0; width: 98px; height: 42px; opacity: 0; margin: 0; cursor: pointer; }
.sv-file:focus-visible + span { outline: 2px solid var(--green); outline-offset: 4px; }
#sv-file-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
#sv-upload-status { flex-basis: 100%; font-size: 12px; }
#sv-upload-status:empty { display: none; }
.sv-binding-form { display: grid; grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; gap: 16px; padding: 22px; background: #fafcf9; border-bottom: 1px solid var(--line); }
.sv-binding-form label { min-width: 0; color: var(--ink); font-size: 12px; font-weight: 600; }
.sv-binding-form label small { margin-left: 6px; font-size: 10px; font-weight: 400; }
.sv-binding-form input { margin-top: 8px; font-weight: 400; padding: 11px 12px; }
.sv-binding-form button { min-height: 42px; }
#sv-panel .empty { padding: 28px 22px; }
#sv-panel .sv-content > .empty { padding: 4px 0; }
.sv-import-summary { margin: 0 0 22px; }
.sv-batch-meta { padding: 14px 22px; font-size: 12px; border-bottom: 1px solid var(--line); }
.sv-batch-actions { padding: 16px 22px; border-top: 1px solid var(--line); justify-content: flex-end; }
#sv-panel td:last-child { white-space: nowrap; }
#sv-panel .sv-content .table-scroll { margin: 18px -22px; }
.sv-issue-list { margin: 0; padding-left: 18px; }
.sv-issue-list li + li { margin-top: 12px; }
@media (max-width: 1100px) {
  .sv-upload { flex-wrap: wrap; }
  .sv-upload-actions { flex-basis: 100%; max-width: none; }
  .sv-binding-form { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .sv-binding-form { grid-template-columns: 1fr; padding: 16px; }
  .sv-content { padding: 16px; }
  #sv-panel .sv-content .table-scroll { margin: 16px -16px; }
  #sv-panel .panel-heading { padding: 16px; }
}
.report-preview-panel { max-width: none; margin-inline: 0; background: transparent; border: 0; }
.report-preview-panel > .panel-heading { padding: 0 0 20px; background: transparent; border: 0; gap: 16px; }
.report-cards { display: grid; gap: 22px; }
/* 预览两个视图用按钮切换：可发送 / 暂不能生成日报，避免长列表混排。 */
.report-preview-panel .report-view-switch { margin: 0 0 18px; }
.report-preview-panel .report-view-switch button { font-size: 12px; }
.report-blocked-note { margin: 0 0 14px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.report-blocked .report-summary { background: #fbfbf9; border-style: dashed; }
.report-blocked .report-summary-company h4 { color: #4c5e53; }
.report-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.report-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.report-card-head h4 { margin: 0; font-size: 16px; color: var(--ink); line-height: 1.6; overflow-wrap: anywhere; }
.report-card-head .tag { border-radius: 20px; padding: 4px 11px; font-size: 12px; }
.report-card-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; }
.report-card-layout > .group-report-previews { min-width: 0; padding: 24px 28px 28px; }
.report-section-label { color: var(--muted); font-size: 11px; letter-spacing: 1px; margin-bottom: 16px; }
.report-group-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.report-template { color: var(--muted); font-size: 12px; }
.report-snapshot { padding: 20px 24px; background: #f6f8f6; border: 1px solid #e7ede8; border-radius: 10px; max-width: 590px; }
.report-snapshot pre { font: 13px/1.85 "Microsoft YaHei", "PingFang SC", sans-serif; color: #3e5149; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.group-report-previews .report-group { padding: 0; }
.group-report-previews .report-group + .report-group { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.report-card-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 24px; border-left: 1px solid var(--line); background: #fcfdfc; min-width: 0; }
.report-card-foot > small { font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.report-task-event { border-left: 2px solid #d9e5dc; padding-left: 12px; color: #52695b; }
.report-card-foot button { min-height: 32px; padding: 5px 12px; font-size: 12px; }
.report-card-foot .report-section-label { margin-bottom: 0; }
.report-card-foot .report-latest { font-size: 11px; margin-bottom: 8px; }
.report-receipt-note { border-top: 1px solid var(--line); padding-top: 14px; width: 100%; }
@media (max-width: 1050px) {
  .report-card-layout { grid-template-columns: 1fr; }
  .report-card-foot { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 700px) {
  .report-card-head, .report-card-layout > .group-report-previews, .report-card-foot { padding: 20px; }
  .report-snapshot { padding: 16px; }
  .report-preview-panel > .panel-heading { align-items: flex-start; flex-direction: column; }
  .report-preview-panel .actions { flex-wrap: wrap; }
}
.template-preview {
  border-top: 1px solid var(--line, #d9e1e5);
  margin-top: 0.65rem;
  padding-top: 0.55rem;
}
.group-report-previews pre,
#template-preview-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0.35rem 0;
}
.template-field-row {
  display: grid;
  grid-template-columns: auto minmax(7rem, 1fr) minmax(10rem, 1.5fr) 5rem minmax(8rem, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line, #d9e1e5);
}
.template-field-row input[type="text"],
.template-field-row input[type="number"] {
  min-width: 0;
  width: 100%;
}
@media (max-width: 850px) {
  .template-field-row {
    grid-template-columns: auto 1fr 5rem;
  }
  .template-field-row .template-field-label { grid-column: 2 / 4; }
  .template-field-row small { grid-column: 2 / 4; }
}

.report-type-switch { align-items:center; flex-wrap:wrap; }
.report-type-switch h3 { margin:0 20px 0 0; }

/* 紧凑公司列表与按需打开的日报详情。 */
.report-cards { gap: 10px; }
#sv-panel .sv-batch-actions { padding: 16px 0 0; border: 0; }
.report-summary { display: grid; grid-template-columns: minmax(180px, 1fr) 200px 190px 88px; align-items: center; gap: 20px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.report-summary-company { min-width: 0; }
.report-summary-company h4 { margin: 0 0 5px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.report-summary-company small, .report-summary-updated { color: var(--muted); font-size: 11px; line-height: 1.6; }
.report-summary > .tag { justify-self: start; align-self: center; width: fit-content; max-width: 100%; margin: 0; white-space: normal; line-height: 1.6; padding: 3px 9px; border-radius: 6px; }
.report-summary-action { justify-self: end; white-space: nowrap; font-size: 12px; padding: 8px 14px; }
.report-detail-dialog { box-sizing: border-box; width: min(1000px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 64px); padding: 0; border: 1px solid #dce5e1; border-radius: 18px; color: var(--ink); background: #fff; box-shadow: 0 28px 100px #142e2938; overflow: hidden; }
.report-detail-dialog[open] { display: flex; flex-direction: column; }
.report-detail-dialog::backdrop { background: #102b2466; backdrop-filter: blur(3px); }
.report-detail-header { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.report-detail-header h2 { margin: 0; font-size: 18px; line-height: 1.6; overflow-wrap: anywhere; }
.report-detail-close { flex-shrink: 0; padding: 8px 12px; font-size: 12px; }
.report-detail-content { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.report-detail-content .report-card { border: 0; border-radius: 0; }
.report-detail-content .report-card-head { padding: 14px 26px; justify-content: flex-start; }
.report-detail-content .report-card-head h4 { display: none; }
.report-detail-content .report-card-layout { grid-template-columns: minmax(0, 1fr) 260px; }
.report-detail-content .report-snapshot { max-width: none; }
@media (max-width: 1050px) {
  .report-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; }
  .report-summary-company { grid-column: 1; }
  .report-summary > .tag { grid-row: 2; grid-column: 1; }
  .report-summary-updated { grid-row: 3; grid-column: 1; }
  .report-summary-action { grid-row: 1 / 4; grid-column: 2; }
  .report-detail-content .report-card-layout { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .report-summary { padding: 14px 16px; }
  .report-detail-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); border-radius: 14px; }
  .report-detail-header { padding: 16px; gap: 12px; }
  .report-detail-header h2 { font-size: 15px; }
  .report-detail-content .report-card-head { padding: 12px 20px; }
}

/* 公司及门店逐行展示，操作收纳以保持行高。 */
.binding-actions { display: flex; align-items: center; gap: 6px; }
.binding-actions button { white-space: nowrap; }
.binding-actions select { width: 112px; min-width: 112px; padding: 8px; font-size: 12px; }
#group-rows td:last-child { min-width: 218px; }
#store-editor input, #store-editor select { width: 100%; margin: 8px 0 16px; }

.sv-preview-content { white-space: pre-wrap; margin: 0; }

.binding-editor { width: min(760px, calc(100vw - 32px)); box-sizing: border-box; }
.binding-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.binding-tabs button { background: #f2f6f3; color: var(--ink); border: 1px solid #dce5e1; }
.binding-tabs button.active { background: var(--accent, #246457); color: white; }
.binding-panel[hidden], .binding-tabs button[hidden] { display: none; }
.binding-panel h2 { font-size: 18px; margin-bottom: 16px; }
.binding-editor .notice.error:empty { display: none; }
.binding-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 22px; }
.binding-fields > div { min-width: 0; }
.binding-editor select, .binding-editor input { width: 100%; box-sizing: border-box; }
.binding-readonly { padding: 12px; border: 1px solid var(--line, #dce5e1); border-radius: 8px; background: #f5f8f6; overflow-wrap: anywhere; }
.binding-report-section { padding: 20px 0; border-bottom: 1px solid var(--line, #dce5e1); margin-bottom: 16px; }
.binding-report-section h3 { margin-top: 0; }
.binding-editor .binding-tabs { gap: 24px; border-bottom: 1px solid var(--line, #dce5e1); }
.binding-editor .binding-tabs button { background: transparent; border: 0; border-radius: 0; padding: 12px 0; border-bottom: 3px solid transparent; }
.binding-editor .binding-tabs button.active { color: var(--accent, #246457); border-bottom-color: currentColor; }
@media (max-width: 600px) { .binding-fields { grid-template-columns: minmax(0, 1fr); } .binding-editor .binding-tabs { gap: 16px; } }

/* 配置弹窗：标题和页签保持可见，仅内容区滚动。 */
.binding-editor { width: min(900px, calc(100vw - 32px)); max-height: min(820px, calc(100dvh - 32px)); padding: 0; overflow: hidden; }
.binding-editor[open] { display: flex; flex-direction: column; }
.binding-dialog-header { flex: none; position: relative; padding: 24px 28px 0; border-bottom: 1px solid var(--line, #dce5e1); background: #fff; }
.binding-dialog-header h2 { margin: 0 42px 4px 0; font-size: 22px; }
.binding-dialog-header > .muted { margin: 0 42px 12px 0; line-height: 1.45; overflow-wrap: anywhere; }
.binding-dialog-header .help-close { top: 18px; right: 20px; }
.binding-editor .binding-tabs { gap: 24px; margin: 0; border: 0; overflow-x: auto; flex-wrap: nowrap; }
.binding-editor .binding-tabs button { flex: 0 0 auto; white-space: nowrap; padding: 10px 0 12px; }
.binding-dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 22px 28px 22px; }
.binding-panel form { display: flow-root; }
.binding-panel h2 { margin: 0 0 16px; font-size: 18px; }
.binding-editor #group-editor label { margin-top: 0; }
.binding-editor #group-editor input, .binding-editor #group-editor select,
.binding-editor #store-editor input, .binding-editor #store-editor select,
.binding-editor #binding-group-panel input { height: 42px; margin: 7px 0 0; padding: 9px 12px; border: 1px solid #ccd7ce; border-radius: 8px; }
.binding-editor label, .binding-field-label { display: block; font-weight: 600; }
.binding-readonly { min-height: 42px; box-sizing: border-box; margin: 7px 0 0; padding: 10px 12px; }
.binding-field-note { margin: 12px 0 0; color: #71817b; font-size: 13px; line-height: 1.5; }
.binding-scope-note { margin: 0 0 20px; padding: 10px 14px; border-left: 3px solid #4c8375; border-radius: 0 8px 8px 0; color: #4e675f; background: #f3f8f5; font-size: 13px; line-height: 1.55; }
.binding-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.binding-section-head h3 { margin: 0; font-size: 16px; }
.binding-section-head .muted { font-size: 12px; }
.binding-editor .operator-summary { margin: 8px 0 18px; }
.binding-report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.binding-report-section { min-width: 0; margin: 0; padding: 18px; border: 1px solid var(--line, #dce5e1); border-radius: 12px; background: #fbfcfb; }
.binding-report-section h3 { margin: 0 0 16px; font-size: 16px; }
.binding-report-fields { display: grid; gap: 14px; }
.binding-report-fields > div { min-width: 0; }
.binding-report-fields .muted { margin: 7px 0 0; font-size: 12px; line-height: 1.45; }
.binding-report-fields a { display: inline-block; margin-top: 10px; }
.binding-video-summary { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line, #dce5e1); border-radius: 10px; background: #fbfcfb; }
.binding-video-summary h3 { margin: 0 0 6px; font-size: 14px; }
.binding-video-summary p { margin: 0; overflow-wrap: anywhere; }
.binding-other-actions { margin-top: 20px; padding: 12px 14px; border: 1px solid #e4e9e5; border-radius: 8px; }
.binding-other-actions summary { cursor: pointer; font-weight: 600; }
.binding-other-actions .actions { margin-top: 12px; }
.binding-dialog-footer { flex: none; border-top: 1px solid var(--line, #dce5e1); background: #fff; }
.binding-form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 28px; }
.binding-form-actions[hidden] { display: none; }
.binding-form-actions > .muted { margin-right: auto; font-size: 12px; }
#store-company-bound[hidden], #store-company-picker[hidden], #store-extra-details[hidden] { display: none; }
.binding-editor [hidden] { display: none !important; }
#store-company-picker label + select { margin-top: 7px; }
#store-company-picker label:not(:first-child) { margin-top: 10px; }
@media (max-width: 680px) {
  .binding-editor { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .binding-dialog-header { padding: 18px 18px 0; }
  .binding-dialog-body { padding: 18px 18px 0; }
  .binding-report-grid, .binding-fields { grid-template-columns: minmax(0, 1fr); }
  .binding-form-actions { padding: 12px 18px; }
}

.list-pager { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
/* 导入错误默认折叠，详情滚动区域不再撑高整张记录表。 */
.import-errors { max-width: 32rem; }
.import-errors summary { cursor: pointer; }
.import-errors-content { max-height: 15rem; overflow: auto; overflow-wrap: anywhere; }
.import-errors-content p { margin: .5rem 0; }

#report-filter-note { flex: 1 0 100%; margin: 0; white-space: normal; }

/* 群聊绑定批量启停 */
.col-check { width: 36px; text-align: center; }
.group-bulk-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; padding: 8px 12px; border: 1px solid var(--line, #d8dcd6); border-radius: 8px; background: var(--surface-soft, #f5f7f4); }
.group-bulk-bar[hidden] { display: none !important; }
.group-bulk-bar select { width: auto; max-width: 100%; margin: 0; padding: 9px 10px; }
#bulk-report-fields { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
#bulk-report-fields[hidden], #group-bot-bulk-open[hidden] { display: none; }

/* 表格复选框不继承文本输入框的整行尺寸。 */
.col-check input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; vertical-align: middle; }

#page-groups .col-check[hidden] { display: none !important; }
#binding-bot-section button[hidden] { display: none !important; }
#group-binding-table .binding-bot-cell { overflow-wrap: anywhere; }
#group-bot-preview-rows { padding-left: 22px; overflow-wrap: anywhere; }
#group-bot-preview-rows li + li { margin-top: 8px; }
#group-bot-handoff .binding-form-actions { flex-wrap: wrap; }

/* 群聊绑定页右上角操作区：视图切换与操作按钮横向排成一行，窄屏自然换行。 */
#page-groups .page-heading { align-items: flex-start; }
#page-groups .directory-import-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin: 0;
}
#page-groups .directory-import-bar > button {
  margin: 0;
  height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  font-size: 13px;
}

/* 视图分段控件：作为「筛选视图」与右侧操作按钮区分开，比单个开关更直观。 */
.group-view-switch {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 3px;
  border: 1px solid #d4ded7;
  border-radius: 9px;
  background: #f4f7f4;
}
.group-view-option {
  height: 30px;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f7369;
  font-size: 13px;
  font-weight: 600;
  box-shadow: none;
}
.group-view-option:hover:not(:disabled) { background: #e7efe9; border-color: transparent; color: var(--ink); }
.group-view-option[aria-pressed="true"] {
  background: #fff;
  color: var(--green);
  box-shadow: 0 1px 2px rgba(16, 40, 32, .14);
}
.group-view-option[aria-pressed="true"]:hover:not(:disabled) { background: #fff; color: var(--green); }
.group-view-count {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e3eae5;
  color: #5f7369;
  font-size: 11px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.group-view-count[hidden] { display: none !important; }
.group-view-option[aria-pressed="true"] .group-view-count { background: var(--green); color: #fff; }

#page-groups .directory-import-bar > .muted { flex-basis: 100%; text-align: right; font-size: 12px; line-height: 18px; }
#page-groups .directory-import-bar > .muted:empty { display: none; }

.pager-jump, .pager-jump label { display: flex; align-items: center; gap: 8px; margin: 0; }
.pager-jump input { width: 72px; padding: 7px 8px; }
/* 群聊指令说明：真实 @、指令与参数说明分开呈现。 */
.command-help { width: min(960px, calc(100vw - 32px)); padding: 0; }
.command-help .command-header { position: sticky; top: 0; z-index: 1; padding: 26px 32px 20px; border-bottom: 1px solid #dce5e1; background: #fff; }
.command-help .command-header h2 { margin: 8px 48px 8px 0; }
.command-help .command-header > p { margin: 0; color: #567267; }
.command-help .command-body { padding: 24px 32px 32px; }
.command-help p, .command-help li { font-size: 14px; line-height: 1.75; }
.command-help h3 { margin: 0 0 14px; font-size: 18px; color: #183d3d; }
.command-help h4 { margin: 0; font-size: 15px; color: #183d3d; }
.command-step + .command-step, .command-section { margin-top: 28px; }
.command-step-number { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 10px; border-radius: 50%; color: #fff; background: #235f52; font-size: 14px; }
.command-prerequisite { padding: 16px 18px; border: 1px solid #bdd4c8; border-left: 4px solid #235f52; border-radius: 10px; background: #edf5ef; }
.command-prerequisite > strong { font-size: 17px; color: #183d3d; }
.command-prerequisite p { margin: 6px 0 12px; }
.command-compose { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.command-compose span:not([aria-hidden]) { padding: 6px 10px; border-radius: 6px; background: #fff; border: 1px solid #d3e2d8; }
.command-parameter-note { color: #567267; }
.command-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.command-card { min-width: 0; padding: 16px; border: 1px solid #dce5e1; border-radius: 12px; background: #fff; }
.command-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.command-tag { padding: 3px 7px; border-radius: 5px; background: #edf3ef; color: #456a59; font-size: 11px; }
.command-help code.command-code { display: block; padding: 14px; border-radius: 8px; background: #183d3d; color: #fff; font-family: Consolas, 'Microsoft YaHei', monospace; font-size: 15px; font-weight: 600; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; }
.command-card > p { margin: 10px 0 0; color: #567267; font-size: 13px; }
.command-warning { margin-top: 16px; padding: 12px 16px; border-left: 3px solid #b18b36; border-radius: 6px; background: #faf5e7; color: #715b2a; font-size: 14px; }
.command-warning p { margin: 4px 0 0; }
.command-receipt { display: grid; gap: 6px; padding: 16px; border: 1px solid #dce5e1; border-radius: 10px; background: #f5f8f5; }
.command-receipt > span { font-size: 12px; color: #567267; }
.command-receipt > strong { font-size: 14px; color: #235f52; }
.command-details { margin-top: 22px; border-top: 1px solid #dce5e1; padding-top: 16px; }
.command-details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: #235f52; }
.command-details ul { padding-left: 20px; }
.command-toggle-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid #e6ede8; align-items: center; }
.command-toggle-row > div { min-width: 0; }
.command-toggle-row > div > span { display: block; margin-bottom: 6px; font-size: 12px; color: #567267; }
.command-backoffice { margin-top: 28px; padding: 18px; border-radius: 10px; background: #f0f4f1; }
.command-backoffice p { margin: 6px 0 0; }
.command-route { font-weight: 700; color: #235f52; }
@media (max-width: 650px) {
  .command-help { width: calc(100vw - 20px); max-height: calc(100dvh - 24px); }
  .command-help .command-header { padding: 20px 18px 16px; }
  .command-help .command-header h2 { font-size: 20px; }
  .command-help .command-body { padding: 20px 18px; }
  .command-card-grid { grid-template-columns: 1fr; }
  .command-toggle-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .command-toggle-row > h4 { grid-column: 1 / -1; }
  .command-help code.command-code { padding: 10px; font-size: 14px; }
}

#notice { opacity: 1; transition: opacity 400ms ease; }
#notice.notice-fading { opacity: 0; }

.issue-title { display: block; margin: 8px 0; font-size: 16px; }
.issue-details { margin-top: 12px; }
.issue-details summary { cursor: pointer; color: #235f52; }
.issue-member { padding: 12px 0; border-bottom: 1px solid #e2eae4; }
.issue-member button { display: block; margin-top: 8px; }

/* Daily delivery obligations and recovery remain usable on narrow screens. */
.sending-panel h4 { margin: 18px 0 4px; }
#delivery-summary { padding: 14px; border: 1px solid #dce5e1; border-radius: 10px; background: #f4f7f5; }
#delivery-summary p { margin: 0 0 8px; }
#delivery-summary p:empty, .delivery-dialog p[role="status"]:empty { display: none; }
.delivery-headline { font-weight: 700; }
.delivery-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#delivery-summary-feedback:not(:empty) { margin: 8px 0 0; }
.delivery-dialog { overflow-wrap: anywhere; }
.delivery-fill-result, .delivery-fill-reason { color: #9a4600; }
.delivery-fill-result { font-weight: 700; }
.delivery-dialog-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  margin-bottom: 12px;
  background: #fff;
}
.delivery-dialog-header h2 { margin: 0; }
.delivery-dialog-header button { flex: none; }
.delivery-filters { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1.3fr) auto; align-items: end; gap: 10px; margin-bottom: 6px; }
.delivery-filters input, .delivery-filters select { display: block; width: 100%; min-width: 0; box-sizing: border-box; margin: 4px 0 0; padding: 8px; min-height: 42px; }
.delivery-day-actions { background: #f4f7f5; border: 1px solid #dce5e1; border-radius: 10px; padding: 12px; margin-top: 12px; }
.delivery-day-actions p { margin: 0 0 8px; }
.delivery-columns { display: grid; grid-template-columns: 7em minmax(0, 1fr) minmax(0, 9em); align-items: start; gap: 12px; }
.delivery-column-headings { font-weight: 600; }
.delivery-item { border-top: 1px solid #dce5e1; padding: 10px 0; }
.delivery-item-status { margin: 0; font-weight: 600; }
.delivery-item button { margin: 4px 8px 0 0; }
@media (max-width: 600px) {
  .delivery-dialog { padding: 18px; }
  .delivery-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-column-headings { display: none; }
  .delivery-columns { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .delivery-group { grid-column: 1 / -1; grid-row: 2; }
}

/* 品牌管理：作为群聊绑定页的弹窗维护品牌，不再占用左侧导航。 */
#brand-manager-open[hidden] { display: none !important; }
.group-management[hidden], .group-management button[hidden], #group-access-dialog [hidden] { display: none !important; }
#group-access-dialog {
  width: min(1040px, calc(100% - 32px));
  height: min(740px, calc(100dvh - 32px));
  max-height: none;
  padding: 0;
  overflow: hidden;
}
#group-access-dialog[open], #group-access-form { display: flex; flex-direction: column; }
#group-access-form { flex: 1; min-height: 0; }
.group-access-header { padding: 22px 26px 14px; border-bottom: 1px solid #e4ece7; }
.group-access-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding-right: 32px; }
#group-access-dialog h2 { margin: 0; }
.group-access-badge { display: inline-block; border-radius: 6px; background: #e9f4ed; color: #285c4d; padding: 3px 8px; font-size: 12px; }
.group-access-badge:empty { display: none; }
.group-access-badge.is-pending { color: #855319; background: #fff3dd; }
#group-access-dialog .group-access-header p { margin: 7px 0 0; }
.group-access-controls, .group-access-footer { display: flex; align-items: center; gap: 10px; padding: 12px 26px; }
#group-access-dialog select, #group-access-dialog input[type="search"] {
  width: auto; min-height: 38px; margin: 0; padding: 7px 10px;
  border: 1px solid #ccd9d1; border-radius: 8px; color: inherit; background: #fff;
}
#group-access-dialog input[type="search"] { width: min(340px, 46vw); min-width: 0; }
#group-access-dialog select { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#group-access-dialog #group-access-brand { max-width: min(180px, 36%); }
#group-access-dialog #group-access-operator { max-width: min(300px, 48%); }
#group-access-result-count { margin-left: auto; white-space: nowrap; font-size: 13px; }
.group-access-list { flex: 1; min-height: 0; overflow: auto; margin: 0 26px 12px; border: 1px solid #dce7df; border-radius: 12px; }
.group-access-list table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.group-access-list thead th { position: sticky; top: 0; z-index: 1; background: #eef5f0; }
.group-access-list th, .group-access-list td { padding: 10px 12px; text-align: left; vertical-align: middle; }
.group-access-list th:first-child, .group-access-list td:first-child:not([colspan]) { width: 44px; text-align: center; padding-inline: 0; }
.group-access-list th:nth-child(2) { width: 13%; }
.group-access-list th:nth-child(4) { width: 25%; }
.group-access-list th:last-child { width: 21%; }
.group-access-list input[type="checkbox"] { display: inline-block; width: 16px; height: 16px; margin: 0; padding: 0; vertical-align: middle; }
.group-access-list td { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.group-access-list td .group-access-badge { max-width: 100%; }
.group-access-list tr.is-selected td { background: #edf6ef; }
.group-access-field-label { display: none; }
.group-access-name, .group-access-meta { display: block; }
.group-access-list .group-access-name { margin: 0; }
.group-access-meta { margin-top: 3px; font-size: 12px; }
.group-access-footer { border-top: 1px solid #dce7df; background: #f7fbf8; }
#group-access-selection { margin-right: auto; font-size: 13px; font-weight: 600; }
.group-access-activation { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 8px; }
#group-access-blocker { color: #855319; font-size: 12px; }
#group-access-dialog .group-access-footer button { min-height: 36px; padding: 6px 12px; white-space: nowrap; }
@media (max-width: 640px) {
  #group-access-dialog { width: 100%; height: 100dvh; max-width: none; border: 0; border-radius: 0; }
  .group-access-header, .group-access-controls, .group-access-footer { padding-inline: 14px; }
  .group-access-header { padding-block: 16px 10px; }
  .group-access-controls, .group-access-footer { padding-block: 8px; }
  .group-access-list { margin-inline: 14px; margin-bottom: 8px; }
  .group-access-list table, .group-access-list thead, .group-access-list tbody { display: block; }
  .group-access-list thead { position: sticky; top: 0; z-index: 1; background: #eef5f0; }
  .group-access-list thead th:first-child { position: static; display: block; width: auto; padding: 7px 12px; text-align: left; }
  .group-access-list thead th:not(:first-child) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
  .group-access-list tbody tr {
    display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "check chat chat" ". company company" ". brand owner";
    gap: 6px 8px; padding: 10px 12px; border-bottom: 1px solid #e4ece7;
  }
  .group-access-list tbody tr:last-child { border-bottom: 0; }
  .group-access-list tbody td { padding: 0; border: 0; }
  .group-access-list tbody td:first-child:not([colspan]) { grid-area: check; width: auto; }
  .group-access-list tbody td:nth-child(2) { grid-area: brand; }
  .group-access-list tbody td:nth-child(3) { grid-area: chat; }
  .group-access-list tbody td:nth-child(4) { grid-area: company; }
  .group-access-list tbody td:nth-child(5) { grid-area: owner; }
  .group-access-list tbody td[colspan] { grid-column: 1 / -1; }
  .group-access-list tbody tr.is-selected { background: #edf6ef; }
  .group-access-field-label { display: block; color: #62796d; font-size: 12px; }
  .group-access-list thead input[type="checkbox"] { margin-inline: 4px; }
  .group-access-list thead .group-access-field-label { display: inline; margin-left: 8px; vertical-align: middle; }
  .group-access-controls { flex-wrap: wrap; }
  #group-access-dialog input[type="search"] { flex: 1; }
  #group-access-result-count { display: none; }
  .group-access-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  #group-access-activation { grid-column: 2; grid-row: 1; }
  #group-access-dialog #group-access-operator { grid-column: 1; grid-row: 2; max-width: 100%; justify-self: start; }
  #group-access-save { grid-column: 2; grid-row: 2; justify-self: end; }
}
#brand-manager {
  width: min(660px, calc(100vw - 32px));
  padding: 30px 30px 26px;
}
.brand-manager-head { margin-bottom: 20px; }
.brand-manager-head h2 { margin: 0 0 6px; font-size: 22px; }
.brand-manager-head p { margin: 0; font-size: 13px; }
.brand-create-form {
  margin: 0;
  padding: 18px 20px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfb;
}
.brand-create-form > label {
  display: block;
  margin-bottom: 8px;
  color: #4d6757;
  font-size: 12px;
  font-weight: 600;
}
.brand-create-row { display: flex; gap: 10px; }
.brand-create-row input {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 11px 13px;
  border: 1px solid #d6e1d8;
  border-radius: 9px;
  background: #fff;
}
.brand-create-row button {
  flex: 0 0 auto;
  height: 42px;
  padding: 0 20px;
  border-radius: 9px;
}
#brand-create-status { margin: 10px 0 0; font-size: 12px; }
#brand-create-status:empty { display: none; }
.brand-manager-list { margin-top: 22px; }
.brand-manager-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.brand-manager-list-head h3 { margin: 0; color: var(--ink); font-size: 15px; }
.brand-manager-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #4d6757;
  font-size: 12px;
  font-weight: 600;
}
.brand-manager-search input {
  width: 210px;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #d6e1d8;
  border-radius: 9px;
  background: #fff;
}
#brand-list-status { margin: 12px 0 10px; font-size: 12px; }
.brand-manager-scroll {
  max-height: min(46vh, 420px);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.brand-manager-scroll thead th { position: sticky; top: 0; z-index: 1; }
.brand-manager-scroll td { padding: 14px 20px; }
.brand-manager-scroll td span { color: var(--ink); font-size: 13px; }
@media (max-width: 560px) {
  #brand-manager { padding: 24px 18px 20px; }
  .brand-create-row { flex-wrap: wrap; }
  .brand-create-row button { width: 100%; }
  .brand-manager-search { flex: 1 1 100%; }
  .brand-manager-search input { width: 100%; }
}
