:root { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; color: #23334a; background: #f2f5fa; }
* { box-sizing: border-box; }
body { display: flex; min-height: 100vh; margin: 0; flex-direction: column; }
main { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 78px 22px 64px; flex: 1 0 auto; }
.legal-disclaimer { width: calc(100% - 44px); max-width: 1180px; margin: 0 auto 18px; padding: 12px 18px; border: 1px solid #d7e2ef; border-radius: 9px; background: #fff; color: #65758a; font-size: 12px; line-height: 1.8; text-align: center; box-shadow: 0 3px 12px #253a6408; }
.legal-disclaimer strong { color: #435873; }
html[data-theme="dark"] .legal-disclaimer { border-color: #3b4d64; background: #202d3d; color: #aebdd0; }
html[data-theme="dark"] .legal-disclaimer strong { color: #dbe7f5; }
.portal-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; width: 100%; margin-bottom: 36px; }
.portal-nav a { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 86px; padding: 14px 13px; border: 1px solid #dce5f1; border-top: 3px solid #4b83d4; border-radius: 10px; background: #fff; color: #23334a; text-align: left; box-shadow: 0 4px 14px #253a640b; }
.portal-nav a:nth-child(2) { border-top-color: #4c9aa1; }
.portal-nav a:nth-child(3) { border-top-color: #715cba; }
.portal-nav a:nth-child(4) { border-top-color: #c58d47; }
.portal-nav a:nth-child(5) { border-top-color: #358e78; }
.portal-nav a:nth-child(6) { border-top-color: #b45a70; }
.portal-nav a:hover { background: #f7faff; border-color: #9fbde8; text-decoration: none; transform: translateY(-2px); }
.portal-nav strong { font-size: 13px; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.portal-nav span { color: #687b91; font-size: 12px; line-height: 1.4; }
header { margin-bottom: 30px; }
.eyebrow { color: #2765c1; font-weight: 700; letter-spacing: .12em; font-size: 13px; }
h1 { font-size: clamp(28px, 4vw, 42px); margin: 8px 0; }
p { line-height: 1.7; }
.positive-result-count { color: #d62f3d; font-weight: 700; }
.search-rule-summary { margin: 10px 0 12px; padding: 10px 12px; border-left: 3px solid #2c66bd; background: #eef5ff; color: #4b6079; font-size: 13px; line-height: 1.7; }
.search-rule-summary strong { color: #174f9f; }
html[data-theme="dark"] .search-rule-summary { border-left-color: #72a8ef; background: #20334a; color: #b8c7d9; }
html[data-theme="dark"] .search-rule-summary strong { color: #93bff7; }
header p { color: #637287; margin: 0; }
.page-header { position: static; }
.profile-menu { position: absolute; top: 18px; right: 22px; z-index: 200; font-size: 14px; }
.theme-toggle { position: absolute; top: 23px; left: 22px; z-index: 21; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #b9cbe1; border-radius: 50%; background: #fff; color: #215eb9; box-shadow: 0 4px 14px #253a6414; font-size: 21px; line-height: 1; }
.theme-toggle:hover { background: #edf5ff; color: #174b9b; }
.profile-menu > summary { display: flex; align-items: center; gap: 8px; list-style: none; min-height: 46px; padding: 7px 12px 7px 8px; color: #215eb9; background: #fff; border: 1px solid #a9cfff; border-radius: 10px; box-shadow: 0 4px 14px #253a640b; font-weight: 700; white-space: nowrap; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover, .profile-menu[open] > summary { background: #f5f9ff; border-color: #9fbde8; box-shadow: 0 6px 18px #253a641c; }
.profile-menu > summary small { max-width: 90px; overflow: hidden; color: #71839a; font-size: 11px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.profile-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border: 1px solid #a9cfff; border-radius: 50%; background: #e8f0fc; color: #215eb9; font-size: 13px; }
.profile-panel { position: absolute; right: 0; top: 54px; z-index: 201; width: min(350px, calc(100vw - 28px)); padding: 20px; background: #fff; border: 1px solid #d7e3f2; border-radius: 14px; box-shadow: 0 16px 38px #1c35532b; }
.profile-panel h2 { margin: 0 0 14px; font-size: 18px; }
.profile-info { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid #e8edf5; }
.profile-info span { color: #64758b; }
.profile-info strong { text-align: right; overflow-wrap: anywhere; }
.profile-panel .profile-form { padding: 0 0 11px; background: none; box-shadow: none; border-radius: 0; }
.profile-form label { margin: 9px 0 6px; font-size: 13px; }
.profile-form input { width: 100%; padding: 9px 10px; font-size: 14px; }
.profile-form button { padding: 9px 13px; font-size: 13px; white-space: nowrap; }
.profile-inline { display: flex; gap: 6px; }
.password-update { padding-top: 10px; color: #215eb9; }
.password-update summary { cursor: pointer; font-weight: 600; }
.password-update .profile-form { color: #23334a; }
#profile-message { min-height: 20px; margin: 10px 0; color: #bc3434; font-size: 12px; }
.profile-contact { display: block; margin-top: 12px; padding: 10px 12px; color: #fff; background: #1769d2; border: 1px solid #1769d2; border-radius: 8px; font-weight: 700; text-align: center; text-decoration: none; }
.profile-contact:hover { background: #1059b6; border-color: #1059b6; }
.profile-contact:focus-visible { outline: 3px solid #a9cfff; outline-offset: 2px; }
.referral-button { width: 100%; margin-top: 12px; padding: 10px 12px; background: #e58a18; color: #fff; border: 1px solid #d97d0e; border-radius: 8px; font-weight: 700; }
.referral-button:hover { background: #cf760c; }
.referral-dialog { box-sizing: border-box; width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 22px; border: 0; border-radius: 14px; color: #23334a; box-shadow: 0 22px 70px #0b183560; }
.referral-dialog::backdrop { background: #0b1835b8; }
.referral-dialog .dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.referral-dialog .dialog-heading h2 { margin: 0; font-size: 20px; }
.referral-rule { margin: 16px 0; padding: 12px 14px; border-radius: 9px; background: #fff5df; color: #6e4a12; font-size: 13px; line-height: 1.7; }
.referral-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 18px; }
.referral-stats div { padding: 12px; border: 1px solid #dbe5f1; border-radius: 9px; background: #f7faff; text-align: center; }
.referral-stats span,.referral-stats strong { display: block; }
.referral-stats span { color: #687b91; font-size: 12px; }
.referral-stats strong { margin-top: 5px; color: #215eb9; font-size: 20px; }
.referral-copy-row { display: flex; gap: 8px; }
.referral-copy-row input { flex: 1; min-width: 0; padding: 10px; }
.referral-copy-row button { flex: none; }
.referral-code-line { color: #687b91; font-size: 13px; }
.referral-code-line strong { color: #23334a; letter-spacing: .08em; }
.referral-plans { display: grid; gap: 9px; }
.referral-plan { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; width: 100%; padding: 11px 13px; border: 1px solid #bfd2eb; border-radius: 9px; background: #f5f9ff; color: #1e559f; text-align: left; }
.referral-plan strong { font-size: 14px; }
.referral-plan span { grid-row: 1 / 3; grid-column: 2; padding: 6px 10px; border-radius: 7px; background: #1769d2; color: #fff; font-size: 13px; }
.referral-plan small { color: #687b91; font-size: 12px; }
.referral-plan:disabled { opacity: .55; cursor: not-allowed; }
.referral-plan:not(:disabled):hover { border-color: #7ba6dd; background: #eaf3ff; }
.referral-result { margin-top: 14px; padding: 14px; border: 1px solid #a9d7b4; border-radius: 9px; background: #eefaf1; }
.referral-result span,.referral-result strong { display: block; }
.referral-result-warning { color: #9b4b16; font-weight: 800; line-height: 1.65; }
.referral-result strong { margin: 8px 0; color: #12642b; font-size: 16px; overflow-wrap: anywhere; }
.referral-history-toggle { width: 100%; margin-top: 10px; padding: 10px; border: 1px solid #c8d8eb; background: #f1f6fd; color: #215eb9; }
.referral-history { margin-top: 10px; padding: 12px; border: 1px solid #d9e4f1; border-radius: 9px; background: #fbfcfe; }
.referral-history h3 { margin: 0 0 9px; font-size: 14px; }
.referral-history-list { display: grid; gap: 7px; max-height: 250px; overflow: auto; }
.referral-history-row { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 9px 10px; border: 1px solid #e0e8f2; border-radius: 7px; background: #fff; }
.referral-history-row > strong { color: #1e559f; font-size: 13px; }
.referral-history-row > time { color: #7a8ba0; font-size: 11px; text-align: right; }
.referral-history-code { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.referral-history-code code { flex: 1; overflow-wrap: anywhere; color: #12642b; font-weight: 700; }
.referral-history-code button { flex: none; padding: 6px 9px; font-size: 12px; }
.referral-history-code .unavailable { color: #b52d2d; font-size: 12px; }
.referral-history-detail { grid-column: 1 / -1; color: #687b91; font-size: 12px; }
.referral-history-status { color: #687b91; font-size: 11px; }
.referral-message { min-height: 20px; margin: 10px 0 0; color: #bc3434; font-size: 13px; }
html[data-theme="dark"] .referral-dialog { background: #202d3d; color: #dbe7f5; }
html[data-theme="dark"] .referral-rule { background: #493b22; color: #f0d59e; }
html[data-theme="dark"] .referral-stats div { border-color: #405169; background: #26374b; }
html[data-theme="dark"] .referral-code-line strong { color: #eef5ff; }
html[data-theme="dark"] .referral-result { border-color: #3f7650; background: #213c2a; }
html[data-theme="dark"] .referral-result-warning { color: #ffc17c; }
html[data-theme="dark"] .referral-history { border-color: #3b4d64; background: #1b2838; }
html[data-theme="dark"] .referral-history-row { border-color: #3b4d64; background: #202d3d; }
html[data-theme="dark"] .referral-plan { border-color: #405b7b; background: #26374b; color: #a9cbf5; }
@media (max-width: 520px) { .referral-stats { grid-template-columns: 1fr; } .referral-copy-row { align-items: stretch; flex-direction: column; } }
.admin-feedback-button { width: 100%; margin-top: 9px; padding: 10px; background: #6547bd; }
.admin-feedback-button:hover { background: #50359f; }
.admin-dashboard-button { width: 100%; margin-top: 9px; padding: 10px; background: #1c7b68; }
.admin-dashboard-button:hover { background: #146252; }
.profile-logout { width: 100%; padding: 10px; background: #f1f5fb; color: #215eb9; border: 1px solid #cfdced; }
.profile-logout:hover { background: #e7effc; }
@media (max-width: 1080px) { .page-header { position: static; padding-bottom: 0; } .profile-menu { top: 18px; right: 22px; bottom: auto; } }
@media (max-width: 920px) { .portal-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } }
@media (max-width: 560px) { .portal-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } .portal-nav strong { white-space: normal; } }
form { background: white; padding: 22px; border-radius: 16px; box-shadow: 0 6px 30px #253a6412; }
.case-help { margin: 14px 2px 0; padding: 12px 16px; border: 1px solid #dae5f2; border-radius: 10px; background: #fff; color: #51647b; font-size: 13px; }
.case-help summary { color: #215eb9; font-weight: 700; cursor: pointer; }
#query-guide > summary { color: #d52222; font-size: 17px; font-weight: 900; line-height: 1.5; }
.search-rule-table-wrap { width: 100%; margin-top: 14px; overflow-x: auto; background: #fff; }
.search-rule-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; background: #fff; color: #ff1734; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; font-size: 15px; }
.search-rule-table .rule-col { width: 28.3%; }
.search-rule-table .format-col { width: 24.5%; }
.search-rule-table .available-col { width: 10%; }
.search-rule-table .site-col { width: 37.2%; }
.search-rule-table th,.search-rule-table td { border: 1px solid #111; vertical-align: middle; }
.search-rule-table th { height: 77px; padding: 8px 10px; background: #80d6d2; color: #000; font-size: 17px; font-weight: 900; line-height: 1.35; text-align: center; }
.search-rule-table .rule-trigger-note { color: #d52222; font-size: 14px; font-weight: 900; }
.search-rule-table td { height: 94px; padding: 12px 4px; color: #ff1734; font-size: 15px; line-height: 1.5; text-align: left; }
.search-rule-table td.available { color: #7629ad; font-size: 16px; font-weight: 900; text-align: center; }
.search-rule-table td.sites-list { padding: 7px 10px; font-weight: 700; }
.sites-list label { display: flex; align-items: center; gap: 7px; width: fit-content; margin: 4px 0; cursor: pointer; color: #ff1f35; }
.sites-list input { position: absolute; opacity: 0; pointer-events: none; }
.sites-list label i { width: 16px; height: 16px; box-sizing: border-box; border: 2px solid #111; border-radius: 50%; background: #fff; flex: 0 0 16px; }
.sites-list label input:checked + i { background: radial-gradient(circle, #1677e8 0 4px, #fff 5px); }
.sites-list label.required-site { cursor: default; }
.sites-list label.required-site i { box-shadow: 0 0 0 2px #e32436; }
.sites-list label.required-site span { margin-left: 4px; color: #1677e8; font-weight: 800; }
.sites-list label:has(input:focus-visible) i { outline: 3px solid rgba(34, 105, 211, .3); outline-offset: 2px; }
.third-party-required-input { display: none; }
.third-party-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; width: 100%; margin: 4px 0 8px; }
.third-party-required-mark { width: 16px; height: 16px; box-sizing: border-box; border: 2px solid #111; border-radius: 50%; background: radial-gradient(circle, #1677e8 0 4px, #fff 5px); box-shadow: 0 0 0 2px #e32436; flex: 0 0 16px; }
.third-party-selector { position: relative; width: fit-content; color: #182b44; }
.third-party-selector > summary { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 10px; border: 1px solid #202020; border-radius: 5px; background: #fff; color: #111; list-style: none; cursor: pointer; font-weight: 800; }
.third-party-selector > summary::-webkit-details-marker { display: none; }
.third-party-selector[open] > summary { border-color: #1677e8; box-shadow: 0 0 0 2px rgba(22,119,232,.2); }
.third-party-options { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; display: grid; min-width: 230px; padding: 7px 10px; border: 1px solid #a9bfdc; border-radius: 8px; background: #fff; box-shadow: 0 8px 20px rgba(24,52,82,.18); }
.third-party-options label { color: #182b44; }
.third-party-option { display: grid; grid-template-columns: minmax(105px,1fr) auto; align-items: center; gap: 12px; }
.third-party-option > label:first-child { min-width: 0; }
.third-party-options .platform-default-choice { display: block; margin: 0; cursor: pointer; }
.platform-default-choice span { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 8px; border: 1px solid #aab8c8; border-radius: 12px; background: #fff; color: #50647c; font-size: 12px; font-weight: 700; }
.platform-default-choice input:checked + span { border-color: #1677e8; background: #1677e8; color: #fff; box-shadow: 0 0 0 2px rgba(22,119,232,.18); }
.third-party-selected .is-default { border-color: #ef5967; background: #fff4f5; color: #e12235; font-weight: 900; }
.third-party-verify-button { margin-top: 4px; padding: 7px 13px; border: 0; border-radius: 7px; background: #c91f32; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.third-party-verify-button:hover { background: #a91526; }
.third-party-blocked-notice { margin: 10px 0 8px; color: #d9283a !important; font-size: 13px; font-weight: 800; line-height: 1.6; }
.third-party-official-button { display: inline-flex; align-items: center; min-height: 34px; box-sizing: border-box; padding: 6px 15px; border-radius: 8px; background: #2867c7; color: #fff !important; font-size: 13px; font-weight: 800; }
.third-party-official-button:hover { background: #1e55aa; }
.qcc-company-tag { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 7px; border: 1px solid transparent; border-radius: 3px; font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
html[data-theme="dark"] .third-party-selected .is-default { border-color: #ef6a77; background: #41252d; color: #ff8c97; }
html[data-theme="dark"] .platform-default-choice span { border-color: #526982; background: #20344a; color: #c5d5e7; }
.third-party-options label i { border-color: #111; }
.third-party-options label input:checked + i { background: radial-gradient(circle, #1677e8 0 4px, #fff 5px); }
html[data-theme="dark"] .third-party-selector > summary b,html[data-theme="dark"] .third-party-options label { color: #dce8f6; }
html[data-theme="dark"] .third-party-options { border-color: #45617f; background: #1d2f43; }
.third-party-selected { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.third-party-selected span { display: inline-flex; align-items: center; min-height: 26px; padding: 2px 8px; border: 1px solid #8eb8e8; border-radius: 5px; background: #edf5ff; color: #145fad; font-weight: 800; white-space: nowrap; }
.third-party-required-text { color: #1677e8; font-weight: 800; white-space: nowrap; }
.site-select-all { display: block; margin: 1px 0 7px; padding: 4px 13px; border: 1px solid #202020; border-radius: 5px; background: #fff; color: #111; font-weight: 800; cursor: pointer; }
.site-select-all[aria-pressed="true"] { border-color: #1677e8; box-shadow: 0 0 0 2px #1677e8; }
.site-select-all:hover { border-color: #1677e8; color: #1264c3; background: #f1f7ff; }
html[data-theme="dark"] .search-rule-table-wrap,html[data-theme="dark"] .search-rule-table { background: #fff; }

/* Search-rule panel: visual refresh only. Functional markup and controls stay unchanged. */
#query-guide {
  padding: 0;
  overflow: visible;
  border: 1px solid #d7e3f1;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 70, 116, .08);
}
#query-guide > summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 58px;
  box-sizing: border-box;
  padding: 16px 54px 16px 52px;
  border-radius: 15px;
  background: linear-gradient(135deg, #fff7f6 0%, #fff 72%);
  color: #d83b38;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .01em;
  list-style: none;
}
#query-guide > summary::-webkit-details-marker { display: none; }
#query-guide > summary::before {
  position: absolute;
  left: 18px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #ffe6e3;
  color: #e1443f;
  content: "!";
  font-size: 15px;
  font-weight: 900;
}
#query-guide > summary::after {
  position: absolute;
  right: 20px;
  color: #6d829d;
  content: "⌄";
  font-size: 20px;
  transition: transform .2s ease;
}
#query-guide[open] > summary {
  border-bottom: 1px solid #edf1f6;
  border-radius: 15px 15px 0 0;
}
#query-guide[open] > summary::after { transform: rotate(180deg); }
#query-guide .search-rule-table-wrap {
  box-sizing: border-box;
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border-radius: 0 0 15px 15px;
  background: #f7faff;
}
.advanced-search-combination-note {
  margin: 4px 4px 0;
  color: #215eb9;
  font-size: 14px;
  font-weight: 700;
}
.advanced-batch-status { margin: 12px 0; padding: 10px 12px; border: 1px solid #b9d3f7; border-radius: 8px; background: #eef6ff; color: #174f9b; font-weight: 700; line-height: 1.8; white-space: pre-line; }
.advanced-result-group { margin: 16px 0; padding: 14px; border: 1px solid #cddcf0; border-radius: 12px; background: #f8fbff; }
.advanced-result-group > h3 { margin: 0 0 10px; color: #174f9b; font-size: 16px; }
.advanced-result-group-content { display: grid; gap: 12px; }
#query-guide .search-rule-table {
  min-width: 1040px;
  border: 0;
  border-collapse: separate;
  border-spacing: 0 10px;
  background: transparent;
  color: #24364d;
  font-size: 14px;
}
#query-guide .search-rule-table .rule-col { width: 24%; }
#query-guide .search-rule-table .format-col { width: 22%; }
#query-guide .search-rule-table .available-col { width: 10%; }
#query-guide .search-rule-table .site-col { width: 44%; }
#query-guide .search-rule-table th,
#query-guide .search-rule-table td { border: 0; }
#query-guide .search-rule-table th {
  height: auto;
  padding: 13px 16px;
  background: #eaf2fb;
  color: #344963;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  text-align: left;
}
#query-guide .search-rule-table th:first-child { border-radius: 10px 0 0 10px; }
#query-guide .search-rule-table th:last-child { border-radius: 0 10px 10px 0; }
#query-guide .search-rule-table th:nth-child(3) { text-align: center; }
#query-guide .search-rule-table .rule-trigger-note { color: #e14d49; font-size: 12px; }
#query-guide .search-rule-table td {
  height: auto;
  padding: 18px 16px;
  border-top: 1px solid #e4ebf4;
  border-bottom: 1px solid #e4ebf4;
  background: #fff;
  color: #42556e;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
}
#query-guide .search-rule-table td:first-child {
  border-left: 4px solid #4d8de4;
  border-radius: 11px 0 0 11px;
  color: #183a67;
  font-weight: 700;
}
#query-guide .search-rule-table tbody tr:nth-child(2) td:first-child { border-left-color: #38a08b; }
#query-guide .search-rule-table tbody tr:nth-child(3) td:first-child { border-left-color: #8a6bd0; }
#query-guide .search-rule-table tbody tr:nth-child(4) td:first-child { border-left-color: #de9340; }
#query-guide .search-rule-table td:last-child {
  border-right: 1px solid #e4ebf4;
  border-radius: 0 11px 11px 0;
}
#query-guide .search-rule-table td.available {
  color: #1d805e;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
#query-guide .search-rule-table td.available::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #31a675;
  content: "";
  vertical-align: 1px;
}
#query-guide .search-rule-table td.sites-list {
  padding: 13px 16px;
  font-weight: 600;
}
#query-guide .sites-list > label {
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-height: 30px;
  box-sizing: border-box;
  margin: 3px 4px 3px 0;
  padding: 4px 10px 4px 7px;
  border: 1px solid #dbe6f3;
  border-radius: 8px;
  background: #f8fbff;
  color: #315a91;
  font-size: 12px;
  line-height: 1.35;
  transition: border-color .16s, background .16s, transform .16s;
}
#query-guide .sites-list > label:hover {
  border-color: #91b8e7;
  background: #eef6ff;
  transform: translateY(-1px);
}
#query-guide .sites-list label i {
  width: 15px;
  height: 15px;
  border: 1.5px solid #91a9c5;
  flex-basis: 15px;
}
#query-guide .sites-list label input:checked + i {
  border-color: #337bd2;
  background: radial-gradient(circle, #337bd2 0 3px, #fff 4px);
}
#query-guide .site-select-all {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 3px 8px 3px 0;
  padding: 4px 13px;
  border: 1px solid #b8cae0;
  border-radius: 8px;
  background: #fff;
  color: #315a91;
  font-size: 12px;
  font-weight: 700;
}
#query-guide .site-select-all[aria-pressed="true"] {
  border-color: #397fd1;
  background: #eaf3ff;
  box-shadow: none;
  color: #1766c2;
}
#query-guide .third-party-row {
  display: inline-flex;
  width: 100%;
  box-sizing: border-box;
  margin: 3px 0 9px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ef4444;
  vertical-align: top;
}
#query-guide .third-party-selector > summary {
  min-height: 30px;
  box-sizing: border-box;
  padding: 4px 12px;
  border: 1px solid #b8cae0;
  border-radius: 8px;
  color: #315a91;
  font-size: 12px;
}
#query-guide .third-party-selector > summary::after { margin-left: 7px; content: "⌄"; }
#query-guide .third-party-selector[open] > summary { background: #eaf3ff; box-shadow: none; }
#query-guide .third-party-options {
  top: calc(100% + 8px);
  min-width: 250px;
  padding: 10px 12px;
  border-color: #cbd9e9;
  border-radius: 12px;
  box-shadow: 0 14px 32px rgba(27, 57, 94, .16);
}
#query-guide .third-party-selected span {
  min-height: 28px;
  border-color: #b9d2ef;
  border-radius: 8px;
  background: #f0f7ff;
  color: #2869ae;
  font-size: 12px;
  font-weight: 800;
}
#query-guide .third-party-selected span.is-default {
  border-color: #ef5967;
  background: #fff4f5;
  color: #e12235;
}
#query-guide .third-party-required-text {
  color: #e12235;
  font-size: 12px;
  font-weight: 700;
}
#query-guide .third-party-help {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 1px solid #e12235;
  border-radius: 50%;
  background: #fff5f6;
  color: #e12235;
  cursor: help;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  outline: none;
}
#query-guide .third-party-help > [role="tooltip"] {
  position: absolute;
  right: -8px;
  bottom: calc(100% + 10px);
  z-index: 30;
  visibility: hidden;
  width: 280px;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #f0b3b8;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(50, 41, 44, .16);
  color: #52657d;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.65;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
#query-guide .third-party-help > [role="tooltip"]::after {
  position: absolute;
  top: 100%;
  right: 12px;
  border: 6px solid transparent;
  border-top-color: #fff;
  content: "";
}
#query-guide .third-party-help:hover > [role="tooltip"],
#query-guide .third-party-help:focus-visible > [role="tooltip"] {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
#query-guide .third-party-help:focus-visible { box-shadow: 0 0 0 3px rgba(225, 34, 53, .16); }
html[data-theme="dark"] #query-guide {
  border-color: #344b65;
  background: #1b2a3b;
  box-shadow: none;
}
html[data-theme="dark"] #query-guide > summary {
  background: linear-gradient(135deg, #352529 0%, #1b2a3b 72%);
  color: #ff8a84;
}
html[data-theme="dark"] #query-guide .search-rule-table-wrap { background: #152334; }
html[data-theme="dark"] #query-guide .search-rule-table { background: transparent; }
html[data-theme="dark"] #query-guide .search-rule-table th { background: #27394e; color: #d7e4f3; }
html[data-theme="dark"] #query-guide .search-rule-table td { border-color: #344b65; background: #1d2d40; color: #c3d1e1; }
html[data-theme="dark"] #query-guide .search-rule-table td:first-child { color: #d8e8fb; }
html[data-theme="dark"] #query-guide .sites-list > label { border-color: #3c5570; background: #23364b; color: #a9ccf4; }
html[data-theme="dark"] #query-guide .site-select-all,
html[data-theme="dark"] #query-guide .third-party-selector > summary { border-color: #4c6682; background: #203246; color: #b7d5f7; }

@media (max-width: 720px) {
  #query-guide > summary { padding: 14px 42px 14px 46px; font-size: 14px; }
  #query-guide > summary::before { left: 14px; }
  #query-guide > summary::after { right: 14px; }
  #query-guide .search-rule-table-wrap { padding: 10px; }
}
.case-help p { margin: 10px 0 0; }
.search-guide { margin-top: 12px; border-top: 1px solid #e5edf7; }
.first-use-note { margin: 10px 0 0; padding: 8px 11px; border-left: 3px solid #e2a21a; background: #fff8e8; color: #76520a; font-size: 13px; }
.search-guide-row { display: grid; grid-template-columns: minmax(160px, 1.1fr) minmax(180px, 1.25fr) minmax(240px, 2fr); gap: 12px; align-items: start; padding: 10px 2px; border-bottom: 1px solid #e5edf7; }
.search-guide-row strong { color: #23334a; }
.search-guide-row span { color: #215eb9; }
.search-guide-row small { color: #65768b; font-size: 12px; line-height: 1.6; }
@media (max-width: 700px) { .search-guide-row { grid-template-columns: 1fr; gap: 3px; } }
.wenshu-card { max-width: 1100px; }
.wenshu-card h2 { padding-bottom: 14px; border-bottom: 1px solid #e8edf4; }
.wenshu-item { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 18px; padding: 15px 3px; border-bottom: 1px solid #e5eaf1; }
.wenshu-item strong { display: block; margin-bottom: 6px; font-size: 16px; }
.wenshu-item span { display: block; color: #65768b; font-size: 13px; line-height: 1.6; }
.wenshu-reason { color: #40516a; font-size: 13px; line-height: 1.7; }
.wenshu-reason b { display: block; color: #23334a; }
.wenshu-reason p { margin: 4px 0 0; }
.search-retry-note { margin: 15px 0 3px; padding: 10px 12px; border: 1px solid #d9e7fa; border-radius: 8px; background: #f3f8ff; color: #c83232; font-size: 13px; }
.trial-card { margin-top: 16px; }
.trial-note { color: #65768b; font-size: 13px; }
.trial-item { display: block; }
.trial-card > button { min-height: 36px; margin-top: 15px; }
.notice-item { display: block; padding: 12px 3px; border-bottom: 1px solid #e5eaf1; }
.notice-item strong { display: block; margin-bottom: 5px; font-size: 15px; }
.notice-item span { display: block; color: #65768b; font-size: 13px; }
@media (max-width: 720px) { .wenshu-item { grid-template-columns: 1fr; gap: 10px; } }
.wenshu-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 15px; }
.wenshu-actions button { min-height: 36px; }
label { display: block; font-weight: 700; margin-bottom: 10px; }
.search-label-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.search-label-row > label { margin: 0; }
.auto-close-control { display: inline-flex; align-items: center; gap: 6px; color: #51647b; font-size: 13px; font-weight: 500; cursor: pointer; }
.auto-close-control input { flex: none; width: 16px; height: 16px; min-width: 16px; margin: 0; padding: 0; accent-color: #215eb9; cursor: pointer; }
.search-row { display: flex; gap: 12px; }
.search-warning { margin: 8px 2px 0; color: #c83232; font-size: 13px; font-weight: 600; }
input { flex: 1; min-width: 0; padding: 14px 16px; border: 1px solid #cfd8e5; border-radius: 9px; font: inherit; }
input:focus { outline: 2px solid #9fc3ff; border-color: #3274d3; }
button { border: 0; background: #215eb9; color: white; font: inherit; font-weight: 700; padding: 0 23px; border-radius: 9px; cursor: pointer; }
button:hover { background: #174b9b; }
button:disabled { opacity: .6; cursor: wait; }
#message { margin: 22px 2px; color: #51647b; min-height: 24px; }
.bridge-status { margin: 12px 2px -10px; color: #a34d35; font-size: 13px; }
.bridge-status.connected { color: #22815b; }
.bridge-update-link { margin-left: 3px; color: #1763bd; font-weight: 700; text-decoration: underline; }
.bridge-update-link:hover { color: #0f4d98; }
.plugin-tutorial-link {
  margin: 0 0 0 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1763bd;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}
.plugin-tutorial-link:hover { color: #0f4d98; }
.plugin-tutorial-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #0b1835d9;
}
.plugin-tutorial-lightbox.open { display: flex; }
.plugin-tutorial-window {
  position: relative;
  width: min(520px, calc(100vw - 40px));
  padding: 12px;
  border: 1px solid #d6e2f3;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 70px #0008;
}
.plugin-tutorial-window img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 9px;
}
.plugin-tutorial-step {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 1;
  transform: translateX(-50%);
  padding: 7px 14px;
  border-radius: 999px;
  background: #245bb4e8;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 2px 8px #172d4d30;
}
.plugin-tutorial-close {
  position: absolute;
  top: -14px;
  right: -14px;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #172d4d;
  font-size: 23px;
  line-height: 34px;
  box-shadow: 0 4px 16px #0004;
  cursor: pointer;
}
.feedback-entry { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 520px; margin-top: 30px; padding: 16px 18px; border: 1px solid #d7e3f2; border-left: 4px solid #3274d3; border-radius: 10px; background: #fff; box-shadow: 0 4px 18px #253a640d; }
.feedback-entry h2 { margin: 0 0 4px; font-size: 17px; }
.feedback-entry p { margin: 0; color: #65768b; font-size: 13px; }
.feedback-entry button { flex: none; min-height: 40px; padding: 0 16px; }
.feedback-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(760px, calc(100vh - 36px)); padding: 22px; border: 0; border-radius: 15px; color: #23334a; box-shadow: 0 22px 60px #172d4d45; }
.feedback-dialog::backdrop { background: #10233d80; }
.feedback-dialog form { padding: 0; box-shadow: none; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font-size: 21px; }
.dialog-close { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: #eef3fa; color: #40516a; font-size: 24px; }
.feedback-dialog textarea { width: 100%; resize: vertical; min-height: 130px; padding: 12px; border: 1px solid #cfd8e5; border-radius: 9px; font: inherit; }
.feedback-text-wrap { position: relative; }
.feedback-text-wrap textarea { padding-bottom: 30px; }
.feedback-text-wrap span { position: absolute; right: 10px; bottom: 9px; padding: 2px 5px; border-radius: 4px; background: #ffffffd9; color: #687b91; font-size: 12px; pointer-events: none; }
.feedback-dialog label { margin-top: 15px; }
.feedback-dialog label span { color: #687b91; font-size: 12px; font-weight: 400; }
.feedback-dialog input[type=file] { width: 100%; padding: 10px; background: #f7f9fc; }
.feedback-preview { display: grid; gap: 5px; margin-top: 9px; color: #5b6e84; font-size: 12px; }
.feedback-status { min-height: 22px; margin: 12px 0 0; color: #bc3434; font-size: 13px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.dialog-actions button { min-height: 42px; }
.dialog-actions .secondary { color: #31516f; background: #edf2f8; }
.admin-feedback-dialog { width: min(860px, calc(100vw - 28px)); }
.admin-feedback-toolbar { display: flex; align-items: center; gap: 8px; }
.admin-feedback-toolbar label { margin: 0; color: #60738a; font-size: 13px; }
.admin-feedback-toolbar select { min-height: 36px; padding: 0 28px 0 10px; border: 1px solid #cfd8e5; border-radius: 7px; background: #fff; color: #30445d; }
.admin-feedback-list { display: grid; gap: 10px; max-height: calc(100vh - 205px); overflow: auto; }
.admin-feedback-card { padding: 15px; border: 1px solid #dce5f1; border-radius: 11px; background: #f9fbfe; }
.admin-feedback-card.is-unread { border-left: 4px solid #3274d3; }
.admin-feedback-card.is-read { opacity: .82; }
.admin-feedback-meta { display: flex; justify-content: space-between; gap: 12px; color: #60738a; font-size: 12px; }
.admin-feedback-meta strong { color: #23334a; font-size: 14px; }
.feedback-read-badge { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: #e6f0ff; color: #215eb9; font-weight: 700; }
.admin-feedback-card.is-unread .feedback-read-badge { background: #fff0e2; color: #b85b12; }
.admin-feedback-excerpt { margin: 10px 0; color: #425770; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-feedback-details summary { color: #215eb9; font-size: 13px; cursor: pointer; }
.admin-feedback-details > p { white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-feedback-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.admin-feedback-actions button { min-height: 34px; padding: 0 12px; font-size: 12px; }
.feedback-read-toggle { background: #eaf2fd; color: #215eb9; border: 1px solid #bdd1ed; }
.feedback-read-toggle:hover { background: #dceafa; }
.feedback-delete { background: #c93232; }
.feedback-delete:hover { background: #a92222; }
.admin-feedback-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 13px; color: #60738a; font-size: 12px; }
.admin-feedback-pagination span { margin-right: auto; }
.admin-feedback-pagination button { min-height: 34px; padding: 0 12px; font-size: 12px; }
.admin-feedback-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.admin-feedback-gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid #d8e2ee; border-radius: 8px; background: #fff; }
.admin-dashboard-dialog { width: min(900px, calc(100vw - 28px)); }
.admin-overview-panel { padding: 13px; border: 1px solid #d7e3f2; border-radius: 11px; background: #fbfcfe; }
.admin-dashboard-dialog section h3 { margin: 15px 0 9px; font-size: 15px; }
.admin-dashboard-dialog section:first-child h3 { margin-top: 0; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.admin-stat-card { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 8px 10px; border: 1px solid #d7e3f2; border-radius: 9px; background: #f7faff; color: #40516a; text-align: center; white-space: nowrap; }
button.admin-stat-card { cursor: pointer; }
.admin-stat-card:hover, .admin-stat-card.active { border-color: #3274d3; background: #eaf3ff; color: #215eb9; }
.admin-stat-card strong { font-size: 18px; color: #215eb9; }
.code-stats .admin-stat-card { background: #f8fafc; }
.admin-referral-stats { display: grid; gap: 5px; max-height: 190px; overflow: auto; color: #64758b; font-size: 12px; }
.admin-referral-row { display: grid; grid-template-columns: minmax(150px,1.4fr) repeat(3,minmax(100px,1fr)); align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e1e8f1; border-radius: 7px; background: #fff; }
.admin-referral-row.heading { position: sticky; top: 0; z-index: 1; border-color: #d2dfef; background: #edf4fd; color: #506681; font-weight: 700; }
.admin-referral-row > span:first-child { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.admin-referral-row > span:first-child strong { overflow: hidden; color: #23334a; text-overflow: ellipsis; white-space: nowrap; }
.admin-referral-row small { overflow: hidden; color: #7a8ba0; text-overflow: ellipsis; white-space: nowrap; }
.admin-referral-row > strong { color: #215eb9; font-size: 13px; }
.admin-referral-inventory { display: grid; gap: 6px; }
.admin-inventory-row { display: grid; grid-template-columns: minmax(150px,1fr) 110px 90px 92px; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid #e1e8f1; border-radius: 7px; background: #fff; }
.admin-inventory-counts { display: grid; gap: 2px; }
.admin-inventory-counts span { color: #18724d; font-weight: 700; }
.admin-inventory-counts span.empty { color: #b52d2d; }
.admin-inventory-counts small { color: #d12f3f; font-size: 11px; font-weight: 700; }
.admin-inventory-row input { width: 100%; padding: 7px 8px; }
.admin-inventory-row button { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.today-stat { border-color: #bdd9cc; background: #f0faf5; }
.today-stat strong { color: #18724d; }
.admin-user-list { display: grid; gap: 7px; max-height: 340px; margin-top: 16px; overflow: auto; }
.admin-user-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(90px, 130px) 90px 72px minmax(170px, 1fr) 68px; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid #e1e8f1; border-radius: 8px; background: #fbfcfe; }
.admin-user-row > div { display: grid; gap: 3px; }
.admin-user-row > div span, .admin-user-row time { color: #697a90; font-size: 12px; }
.admin-user-membership, .admin-user-activity { width: fit-content; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.admin-user-membership.member { background: #e8efff; color: #2b59ad; }
.admin-user-membership.user { background: #fff3df; color: #a35c12; }
.admin-user-activity.online { background: #e4f7ee; color: #18724d; }
.admin-user-activity.offline { background: #edf1f6; color: #5f7086; }
.admin-user-activity.unused, .admin-user-activity.disabled { background: #ffe8e8; color: #b52d2d; }
.admin-user-suspend { min-height: 34px; padding: 0 12px; background: #c93232; font-size: 12px; }
.admin-user-suspend:hover { background: #a92222; }
.admin-user-note { min-width: 0; min-height: 32px; padding: 5px 9px; overflow: hidden; border: 1px dashed #b9c9dc; border-radius: 7px; background: #f4f7fb; color: #58708d; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-note:hover { border-color: #2c68bf; background: #edf4ff; color: #215eb9; }
.admin-user-note.has-note { border-style: solid; border-color: #efb45e; background: #fff8e8; color: #9a5b0b; }
.admin-user-note-cell { position: relative; display: block !important; min-width: 0; }
.admin-user-note-cell .admin-user-note { width: 100%; }
.admin-user-note-editor { position: absolute; top: 50%; left: 0; z-index: 15; display: grid !important; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 5px !important; width: 270px; box-sizing: border-box; padding: 6px; border: 1px solid #99b9df; border-radius: 9px; background: #fff; box-shadow: 0 9px 24px rgba(32, 67, 110, .2); transform: translateY(-50%); }
.admin-user-note-editor input { min-width: 0; height: 32px; box-sizing: border-box; padding: 5px 8px; border: 1px solid #c7d6e8; border-radius: 6px; font-size: 12px; outline: none; }
.admin-user-note-editor input:focus { border-color: #3679cc; box-shadow: 0 0 0 2px rgba(54, 121, 204, .13); }
.admin-user-note-editor button { min-height: 32px; padding: 4px 9px; border-radius: 6px; font-size: 12px; }
.admin-user-note-editor .save { background: #2867c7; color: #fff; }
.admin-user-note-editor .cancel { padding-right: 8px; padding-left: 8px; background: #eef2f7; color: #53677f; }
@media (max-width: 620px) { .feedback-entry { align-items: stretch; flex-direction: column; } .admin-feedback-meta { flex-direction: column; gap: 4px; } .admin-feedback-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

html[data-theme="dark"] { color: #dbe7f5; background: #101722; color-scheme: dark; }
html[data-theme="dark"] body { background: #101722; }
html[data-theme="dark"] header p,
html[data-theme="dark"] .portal-nav span,
html[data-theme="dark"] .note,
html[data-theme="dark"] #message,
html[data-theme="dark"] .auto-close-control,
html[data-theme="dark"] .feedback-entry p,
html[data-theme="dark"] .empty { color: #9fb0c5; }
html[data-theme="dark"] .portal-nav a,
html[data-theme="dark"] form,
html[data-theme="dark"] .case-help,
html[data-theme="dark"] .card,
html[data-theme="dark"] .feedback-entry,
html[data-theme="dark"] .profile-menu > summary,
html[data-theme="dark"] .profile-panel,
html[data-theme="dark"] .feedback-dialog { background: #182231; border-color: #33445a; color: #dbe7f5; }
html[data-theme="dark"] .portal-nav a:hover,
html[data-theme="dark"] .profile-menu > summary:hover,
html[data-theme="dark"] .profile-menu[open] > summary { background: #202e40; }
html[data-theme="dark"] .portal-nav strong,
html[data-theme="dark"] .search-guide-row strong,
html[data-theme="dark"] .password-update .profile-form,
html[data-theme="dark"] .company-fields dd,
html[data-theme="dark"] .card h2 { color: #e7eff9; }
html[data-theme="dark"] input,
html[data-theme="dark"] textarea { background: #111a26; border-color: #3b4d64; color: #e5edf7; }
html[data-theme="dark"] .company-fields dt { background: #202d3d; color: #aebed1; }
html[data-theme="dark"] .company-fields,
html[data-theme="dark"] .company-fields dt,
html[data-theme="dark"] .company-fields dd,
html[data-theme="dark"] .search-guide,
html[data-theme="dark"] .search-guide-row,
html[data-theme="dark"] .company-result,
html[data-theme="dark"] .card h2 { border-color: #33445a; }
html[data-theme="dark"] .company-result { color: #dbe7f5; }
html[data-theme="dark"] .company-result:hover { background: #202d3d; }
html[data-theme="dark"] .creditchina-metrics span { background: #202d3d; border-color: #3b4d64; color: #b8c7d9; }
html[data-theme="dark"] .profile-info span,
html[data-theme="dark"] .company-result span { color: #aebed1; }
html[data-theme="dark"] .theme-toggle { background: #182231; border-color: #47617f; color: #ffd166; }
html[data-theme="dark"] .theme-toggle:hover { background: #243348; color: #ffe29a; }
html[data-theme="dark"] .first-use-note { background: #302816; color: #f3cf78; }
html[data-theme="dark"] .admin-feedback-card { background: #202d3d; border-color: #3b4d64; }
html[data-theme="dark"] .admin-feedback-meta strong,
html[data-theme="dark"] .admin-feedback-excerpt { color: #dbe7f5; }
html[data-theme="dark"] .admin-feedback-toolbar select { background: #111a26; border-color: #3b4d64; color: #dbe7f5; }
html[data-theme="dark"] .feedback-text-wrap span { background: #111a26d9; color: #9fb0c5; }
html[data-theme="dark"] .admin-stat-card,
html[data-theme="dark"] .admin-user-row { background: #202d3d; border-color: #3b4d64; color: #dbe7f5; }
html[data-theme="dark"] .admin-user-note { border-color: #4a607a; background: #26374a; color: #bfd0e3; }
html[data-theme="dark"] .admin-user-note.has-note { border-color: #8f6a35; background: #3a3021; color: #ffd38a; }
html[data-theme="dark"] .admin-user-note-editor { border-color: #506d8d; background: #1e2d3e; }
html[data-theme="dark"] .admin-user-note-editor input { border-color: #405a76; background: #26384c; color: #e2ebf5; }
html[data-theme="dark"] .admin-referral-row { border-color: #3b4d64; background: #202d3d; }
html[data-theme="dark"] .admin-inventory-row { border-color: #3b4d64; background: #202d3d; }
html[data-theme="dark"] .admin-referral-row.heading { background: #273b53; color: #c5d5e8; }
html[data-theme="dark"] .admin-referral-row > span:first-child strong { color: #e6eef8; }
html[data-theme="dark"] .admin-overview-panel { background: #172331; border-color: #3b4d64; }
html[data-theme="dark"] .admin-stat-card:hover,
html[data-theme="dark"] .admin-stat-card.active { background: #273b53; }
@media (max-width: 680px) { .admin-stat-grid { grid-template-columns: repeat(2, 1fr); } .admin-user-row { grid-template-columns: 1fr; } .admin-referral-row { grid-template-columns: 1.3fr repeat(3,1fr); gap: 6px; padding: 7px; } .admin-referral-row > span:first-child { display: grid; gap: 2px; } .admin-inventory-row { grid-template-columns: 1fr 1fr; } }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card { background: white; border: 1px solid #e0e7f1; border-radius: 15px; padding: 19px; min-width: 0; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; border-bottom: 1px solid #e8edf4; padding-bottom: 13px; }
.card h2 { margin: 0; font-size: 19px; }
.count { color: #6b7b8e; font-size: 13px; white-space: nowrap; }
.links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; }
a { color: #215eb9; text-decoration: none; }
a:hover { text-decoration: underline; }
.item { padding: 15px 0; border-bottom: 1px solid #eef1f6; }
.item:last-child { border: 0; padding-bottom: 0; }
.item a { font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.item p { color: #5f6d7d; font-size: 13px; margin: 6px 0 0; overflow-wrap: anywhere; }
.empty { color: #6b7b8e; padding-top: 10px; font-size: 14px; }
.results-panel .empty { color: #d52222; font-weight: 700; }
.note { color: #667588; font-size: 13px; margin-top: 25px; }
.qcc-card { max-width: 850px; }
.platform-results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.platform-results-grid.single-platform { grid-template-columns: minmax(0, 1fr); }
.platform-results-grid.single-platform .platform-other-column:empty { display: none; }
.platform-results-column { display: grid; gap: 14px; align-content: stretch; min-width: 0; }
.platform-other-column { align-content: start; }
.platform-leading-ready .platform-default-column > .company-platform-card { height: 100%; box-sizing: border-box; }
.platform-remaining-column { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr); }
.platform-remaining-column:empty { display: none; }
.platform-results-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.platform-results-pair.platform-pair-ready > .company-platform-card { height: 100%; box-sizing: border-box; }
.platform-results-grid .company-platform-card { width: auto; max-width: none; min-width: 0; margin: 0; }
@media (max-width: 900px) { .platform-results-grid,.platform-results-pair { grid-template-columns: minmax(0, 1fr); } .platform-remaining-column { grid-column: auto; } .platform-leading-ready .platform-default-column > .company-platform-card,.platform-results-pair.platform-pair-ready > .company-platform-card { height: auto; } }
.qcc-card h2 { padding-bottom: 14px; border-bottom: 1px solid #e8edf4; }
.platform-order-number { color: #1677e8; font-size: 1em; font-weight: 800; }
.creditchina-card { max-width: 850px; margin-top: 18px; border-top: 3px solid #b45a70; }
.creditchina-card h2 { padding-bottom: 14px; border-bottom: 1px solid #e8edf4; }
.creditchina-card .verification-note { margin-bottom: 10px; color: #a34d35; }
.external-entry { color: #215eb9; font-weight: 700; }
.creditchina-open-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; min-height: 40px; margin: 8px 0 4px; padding: 0 16px; border: 0; border-radius: 8px; background: #c5192d; color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; }
.creditchina-open-button:hover { background: #a81224; color: #fff; text-decoration: none; }
.creditchina-focus-link { width: fit-content; margin: 2px 0 4px; padding: 0; border: 0; background: transparent; color: #215eb9; font-size: 13px; cursor: pointer; }
.creditchina-focus-link:hover { color: #174987; text-decoration: underline; }
.creditchina-info { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 5px; color: #4e6178; font-size: 13px; line-height: 1.7; }
.creditchina-info span { color: #4e6178; }
.creditchina-info b { color: #23334a; }
.creditchina-address { margin: 2px 0 0; color: #4e6178; font-size: 13px; }
.creditchina-metrics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
.creditchina-metrics span { padding: 5px 9px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f7f9fc; color: #52667d; font-size: 12px; }
.creditchina-metrics .creditchina-metric-label,
.creditchina-metrics .creditchina-metric-value { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: 400; line-height: inherit; }
.creditchina-metrics span.is-positive,
.creditchina-metrics span.is-positive .creditchina-metric-label { border-color: #e02424; background: #e02424; color: #fff; }
.creditchina-metrics span.is-positive .creditchina-metric-value { color: #fff; }
.execution-card { max-width: 1100px; }
.execution-card + .execution-card { margin-top: 18px; }
.verification-focus { min-height: 38px; margin: 0 16px 12px 0; }
.execution-card h2 { padding-bottom: 14px; border-bottom: 1px solid #e8edf4; }
.execution-card.execution-no-results .empty { color: #d52222; font-weight: 700; }
.creditchina-open-button.query-action-disabled { border-color: #aab6c5; background: #e8edf3; color: #6e7b8c; cursor: not-allowed; box-shadow: none; opacity: .85; }
.execution-table-wrap { width: 100%; overflow-x: auto; }
.execution-table { width: 100%; min-width: 640px; table-layout: fixed; margin-top: 16px; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.execution-table th, .execution-table td { padding: 12px 14px; border-bottom: 1px solid #e2e7ee; text-align: left; }
.execution-table th { background: #f4f6f9; color: #35465c; font-weight: 700; }
.execution-table tbody tr:hover { background: #f8fbff; }
.execution-table th:nth-child(1), .execution-table td:nth-child(1) { width: 70px; text-align: center; }
.execution-table th:nth-child(2), .execution-table td:nth-child(2) { width: 165px; }
.execution-table th:nth-child(3), .execution-table td:nth-child(3) { width: 210px; }
.execution-table td:nth-child(4) { white-space: nowrap; }
.execution-table.has-termination th:nth-child(2), .execution-table.has-termination td:nth-child(2) { width: 120px; }
.execution-table.has-termination th:nth-child(3), .execution-table.has-termination td:nth-child(3) { width: 155px; }
.execution-table.has-termination th:nth-child(5), .execution-table.has-termination td:nth-child(5) { width: 155px; }
.execution-detail-link { display: inline-flex; align-items: center; min-height: 36px; margin-top: 13px; font-size: 14px; font-weight: 700; }
.company-result { display: flex; flex-direction: column; gap: 7px; padding: 18px 8px; border-bottom: 1px solid #e8edf4; color: #23334a; }
.company-title-line { display: flex; align-items: center; gap: 9px; }
.company-result strong { font-size: 19px; }
.company-result small { color: #78889a; font-size: 12px; }
.company-result span { color: #64758b; font-size: 13px; line-height: 1.6; }
.company-result em { color: #215eb9; font-style: normal; font-size: 13px; }
.company-result:hover { background: #f8fbff; text-decoration: none; }
.company-fields { display: grid; grid-template-columns: 145px 1fr; margin: 8px 0; border: 1px solid #e0e8f1; border-bottom: 0; }
.company-basic-information > h3 { margin: 12px 0 4px; color: #102a43; font-size: 15px; }
.third-party-info-line { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 3px 0; color: #2f3e50; font-size: 14px; line-height: 1.6; }
.third-party-info-label { flex: 0 0 auto; color: #60738a !important; font-size: 14px !important; }
.third-party-info-value { min-width: 0; color: #172b45; font-size: 16px !important; font-weight: 700; overflow-wrap: anywhere; }
.third-party-credit-code { margin: 3px 0 10px; }
.third-party-credit-code .third-party-info-value { color: #172b45; font-size: 14px !important; font-weight: 500; letter-spacing: .15px; }
.third-party-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 2px 0 5px; }
.company-fields dt, .company-fields dd { padding: 9px 12px; margin: 0; border-bottom: 1px solid #e0e8f1; font-size: 13px; }
.company-fields dt { background: #f3f8fc; color: #60738a; }
.company-fields dd { display: flex; align-items: center; gap: 9px; color: #2f3e50; }
.inline-copy-button { flex: 0 0 auto; min-height: 26px; padding: 2px 9px; border: 1px solid #9cb9df; border-radius: 5px; background: #fff; color: #2362ad; font-size: 12px; line-height: 1; cursor: pointer; }
.inline-copy-button:hover { border-color: #2362ad; background: #eef6ff; }
.inline-copy-button.copied { border-color: #26a269; background: #eefaf4; color: #19734a; }
.company-screenshot { display: block; max-width: 100%; width: 100%; height: auto; border: 1px solid #dce5ef; border-radius: 6px; margin: 10px 0; }
.screenshot-preview { padding: 8px 0; }
.screenshot-preview summary { color: #215eb9; cursor: pointer; font-size: 13px; }
.detail-progress { color: #6f7d8b; font-size: 12px; }
.risk-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0; }
.risk-counts > div { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 5px; background: #fff5f5; border: 1px solid #f5e0e0; border-radius: 7px; }
.risk-counts span { color: #714d4d; font-size: 12px; }
.risk-counts strong { color: #d24040; font-size: 18px; }
.qcc-legal-counts { margin: 10px 0 4px; padding: 12px; border: 1px solid #f0d7da; border-radius: 8px; background: #fffafa; }
.qcc-legal-counts h3 { margin: 0 0 10px; color: #8f1727; font-size: 15px; }
.qcc-legal-positive { display: flex; flex-wrap: wrap; gap: 8px; }
.qcc-legal-positive > div { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #efc5ca; border-radius: 6px; background: #fff; }
.qcc-legal-positive span { color: #3b4654; font-size: 13px; }
.qcc-legal-positive strong { color: #d51d32; font-size: 15px; }
.qcc-legal-zero { margin-top: 10px; }
.qcc-legal-zero summary { width: fit-content; color: #66778c; font-size: 13px; font-weight: 700; cursor: pointer; }
.qcc-legal-zero-list { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #e2cdd0; }
.qcc-legal-zero-list span { color: #8793a1; font-size: 12px; }
.qcc-history-vip p { margin: 0; color: #bf293b; font-size: 13px; font-weight: 700; }
@media (max-width: 520px) { .risk-counts { grid-template-columns: repeat(2, 1fr); } }
.loading-result { display: flex; align-items: baseline; gap: 2px; color: #3766a6; font-weight: 600; padding: 18px 0 4px; }
.loading-result.login-required { color: #d62f3d; }
.loading-dots { display: inline-flex; width: 22px; }
.loading-dots span { opacity: .2; animation: dot-pulse 1.2s infinite; }
.loading-dots span:nth-child(2) { animation-delay: .2s; }
.loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-pulse { 0%, 60%, 100% { opacity: .2; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 760px) { main { padding: 26px 14px; } .grid { grid-template-columns: 1fr; } .search-row { flex-direction: column; } button { padding: 13px; } }
@media (max-width: 1080px) { .portal-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } .portal-nav a:last-child { grid-column: 1 / -1; } }

/* Dashboard layout: top navigation card workspace */
body { background: #f5f8fc; }
main { display: flex; max-width: 1540px; padding: 18px 32px 42px; flex-direction: column; }
.page-header { order: 1; display: grid; grid-template-columns: minmax(300px,1fr) auto auto; align-items: center; gap: 34px; min-height: 66px; margin: 0 0 18px; padding: 0 58px 0 0; border-bottom: 1px solid #e2eaf4; }
.page-title-block { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark { display: block; width: 40px; height: 40px; flex: none; border-radius: 12px; object-fit: contain; filter: drop-shadow(0 7px 9px #1c66c433); }
.page-header h1 { margin: 0; color: #102b56; font-size: 22px; line-height: 1.2; white-space: nowrap; }
.page-header .page-title-block p { margin: 4px 0 0; color: #7b8ba1; font-size: 12px; }
.section-nav { display: flex; align-items: stretch; align-self: stretch; gap: 30px; }
.section-nav a { position: relative; display: grid; place-items: center; padding: 0 3px; color: #344960; font-size: 14px; font-weight: 700; text-decoration: none; }
.section-nav a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; content: ""; }
.section-nav a:hover,.section-nav a.active { color: #1769d2; text-decoration: none; }
.section-nav a:hover::after,.section-nav a.active::after { background: #2379e7; }
.profile-menu { position: relative; top: auto; right: auto; z-index: 200; }
.profile-menu > summary { min-height: 42px; border-color: transparent; box-shadow: none; }
.profile-panel { top: 50px; }
.theme-toggle { top: 31px; right: 32px; left: auto; width: 32px; height: 32px; border: 0; box-shadow: none; }
.search-intro { order: 2; position: relative; min-height: 150px; margin-bottom: -62px; padding: 26px 30px 78px; overflow: hidden; border: 1px solid #d8e7fa; border-radius: 16px; background: radial-gradient(circle at 75% 15%,#d7eaff 0,transparent 31%),linear-gradient(105deg,#eff7ff,#e8f3ff 55%,#f6faff); }
.search-intro > div:first-child { position: relative; z-index: 2; }
.search-intro span { color: #3974c5; font-size: 10px; font-weight: 800; letter-spacing: .32em; }
.search-intro h2 { margin: 9px 0 4px; color: #112e5b; font-size: clamp(24px,2.2vw,34px); }
.search-intro p { margin: 0; color: #687d98; font-size: 14px; }
.search-intro-art { position: absolute; top: 12px; right: 5%; width: 220px; height: 125px; opacity: .55; transform: rotate(-5deg); }
.search-intro-art::before { position: absolute; right: 38px; bottom: 14px; width: 72px; height: 88px; border: 4px solid #66a5eb; border-radius: 12px; background: #ffffff80; box-shadow: -26px 13px 0 #b9d8fa80; content: ""; }
.search-intro-art::after { position: absolute; right: 10px; bottom: 0; width: 52px; height: 52px; border: 7px solid #317ddd; border-radius: 50%; box-shadow: 18px 20px 0 -12px #317ddd; content: ""; }
.search-intro-art i { position: absolute; right: 58px; z-index: 1; width: 38px; height: 4px; border-radius: 4px; background: #6fa8e8; }
.search-intro-art i:nth-child(1) { top: 45px; }.search-intro-art i:nth-child(2) { top: 61px; }.search-intro-art i:nth-child(3) { top: 77px; }
#search-form { order: 3; position: relative; z-index: 3; margin: 0 26px 26px; padding: 17px 20px; border: 1px solid #dbe7f5; border-radius: 13px; box-shadow: 0 12px 30px #225cae16; }
.search-label-row { justify-content: flex-end; min-height: 22px; margin: 0 0 8px; }
.search-label-row > label:first-child { margin-right: auto; color: #34516f; font-size: 13px; }
.search-row input { min-height: 52px; border-color: #bdd2ec; background: #fbfdff; }
.search-row button { min-width: 170px; background: linear-gradient(135deg,#2377e6,#0e63d5); box-shadow: 0 6px 14px #1769d22b; }
.portal-nav { order: 4; gap: 12px; margin: 0 0 20px; }
.portal-nav::before { grid-column: 1 / -1; color: #173a67; content: "官方网站入口"; font-size: 18px; font-weight: 800; }
.portal-nav a { display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 10px; min-height: 90px; padding: 16px 13px; border: 1px solid #dae5f2; border-top: 1px solid #dae5f2; border-radius: 12px; box-shadow: 0 5px 16px #214c820a; }
.portal-nav a::before { grid-row: 1 / 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #edf4ff; color: #1769d2; content: "官"; font-size: 16px; font-weight: 900; }
.portal-nav a:nth-child(2)::before { content: "庭"; }.portal-nav a:nth-child(3)::before { content: "执"; }.portal-nav a:nth-child(4)::before { content: "告"; }.portal-nav a:nth-child(5)::before { content: "企"; }.portal-nav a:nth-child(6)::before { content: "信"; }
.portal-nav strong { align-self: end; font-size: 13px; }
.portal-nav span { align-self: start; font-size: 11px; }
.case-help { order: 5; margin: 0; padding: 15px 18px; border-radius: 12px; }
.bridge-status { order: 6; margin: 14px 0 0; padding: 14px 18px; border: 1px solid #cae7d8; border-radius: 12px; background: #f0fbf5; font-weight: 700; }
.bridge-status.connected { color: #188657; }
#message { order: 7; margin: 16px 2px 8px; }
#results { order: 8; min-height: 190px; padding: 18px; border: 1px solid #dbe5f1; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px #214c8209; }
#results:empty::before { display: grid; min-height: 150px; place-items: center; border: 1px dashed #d6e1ef; border-radius: 10px; color: #8a9bb0; content: "查询结果将在这里显示"; font-size: 14px; }
.note { order: 9; }
.feedback-entry { order: 10; width: 100%; max-width: none; margin-top: 18px; border-left-width: 1px; background: linear-gradient(90deg,#f7fbff,#fff); }
.legal-disclaimer { max-width: 1476px; }

html[data-theme="dark"] body { background: #101722; }
html[data-theme="dark"] .page-header { border-color: #2b3d53; }
html[data-theme="dark"] .page-header h1,html[data-theme="dark"] .section-nav a { color: #dce9f8; }
html[data-theme="dark"] .search-intro { border-color: #334b67; background: radial-gradient(circle at 75% 15%,#254d7c 0,transparent 35%),linear-gradient(105deg,#172a40,#1b3049); }
html[data-theme="dark"] .search-intro h2 { color: #f1f6fc; }
html[data-theme="dark"] #results { border-color: #33445a; background: #182231; }
html[data-theme="dark"] .bridge-status { border-color: #355c4b; background: #172f27; }

@media (max-width: 1100px) {
  main { padding: 16px 22px 38px; }
  .page-header { grid-template-columns: 1fr auto; padding-right: 48px; }
  .section-nav { display: none; }
  .portal-nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .portal-nav a:last-child { grid-column: auto; }
}
@media (max-width: 760px) {
  main { padding: 12px 14px 30px; }
  .page-header { gap: 10px; min-height: 58px; padding-right: 40px; }
  .brand-mark { width: 34px; height: 34px; }
  .page-header h1 { font-size: 17px; white-space: normal; }
  .page-header .page-title-block p { display: none; }
  .theme-toggle { top: 24px; right: 12px; }
  .profile-menu > summary > span:not(.profile-avatar),.profile-menu > summary small { display: none; }
  .profile-menu > summary { padding: 5px; }
  .search-intro { min-height: 170px; margin-bottom: -55px; padding: 22px 20px 70px; }
  .search-intro-art { display: none; }
  #search-form { margin: 0 10px 20px; padding: 14px; }
  .search-label-row { align-items: flex-start; flex-direction: column; }
  .search-row button { min-width: 0; }
  .portal-nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-nav a { grid-template-columns: 34px 1fr; min-height: 78px; padding: 12px 10px; }
  .portal-nav a::before { width: 32px; height: 32px; border-radius: 9px; font-size: 13px; }
}

/* Theme control matching the selected sun + switch reference */
.theme-toggle { display: flex; align-items: center; justify-content: center; gap: 7px; width: 78px; height: 36px; padding: 0 7px; border: 0; border-radius: 10px; background: #fff; color: #153d76; box-shadow: 0 3px 12px #274f7d12; }
.theme-toggle:hover { background: #f8fbff; }
.theme-icon { display: grid; place-items: center; width: 21px; height: 21px; flex: none; font-size: 23px; line-height: 1; }
.theme-switch { position: relative; display: block; width: 42px; height: 22px; flex: 0 0 42px; border-radius: 99px; background: #1472e8; box-shadow: inset 0 0 0 1px #0d64cf; }
.theme-switch i { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #173b6855; transform: translateX(20px); transition: transform .2s ease; }
html[data-theme="dark"] .theme-toggle { background: #182231; color: #f7c94f; }
html[data-theme="dark"] .theme-toggle:hover { background: #202e40; }
html[data-theme="dark"] .theme-switch { background: #53657d; box-shadow: inset 0 0 0 1px #6d819b; }
html[data-theme="dark"] .theme-switch i { transform: translateX(0); }

/* User markup pass: remove center nav, lift content, compact the switch */
main { padding-top: 8px; }
.page-header { grid-template-columns: minmax(300px,1fr) auto; gap: 18px; min-height: 54px; margin-bottom: 10px; padding-right: 52px; }
.theme-toggle { top: 19px; }
.search-intro { min-height: 196px; margin-bottom: -84px; padding-top: 27px; }
#search-form { margin-bottom: 20px; }
.portal-heading { margin-bottom: 8px; }
.portal-nav { margin-bottom: 14px; }
.search-row .auto-close-control { min-width: 230px; font-size: 12px; }
.search-row .auto-close-control input { appearance: auto; width: 18px; height: 18px; max-height: 18px; flex: 0 0 18px; min-width: 18px; border-radius: 4px; background: #fff; accent-color: #1769d2; }
.search-row .auto-close-control input::after { display: none; content: none; }
@media (max-width: 760px) {
  main { padding-top: 6px; }
  .page-header { min-height: 52px; margin-bottom: 8px; }
  .theme-toggle { top: 17px; }
  .search-intro { min-height: 178px; margin-bottom: -58px; padding-top: 22px; }
}
@media (max-width: 440px) { .portal-nav { grid-template-columns: 1fr; } }

/* High fidelity pass for the selected dashboard concept */
main { max-width: 1680px; padding-right: 40px; padding-left: 40px; }
.page-header { min-height: 64px; margin-bottom: 20px; }
.search-intro { min-height: 214px; margin-bottom: -86px; padding: 34px 38px 112px; border-radius: 15px; }
.search-intro h2 { margin-top: 12px; font-size: clamp(30px,2.55vw,42px); letter-spacing: -.02em; }
.search-intro p { font-size: 16px; }
.search-intro-art { top: 24px; right: 6%; width: 280px; height: 150px; }
#search-form { margin: 0 40px 30px; padding: 18px 22px; }
.search-label-row { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.search-row { align-items: center; }
.search-row input { min-height: 58px; font-size: 15px; }
.search-row button { min-width: 180px; min-height: 58px; font-size: 16px; }
.search-row .auto-close-control { flex: 0 0 auto; min-width: 250px; margin: 0 2px; color: #233b5c; white-space: nowrap; }
.search-row .auto-close-control input { appearance: none; position: relative; display: block; box-sizing: border-box; width: 44px; height: 24px; max-height: 24px; align-self: center; flex: 0 0 44px; min-width: 44px; margin: 0; padding: 0; border: 0; border-radius: 99px; background: #c8d6e8; transition: background .2s; }
.search-row .auto-close-control input::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px #173b6840; content: ""; transition: transform .2s; }
.search-row .auto-close-control input:checked { background: #1971e2; }
.search-row .auto-close-control input:checked::after { transform: translateX(20px); }
.portal-heading { order: 4; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 12px; }
.portal-heading h2 { position: relative; margin: 0; padding-left: 17px; color: #112e59; font-size: 21px; }
.portal-heading h2::before { position: absolute; top: 2px; bottom: 2px; left: 0; width: 5px; border-radius: 5px; background: #1875e5; content: ""; }
.portal-heading span { color: #647a96; font-size: 13px; }
.portal-nav { order: 5; margin-bottom: 18px; }
.portal-nav::before { display: none; }
.portal-nav a { grid-template-columns: 50px minmax(0,1fr) 10px; min-height: 106px; padding: 17px 14px; border-color: #dce7f4; background: #fff; }
.portal-nav a::after { grid-column: 3; grid-row: 1 / 3; align-self: center; color: #3b6da9; content: "›"; font-size: 24px; font-weight: 400; }
.portal-nav a::before { width: 46px; height: 46px; border: 3px solid #f3c842; border-radius: 50%; background: #d82b2e; color: #ffe067; content: "法"; box-shadow: inset 0 0 0 2px #b81e25; }
.portal-nav a:nth-child(2)::before { content: "庭"; }.portal-nav a:nth-child(3)::before { content: "执"; }.portal-nav a:nth-child(4)::before { content: "告"; }
.portal-nav a:nth-child(5)::before { border: 0; border-radius: 12px; background: linear-gradient(145deg,#1288ef,#0656c9); color: #fff; content: "企"; box-shadow: none; }
.portal-nav a:nth-child(6)::before { content: "信"; }
.portal-nav strong { font-size: 14px; }
.portal-nav span { font-size: 12px; }
.utility-row { order: 6; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.utility-row .case-help,.utility-row .bridge-status { margin: 0; min-height: 78px; }
.utility-row .case-help { align-self: start; padding: 18px 20px; }
.utility-row .case-help[open] { grid-column: 1 / -1; }
.utility-row .bridge-status { display: flex; align-items: center; padding: 18px 22px; color: #9e563a; }
.utility-row .bridge-status::before { display: grid; place-items: center; width: 40px; height: 40px; margin-right: 13px; border-radius: 12px; background: #e8f2ff; color: #1769d2; content: "扩"; font-size: 16px; font-weight: 900; }
.utility-row .bridge-status.connected::before { background: #e8f8ef; color: #168858; content: "✓"; }
.results-panel { order: 7; padding: 18px; border: 1px solid #dbe5f1; border-radius: 14px; background: #fff; box-shadow: 0 5px 18px #214c8209; }
.results-panel > h2 { margin: 0; color: #17345c; font-size: 19px; }
.results-panel #message { margin: 7px 0 10px; min-height: 20px; font-size: 13px; }
.results-panel #results { min-height: 160px; padding: 0; border: 0; border-radius: 10px; box-shadow: none; }
.results-panel #results:empty::before { min-height: 158px; background: #fbfdff; }
.results-panel .note { margin: 14px 0 0; }
.feedback-entry { order: 8; }

.back-to-top {
  position: fixed;
  right: clamp(22px, 5vw, 78px);
  bottom: 72px;
  z-index: 80;
  display: grid;
  width: 58px;
  height: 58px;
  padding: 7px 0 6px;
  place-content: center;
  gap: 1px;
  border: 1px solid #b9d5f7;
  border-radius: 17px;
  background: linear-gradient(145deg,#ffffff 0%,#eaf4ff 100%);
  color: #1769d2;
  box-shadow: 0 10px 28px #245b9d2b, inset 0 1px 0 #fff;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(.94);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: translateY(0) scale(1); }
.back-to-top svg { width: 24px; height: 24px; margin: 0 auto; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.back-to-top span { font-size: 11px; font-weight: 800; line-height: 1; }
.back-to-top:hover { border-color: #2c7ce3; background: linear-gradient(145deg,#2d80e9,#1767ce); color: #fff; box-shadow: 0 13px 30px #1769d246; transform: translateY(-3px); }
.back-to-top:active { transform: translateY(0) scale(.96); }
.back-to-top:focus-visible { outline: 3px solid #9fc8ff; outline-offset: 3px; }
html[data-theme="dark"] .back-to-top { border-color: #446d9c; background: linear-gradient(145deg,#263d58,#1c3047); color: #9bc8ff; box-shadow: 0 10px 30px #0007; }
html[data-theme="dark"] .back-to-top:hover { border-color: #68a7f3; background: linear-gradient(145deg,#347fd8,#1f65b9); color: #fff; }
@media (max-width: 760px) { .back-to-top { right: 16px; bottom: 22px; width: 52px; height: 52px; border-radius: 15px; } }

/* Consistent color strips for every official-site card */
.portal-nav a { --portal-accent: #347ddd; border-top: 3px solid var(--portal-accent); }
.portal-nav a:nth-child(1) { --portal-accent: #347ddd; }
.portal-nav a:nth-child(2) { --portal-accent: #43a0a5; }
.portal-nav a:nth-child(3) { --portal-accent: #725cd0; }
.portal-nav a:nth-child(4) { --portal-accent: #df8b38; }
.portal-nav a:nth-child(5) { --portal-accent: #2f9b79; }
.portal-nav a:nth-child(6) { --portal-accent: #d25b79; }
.portal-nav a:nth-child(7) { --portal-accent: #3190d8; }
.portal-nav a:hover { border-top-color: var(--portal-accent); }
.utility-row .bridge-status.connected { color: #168858; }

/* Give the long national enterprise title more room without creating a second row */
@media (min-width: 1181px) {
  .portal-nav {
    grid-template-columns: 1.12fr 1.12fr 1.35fr 1.15fr 1.42fr .9fr .9fr;
  }
  .portal-nav strong {
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .portal-nav a:nth-child(3) strong { white-space: nowrap; }
  .portal-nav a:nth-child(5) { padding-right: 8px; padding-left: 10px; }
  .portal-nav a:nth-child(6),
  .portal-nav a:nth-child(7) { padding-right: 8px; padding-left: 8px; }
}

/* Official-site entries use content-aware widths on one desktop row. */
.portal-nav {
  grid-template-columns: 1.08fr 1.08fr 1.3fr 1.04fr 1.4fr 1.08fr .82fr .92fr;
  gap: 9px;
}
.portal-nav a {
  grid-template-columns: 42px minmax(0, 1fr) 8px;
  column-gap: 8px;
  min-height: 96px;
  padding: 14px 10px;
}
.portal-nav a::before { width: 40px; height: 40px; font-size: 14px; }
.portal-nav strong { font-size: 13px; line-height: 1.35; }
.portal-nav span { font-size: 11px; line-height: 1.35; }
.portal-nav a:nth-child(5)::before {
  border: 3px solid #f3c842;
  border-radius: 50%;
  background: #d82b2e;
  color: #ffe067;
  content: "国";
  box-shadow: inset 0 0 0 2px #b81e25;
}
.portal-nav a:nth-child(6)::before {
  border: 0;
  border-radius: 11px;
  background: linear-gradient(145deg,#2aa26f,#087e55);
  color: #fff;
  content: "浙";
  box-shadow: none;
}
.portal-nav a:nth-child(7)::before {
  border: 3px solid #f3c842;
  border-radius: 50%;
  background: #d82b2e;
  color: #ffe067;
  content: "信";
  box-shadow: inset 0 0 0 2px #b81e25;
}

.portal-dropdown {
  position: relative;
  min-width: 0;
  z-index: 35;
}
.portal-dropdown > summary {
  --portal-accent: #3190d8;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 8px;
  grid-template-rows: auto auto;
  align-content: center;
  column-gap: 8px;
  min-height: 96px;
  height: 100%;
  padding: 14px 8px;
  border: 1px solid #dce5f1;
  border-top: 3px solid var(--portal-accent);
  border-radius: 10px;
  background: #fff;
  color: #23334a;
  list-style: none;
  text-align: left;
  box-shadow: 0 4px 14px #253a640b;
  cursor: pointer;
}
.portal-dropdown > summary::-webkit-details-marker { display: none; }
.portal-dropdown > summary::before {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(145deg,#1288ef,#0656c9);
  color: #fff;
  content: "查";
  font-size: 14px;
  font-weight: 900;
}
.portal-dropdown > summary::after {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 2px solid #3b6da9;
  border-bottom: 2px solid #3b6da9;
  content: "";
  transform: rotate(45deg);
  transition: transform .18s ease;
}
.portal-dropdown[open] > summary::after { margin-top: 4px; transform: rotate(225deg); }
.portal-dropdown > summary:hover,
.portal-dropdown[open] > summary {
  border-color: #9fbde8;
  border-top-color: var(--portal-accent);
  background: #f7faff;
}
.portal-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  z-index: 50;
  display: grid;
  width: 100%;
  box-sizing: border-box;
  padding: 7px;
  border: 1px solid #cbdbea;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 16px 38px #1c35532b;
}
.portal-dropdown-menu a {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 0;
  padding: 10px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #23334a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: none;
  transform: none;
}
.portal-dropdown-menu a img {
  display: block;
  width: 25px;
  height: 25px;
  border: 1px solid #dbe6f2;
  border-radius: 7px;
  background: #f2f7fd;
  object-fit: contain;
}
.portal-dropdown-menu a span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 25px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 25px;
  text-align: center;
  white-space: nowrap;
}
.portal-dropdown-menu a::before,
.portal-dropdown-menu a::after { display: none; content: none; }
.portal-dropdown-menu a:hover {
  border: 0;
  background: #edf5ff;
  color: #1557ad;
  text-decoration: none;
  transform: none;
}
html[data-theme="dark"] .portal-dropdown > summary,
html[data-theme="dark"] .portal-dropdown-menu {
  border-color: #3b4d64;
  background: #202d3d;
  color: #dbe7f5;
}
html[data-theme="dark"] .portal-dropdown > summary:hover,
html[data-theme="dark"] .portal-dropdown[open] > summary { background: #26374b; }
html[data-theme="dark"] .portal-dropdown-menu a { color: #dbe7f5; }
html[data-theme="dark"] .portal-dropdown-menu a:hover { background: #2b4058; color: #a9cbf5; }

@media (max-width: 1180px) and (min-width: 761px) {
  .portal-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .portal-nav a { grid-template-columns: 34px minmax(0, 1fr); padding: 12px 7px; }
  .portal-nav a::before { width: 32px; height: 32px; }
  .portal-nav a::after { display: none; }
  .portal-dropdown > summary { grid-template-columns: 32px minmax(0, 1fr) 8px; padding: 12px 7px; }
  .portal-dropdown > summary::before { width: 32px; height: 32px; }
}
@media (max-width: 760px) {
  .portal-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 440px) {
  .portal-nav { grid-template-columns: 1fr; }
}
html[data-theme="dark"] .portal-heading h2,html[data-theme="dark"] .results-panel > h2 { color: #e3eefb; }
html[data-theme="dark"] .portal-heading span { color: #9fb0c5; }
html[data-theme="dark"] .results-panel { border-color: #33445a; background: #182231; }
html[data-theme="dark"] .results-panel #results { background: transparent; }
html[data-theme="dark"] .results-panel #results:empty::before { background: #162130; }

@media (max-width: 1180px) {
  .search-row { flex-wrap: wrap; }
  .search-row input { flex-basis: calc(100% - 200px); }
  .search-row .auto-close-control { width: 100%; min-width: 0; justify-content: flex-end; }
}
@media (max-width: 760px) {
  main { padding-right: 14px; padding-left: 14px; }
  .search-intro { min-height: 190px; margin-bottom: -60px; padding: 26px 20px 85px; }
  .search-intro h2 { font-size: 27px; }
  .search-intro p { font-size: 13px; }
  #search-form { margin-right: 8px; margin-left: 8px; }
  .search-row .auto-close-control { justify-content: flex-start; white-space: normal; }
  .portal-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .utility-row { grid-template-columns: 1fr; }
  .utility-row .case-help[open] { grid-column: auto; }
}

/* Final control alignment: theme switch, personal center and matching auto-close switch */
.page-header {
  grid-template-columns: minmax(300px, 1fr) auto auto;
  gap: 14px;
  padding-right: 0;
}
.theme-toggle {
  position: static;
  width: 78px;
  height: 38px;
  padding: 6px 7px;
  gap: 7px;
  border-radius: 11px;
}
.theme-toggle .theme-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  color: #1472e8;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}
.theme-toggle .theme-switch { width: 42px; height: 22px; flex-basis: 42px; }
html[data-theme="dark"] .theme-toggle .theme-icon { color: #ffd36a; }
.profile-menu { position: relative; top: auto; right: auto; margin: 0; }
.profile-menu > summary { min-height: 38px; }

.search-row .auto-close-control {
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.search-row .auto-close-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 1px;
  max-height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  clip: rect(0 0 0 0);
  pointer-events: none;
}
.auto-close-switch {
  position: relative;
  display: block;
  width: 42px;
  height: 22px;
  flex: 0 0 42px;
  border-radius: 99px;
  background: #c8d6e8;
  box-shadow: inset 0 0 0 1px #b5c6db;
  transition: background .2s ease, box-shadow .2s ease;
}
.auto-close-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px #173b6855;
  transition: transform .2s ease;
}
.auto-close-control input:checked + .auto-close-switch {
  background: #1472e8;
  box-shadow: inset 0 0 0 1px #0d64cf;
}
.auto-close-control input:checked + .auto-close-switch i { transform: translateX(20px); }
.auto-close-control input:focus-visible + .auto-close-switch { outline: 3px solid #8fbfff; outline-offset: 2px; }
.auto-close-control > span:last-child { font-weight: 700; }
.search-row .close-all-query-tabs { flex: 0 0 auto; min-width: 220px; min-height: auto; padding: 8px 4px; border: 0; background: transparent; box-shadow: none; color: #2365bc; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.search-row .export-docx { flex: 0 0 auto; min-width: 92px; min-height: 42px; padding: 8px 14px; border: 1px solid #1d66ca; border-radius: 7px; background: #fff; box-shadow: none; color: #1d66ca; font-size: 13px; font-weight: 800; }
.search-row .export-docx:hover { background: #edf5ff; }
.search-row .export-docx:disabled { border-color: #bdc9d8; background: #f2f5f8; color: #8999ac; cursor: default; }
html[data-theme="dark"] .search-row .export-docx { border-color: #70aaf2; background: #20344a; color: #9bc5f8; }
.export-help { position: relative; display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border: 1px solid #78a9e9; border-radius: 50%; background: #eef6ff; color: #1769d2; font-size: 14px; font-weight: 900; cursor: help; }
.export-help > span { position: absolute; right: 0; bottom: calc(100% + 10px); z-index: 80; display: none; width: 310px; box-sizing: border-box; padding: 10px 12px; border: 1px solid #bfd4ef; border-radius: 8px; background: #fff; box-shadow: 0 9px 24px #18395f2b; color: #334c69; font-size: 13px; font-weight: 600; line-height: 1.6; }
.export-help:hover > span,.export-help:focus > span,.export-help:focus-within > span { display: block; }
.export-help:focus-visible { outline: 3px solid #9fc3ff; outline-offset: 2px; }
html[data-theme="dark"] .export-help { border-color: #659bdc; background: #20344a; color: #9bc5f8; }
html[data-theme="dark"] .export-help > span { border-color: #465e79; background: #24354a; color: #dce8f6; }
.export-dialog { box-sizing: border-box; width: min(720px, calc(100vw - 28px)); max-height: calc(100vh - 36px); padding: 22px; border: 0; border-radius: 14px; color: #23334a; box-shadow: 0 22px 70px #0b183560; }
.export-dialog::backdrop { background: #0b1835b8; }
.export-dialog .dialog-heading { align-items: flex-start; }
.export-dialog .dialog-heading h2 { margin: 0; font-size: 21px; }
.export-dialog .dialog-heading p { margin: 5px 0 0; color: #6b7d93; font-size: 13px; }
.export-select-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 0 10px; padding: 10px 12px; border-radius: 8px; background: #f3f7fc; color: #60748c; font-size: 13px; }
.export-select-toolbar label { display: flex; align-items: center; gap: 7px; margin: 0; color: #243b59; }
.export-select-toolbar input,.export-result-item input { flex: none; width: 17px; height: 17px; min-width: 17px; padding: 0; accent-color: #1769d2; }
.export-result-list { display: grid; gap: 8px; max-height: min(460px, 55vh); overflow: auto; padding: 2px; }
.export-result-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; margin: 0; padding: 12px 13px; border: 1px solid #dbe5f1; border-radius: 9px; background: #fff; cursor: pointer; }
.export-result-item strong { min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.export-result-status { padding: 4px 9px; border-radius: 99px; background: #eef2f7; color: #64768c; font-size: 12px; font-weight: 800; white-space: nowrap; }
.export-result-status.has-result { background: #e7f8ef; color: #14804f; }
.export-result-status.no-result { background: #fff5de; color: #9a650d; }
.export-result-status.verification-missing { background: #fff0f0; color: #c43535; }
.export-dialog-message { min-height: 20px; margin: 10px 0 0; color: #c43535; font-size: 13px; }
.export-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 10px; }
.export-dialog .dialog-actions button { min-height: 40px; padding: 7px 18px; }
.export-dialog .dialog-actions .secondary { background: #edf2f8; color: #52677f; }
html[data-theme="dark"] .export-dialog { background: #1c2939; color: #e5edf7; }
html[data-theme="dark"] .export-select-toolbar,html[data-theme="dark"] .export-result-item { border-color: #3b4d64; background: #26384c; color: #e5edf7; }
.site-announcement { order: 3; display: flex; align-items: center; min-height: 38px; margin: -6px 0 14px; overflow: hidden; border: 1px solid #ffd9a3; border-radius: 9px; background: #fff9eb; color: #9b5710; }
.site-announcement[hidden] { display: none; }
.site-announcement > strong { position: relative; z-index: 2; align-self: stretch; display: flex; align-items: center; flex: 0 0 auto; padding: 0 15px; background: #f59b23; color: #fff; font-size: 16px; }
.site-announcement-viewport { min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; }
.site-announcement-viewport p { display: block; width: 100%; box-sizing: border-box; margin: 0; padding: 0 14px; overflow: hidden; color: inherit; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-dashboard-title { display: flex; align-items: center; gap: 12px; }
.admin-announcement-button { min-height: 32px; padding: 5px 13px; border: 1px solid #efb45e; background: #fff7e7; color: #9a5b0b; font-size: 12px; }
.admin-announcement-editor { margin: 0 0 13px; padding: 12px; border: 1px solid #d6e3f2; border-radius: 10px; background: #f8fbff; }
.admin-announcement-editor[hidden] { display: none; }
.admin-announcement-editor label { display: block; margin-bottom: 7px; color: #30445d; font-size: 13px; font-weight: 800; }
.admin-announcement-editor textarea { box-sizing: border-box; width: 100%; min-height: 86px; padding: 10px; resize: vertical; border: 1px solid #c8d7e9; border-radius: 8px; font: inherit; }
.admin-announcement-editor > div { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.admin-announcement-editor > div span { margin-right: auto; color: #718198; font-size: 12px; }
.admin-announcement-editor button { min-height: 34px; padding: 5px 13px; font-size: 12px; }
.admin-announcement-editor .secondary { background: #edf2f8; color: #53677f; }
.admin-announcement-editor p { min-height: 18px; margin: 6px 0 0; color: #18724d; font-size: 12px; }
html[data-theme="dark"] .site-announcement { border-color: #705527; background: #332b1d; color: #ffd28c; }
html[data-theme="dark"] .admin-announcement-editor { border-color: #3b4d64; background: #202d3d; }
html[data-theme="dark"] .admin-announcement-editor label { color: #dbe7f5; }
html[data-theme="dark"] .admin-announcement-editor textarea { border-color: #405a76; background: #26384c; color: #e2ebf5; }
.search-row .close-all-query-tabs:hover { background: transparent; color: #174d94; }
.search-row .close-all-query-tabs:disabled { background: transparent; color: #70839a; cursor: default; }
html[data-theme="dark"] .search-row .close-all-query-tabs { color: #8ebcf4; }
.advanced-search { position: relative; flex: 0 0 auto; }
.advanced-search > summary { display: grid; min-width: 86px; min-height: 48px; padding: 0 12px; place-items: center; border: 1px solid #2a73d6; border-radius: 8px; background: #f5f9ff; color: #1769d2; cursor: pointer; font-size: 13px; font-weight: 800; list-style: none; }
.advanced-search > summary::-webkit-details-marker { display: none; }
.advanced-search[open] > summary { background: #1769d2; color: #fff; }
.advanced-search-panel { position: absolute; top: calc(100% + 10px); left: 0; z-index: 40; box-sizing: border-box; width: min(760px,calc(100vw - 72px)); padding: 18px; border: 1px solid #bad1ed; border-radius: 12px; background: #fff; box-shadow: 0 18px 48px #173c6b33; }
.advanced-search-panel h3 { margin: 0 0 14px; color: #173a67; font-size: 17px; }
.advanced-search-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 14px; }
.advanced-search-grid label { display: grid; gap: 6px; color: #34516f; font-size: 13px; font-weight: 700; }
.search-row .advanced-search-grid input { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px; font-size: 14px; }
.advanced-search-message { min-height: 20px; margin: 10px 0 0; color: #cf2538; font-size: 12px; }
.advanced-search-actions { display: flex; justify-content: flex-end; gap: 10px; }
.search-row .advanced-search-actions button { min-width: 105px; min-height: 40px; padding: 8px 14px; font-size: 13px; }
#advanced-search-clear { border: 1px solid #b9c9dc; background: #fff; box-shadow: none; color: #536a84; }
html[data-theme="dark"] .advanced-search > summary { border-color: #5798e9; background: #1d3046; color: #9bc6fb; }
html[data-theme="dark"] .advanced-search[open] > summary { background: #246fcf; color: #fff; }
html[data-theme="dark"] .advanced-search-panel { border-color: #405873; background: #182636; }
html[data-theme="dark"] .advanced-search-panel h3,html[data-theme="dark"] .advanced-search-grid label { color: #d8e7f8; }
html[data-theme="dark"] #advanced-search-clear { border-color: #536b85; background: #213348; color: #c6d6e8; }
@media (max-width: 760px) { .advanced-search { width: 100%; } .advanced-search > summary { width: 100%; } .advanced-search-panel { width: calc(100vw - 56px); } .advanced-search-grid { grid-template-columns: 1fr; } }

@media (max-width: 980px) {
  .search-row { flex-wrap: wrap; }
  .search-row .close-all-query-tabs { margin-left: auto; }
}

@media (max-width: 760px) {
  .page-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding-right: 0; }
  .theme-toggle { position: static; width: 74px; height: 36px; }
}

/* Move the complete official-site entry section directly below the page header */
.header-client-download {
  grid-area: download;
  justify-self: start;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 190px;
  min-height: 44px;
  padding: 7px 18px;
  box-sizing: border-box;
  border: 1px solid #1d66ca;
  border-radius: 8px;
  background: #fff;
  color: #1762c2;
  box-shadow: 0 5px 15px #2568bd14;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.brand-title-row { display: flex; align-items: center; gap: 9px; }
.client-version { display: inline-flex; align-items: center; padding: 2px 7px; border: 1px solid #b9d4f5; border-radius: 99px; background: #eef6ff; color: #3974bd; font-size: 10px; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.client-version[hidden] { display: none; }
html[data-theme="dark"] .client-version { border-color: #416b9c; background: #203b59; color: #a9d0ff; }
.company-wenshu-status { margin: 8px 0 5px; color: #64768c; font-size: 13px; }
.company-wenshu-detail-link { display: inline-block; margin-top: 5px; color: #1769d2; font-size: 12px; font-weight: 700; text-decoration: none; }
.company-wenshu-detail-link:hover { color: #0d4fa7; text-decoration: underline; }
html[data-theme="dark"] .company-wenshu-status { color: #aabbd0; }
html[data-theme="dark"] .company-wenshu-detail-link { color: #8fc0ff; }
.header-client-download small { margin-top: 2px; font-size: 11px; font-weight: 600; opacity: .78; }
.header-client-download:hover { background: #1769d2; color: #fff; box-shadow: 0 8px 20px #1769d238; transform: translateY(-1px); }
.header-client-download:focus-visible { outline: 3px solid #9fc3ff; outline-offset: 2px; }
html[data-theme="dark"] .header-client-download { border-color: #70aaf2; background: #20344a; color: #b8d8ff; }
body.client-mode .header-client-download { display: none; }
.page-header { grid-template-areas: "brand download theme profile"; grid-template-columns: minmax(300px, 1fr) auto auto auto; }
.page-title-block { grid-area: brand; }
.page-header > .theme-toggle { grid-area: theme; }
.page-header > .profile-menu { grid-area: profile; }

@media (max-width: 760px) {
  .page-header { grid-template-areas: "brand theme profile" "download download download"; grid-template-columns: minmax(0, 1fr) auto auto; }
  .header-client-download { width: 100%; min-width: 0; min-height: 40px; }
}

.portal-heading { order: 2; margin-top: 0; }
.portal-nav { order: 3; }
.search-intro { order: 4; }
#search-form { order: 5; }
.utility-row { order: 6; }
.results-panel { order: 7; }
.feedback-entry { order: 8; }

/* Manual entry stays bound to the existing website tab for this query. */
.qcc-card h2.third-party-heading { display: flex; align-items: center; gap: 12px; }
.third-party-heading-label { flex: 1; min-width: 0; }
.third-party-manual-button { flex: 0 0 auto; padding: 7px 12px; border: 0; border-radius: 7px; color: #fff; background: #2467c9; font-size: 13px; font-weight: 600; cursor: pointer; }
.third-party-manual-button:disabled { color: #8795a7; background: #e9eef4; cursor: not-allowed; }
.third-party-manual-button:not(:disabled):hover { background: #1855af; }
.third-party-manual-button:focus-visible { outline: 2px solid #2467c9; outline-offset: 3px; }
.third-party-manual-action { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-end; max-width: 48%; gap: 4px; }
.third-party-manual-feedback { font-size: 12px; font-weight: 400; color: #d32236; line-height: 1.5; text-align: right; }

.results-heading-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px 24px; }
.results-heading-row > h2 { flex:0 0 auto; margin:0; color:#17345c; font-size:19px; }
#company-basic-slot { flex:1 1 650px; min-width:0; }
#company-basic-slot[hidden] { display:none; }
.company-basic-summary { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; padding:0; margin:0; color:inherit; font-size:14px; font-weight:400; }
.advanced-result-group > .company-basic-summary { margin:10px 0; }
.company-basic-status { color:#687f99; font-size:13px; }
.company-basic-summary > span { overflow-wrap:anywhere; }
html[data-theme="dark"] .results-heading-row > h2 { color:#e3eefb; }

.company-basic-summary>span{display:inline-flex;align-items:center;gap:7px;flex-wrap:wrap}

.extension-download-dialog{width:min(540px,calc(100vw - 40px));box-sizing:border-box;padding:28px;border:0;border-radius:18px;color:#183757;background:#fff;box-shadow:0 22px 80px #10294655}.extension-download-dialog::backdrop{background:#17334b80}.extension-download-dialog h2{margin:0 0 18px;font-size:23px}.extension-download-dialog p{line-height:1.8;overflow-wrap:anywhere}.extension-download-dialog progress{width:100%;height:14px;accent-color:#246bca}.extension-download-location{padding:14px;background:#eff6ff;border-radius:10px;font-weight:600}.extension-download-note{font-size:13px;color:#697b91}.extension-download-dialog button{background:#246bca;color:#fff;padding:10px 24px;border:0;border-radius:9px;font:inherit}.extension-download-dialog button:disabled{opacity:.5}html[data-theme="dark"] .extension-download-dialog{background:#1b2b40;color:#e1ebf8}html[data-theme="dark"] .extension-download-location{background:#273d58}

.extension-helper-actions{display:flex;flex-wrap:wrap;gap:12px;margin:20px 0}.extension-helper-actions a{display:inline-block;padding:10px 15px;border-radius:9px;background:#246bca;color:white;text-decoration:none}.extension-helper-actions a:first-child{background:#edf4ff;color:#2460a9}
