:root {
  color-scheme: light;
  --canvas: #f5f7fb;
  --surface: #ffffff;
  --ink: #1c2940;
  --muted: #586980;
  --line: #e3e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eef4ff;
  --success: #16754b;
  --warning: #98620d;
  --danger: #b42332;
  --sidebar-width: 228px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; }
a { color: var(--primary-dark); text-decoration: none; text-underline-offset: 3px; }
a:visited { color: var(--primary-dark); }
a:hover { text-decoration: underline; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2563eb; outline-offset: 3px; }
::selection { background: #dbe8ff; }
h1, h2, h3 { color: #14243c; line-height: 1.4; }
h1 { margin: 0 0 18px; font-size: 26px; font-weight: 700; letter-spacing: -.6px; overflow-wrap: anywhere; }
h2 { margin: 0 0 16px; font-size: 18px; font-weight: 650; }
h3 { margin: 0 0 12px; font-size: 15px; font-weight: 650; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
small { font-size: 12px; line-height: 1.6; }
strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code, pre { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }
code { overflow-wrap: anywhere; }
pre { max-width: 100%; padding: 14px; overflow: auto; background: #f6f8fc; border-radius: 8px; }
svg { vertical-align: middle; }
.ui-icon { flex: 0 0 20px; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 300; padding: 10px 18px; background: var(--primary); color: white; border-radius: 8px; }
.skip-link:focus { top: 12px; color: white; }
.app-shell { padding-left: var(--sidebar-width); }
.site-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); z-index: 80; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar-brand-row { display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; padding: 25px 20px 22px; }
.brand, .brand:visited { display: inline-flex; gap: 11px; align-items: center; color: #192c49; font-size: 16px; font-weight: 750; line-height: 1.3; letter-spacing: -.3px; }
.brand:hover { text-decoration: none; }
.brand small { display: block; margin-top: 6px; font-weight: 400; letter-spacing: 1px; color: #65758b; font-size: 11px; }
.brand-mark { width: 36px; height: 38px; display: grid; place-items: center; flex: 0 0 36px; background: var(--primary); color: white; border-radius: 10px; box-shadow: 0 4px 10px #2563eb18; }
.brand-mark .ui-icon { width: 23px; height: 23px; }
.site-sidebar__body { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.sidebar-nav { padding: 0 12px 14px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
.nav-group-label { margin: 21px 12px 8px; font-size: 12px; font-weight: 600; color: #65758b; letter-spacing: 1.2px; }
.nav-group-label:first-child { margin-top: 7px; }
.sidebar-nav > a, .nav-history > summary { display: flex; align-items: center; gap: 13px; min-height: 41px; margin: 3px 0; padding: 9px 13px; color: #54647a; border-radius: 7px; font-weight: 500; font-size: 13px; text-decoration: none; }
.sidebar-nav > a .ui-icon { color: #8090a7; width: 18px; height: 18px; flex-basis: 18px; }
.sidebar-nav > a:hover, .nav-history > summary:hover { background: #f3f6fa; color: #223958; }
.sidebar-nav > a.is-active { color: var(--primary); background: var(--primary-soft); font-weight: 650; }
.sidebar-nav > a.is-active .ui-icon { color: var(--primary); }
.nav-history { position: relative; }
.nav-history summary { cursor: pointer; list-style: none; }
.nav-history summary::-webkit-details-marker { display: none; }
.nav-history summary::before { content: ""; width: 16px; height: 16px; border: 1.6px solid #8090a7; border-radius: 50%; margin-right: 2px; background: linear-gradient(#8090a7, #8090a7) 7px 3px / 1.5px 5px no-repeat, linear-gradient(#8090a7, #8090a7) 7px 7px / 4px 1.5px no-repeat; }
.nav-history summary::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
.nav-history[open] summary::after { transform: rotate(225deg); }
.nav-history.is-active > summary { color: var(--primary); }
.nav-history__menu { margin: 5px 0 7px 34px; padding-left: 9px; border-left: 1px solid var(--line); }
.nav-history:not([open]) > .nav-history__menu { display: none; }
.nav-history[open] > .nav-history__menu { display: grid; gap: 3px; }
.nav-history__menu a { display: block; padding: 7px 12px; color: var(--muted); font-size: 12px; border-radius: 6px; text-decoration: none; }
.nav-history__menu a:hover, .nav-history__menu a.is-active { background: var(--primary-soft); color: var(--primary); }
.sidebar-logout { display: block !important; margin-top: 8px; }
button.logout-button { display: flex; gap: 13px; align-items: center; width: 100%; padding: 9px 13px; background: transparent; border-color: transparent; box-shadow: none; color: #64748b; text-align: left; font-weight: 400; font-size: 13px; }
button.logout-button:hover { background: #fff1f2; color: var(--danger); border-color: transparent; }
.sidebar-account { display: flex; gap: 10px; align-items: center; margin: 0 16px; padding: 17px 3px; border-top: 1px solid var(--line); }
.user-avatar { width: 33px; height: 33px; border-radius: 50%; background: #eaf0fc; color: #4266b1; display: grid; place-items: center; flex-shrink: 0; font-size: 13px; font-weight: 650; }
.sidebar-account__name { min-width: 0; }
.sidebar-account__name strong, .sidebar-account__name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account__name strong { font-size: 12px; }
.sidebar-account__name small { font-size: 12px; color: #65758b; margin-top: 1px; }
.sidebar-toggle { display: none; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 65px; padding: 16px 32px; background: #ffffffdd; border-bottom: 1px solid var(--line); }
.workspace-path { display: flex; gap: 14px; align-items: center; font-size: 12px; color: #586980; }
.workspace-path strong { font-weight: 500; color: #3c4e68; }
.workspace-label { color: #586980; font-size: 12px; letter-spacing: .5px; }
.public-header { display: flex; align-items: center; justify-content: space-between; padding: 25px 42px; gap: 16px; }
.public-header .brand { font-size: 18px; }
.container { width: 100%; max-width: 1760px; min-width: 0; margin: 0 auto; padding: 28px 32px; flex: 1 0 auto; }
.container:focus { outline: none; }
.public-shell .container { max-width: 1100px; display: flex; flex-direction: column; padding-top: 0; padding-bottom: 0; }
.public-shell .auth-layout { flex: 1; min-height: 0; }
.site-footer { flex: 0 0 auto; padding: 22px 24px; color: #586980; font-size: 12px; text-align: center; }
.site-footer a, .site-footer a:visited { color: #586980; }
.site-footer__filings { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 9px 20px; }
.site-footer__filing { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.site-footer__police-icon { display: block; width: 15px; height: 17px; object-fit: contain; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 22px; box-shadow: 0 2px 4px #13294b03; margin-bottom: 20px; min-width: 0; }
.card > h1, .panel > h1 { margin-bottom: 12px; }
.card > h2, .panel > h2 { padding-bottom: 13px; border-bottom: 1px solid #edf0f5; }
.card > h3:not(:first-child), .panel > h3:not(:first-child) { margin-top: 22px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.grid > * { min-width: 0; }
.page-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-actions h1, .page-actions h2 { margin: 0; }
.page-actions p { margin: 7px 0 0; color: var(--muted); font-size: 13px; max-width: 1000px; }
.page-actions > div:last-child:not(:first-child) { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.table-wrap, .table-scroll { max-width: 100%; min-width: 0; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin: 14px 0 20px; scrollbar-width: thin; scrollbar-color: #cbd5e1 #f8fafc; }
.card > .table-wrap, .panel > .table-scroll, .card > .table-scroll { margin-bottom: 0; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { border-bottom: 1px solid #ecf0f5; padding: 13px 16px; text-align: left; white-space: nowrap; vertical-align: middle; }
th { background: #f8fafd; color: #586980; font-weight: 550; font-size: 12px; position: sticky; top: 0; z-index: 1; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcff; }
td a:not(.button) { font-weight: 500; }
td small { color: var(--muted); }
td[colspan] { padding: 30px 18px; text-align: center; color: #65758b; font-size: 13px; }
table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), table select { min-width: 100px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]), select, textarea {
  max-width: 100%; min-height: 39px; padding: 8px 11px; border: 1px solid #d6deea; border-radius: 7px; color: #283a54; background: white; line-height: 1.5; box-shadow: 0 1px 2px #13294b03;
}
input::placeholder, textarea::placeholder { color: #65758b; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #abbcd3; }
input:focus, select:focus, textarea:focus { border-color: #2563eb; outline: 2px solid #2563eb; outline-offset: 2px; }
input:disabled, select:disabled, textarea:disabled { background: #f2f5f9; color: #8591a2; cursor: not-allowed; }
input[readonly], textarea[readonly] { background: #f7f9fc; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: middle; margin: 0 6px 2px 0; cursor: pointer; }
input[type="file"] { padding: 5px; font-size: 12px; }
input[type="file"]::file-selector-button { padding: 6px 12px; margin-right: 12px; border: 0; border-radius: 5px; background: #edf3ff; color: var(--primary-dark); font: inherit; cursor: pointer; }
textarea { width: min(100%, 640px); min-height: 94px; resize: vertical; }
select { min-width: 120px; }
button, .button, a.button:visited, input[type="submit"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 8px 16px; border: 1px solid var(--primary); border-radius: 7px; background: var(--primary); color: #fff; cursor: pointer; text-decoration: none; font-size: 13px; font-weight: 550; line-height: 1.5; box-shadow: 0 1px 2px #2563eb0a; vertical-align: middle; }
button:hover, .button:hover, input[type="submit"]:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }
button:active, .button:active { transform: translateY(1px); }
button:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.button.secondary, button.secondary, a.button.secondary:visited { color: #53627b; background: white; border-color: #d8e1ec; box-shadow: 0 1px 2px #13294b05; }
.button.secondary:hover, button.secondary:hover { background: #f5f8fd; border-color: #b8c9e2; color: #254878; }
.button + .button, form.inline + form.inline { margin-left: 5px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.filters label { display: grid; gap: 6px; color: #586980; font-size: 12px; }
.filters > input, .filters label input[name="q"] { width: 280px; max-width: 100%; }
.filters input, .filters select { font-size: 13px; }
.filters > label:has(input[name="q"]) { flex: 1 1 240px; max-width: 440px; }
.filters > label:has(input[name="q"]) input { width: 100%; }
form p:has(> label) { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 17px; }
form p > label { color: #42526a; font-weight: 500; font-size: 13px; }
form p > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), form p > select { width: min(100%, 540px); }
form p > textarea { width: min(100%, 640px); }
form p > .helptext, form p > small, .helptext { display: block; color: #586980; font-size: 12px; max-width: 700px; }
form p:has(> input[type="checkbox"]) { flex-direction: row; align-items: center; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 5px 24px; }
.form-grid p > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .form-grid p > select, .form-grid p > textarea { width: 100%; }
fieldset.panel { padding-top: 15px; }
legend { padding: 0 10px; margin-left: -10px; font-size: 16px; font-weight: 650; color: #263e61; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-start; margin-top: 20px; }
.inline { display: inline; }
.pagination, .catalog-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; font-size: 12px; color: #586980; }
.pagination a, .catalog-pagination a { padding: 6px 12px; border: 1px solid var(--line); background: white; border-radius: 6px; }
dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 12px 28px; margin: 0; font-size: 13px; }
dt { font-weight: 400; color: #586980; }
dd { margin: 0; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.wrap { white-space: normal; min-width: 16rem; overflow-wrap: anywhere; }
.warning { color: var(--warning); }
p.warning { background: #fffaed; padding: 12px 15px; border: 1px solid #f6e6bd; border-radius: 8px; font-size: 13px; }
.danger { color: var(--danger); }
button.danger, .button.danger, a.button.danger:visited { color: white; background: var(--danger); border-color: var(--danger); }
button.danger:hover, .button.danger:hover { background: #971e2b; border-color: #971e2b; }
.quality-badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 550; white-space: nowrap; }
.quality-green { color: #16734b; background: #eaf7f0; }
.quality-yellow { color: #8b650e; background: #fff5d7; }
.quality-red { color: #b42332; background: #fff0f0; }
.quality-grey { color: #586980; background: #eef1f6; }
.errorlist { color: var(--danger); list-style: none; padding: 0; margin: 5px 0; font-size: 12px; }
.errorlist li { margin: 3px 0; }
.message { padding: 12px 16px; margin-bottom: 18px; border: 1px solid #d9e5ff; background: #eef4ff; color: #2c5498; border-radius: 8px; font-size: 13px; }
.message.success { background: #effaf4; border-color: #cdebdc; color: #19704a; }
.message.error { background: #fff2f2; border-color: #f5d0d4; color: var(--danger); }
.message.warning { background: #fff9e9; border-color: #f3e1b2; color: var(--warning); }
.task-dialog { width: min(1380px, 96vw); max-height: 92vh; border: 1px solid var(--line); border-radius: 14px; padding: 26px; color: var(--ink); box-shadow: 0 24px 80px #142b4e33; }
.task-dialog::backdrop { background: #172b4d66; backdrop-filter: blur(3px); }
.candidate-order { border: 1px solid var(--line); border-radius: 10px; margin: 20px 0; padding: 18px; }
.candidate-order h3 { margin: 0 0 12px; }
.candidate-order input[type="number"] { width: 9rem; }
.candidate-order input[name^="supplement_reason"] { min-width: 13rem; }
.admin-actions { align-items: stretch; }
.admin-actions .card { height: 100%; margin: 0; }
.admin-actions { margin-bottom: 20px; }
.metrics-detail strong { color: #445b70; }
.batch-standard-list { display: grid; gap: 12px; max-width: 52rem; margin: 14px 0; }
.batch-standard-row { display: flex; align-items: flex-end; gap: 10px; }
.batch-standard-field { display: grid; gap: 6px; flex: 1 1 28rem; }
.batch-standard-field input { width: 100%; }
.batch-standard-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.batch-standard-add, .batch-standard-remove { display: none; }
.js-enabled .batch-standard-add, .js-enabled .batch-standard-remove { display: inline-flex; }
.js-enabled .batch-standard-delete-control { display: none; }
.batch-standard-values { margin: 12px 0 0; padding-left: 20px; }
.lab-requirement-form { display: grid; gap: 20px; }
.lab-requirement-form > .card, .lab-requirement-form > .requirement-section { margin-bottom: 0; }
.requirement-section { border-top: 1px solid var(--line); padding-top: 20px; }
.requirement-section:first-of-type { border-top: 0; }
.requirement-section h3 { margin: 0 0 15px; font-size: 16px; }
.requirement-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px 22px; align-items: start; }
.form-field { display: grid; gap: 6px; min-width: 0; }
.form-field label { color: #53647d; font-size: 13px; }
.form-field--wide { grid-column: span 2; }
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), .form-field select, .form-field textarea { width: 100%; max-width: 42rem; }
.form-field.has-error input, .form-field.has-error select, .form-field.has-error textarea { border-color: var(--danger); }
.field-help { display: block; color: #586980; line-height: 1.6; font-size: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 12px 0; }
.check-row label { display: inline-flex; align-items: center; gap: 6px; }
.input-with-unit { display: flex; align-items: center; gap: 8px; }
.input-with-unit input { flex: 1 1 auto; min-width: 0; }
.input-with-unit [data-unit-label] { color: #586980; white-space: nowrap; font-size: 12px; }
.rule-panel { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #f9fbfe; }
.rule-editor--enhanced .rule-panel { display: none; }
.rule-editor--enhanced .rule-panel.is-active { display: block; }
.rule-preview { display: grid; gap: 6px; margin-top: 18px; padding: 16px 18px; border-left: 3px solid #5f8dea; background: #eff5ff; border-radius: 0 8px 8px 0; }
.rule-preview__label { color: #586980; font-size: 12px; }
.source-details { margin-top: 18px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 8px; }
.source-details summary { cursor: pointer; font-weight: 500; color: #53647b; }
.source-details[open] summary { margin-bottom: 16px; }
.requirement-delete { display: grid; gap: 6px; margin-top: 8px; }
.requirement-delete label { display: grid; gap: 5px; }
@media (min-width: 1700px) { .container { padding: 32px 40px; } }
@media (max-width: 1100px) {
  :root { --sidebar-width: 208px; }
  .sidebar-brand-row { padding: 22px 14px; }
  .site-header { padding-inline: 24px; }
  .container { padding: 24px; }
  .form-field--wide { grid-column: span 1; }
}
@media (max-width: 900px) {
  .app-shell { padding-left: 0; }
  .site-sidebar { position: static; width: 100%; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand-row { padding: 14px 20px; }
  .brand { font-size: 15px; }
  .brand small { display: none; }
  .brand-mark { width: 32px; height: 34px; flex-basis: 32px; }
  .shell-ready .sidebar-toggle { display: inline-flex; padding: 8px; min-height: 36px; background: white; border-color: var(--line); color: #53647b; }
  .shell-ready .site-sidebar__body { display: none; }
  .shell-ready .site-sidebar.is-open .site-sidebar__body { display: flex; }
  .sidebar-nav { overflow: visible; padding: 0 14px 12px; }
  .sidebar-account { margin-inline: 20px; }
  .site-header { min-height: 48px; padding: 12px 20px; }
  .container { padding: 22px 20px; }
  .public-header { padding: 22px 24px; }
  .task-dialog { padding: 20px; }
}
@media (max-width: 600px) {
  h1 { font-size: 23px; }
  h2 { font-size: 17px; }
  .container { padding: 20px 14px; }
  .workspace-label { display: none; }
  .card, .panel { padding: 17px; border-radius: 9px; margin-bottom: 16px; }
  .grid { gap: 14px; }
  .page-actions { gap: 12px; margin-bottom: 18px; }
  .page-actions > div:last-child:not(:first-child) { width: 100%; }
  .filters { gap: 10px; }
  .filters > label { flex: 1 1 130px; }
  .filters input, .filters select, .filters > input { width: 100%; min-width: 0; }
  th, td { padding: 11px 13px; }
  dl { grid-template-columns: minmax(72px, 100px) minmax(0, 1fr); gap: 10px 12px; }
  .wrap { min-width: 13rem; }
  .batch-standard-row { align-items: stretch; flex-direction: column; }
  .batch-standard-field { flex-basis: auto; width: 100%; }
  .form-field--wide { grid-column: span 1; }
  .rule-panel { padding: 13px; }
  .site-footer { padding: 20px 12px; font-size: 12px; }
  .site-footer__filings { gap: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  a, button, input, select, textarea { transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
}
@media print {
  .site-sidebar, .site-header, .public-header, .site-footer, .skip-link { display: none !important; }
  .app-shell { padding-left: 0; }
  .container { padding: 0; max-width: none; }
  .card, .panel { box-shadow: none; break-inside: avoid; }
  .table-wrap, .table-scroll { overflow: visible; }
}
