:root {
  --blue: #1769ff;
  --blue-dark: #0d4ed8;
  --blue-soft: #eef5ff;
  --ink: #172033;
  --muted: #6c778d;
  --line: #e8edf5;
  --panel: rgba(255,255,255,.92);
  --danger: #dc3f4f;
  --success: #11845b;
  --shadow: 0 18px 55px rgba(20, 52, 96, .10);
}
* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; background: #f6f9fd; }
body { width: 100%; max-width: 100%; overflow-x: hidden; margin: 0; color: var(--ink); font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",Arial,sans-serif; background: #f7f9fd; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button,input { font: inherit; }
.page-bg { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 12% 4%, rgba(42,118,255,.11), transparent 28%), radial-gradient(circle at 88% 12%, rgba(78,202,192,.09), transparent 26%), linear-gradient(#f8fbff,#f7f9fd); }
.site-header { height: 74px; background: rgba(255,255,255,.82); border-bottom: 1px solid rgba(225,232,242,.88); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.header-inner { width: 100%; max-width: 1180px; min-width: 0; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { min-width: 0; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#287cff,#1056eb); color: #fff; box-shadow: 0 8px 22px rgba(23,105,255,.28); font-weight: 800; }
.brand strong { display: block; font-size: 16px; letter-spacing: .02em; }
.brand small { display: block; margin-top: 2px; color: #8a94a7; font-size: 10px; letter-spacing: .08em; }
.admin-entry,.ghost-btn { padding: 9px 14px; border: 1px solid #dfe7f2; background: #fff; border-radius: 10px; font-size: 13px; color: #49556b; transition: .2s; }
.admin-entry:hover,.ghost-btn:hover { border-color: #b9cff7; color: var(--blue); }
.header-links { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 58px 0 30px; display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.eyebrow { display: inline-block; color: var(--blue); background: var(--blue-soft); padding: 6px 10px; border-radius: 8px; font-size: 11px; font-weight: 700; letter-spacing: .09em; }
.hero h1,.admin-title h1 { margin: 14px 0 10px; font-size: clamp(29px,4vw,46px); letter-spacing: -.04em; line-height: 1.15; }
.hero p,.admin-title p { margin: 0; color: var(--muted); font-size: 15px; }
.hero-stat { min-width: 170px; padding: 17px 20px; border: 1px solid rgba(217,227,241,.9); background: rgba(255,255,255,.7); border-radius: 18px; box-shadow: 0 12px 35px rgba(35,72,120,.06); }
.hero-stat span,.hero-stat small,.admin-stat span { display: block; color: #8590a3; font-size: 11px; }
.hero-stat strong,.admin-stat strong { display: block; margin: 3px 0 1px; font-size: 28px; color: #1a2840; }
.search-panel { background: var(--panel); padding: 16px; border: 1px solid rgba(222,230,241,.95); border-radius: 20px; box-shadow: var(--shadow); }
.criteria-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; gap: 10px; align-items: end; }
.criteria-field { min-width: 0; display: block; }
.criteria-field > span { display: block; margin: 0 0 7px 3px; color: #68758a; font-size: 11px; font-weight: 700; }
.criteria-field input { width: 100%; height: 54px; padding: 0 14px; border: 1px solid #dce5f1; border-radius: 13px; outline: none; background: #fbfcff; color: var(--ink); font-size: 14px; transition: .2s; }
.criteria-field select {
  width: 100%;
  height: 54px;
  padding: 0 36px 0 14px;
  border: 1px solid #dce5f1;
  border-radius: 13px;
  outline: none;
  background: #fbfcff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2368758a' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: .2s;
}
.criteria-field input:focus { border-color: #8ab3ff; box-shadow: 0 0 0 4px rgba(23,105,255,.08); background: #fff; }
.criteria-field select:focus { border-color: #8ab3ff; box-shadow: 0 0 0 4px rgba(23,105,255,.08); background-color: #fff; }
.criteria-field input.input-error,
.criteria-field select.input-error { border-color: #ee7d8a; box-shadow: 0 0 0 4px rgba(220,63,79,.08); }
.query-btn { min-width: 94px; }
.query-hint { padding: 10px 4px 0; color: #929bad; font-size: 11px; }
.primary-btn { border: 0; height: 54px; padding: 0 30px; border-radius: 13px; background: linear-gradient(135deg,#2479ff,#0f59e7); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 9px 22px rgba(23,105,255,.22); transition: .2s; }
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 27px rgba(23,105,255,.3); }
.primary-btn.full { width: 100%; }
.source-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px 4px 0; font-size: 12px; color: #7f899c; }
.radio-chip input { display: none; }
.radio-chip span { display: inline-block; padding: 5px 10px; border: 1px solid #e2e8f1; border-radius: 999px; color: #68758b; background: #fff; cursor: pointer; }
.radio-chip input:checked + span { color: #0d5ce5; background: #edf5ff; border-color: #b9d2ff; }
.tips-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 18px 0 60px; }
.tip-card { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.66); }
.tip-card > span { color: #a1b5d7; font-weight: 700; font-size: 12px; }
.tip-card strong { font-size: 14px; }
.tip-card p { margin: 5px 0 0; color: #8490a4; font-size: 12px; line-height: 1.6; }
.results-head { margin: 31px 0 13px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.results-head h2 { margin: 0 0 4px; font-size: 19px; }
.results-head p { margin: 0; color: #7a8598; font-size: 13px; }
.results-head b { color: #344258; }
.page-indicator { font-size: 12px; color: #8893a7; }
.results-list { display: grid; gap: 14px; }
.drug-card { border: 1px solid #e2e8f2; background: rgba(255,255,255,.94); border-radius: 18px; overflow: hidden; box-shadow: 0 8px 28px rgba(31,65,108,.055); }
.drug-card-head { padding: 18px 20px 15px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid #edf1f6; }
.drug-card-head h3 { margin: 0 0 5px; font-size: 18px; }
.drug-code { color: #7d899e; font-size: 12px; word-break: break-all; }
.price { flex: 0 0 auto; text-align: right; }
.price span { display: block; color: #8994a7; font-size: 10px; }
.price strong { font-size: 23px; color: #e45b2a; }
.price small { margin-left: 3px; color: #9b7c70; font-size: 11px; }
.detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.detail-item { min-width: 0; padding: 13px 20px 15px; border-right: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.detail-item:nth-child(4n) { border-right: 0; }
.detail-item span { display: block; margin-bottom: 5px; color: #939daf; font-size: 10px; }
.detail-item strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.55; word-break: break-word; }
.mobile-compact-meta { display: none; }
.compact-row { display: grid; gap: 8px; }
.compact-cell { min-width: 0; }
.compact-cell span { display: block; color: #939daf; font-size: 10px; margin-bottom: 5px; }
.compact-cell strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; word-break: break-word; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; margin: 24px 0 55px; font-size: 13px; }
.pagination a,.pagination .disabled { padding: 8px 15px; border: 1px solid #dfe6f0; border-radius: 9px; background: #fff; }
.pagination a { color: var(--blue); }
.pagination .disabled { color: #b1bac8; background: #f5f7fa; }
.sales-pagination { flex-wrap: wrap; gap: 8px; margin: 16px 0 48px; }
.sales-pagination a,.sales-pagination .disabled { padding: 8px 12px; }
.page-jump { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; width: 100%; }
.page-jump label { display: flex; align-items: center; gap: 6px; color: #68758a; font-size: 13px; white-space: nowrap; }
.page-jump input {
  width: 68px;
  height: 36px;
  padding: 0 8px;
  border: 1px solid #dfe6f0;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  text-align: center;
  outline: none;
}
.page-jump input:focus { border-color: #8ab3ff; box-shadow: 0 0 0 4px rgba(23,105,255,.08); }
.page-jump button {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: #1769ff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
@media (min-width: 720px) {
  .page-jump { width: auto; margin-left: 4px; }
}
.empty-state { padding: 60px 20px; text-align: center; color: #78859a; }
.empty-icon { margin: auto; width: 54px; height: 54px; display: grid; place-items: center; background: #eef4fb; border-radius: 18px; font-size: 27px; color: #7194c7; }
.empty-state h3 { color: #3b4658; margin-bottom: 8px; }
.empty-state p { font-size: 13px; }
.footer { max-width: 100%; padding: 35px 20px; text-align: center; color: #a0a9b8; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px,100%); padding: 34px; border: 1px solid #e1e8f2; background: rgba(255,255,255,.94); border-radius: 24px; box-shadow: 0 25px 70px rgba(36,68,110,.12); }
.login-brand { margin-bottom: 30px; }
.login-card h1 { margin: 0 0 7px; font-size: 25px; }
.muted { color: #8590a3; font-size: 13px; line-height: 1.6; }
.login-form { display: grid; gap: 15px; margin-top: 24px; }
.login-form label { color: #546176; font-size: 12px; font-weight: 600; }
.login-form input { width: 100%; height: 47px; margin-top: 7px; padding: 0 13px; border: 1px solid #dce4ef; border-radius: 11px; outline: none; background: #fafcff; }
.login-form input:focus { border-color: #8ab3ff; box-shadow: 0 0 0 4px rgba(23,105,255,.08); }
.back-link { display: block; margin-top: 20px; text-align: center; color: #748298; font-size: 12px; }
.access-links { display: flex; justify-content: center; gap: 22px; margin-top: 20px; }
.access-links .back-link { margin-top: 0; }
.alert { margin: 16px 0; padding: 11px 14px; border-radius: 11px; font-size: 13px; }
.alert.error { color: #b72f41; background: #fff0f2; border: 1px solid #ffd9df; }
.alert.success { color: #0d754f; background: #edfbf5; border: 1px solid #c9f0df; }

.admin-main { padding-bottom: 60px; }
.admin-actions { display: flex; align-items: center; gap: 10px; }
.admin-actions form { margin: 0; }
.text-btn { border: 0; background: transparent; color: #7d899d; cursor: pointer; font-size: 12px; }
.admin-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding: 43px 0 26px; }
.admin-title h1 { font-size: 34px; }
.admin-stat { min-width: 175px; background: #fff; border: 1px solid #e3e9f2; border-radius: 16px; padding: 16px 18px; }
.admin-grid { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(440px,1.2fr); gap: 18px; }
.panel { background: rgba(255,255,255,.94); border: 1px solid #e2e8f1; border-radius: 19px; padding: 21px; box-shadow: 0 10px 35px rgba(33,68,112,.055); }
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.panel-title h2 { margin: 0 0 4px; font-size: 17px; }
.panel-title p { margin: 0; color: #8c96a8; font-size: 11px; }
.panel-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--blue); background: #edf4ff; border-radius: 10px; font-size: 22px; }
.upload-form { display: grid; gap: 12px; }
.file-drop { min-height: 160px; border: 1.5px dashed #cbd9ef; background: #f8fbff; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; cursor: pointer; padding: 20px; }
.file-drop input { display: none; }
.upload-symbol { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; margin-bottom: 9px; color: #276fef; background: #eaf2ff; font-size: 21px; }
.file-drop strong { max-width: 100%; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-drop small { margin-top: 4px; color: #98a2b3; font-size: 10px; }
.field-note { margin-top: 13px; padding: 12px; border-radius: 11px; background: #f7f9fc; color: #7d889c; font-size: 10px; line-height: 1.7; }
.file-list { display: grid; gap: 9px; }
.file-row { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid #e8edf4; border-radius: 13px; }
.file-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: #ebf7ef; color: #17874a; font-weight: 800; font-size: 13px; }
.file-meta { min-width: 0; }
.file-meta strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { display: block; margin-top: 4px; color: #939dae; font-size: 10px; }
.danger-btn { border: 1px solid #ffd8dd; background: #fff6f7; color: #cf3c4c; border-radius: 9px; padding: 7px 10px; cursor: pointer; font-size: 11px; }
.empty-small { padding: 45px 10px; text-align: center; color: #9aa4b5; font-size: 12px; }

@media (max-width: 980px) {
  .criteria-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-criteria-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .sales-criteria-grid .query-btn { grid-column: 1 / -1; }
  .query-btn { width: 100%; }
}
@media (max-width: 840px) {
  .hero { padding-top: 38px; align-items: stretch; }
  .hero-stat { display: none; }
  .tips-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-item:nth-child(4n) { border-right: 1px solid #f0f2f6; }
  .detail-item:nth-child(2n) { border-right: 0; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-title { align-items: stretch; }
}
@media (max-width: 600px) {
  .site-header { height: 64px; }
  .header-inner,.container { width: 100%; max-width: 100%; min-width: 0; padding-left: 15px; padding-right: 15px; }
  .header-inner { gap: 8px; }
  .brand { flex: 0 1 auto; }
  .header-links { flex: 0 1 auto; gap: 4px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 10px; }
  .brand strong { font-size: 14px; }
  .brand small { display: none; }
  .admin-entry { flex: 0 0 auto; padding: 7px 8px; font-size: 10px; }
  .hero { padding: 34px 0 20px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 13px; line-height: 1.65; }
  .search-panel { padding: 10px; border-radius: 16px; }
  .criteria-grid { grid-template-columns: 1fr; gap: 10px; }
  .criteria-field > span { margin-bottom: 5px; }
  .criteria-field input,
  .criteria-field select { height: 48px; font-size: 13px; }
  .query-btn { width: 100%; }
  .query-hint { padding-top: 9px; line-height: 1.6; }
  .primary-btn { height: 50px; padding: 0 18px; }
  .source-filter { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; padding-bottom: 2px; }
  .results-head { margin-top: 18px; margin-bottom: 8px; }
  .results-head h2 { font-size: 17px; margin-bottom: 2px; }
  .results-head p { font-size: 12px; line-height: 1.5; }
  .page-indicator { display: none; }
  .results-list { gap: 10px; }
  .drug-card { border-radius: 15px; }
  .drug-card-head { padding: 12px 15px 10px; align-items: flex-start; }
  .drug-card-head h3 { font-size: 16px; }
  .drug-code { font-size: 11px; }
  .price strong { font-size: 18px; }
  .price span { font-size: 9px; }
  .price small { font-size: 10px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-item { padding: 8px 15px 9px; }
  .detail-item span { font-size: 9.5px; margin-bottom: 4px; }
  .detail-item strong { font-size: 11.5px; }
  .detail-mobile-hide { display: none; }
  .detail-mobile-compact-hide { display: none; }
  .mobile-compact-meta { display: block; padding: 8px 15px 11px; border-top: 1px solid #f0f2f6; background: #fcfdff; }
  .compact-row { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .compact-row + .compact-row { margin-top: 6px; }
  .compact-cell { padding: 7px 10px; border: 1px solid #edf1f6; border-radius: 10px; background: #fff; }
  .compact-cell span { font-size: 9px; margin-bottom: 3px; }
  .compact-cell strong { font-size: 10.5px; line-height: 1.35; }
  .compact-wide strong { font-size: 10px; }
  .tips-grid { margin-bottom: 35px; }
  .pagination { margin-bottom: 35px; }
  .login-card { padding: 26px 20px; border-radius: 20px; }
  .site-header.admin-header { height: auto; min-height: 64px; }
  .admin-header .header-inner { height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .admin-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .admin-header .ghost-btn { display: inline-flex; }
  .admin-header .admin-extra-link { display: none; }
  .admin-header .admin-home-link { display: inline-flex; }
  .admin-header .cms-license-entry { display: inline-flex; background: #1769ff; color: #fff; border-color: #1769ff; }
  .admin-title { display: block; padding-top: 30px; }
  .admin-title h1 { font-size: 27px; }
  .admin-stat { margin-top: 18px; }
  .panel { padding: 16px; }
  .file-row { grid-template-columns: 36px minmax(0,1fr) auto; padding: 9px; }
  .file-icon { width: 36px; height: 36px; }
}

/* Compact listing directory cards */
.listing-results { gap: 8px; }
.listing-card { border-radius: 12px; }
.listing-card .drug-card-head { padding: 10px 12px 8px; gap: 10px; }
.listing-card .drug-card-head h3 { margin: 0 0 2px; font-size: 15px; line-height: 1.25; }
.listing-card .drug-code { font-size: 10px; line-height: 1.3; }
.listing-card .price span { font-size: 9px; line-height: 1.2; }
.listing-card .price strong { font-size: 17px; line-height: 1.1; }
.listing-card .price small { font-size: 10px; }
.listing-card .detail-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.listing-card .detail-item { padding: 6px 10px; }
.listing-card .detail-item span { margin-bottom: 1px; font-size: 9px; }
.listing-card .detail-item strong { font-size: 12px; line-height: 1.3; }
.listing-card .listing-short { max-width: 140px; }
.listing-card .compact-stats { display: flex; flex-wrap: wrap; gap: 4px; }
.listing-card .compact-stat { display: flex; align-items: baseline; gap: 4px; padding: 3px 7px; border: 1px solid #edf1f6; border-radius: 6px; background: #fff; }
.listing-card .compact-stat span { display: inline; margin: 0; font-size: 9px; color: #939daf; white-space: nowrap; }
.listing-card .compact-stat strong { display: inline; font-size: 11px; line-height: 1.2; font-weight: 700; }
.listing-card .compact-lines { display: grid; gap: 2px; margin-top: 5px; }
.listing-card .compact-line { display: flex; gap: 8px; align-items: baseline; }
.listing-card .compact-line span { flex: 0 0 auto; font-size: 9px; color: #939daf; }
.listing-card .compact-line strong { flex: 1; min-width: 0; font-size: 11px; line-height: 1.3; font-weight: 600; word-break: break-all; }
.listing-page .results-head { margin-top: 14px; margin-bottom: 6px; }
@media (max-width: 840px) {
  .listing-card .detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .listing-card .listing-short { max-width: none; }
}
@media (max-width: 600px) {
  .listing-results { gap: 7px; }
  .listing-card { border-radius: 10px; }
  .listing-card .drug-card-head { padding: 8px 10px 6px; }
  .listing-card .drug-card-head h3 { font-size: 14px; }
  .listing-card .price strong { font-size: 15px; }
  .listing-card .detail-item { padding: 5px 10px 6px; }
  .listing-card .detail-item strong { font-size: 11px; line-height: 1.28; }
  .listing-card .mobile-compact-meta { padding: 6px 10px 7px; }
}

/* v1.2.0 query center + delivery directory */
.home-main { padding-bottom: 28px; }
.site-declaration { margin-top: 30px; padding: 15px 20px; border: 1px solid #cfe0f7; border-radius: 14px; background: linear-gradient(135deg,#f7fbff,#eef6ff); color: #31577f; text-align: center; box-shadow: 0 8px 24px rgba(40,91,150,.06); }
.site-declaration p { margin: 0; line-height: 1.8; font-size: 14px; font-weight: 600; }
.site-declaration p:nth-child(2) { color: #c62828; font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.home-hero { padding: 34px 0 30px; max-width: 760px; }
.home-hero h1 { margin: 14px 0 9px; font-size: clamp(30px,4vw,44px); letter-spacing: -.035em; }
.home-hero p { margin: 0; color: var(--muted); font-size: 14px; }
.query-entry-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin: 0 0 42px; }
.query-entry-card { position: relative; min-height: 220px; padding: 26px 64px 24px 25px; display: flex; align-items: flex-start; gap: 17px; border: 1px solid #dfe7f2; border-radius: 22px; background: rgba(255,255,255,.94); box-shadow: 0 14px 40px rgba(28,61,103,.07); transition: transform .2s,border-color .2s,box-shadow .2s; overflow: hidden; }
.query-entry-card:before { content: ""; position: absolute; inset: auto -45px -58px auto; width: 165px; height: 165px; border-radius: 50%; background: rgba(40,124,255,.05); }
.query-entry-card:hover { transform: translateY(-2px); border-color: #bfd4f8; box-shadow: 0 18px 46px rgba(28,61,103,.11); }
.query-entry-card.delivery-entry:before { background: rgba(27,154,116,.06); }
.query-entry-card.sales-entry:before { background: rgba(236,137,43,.07); }
.query-entry-card.catalog-entry:before { background: rgba(124,58,237,.07); }
.query-entry-card.fugu-entry:before { background: rgba(13,148,136,.07); }
.query-entry-card.shenmu-entry:before { background: rgba(190,24,93,.07); }
.query-entry-card.fugu-purchase-entry:before { background: rgba(2,132,199,.07); }
.entry-icon { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: #edf4ff; color: #1769ff; font-size: 18px; font-weight: 800; }
.delivery-entry .entry-icon { background: #ecf8f4; color: #168565; }
.sales-entry .entry-icon { background: #fff4e8; color: #c56b16; }
.catalog-entry .entry-icon { background: #f4edff; color: #7c3aed; }
.fugu-entry .entry-icon { background: #e6f7f4; color: #0f766e; }
.shenmu-entry .entry-icon { background: #fce7f3; color: #be185d; }
.fugu-purchase-entry .entry-icon { background: #e0f2fe; color: #0369a1; }
.tool-entry .entry-icon, .analysis-entry .entry-icon { background: #eef8ff; color: #0369a1; }
.analysis-entry:before { background: rgba(3,105,161,.07); }

/* v1.2.3 toolkit categories + single product analysis */
.tool-category { margin: 0 0 22px; border: 1px solid #e2e8f2; border-radius: 20px; background: rgba(255,255,255,.78); box-shadow: 0 10px 30px rgba(28,61,103,.05); overflow: hidden; }
.tool-category-toggle { width: 100%; display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.tool-category-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: #edf4ff; color: #1769ff; font-weight: 800; }
.tool-category-icon.batch { background: #eef8ff; color: #0369a1; }
.tool-category-copy strong { display: block; font-size: 18px; letter-spacing: -.02em; }
.tool-category-count { display: block; margin-top: 4px; color: #7c879a; font-size: 12px; }
.tool-category-arrow { margin-left: auto; color: #8b98ab; font-size: 18px; line-height: 1; }
.tool-category-body { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .28s ease, opacity .22s ease; padding: 0 16px; }
.tool-category-body.is-open { max-height: 4000px; opacity: 1; padding: 0 16px 18px; }
.tool-category-body .query-entry-grid { margin-bottom: 0; }
.tool-category-toggle { cursor: pointer; }
.tool-category-arrow { transition: transform .2s ease; }
.tool-category-toggle[aria-expanded="true"] .tool-category-arrow { transform: rotate(90deg); }

.spa-page .spa-hero { padding-top: 24px; }
.spa-panel { margin-top: 18px; }
.spa-section-title { margin: 0 0 8px; font-size: 17px; }
.spa-hint { margin: 0 0 14px; color: #7c879a; font-size: 12px; line-height: 1.7; }
.spa-dataset { margin: 18px 0; padding: 16px 18px; border-radius: 16px; border: 1px solid #dfe7f2; background: #fff; }
.spa-dataset.ok { border-color: #b9e6d2; background: linear-gradient(135deg,#f3fbf7,#fff); }
.spa-dataset.empty { border-color: #f3c7cf; background: #fff7f8; color: #8a3b48; }
.spa-dataset-title { font-weight: 700; margin-bottom: 10px; }
.spa-dataset-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.spa-dataset-grid span { display: block; color: #8b98ab; font-size: 11px; margin-bottom: 4px; }
.spa-status-ok { color: #11845b; }
.spa-product-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.spa-product-search { position: relative; }
.spa-suggest { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); border: 1px solid #dfe7f2; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px rgba(20,52,96,.12); max-height: 320px; overflow: auto; }
.spa-suggest-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; min-height: 40px; background: #f7fafc; border-bottom: 1px solid #e6edf5; }
.spa-suggest-head-count { color: #5f6c80; font-size: 12px; white-space: nowrap; }
.spa-suggest-select-all { appearance: none; border: 1px solid #2f6fed; background: #fff; color: #2f6fed; border-radius: 8px; padding: 6px 10px; min-height: 36px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.spa-suggest-select-all:hover { background: #eef4ff; }
.spa-suggest-check { flex-shrink: 0; width: 1.1em; color: #6b7c93; font-size: 14px; line-height: 1.3; margin-top: 1px; }
.spa-suggest-item { display: flex; width: 100%; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 0; background: #fff; text-align: left; cursor: pointer; font-size: 13px; }
.spa-suggest-item:hover, .spa-suggest-item.is-active { background: #f3f7fd; }
.spa-suggest-item.is-added { opacity: .55; cursor: not-allowed; }
.spa-suggest-name { flex: 1; min-width: 0; word-break: break-all; }
.spa-suggest-item--pair { align-items: flex-start; }
.spa-suggest-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.spa-suggest-mfr { color: #5f6c80; font-size: 12px; word-break: break-all; }
.spa-suggest-alias { color: #8b98ab; font-size: 11px; }
.spa-selected-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.spa-selected-product { font-weight: 600; color: #1f2a3d; }
.spa-selected-mfr { color: #5f6c80; font-size: 12px; word-break: break-all; }
.spa-suggest-rows { color: #8b98ab; font-size: 11px; white-space: nowrap; }
.spa-suggest-added { color: #11845b; font-size: 11px; white-space: nowrap; }
.spa-suggest-meta { padding: 10px 12px; color: #7c879a; font-size: 12px; }
.spa-suggest-meta--error { color: #b42334; }
.spa-confirm { position: fixed; inset: 0; z-index: 320; display: flex; align-items: center; justify-content: center; padding: 20px; }
.spa-confirm-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.spa-confirm-card { position: relative; z-index: 1; width: min(420px, 100%); background: #fff; border-radius: 14px; box-shadow: 0 20px 50px rgba(15,23,42,.28); padding: 18px 18px 16px; }
.spa-confirm-msg { margin: 0 0 16px; color: #1f2a3d; font-size: 14px; line-height: 1.55; }
.spa-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.spa-confirm-actions .ghost-btn,
.spa-confirm-actions .primary-btn { min-height: 40px; }
.spa-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(12px); z-index: 100; max-width: min(92vw, 420px); padding: 12px 16px; border-radius: 12px; background: #1f2a3d; color: #fff; font-size: 13px; line-height: 1.5; box-shadow: 0 12px 32px rgba(15,23,42,.28); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.spa-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.spa-toast--error { background: #8f1f2d; }
.spa-toast--info { background: #1f4b7a; }
.spa-toolbar-row { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.spa-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.spa-modal[hidden] { display: none !important; }
.spa-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.spa-modal-card { position: relative; z-index: 1; width: min(920px, 100%); max-height: none; overflow: visible; background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(15,23,42,.28); padding: 20px 22px 24px; margin-bottom: 24px; }
.spa-modal-card .spa-product-search { position: relative; z-index: 6; }
.spa-modal-card .spa-suggest { z-index: 40; }
.spa-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.spa-modal-head h2 { margin: 0; font-size: 20px; }
body.spa-modal-open { overflow: hidden; }
.spa-mfr-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 12px; align-items: end; margin: 14px 0 16px; }
.spa-mfr-form-product { grid-template-columns: 1fr; align-items: stretch; }
.spa-mfr-form-pair { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 14px; align-items: start; margin: 14px 0 12px; }
.spa-pair-col { display: grid; gap: 10px; padding: 12px; border: 1px solid #e8edf5; border-radius: 12px; background: #fbfcff; }
.spa-pair-label { font-size: 13px; color: #1f2a3d; }
.spa-pair-arrow { align-self: center; font-size: 22px; color: #8b98ab; padding-top: 18px; }
@media (max-width: 800px) {
  .spa-mfr-form-pair { grid-template-columns: 1fr; }
  .spa-pair-arrow { display: none; }
}
.spa-mfr-create-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.spa-mfr-product { display: block; width: 100%; margin-bottom: 4px; color: #1f2a3d; }
.spa-mfr-list-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.spa-mfr-list-tools input { flex: 1; min-width: 0; }
.spa-mfr-list { list-style: none; margin: 0; padding: 0; border: 1px solid #e8edf5; border-radius: 12px; }
.spa-mfr-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; padding: 12px 14px; border-bottom: 1px solid #eef2f7; align-items: center; }
.spa-cycle-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.spa-cycle-chip { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 12px; color: #1f2a3d; border: 1px solid transparent; }
.spa-cycle-chip-btn { cursor: pointer; font: inherit; line-height: 1.3; transition: box-shadow .15s ease, border-color .15s ease, opacity .15s ease; }
.spa-cycle-chip-btn:not(.is-disabled):hover { box-shadow: 0 1px 4px rgba(15,23,42,.12); }
.spa-cycle-chip-btn.is-selected { border-color: #2f6fed; box-shadow: 0 0 0 2px rgba(47,111,237,.18); font-weight: 600; }
.spa-cycle-chip-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.spa-cycle-normal { background: #c6efce; }
.spa-cycle-approaching { background: #fff2cc; }
.spa-cycle-due { background: #fce4d6; }
.spa-cycle-overdue { background: #ffcdd2; }
.spa-cycle-insufficient { background: #f2f2f2; }
.spa-cycle-detail { margin: 14px 0 18px; padding: 14px 16px; border: 1px solid #dbe4f0; border-radius: 14px; background: #f8fafc; max-width: 100%; min-width: 0; box-sizing: border-box; overflow-x: clip; }
.spa-cycle-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; min-width: 0; }
.spa-cycle-detail-head > div:first-child { min-width: 0; flex: 1; }
.spa-cycle-detail-head h3 { margin: 0 0 4px; font-size: 15px; }
.spa-cycle-detail-title { margin: 0; font-size: 14px; font-weight: 600; color: #1f2a3d; overflow-wrap: anywhere; word-break: break-word; }
.spa-cycle-detail-ref, .spa-cycle-detail-mini { margin: 4px 0 0; font-size: 12px; color: #6b7c93; overflow-wrap: anywhere; word-break: break-word; }
.spa-cycle-detail-close { border: 0; background: #fff; border-radius: 8px; width: 32px; height: 32px; font-size: 20px; line-height: 1; cursor: pointer; color: #5f6c80; box-shadow: 0 1px 3px rgba(15,23,42,.08); flex-shrink: 0; }
.spa-cycle-detail-tools { margin: 8px 0 12px; min-width: 0; }
.spa-cycle-detail-tools input { width: 100%; max-width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid #d5deea; border-radius: 10px; font-size: 14px; }
.spa-cycle-detail-cards { display: grid; gap: 8px; min-width: 0; }
.spa-cycle-detail-card { padding: 8px 10px; border: 1px solid #cfd8e6; border-radius: 10px; background: #fff; min-width: 0; max-width: 100%; box-sizing: border-box; overflow: hidden; }
.spa-cycle-detail-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; min-width: 0; padding-bottom: 6px; border-bottom: 1px solid #e8edf5; }
.spa-cycle-detail-customer { appearance: none; -webkit-appearance: none; border: 0; background: transparent; padding: 0; margin: 0; text-align: left; font: inherit; font-size: 14px; font-weight: 700; color: #1f2a3d; min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.spa-cycle-detail-card-head .spa-cycle-chip { flex-shrink: 0; max-width: 38%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spa-cycle-detail-line { display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 6px; align-items: center; font-size: 12px; margin-bottom: 4px; min-width: 0; padding: 5px 8px; border: 1px solid #e8edf5; border-radius: 6px; background: #fbfcfe; }
.spa-cycle-detail-line span { color: #8b98ab; flex-shrink: 0; }
.spa-cycle-detail-line strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: #1f2a3d; }
.spa-cycle-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 4px; font-size: 12px; min-width: 0; }
.spa-cycle-kv { display: flex; justify-content: space-between; align-items: center; gap: 6px; min-width: 0; padding: 5px 8px; border: 1px solid #e8edf5; border-radius: 6px; background: #fbfcfe; }
.spa-cycle-kv-wide { grid-column: 1 / -1; }
.spa-cycle-kv span { color: #8b98ab; flex-shrink: 0; }
.spa-cycle-kv strong { color: #1f2a3d; font-size: 12px; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spa-cycle-detail-remark { margin: 6px 0 0; padding: 5px 8px; border: 1px solid #f3c7cf; border-radius: 6px; background: #fff7f8; font-size: 12px; color: #b42334; overflow-wrap: anywhere; word-break: break-word; line-height: 1.4; }
.spa-cycle-customer-tip { position: fixed; z-index: 120; max-width: calc(100vw - 24px); padding: 10px 12px; border: 1px solid #d5deea; border-radius: 10px; background: #1f2a3d; color: #fff; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 28px rgba(15,23,42,.28); word-break: break-word; pointer-events: none; }
.spa-cycle-detail-table-wrap { display: none; overflow-x: auto; margin-top: 12px; }
.spa-cycle-detail-table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
.spa-cycle-detail-table th, .spa-cycle-detail-table td { border: 1px solid #e8edf5; padding: 8px 10px; text-align: left; vertical-align: top; }
.spa-cycle-detail-table th { background: #f3f7fd; font-weight: 600; white-space: nowrap; }
.spa-cycle-detail-table .num { text-align: right; white-space: nowrap; }
.spa-cycle-detail-pager { margin-top: 12px; flex-wrap: wrap; gap: 8px; }
.spa-cycle-detail-pagesize { display: inline-flex; align-items: center; gap: 6px; margin-left: 0; flex-wrap: wrap; }
@media (min-width: 901px) {
  .spa-cycle-detail-cards { display: none; }
  .spa-cycle-detail-table-wrap { display: block; }
}
@media (max-width: 900px) {
  .spa-cycle-detail-table-wrap { display: none; }
  .spa-cycle-detail-cards { display: grid; }
  .spa-preview { max-width: 100%; min-width: 0; overflow-x: clip; }
  .spa-cycle-stats { max-width: 100%; }
  .spa-cycle-chip-btn { max-width: 100%; }
  .spa-cycle-detail {
    margin-left: -8px;
    margin-right: -8px;
    padding: 10px;
    border-radius: 12px;
  }
  .spa-cycle-detail-pager { justify-content: flex-start; }
  .spa-cycle-detail-pagesize { width: 100%; margin-top: 4px; }
}
.spa-cycle-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.spa-cycle-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 13px; flex-wrap: wrap; }
.spa-cycle-remark { font-size: 12px; color: #b42334; margin-left: 8px; white-space: nowrap; }
.spa-cycle-item-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.spa-mfr-item:last-child { border-bottom: 0; }
.spa-mfr-item-pair .spa-mfr-item-main { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: stretch; }
.spa-mfr-pair-block { display: grid; gap: 2px; min-width: 140px; }
.spa-mfr-pair-block .spa-pair-label { font-size: 12px; color: #8b98ab; }
.spa-mfr-pair-block strong { font-size: 14px; color: #1f2a3d; }
.spa-mfr-item-main { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.spa-suggest-alias { display: block; width: 100%; color: #6b7c93; font-size: 12px; margin-top: 2px; }
.spa-cust-alias-note { display: block; color: #6b7c93; font-size: 12px; margin-top: 4px; font-weight: 400; }
.spa-mfr-arrow { color: #8b98ab; }
.spa-mfr-item-meta { grid-column: 1 / -1; color: #8b98ab; font-size: 12px; }
.spa-mfr-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 12px; }
.spa-binding-dirty { color: #b42334; font-weight: 600; }
@media (max-width: 800px) {
  .spa-mfr-form { grid-template-columns: 1fr; }
  .spa-dataset-grid { grid-template-columns: 1fr 1fr; }
}
.spa-selected-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 8px 0 10px; font-size: 13px; color: #5f6c80; }
.spa-selected-list { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid #e8edf5; border-radius: 14px; background: #fbfcff; min-height: 54px; }
.spa-selected-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid #eef2f7; }
.spa-selected-list li:last-child { border-bottom: 0; }
.spa-selected-list button { border: 0; background: transparent; color: #dc3f4f; cursor: pointer; font-size: 12px; }
.spa-criteria-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.spa-customer-field { position: relative; grid-column: 1 / -1; }
.spa-associate-row { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #e2e8f2; border-radius: 14px; background: #f8fafc; }
.spa-toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 600; }
.spa-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.spa-toggle-ui { width: 42px; height: 24px; border-radius: 999px; background: #c5cedb; position: relative; transition: background .2s ease; flex-shrink: 0; }
.spa-toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.2); transition: transform .2s ease; }
.spa-toggle input:checked + .spa-toggle-ui { background: #2f6fed; }
.spa-toggle input:checked + .spa-toggle-ui::after { transform: translateX(18px); }
.spa-toggle input:disabled + .spa-toggle-ui { opacity: .5; }
.spa-associate-hint { margin: 10px 0 0; }
.spa-catalog-meta { display: flex; flex-wrap: wrap; gap: 12px 18px; margin-top: 10px; font-size: 12px; color: #5f6c80; }
.spa-idle-tag { display: inline-block; margin-left: 8px; color: #9aa6b8; font-style: normal; font-size: 11px; }
.spa-selected-list.is-catalog-mode { opacity: .72; }
.spa-preview-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 12px; color: #5f6c80; font-size: 13px; }
.spa-preview-pager { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; font-size: 13px; color: #5f6c80; }
.spa-preview-pager button { border: 1px solid #d5deea; background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.spa-preview-pager button:disabled { opacity: .45; cursor: not-allowed; }
.spa-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.spa-job-status { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #f3f7fd; color: #3b4d68; font-size: 13px; }
.spa-preview { margin-top: 18px; max-width: 100%; min-width: 0; }
.spa-preview-card { margin-top: 12px; padding: 14px 16px; border: 1px solid #e2e8f2; border-radius: 14px; background: #fff; }
.spa-preview-card h3 { margin: 0 0 8px; font-size: 16px; }
.spa-preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 14px; color: #5f6c80; font-size: 13px; }
.slot-extra-note { margin: 10px 0 0; color: #5f7f9d; font-size: 12px; line-height: 1.6; }

@media (max-width: 900px) {
  .spa-dataset-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .spa-criteria-grid { grid-template-columns: 1fr; }
  .spa-preview-grid { grid-template-columns: 1fr; }
}
.entry-content { min-width: 0; }
.entry-kicker { color: #8b98ab; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.entry-content h2 { margin: 7px 0 8px; font-size: 21px; letter-spacing: -.02em; }
.entry-content p { min-height: 44px; margin: 0; color: #7c879a; font-size: 12px; line-height: 1.75; }
.entry-meta { display: flex; align-items: baseline; gap: 6px; margin-top: 17px; }
.entry-meta strong { font-size: 24px; }
.entry-meta span { color: #929cad; font-size: 10px; }
.entry-arrow { position: absolute; right: 23px; top: 50%; transform: translateY(-50%); width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: #f3f6fa; color: #7c899e; font-size: 17px; }
.query-back { padding-top: 18px; margin-bottom: -16px; }
.query-back a { display: inline-block; padding: 7px 0; color: #7e8a9d; font-size: 11px; }
.query-back a:hover { color: var(--blue); }
.delivery-criteria-grid { grid-template-columns: repeat(2,minmax(0,1fr)) auto; }
.sales-criteria-grid { grid-template-columns: minmax(0,1.1fr) minmax(0,1.1fr) minmax(150px,0.9fr); }
.sales-criteria-grid .query-btn { width: 100%; }
.catalog-criteria-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.catalog-criteria-grid .query-btn { grid-column: 1 / -1; width: 100%; }
.sales-date-input {
  display: flex;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #dce5f1;
  border-radius: 13px;
  background: #fbfcff;
  overflow: hidden;
}
.sales-date-input:focus-within {
  border-color: #8ab3ff;
  box-shadow: 0 0 0 4px rgba(23,105,255,.08);
  background: #fff;
}
.sales-date-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 54px;
  padding: 0 10px 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.sales-date-field input:focus { box-shadow: none; }
.sales-date-pick {
  flex: 0 0 46px;
  width: 46px;
  border: 0;
  border-left: 1px solid #e4ebf4;
  background: #f4f8ff;
  color: #1677ff;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.sales-date-pick svg { width: 18px; height: 18px; fill: currentColor; }
.sales-date-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
}
.sales-date-sheet-mask {
  position: absolute;
  inset: 0;
  background: rgba(17,24,39,.38);
}
.sales-date-sheet-panel {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 14px 18px;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -12px 32px rgba(20,40,70,.16);
}
.sales-date-sheet-title {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.sales-date-cols {
  display: grid;
  grid-template-columns: 1.2fr .9fr .9fr;
  gap: 8px;
  height: 220px;
}
.sales-date-col {
  overflow-y: auto;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #f8fafd;
  -webkit-overflow-scrolling: touch;
}
.sales-date-item {
  display: block;
  width: 100%;
  height: 40px;
  border: 0;
  background: none;
  color: #334155;
  font-size: 14px;
  cursor: pointer;
}
.sales-date-item.is-active {
  background: #edf5ff;
  color: #0d5ce5;
  font-weight: 700;
}
.sales-date-sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.sales-date-sheet-actions .ghost-btn,
.sales-date-sheet-actions .primary-btn { height: 44px; }
body.sales-date-open { overflow: hidden; }
.sales-page .results-list.sales-results { gap: 8px; max-width: 860px; }
.sales-appbar, .sales-filter-summary,
.listing-appbar, .listing-filter-summary { display: none; }
.sales-results-head { margin: 16px 0 8px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sales-results-head h2 { margin: 0; font-size: 16px; }
.sales-card {
  --sales-primary: #1677ff;
  --sales-label: #7b8495;
  --sales-text: #111827;
  --sales-border: #edf0f5;
  --sales-panel: #f8fafd;
  --sales-orange: #ff6b00;
  --sales-purple: #7c3aed;
  --sales-green: #22b84b;
  --sales-left: 10px;
  border: 1px solid #e5ebf3;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(28,61,103,.04);
}
.sales-card-head {
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) minmax(8.6em, max-content);
  gap: 8px;
  align-items: start;
  padding: 10px 12px 8px 10px;
  border-bottom: 1px solid var(--sales-border);
}
.sales-pill-icon {
  width: 26px; height: 26px; margin-top: 1px;
  border-radius: 7px;
  display: grid; place-items: center;
  color: #fff; background: #1677ff;
}
.sales-pill-icon svg { width: 14px; height: 14px; fill: currentColor; }
.sales-head-left { min-width: 0; }
.sales-head-left h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--sales-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sales-code { margin-top: 2px; color: var(--sales-label); font-size: 11px; line-height: 1.3; word-break: break-all; }
.sales-customer-line {
  display: block;
  width: 100%;
  margin-top: 2px;
  color: var(--sales-label);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.sales-chips {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
}
.sales-chip {
  flex: 0 1 auto;
  min-width: 0;
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid #dce3ee;
  border-radius: 4px;
  color: #334155;
  font-size: 11px;
  line-height: 1.35;
  background: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sales-chip-yulin {
  color: #0f7a4a;
  background: #e7f8ee;
  border-color: #8fd0ae;
}
.sales-chip-shiwei {
  color: #c62828;
  background: #fdecec;
  border-color: #f0b0b0;
}
.sales-chip-xian {
  color: #8a6d00;
  background: #fff6d4;
  border-color: #e6cf7a;
}
.sales-head-right {
  min-width: 8.6em;
  max-width: none;
  width: auto;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  overflow: visible;
}
.sales-date-box {
  display: inline-block;
  box-sizing: border-box;
  min-width: 8.6em;
  padding: 4px 8px;
  border: 1px solid #c5dbff;
  border-radius: 6px;
  background: #f4f8ff;
  text-align: center;
  overflow: visible;
}
.sales-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  color: var(--sales-primary);
  font-style: normal;
  white-space: nowrap;
}
.sales-date b,
.sales-date span {
  white-space: nowrap;
  overflow: visible;
}
.sales-date b {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.sales-date span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.sales-collect {
  margin-top: 4px;
  max-width: 8.6em;
  color: var(--sales-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-core { background: var(--sales-panel); border-bottom: 1px solid var(--sales-border); }
.sales-core-row { display: grid; }
.sales-core-5 {
  grid-template-columns:
    max-content
    max-content
    minmax(0, 0.72fr)
    minmax(0, 1fr)
    minmax(0, 1.12fr);
}
.sales-core-meta {
  grid-template-columns: max-content minmax(0, 1fr);
  border-top: 1px solid var(--sales-border);
}
.sales-metric { min-width: 0; padding: 7px 6px; border-right: 1px solid #eef2f7; }
.sales-core-5 .sales-metric:first-child,
.sales-core-meta .sales-metric:first-child,
.sales-split-cell:first-child { padding-left: var(--sales-left); }
.sales-core-row > .sales-metric:last-child { border-right: 0; }
.sales-metric span { display: block; margin-bottom: 2px; color: var(--sales-label); font-size: 11px; line-height: 1.2; }
.sales-metric strong {
  display: block; color: var(--sales-text); font-size: 13px; font-weight: 700; line-height: 1.25;
  overflow-wrap: anywhere; word-break: break-word;
}
.sales-col-name,
.sales-col-unit { min-width: max-content; }
.sales-col-name { padding-right: 6px; }
.sales-col-unit { padding-left: 4px; padding-right: 4px; }
.sales-col-name strong {
  white-space: nowrap;
  overflow: visible;
}
.sales-col-unit strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sales-col-center {
  text-align: center;
}
.sales-col-center span,
.sales-col-center strong {
  width: 100%;
  text-align: center;
}
.sales-core-5 .sales-metric:nth-child(n+3) strong { white-space: nowrap; }
.sales-core-meta .sales-metric {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  flex-wrap: nowrap;
  padding: 6px 8px;
}
.sales-core-meta .sales-metric span {
  margin-bottom: 0;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}
.sales-core-meta .sales-metric strong {
  display: inline;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}
.sales-tone-qty strong { color: var(--sales-green); font-size: 15px; }
.sales-tone-price strong { color: var(--sales-orange); font-size: 15px; }
.sales-tone-amount strong { color: var(--sales-purple); font-size: 15px; }
.sales-detail { padding: 0; }
.sales-kv, .sales-kv-customer {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 6px;
  align-items: start;
  padding: 7px 10px;
  border-bottom: 1px solid var(--sales-border);
}
.sales-kv span, .sales-split-cell span, .sales-kv-customer span {
  color: var(--sales-label); font-size: 12px; line-height: 1.35; font-weight: 500;
}
.sales-split {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  border-bottom: 1px solid var(--sales-border);
}
.sales-split-last { border-bottom: 0; }
.sales-split-cell {
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 7px 8px 7px 10px;
  border-right: 1px solid #eef2f7;
}
.sales-split-cell:last-child { border-right: 0; }
.sales-split-cell span {
  flex: 0 0 auto;
  white-space: nowrap;
}
.sales-split-cell .sales-clip {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.sales-clip {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0; padding: 0; border: 0; background: none;
  color: var(--sales-text);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.sales-clip.sales-customer-line {
  color: var(--sales-label);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  cursor: default;
}
.sales-popover {
  position: fixed;
  z-index: 80;
  max-width: min(280px, calc(100vw - 16px));
  padding: 8px 10px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 13px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(20,40,70,.16);
  word-break: break-word;
}
.delivery-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.delivery-detail-item { min-width: 0; padding: 10px 14px 11px; border-right: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.delivery-detail-item span { display: block; margin-bottom: 3px; color: #939daf; font-size: 9.5px; }
.delivery-detail-item strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.4; word-break: break-word; }
.delivery-detail-item.delivery-wide { grid-column: span 2; }
.delivery-detail-item:nth-child(2n) { border-right: 0; }
.delivery-card-main { min-width: 0; flex: 1; }
.delivery-card-main h3 {
  margin: 0 0 4px;
  font-size: 16px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.delivery-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.delivery-code-label {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef4ff;
  color: #3b6fd9;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .02em;
}
.delivery-card .drug-code {
  flex: 1;
  min-width: 0;
  color: #7d899e;
  font-size: 11px;
  line-height: 1.3;
  word-break: break-all;
}
.delivery-price {
  padding: 6px 10px 5px;
  border-radius: 10px;
  background: #fff5ef;
  text-align: right;
  line-height: 1.15;
}
.delivery-price span { font-size: 9px; color: #a8897c; }
.delivery-price strong { font-size: 18px; color: #e45b2a; }
.delivery-price small { margin-left: 2px; font-size: 10px; color: #b08878; }
.delivery-card-foot {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px 10px;
  border-top: 1px solid #f0f2f6;
  background: #fcfdff;
}
.delivery-card-foot .delivery-mfr {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
}
.delivery-card-foot .delivery-mfr span { margin-bottom: 2px; font-size: 9px; }
.delivery-card-foot .delivery-mfr strong { font-size: 11.5px; line-height: 1.35; }
.delivery-status-tag {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid #c9dcff;
  border-radius: 999px;
  background: #f3f8ff;
  color: #1d5fd0;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.delivery-status-tag::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59,130,246,.18);
}
.catalog-detail-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.catalog-detail-item { min-width: 0; padding: 12px 18px 13px; border-right: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.catalog-detail-item span { display: block; margin-bottom: 4px; color: #939daf; font-size: 9.5px; }
.catalog-detail-item strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; word-break: break-word; }
.catalog-detail-item.catalog-wide { grid-column: span 2; }
.admin-dataset-section { margin-bottom: 28px; }

/* v1.2.25 管理后台 Excel 数据源大类折叠 */
.admin-category {
  margin: 0 0 24px;
  border: 1px solid #e2e8f2;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 10px 28px rgba(28,61,103,.05);
  overflow: hidden;
}
.admin-category-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.admin-category-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf4ff;
  color: #1769ff;
  font-weight: 800;
}
.admin-category-copy strong { display: block; font-size: 17px; letter-spacing: -.02em; }
.admin-category-count { display: block; margin-top: 4px; color: #7c879a; font-size: 12px; }
.admin-category-arrow {
  margin-left: auto;
  color: #8b98ab;
  font-size: 18px;
  line-height: 1;
  transition: transform .2s ease;
}
.admin-category-toggle[aria-expanded="true"] .admin-category-arrow { transform: rotate(90deg); }
.admin-category-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .3s ease, opacity .22s ease, padding .22s ease;
  padding: 0 16px;
}
.admin-category-body.is-open {
  max-height: 20000px;
  opacity: 1;
  padding: 0 16px 16px;
}
.admin-category-body .admin-dataset-section:last-child { margin-bottom: 8px; }
.dataset-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 6px 0 12px; }
.dataset-heading > div { display: flex; align-items: center; gap: 9px; }
.dataset-heading h2 { margin: 0; font-size: 17px; }
.dataset-heading p { margin: 0; color: #929bad; font-size: 11px; }
.dataset-badge { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #1769ff; background: #edf4ff; font-size: 10px; font-weight: 800; }
.admin-stat-double small { display: block; margin-top: 3px; color: #8792a5; font-size: 10px; }

@media (max-width: 1100px) {
  .query-entry-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 840px) {
  .query-entry-grid { grid-template-columns: 1fr; }
  .query-entry-card { min-height: 0; }
  .delivery-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .delivery-detail-item.delivery-wide { grid-column: span 1; }
  .catalog-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-detail-item.catalog-wide { grid-column: span 2; }
}
@media (max-width: 600px) {
  .site-declaration { margin-top: 18px; padding: 12px 13px; border-radius: 12px; }
  .site-declaration p { font-size: 12px; line-height: 1.65; }
  .site-declaration p,.home-hero p { overflow-wrap: anywhere; word-break: normal; }
  .site-declaration p:nth-child(2) { font-size: 13px; }
  .home-hero { padding: 26px 0 20px; }
  .home-hero h1 { font-size: 29px; }
  .query-entry-grid { gap: 12px; margin-bottom: 22px; }
  .query-entry-card { padding: 18px 48px 17px 15px; gap: 12px; border-radius: 17px; }
  .entry-icon { width: 41px; height: 41px; border-radius: 12px; font-size: 15px; }
  .entry-content h2 { margin-top: 5px; margin-bottom: 5px; font-size: 17px; }
  .entry-content p { min-height: 0; font-size: 11px; line-height: 1.6; }
  .entry-meta { margin-top: 10px; }
  .entry-meta strong { font-size: 19px; }
  .entry-arrow { right: 13px; width: 28px; height: 28px; }
  .query-back { padding-top: 10px; margin-bottom: -20px; }
  .delivery-criteria-grid { grid-template-columns: 1fr; }
  .sales-criteria-grid { grid-template-columns: 1fr; }
  .catalog-criteria-grid { grid-template-columns: 1fr; }
  .sales-date-field input { height: 48px; }
  .sales-date-pick { flex-basis: 44px; width: 44px; }
  .sales-page.has-results .sales-hero,
  .sales-page.has-results .sales-query-back,
  .listing-page.has-results .listing-hero,
  .listing-page.has-results .listing-query-back { display: none; }
  body:has(.sales-page.has-results) .site-header,
  body:has(.listing-page.has-results) .site-header { display: none; }
  .sales-appbar,
  .listing-appbar {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    margin: 0 -10px 8px;
    padding: 0 10px;
    background: #fff;
    border-bottom: 1px solid #edf0f5;
  }
  .sales-appbar-back, .sales-appbar-filter,
  .listing-appbar-back, .listing-appbar-filter {
    flex: 0 0 auto;
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border: 0; background: none;
    color: #334155;
    font-size: 18px;
    cursor: pointer;
  }
  .sales-appbar-filter svg,
  .listing-appbar-filter svg { width: 18px; height: 18px; fill: currentColor; }
  .sales-appbar h1,
  .listing-appbar h1 { flex: 1; margin: 0; text-align: center; font-size: 16px; font-weight: 700; }
  .sales-filter-summary,
  .listing-filter-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f3f6fa;
    color: #5b6778;
    font-size: 12px;
  }
  .sales-filter-text,
  .listing-filter-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sales-filter-meta,
  .listing-filter-meta { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
  .sales-filter-meta b,
  .listing-filter-meta b { color: #111827; }
  .sales-filter-edit,
  .listing-filter-edit { border: 0; background: none; color: #1677ff; font-size: 12px; font-weight: 700; cursor: pointer; padding: 0; }
  .sales-page.has-results .sales-search.is-collapsed,
  .listing-page.has-results .listing-search.is-collapsed { display: none; }
  .sales-page.has-results .sales-search,
  .listing-page.has-results .listing-search { margin-bottom: 8px; }
  .sales-results-head { margin: 6px 0 8px; }
  .sales-results-head h2 { font-size: 14px; }
  .listing-results-head { margin: 6px 0 8px; }
  .listing-results-head h2 { font-size: 14px; }
  .container.sales-page,
  .container.listing-page.has-results { padding-left: 10px; padding-right: 10px; max-width: 100%; overflow-x: hidden; }
  .sales-page .results-list.sales-results { gap: 8px; }
  .sales-card { border-radius: 12px; }
  .sales-card-head { padding: 8px 10px 6px 8px; gap: 6px; grid-template-columns: 24px minmax(0,1fr) minmax(8.6em, max-content); }
  .sales-pill-icon { width: 24px; height: 24px; border-radius: 6px; }
  .sales-head-left h3 { font-size: 16px; }
  .sales-date b { font-size: 12px; }
  .sales-date span { font-size: 11px; }
  .sales-code,
  .sales-customer-line { font-size: 10.5px; }
  .sales-chip { font-size: 10.5px; padding: 1px 6px; }
  .sales-collect { font-size: 12px; max-width: 8.6em; }
  .sales-head-right { min-width: 8.6em; max-width: none; }
  .sales-core-5 {
    grid-template-columns:
      max-content
      max-content
      minmax(0, 0.7fr)
      minmax(0, 1fr)
      minmax(0, 1.1fr);
  }
  .sales-core-meta {
    grid-template-columns: max-content minmax(0, 1fr);
  }
  .sales-metric { padding: 6px 5px; }
  .sales-core-5 .sales-metric:first-child,
  .sales-core-meta .sales-metric:first-child,
  .sales-split-cell:first-child { padding-left: var(--sales-left); }
  .sales-col-unit { padding-left: 4px; padding-right: 4px; }
  .sales-metric span { font-size: 10px; margin-bottom: 1px; }
  .sales-metric strong { font-size: 12.5px; }
  .sales-tone-qty strong,
  .sales-tone-price strong,
  .sales-tone-amount strong { font-size: 14px; }
  .sales-kv { grid-template-columns: 32px minmax(0,1fr); gap: 5px; padding: 6px 8px; }
  .sales-clip { font-size: 13px; }
  .sales-clip.sales-customer-line { font-size: 10.5px; font-weight: 400; color: var(--sales-label); white-space: normal; overflow: visible; }
  .sales-split-cell { padding: 6px 8px 6px var(--sales-left); gap: 4px; }
  .sales-core-meta .sales-metric { padding: 6px 8px; }
  .sales-core-meta .sales-metric span,
  .sales-split-cell span { font-size: 12px; }
  .sales-core-meta .sales-metric strong,
  .sales-split-cell .sales-clip { font-size: 13px; }
  .delivery-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .delivery-detail-item { padding: 7px 10px 8px; }
  .delivery-detail-item span { font-size: 8.5px; margin-bottom: 2px; }
  .delivery-detail-item strong { font-size: 11px; line-height: 1.32; }
  .delivery-detail-item.delivery-wide { grid-column: span 1; }
  .delivery-card .drug-card-head { padding: 9px 11px 8px; gap: 8px; }
  .delivery-card-main h3 { margin: 0 0 3px; font-size: 14.5px; line-height: 1.25; }
  .delivery-code-label { padding: 0 5px; font-size: 8.5px; }
  .delivery-card .drug-code { font-size: 10px; }
  .delivery-price { padding: 4px 8px 3px; border-radius: 8px; }
  .delivery-price span { font-size: 8px; }
  .delivery-price strong { font-size: 15px; }
  .delivery-price small { font-size: 9px; }
  .delivery-card-foot { padding: 6px 10px 8px; gap: 8px; }
  .delivery-card-foot .delivery-mfr span { font-size: 8.5px; margin-bottom: 1px; }
  .delivery-card-foot .delivery-mfr strong { font-size: 10.5px; line-height: 1.3; }
  .delivery-status-tag { height: 22px; padding: 0 8px; font-size: 9.5px; }
  .catalog-detail-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .catalog-detail-item { padding: 9px 12px 10px; }
  .catalog-detail-item span { font-size: 9px; }
  .catalog-detail-item strong { font-size: 10.8px; line-height: 1.42; }
  .catalog-detail-item.catalog-wide { grid-column: span 2; }
  .dataset-heading { align-items: flex-start; }
  .dataset-heading p { display: none; }
  .admin-dataset-section { margin-bottom: 22px; }
}

@media (max-width: 375px) {
  .container.sales-page,
  .container.listing-page.has-results { padding-left: 8px; padding-right: 8px; }
  .sales-appbar,
  .listing-appbar { margin-left: -8px; margin-right: -8px; }
  .sales-head-left h3 { font-size: 16px; }
  .sales-date b { font-size: 12px; }
  .sales-date span { font-size: 11px; }
  .sales-core-5 {
    grid-template-columns:
      max-content
      max-content
      minmax(0, 0.68fr)
      minmax(0, 1fr)
      minmax(0, 1.12fr);
  }
  .sales-metric { padding: 5px 4px; }
  .sales-core-5 .sales-metric:first-child,
  .sales-core-meta .sales-metric:first-child,
  .sales-split-cell:first-child { padding-left: var(--sales-left); }
  .sales-metric span { font-size: 9.5px; }
  .sales-metric strong { font-size: 12px; }
  .sales-tone-qty strong,
  .sales-tone-price strong,
  .sales-tone-amount strong { font-size: 13px; }
  .sales-kv { padding: 5px 8px; }
  .sales-core-meta .sales-metric span,
  .sales-split-cell span { font-size: 12px; }
  .sales-core-meta .sales-metric strong,
  .sales-split-cell .sales-clip,
  .sales-clip { font-size: 13px; }
  .sales-clip.sales-customer-line { font-size: 10.5px; font-weight: 400; color: var(--sales-label); white-space: normal; overflow: visible; }
}

/* v1.2.1 fixed 1:1 source slots */
.source-slot-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.source-slot-grid.single { grid-template-columns:minmax(0,1fr); max-width:760px; }
.source-slot-panel { min-width:0; }
.slot-badge { display:inline-flex; align-items:center; justify-content:center; min-width:38px; height:28px; padding:0 9px; border-radius:999px; background:#edf5ff; color:#1769ff; font-size:11px; font-weight:800; }
.slot-state { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; font-size:11px; font-weight:700; margin-bottom:12px; }
.slot-state.ok { background:#edf9f4; color:#11845b; }
.slot-state.empty { background:#fff8e8; color:#9a6a00; }
.slot-lock-tip { margin-top:10px; color:#8a6670; background:#fff7f8; border:1px solid #ffe1e5; padding:9px 11px; border-radius:10px; font-size:11px; line-height:1.6; }
.compact-drop { min-height:128px; }
@media (max-width:840px){ .source-slot-grid { grid-template-columns:1fr; } .source-slot-grid.single { max-width:none; } }

.password-panel { max-width: 900px; }
.password-change-form { display: grid; gap: 15px; }
.password-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.password-grid label { min-width: 0; color: #546176; font-size: 11px; font-weight: 700; }
.password-grid label > span { display: block; margin: 0 0 7px 2px; }
.password-grid input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #dce4ef; border-radius: 11px; outline: none; background: #fafcff; }
.password-grid input:focus { border-color: #8ab3ff; box-shadow: 0 0 0 4px rgba(23,105,255,.08); background: #fff; }
.password-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 2px; }
.password-actions > span { color: #8a95a7; font-size: 11px; }
.password-actions .primary-btn { height: 46px; }
@media (max-width: 700px) {
  .password-grid { grid-template-columns: 1fr; gap: 10px; }
  .password-actions { align-items: stretch; flex-direction: column; }
  .password-actions .primary-btn { width: 100%; }
}

/* Browser-bound query licenses */
.device-page { padding-top: 48px; padding-bottom: 48px; }
.device-card { width: min(560px,100%); }
.device-rule-box { margin: 18px 0; padding: 13px 15px; border: 1px solid #dce9fb; border-radius: 13px; background: #f4f8ff; color: #5b6c85; font-size: 12px; line-height: 1.7; }
.full { width: 100%; justify-content: center; }
.device-admin-list { display: grid; gap: 0; max-width: 980px; padding-top: 6px; padding-bottom: 6px; }
.device-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 4px; border-bottom: 1px solid #edf1f6; }
.device-admin-row:last-child { border-bottom: 0; }
.device-admin-row > div { min-width: 0; display: grid; gap: 4px; }
.device-admin-row strong { font-size: 13px; }
.device-admin-row span,.device-admin-row small { color: #8792a5; font-size: 10px; word-break: break-all; }
.compact-empty { padding: 24px; }
.warn-btn { border: 1px solid #ffe0c2; background: #fff7ee; color: #c45a12; border-radius: 9px; padding: 7px 10px; cursor: pointer; font-size: 11px; }
.warn-btn:hover { background: #ffefd9; }
.device-admin-group { border-bottom: 1px solid #edf1f6; }
.device-admin-group:last-child { border-bottom: 0; }
.device-admin-group summary { list-style: none; cursor: pointer; padding: 15px 4px; }
.device-admin-group summary::-webkit-details-marker { display: none; }
.device-admin-summary { display: grid; gap: 4px; position: relative; padding-right: 28px; }
.device-admin-summary::after { content: "▾"; position: absolute; right: 4px; top: 2px; color: #8792a5; font-size: 14px; }
.device-admin-group[open] .device-admin-summary::after { content: "▴"; }
.device-admin-summary strong { font-size: 14px; }
.device-admin-summary span,.device-admin-summary small { color: #8792a5; font-size: 10px; word-break: break-all; }
.device-admin-licenses { display: grid; gap: 10px; padding: 0 4px 14px; }
.device-admin-license { display: grid; gap: 10px; padding: 12px; border: 1px solid #edf1f6; border-radius: 12px; background: #f7f9fc; }
.device-admin-license > div:first-child { display: grid; gap: 4px; }
.license-full-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; letter-spacing: .4px; word-break: break-all; }
.license-disabled-tag { margin-left: 8px; color: #cf3c4c; font-size: 11px; font-style: normal; }
.device-admin-actions { display: flex; gap: 8px; width: 100%; }
.device-admin-actions form { flex: 1; margin: 0; min-width: 0; }
.device-admin-actions button { width: 100%; }
@media (max-width: 600px) {
  .header-links { gap: 5px; }
  .header-links .admin-entry { padding-left: 8px; padding-right: 8px; }
  .device-admin-row { align-items: stretch; flex-direction: column; }
  .device-admin-row form,.device-admin-row button { width: 100%; }
  .device-admin-actions { flex-direction: row; }
  .device-admin-actions form { width: auto; }
}

.cms-issue-form { display:flex; flex-wrap:wrap; gap:12px; align-items:flex-end; }
.cms-issue-form label { display:grid; gap:6px; color:#68758a; font-size:12px; font-weight:700; }
.cms-issue-form input { width:92px; height:40px; padding:0 10px; border:1px solid #dce5f1; border-radius:10px; }
.cms-issue-panel { padding:20px; margin-bottom:18px; }
.cms-issue-hint { margin:12px 0 0; }
.cms-table-wrap { overflow-x:auto; background:#fff; border:1px solid #e8edf5; border-radius:16px; }
.cms-license-table { width:100%; border-collapse:collapse; font-size:13px; }
.cms-license-table th,.cms-license-table td { padding:10px 12px; border-bottom:1px solid #edf1f6; text-align:left; vertical-align:top; }
.cms-license-table th { color:#8590a3; font-size:11px; }
.cms-license-table code { font-size:12px; }
.cms-actions { display:flex; flex-wrap:wrap; gap:6px; }
.cms-inline-form { display:inline; }
.cms-card-list { display:none; }
.cms-entry-card { display:flex; flex-direction:column; gap:6px; margin:0 0 22px; padding:18px 20px; border:1px solid #c9dcff; border-radius:16px; background:linear-gradient(135deg,#f4f8ff,#eaf2ff); box-shadow:0 10px 28px rgba(23,105,255,.08); }
.cms-entry-card strong { font-size:18px; color:#0d4ed8; }
.cms-entry-card span { color:#5b6c85; font-size:13px; line-height:1.6; }
.access-log-entry-card { border-color:#d5e0ef; background:linear-gradient(135deg,#f7fafc,#eef3f8); }
.access-log-entry-card strong { color:#1f3b63; }
.access-log-page .admin-back-link { margin:0 0 16px; }
.access-log-filter {
  display:flex; flex-wrap:wrap; gap:12px; align-items:end;
  margin:0 0 18px; padding:16px; border:1px solid #e2e8f2; border-radius:16px;
  background:rgba(255,255,255,.9);
}
.access-log-filter label { display:flex; flex-direction:column; gap:6px; min-width:180px; flex:1; }
.access-log-filter label span { color:#6b778c; font-size:12px; }
.access-log-filter input, .access-log-filter select {
  height:40px; padding:0 12px; border:1px solid #d5deea; border-radius:10px; background:#fff;
}
.access-log-list { display:flex; flex-direction:column; gap:10px; }
.access-log-item {
  padding:14px 16px; border:1px solid #e5ebf3; border-radius:14px; background:#fff;
  box-shadow:0 6px 18px rgba(28,61,103,.04);
}
.access-log-main { display:flex; flex-direction:column; gap:4px; }
.access-log-main strong { font-size:15px; color:#15233a; }
.access-log-meta { color:#6b778c; font-size:12px; line-height:1.5; }
.access-log-detail { color:#334155; font-size:13px; }
.access-log-ua {
  color:#94a3b8; font-size:11px; line-height:1.4; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap;
}
.cms-public-entry { max-width:560px; margin:42px auto; padding:28px 22px; background:rgba(255,255,255,.94); border:1px solid #e2e8f1; border-radius:22px; box-shadow:0 18px 50px rgba(33,68,112,.08); }
.cms-public-entry h1 { margin:12px 0 10px; font-size:28px; }
.cms-public-entry p { color:#6c778d; line-height:1.7; }
.cms-public-login { margin:22px 0 12px; display:flex; align-items:center; }
.cms-license-entry { font-weight:700; }
@media (max-width: 700px) {
  .cms-desktop-table { display:none; }
  .cms-card-list { display:grid; gap:12px; }
  .cms-card { padding:16px; border:1px solid #e2e8f1; border-radius:16px; background:#fff; }
  .cms-card-key { display:block; font-size:14px; word-break:break-all; user-select:all; }
  .cms-card-status { margin:8px 0; color:#0d4ed8; font-size:13px; font-weight:700; }
  .cms-card p { margin:4px 0; color:#68758a; font-size:12px; word-break:break-all; }
  .cms-issue-form { flex-direction:column; align-items:stretch; }
  .cms-issue-form input, .cms-issue-form .primary-btn { width:100%; }
  .cms-public-entry { margin:24px auto; padding:22px 16px; }
}

/* v1.2.20 府谷历史采购 */
.fugu-ph-page { max-width: 1560px; }
.fugu-ph-search { max-width: 1120px; margin-left: auto; margin-right: auto; }
.fugu-ph-criteria-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.fugu-ph-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.fugu-ph-actions .ghost-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid #d7e0ec;
  color: #4b5870; text-decoration: none; background: #fff; font-weight: 600;
}
.fugu-ph-results-head { max-width: none; }
.fugu-ph-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border: 1px solid #e5ebf4;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(28,61,103,.05);
  margin: 0 0 18px;
}
.fugu-ph-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
  line-height: 1.35;
}
.fugu-ph-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 38px;
  padding: 8px 10px;
  background: #f5f8fc;
  color: #66758c;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f2;
}
.fugu-ph-table tbody td {
  height: 40px;
  max-height: 44px;
  padding: 6px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
  color: #243247;
}
.fugu-ph-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fugu-ph-sort { color: inherit; text-decoration: none; }
.fugu-ph-sort:hover { color: #1769ff; }
.fugu-ph-inst { min-width: 190px; max-width: 220px; }
.fugu-ph-code { min-width: 180px; max-width: 220px; }
.fugu-ph-drug { min-width: 190px; max-width: 240px; }
.fugu-ph-package {
  min-width: 240px;
  max-width: 300px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.3;
}
.fugu-ph-time { min-width: 150px; white-space: nowrap; }
.fugu-ph-table td:nth-child(3),
.fugu-ph-table td:nth-child(11),
.fugu-ph-table td:nth-child(13),
.fugu-ph-table td:nth-child(14) {
  min-width: 170px;
  max-width: 220px;
}
.fugu-ph-table td:nth-child(6),
.fugu-ph-table td:nth-child(7),
.fugu-ph-table td:nth-child(8),
.fugu-ph-table td:nth-child(9),
.fugu-ph-table td:nth-child(12) {
  min-width: 88px;
  white-space: nowrap;
}
.fugu-ph-cards { display: none; gap: 10px; margin-bottom: 18px; }
.fugu-ph-card {
  background: #fff;
  border: 1px solid #e5ebf4;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(28,61,103,.04);
}
.fugu-ph-card-top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.fugu-ph-card-top h3 { flex: 1; margin: 0; font-size: 15px; line-height: 1.35; }
.fugu-ph-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1d5fd0;
  font-size: 11px;
  font-weight: 700;
}
.fugu-ph-card-inst { color: #4b5870; font-size: 13px; margin-bottom: 8px; }
.fugu-ph-card-pack { display: grid; gap: 2px; margin-bottom: 8px; }
.fugu-ph-card-pack span,
.fugu-ph-card-line span,
.fugu-ph-card-grid span,
.fugu-ph-card-meta span { color: #8590a3; font-size: 11px; }
.fugu-ph-card-pack strong {
  font-size: 12.5px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fugu-ph-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-bottom: 8px;
}
.fugu-ph-card-grid strong,
.fugu-ph-card-line strong,
.fugu-ph-card-meta strong { display: block; font-size: 13px; font-weight: 700; color: #1f2a3d; }
.fugu-ph-card-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  padding: 4px 0;
  border-top: 1px dashed #eef2f7;
}
.fugu-ph-card-line strong { text-align: right; }
.fugu-ph-card-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}
.fugu-ph-card-meta strong { font-size: 12px; font-weight: 600; word-break: break-all; }
@media (max-width: 1100px) {
  .fugu-ph-criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .fugu-ph-page { max-width: 100%; padding-left: 12px; padding-right: 12px; }
  .fugu-ph-criteria-grid { grid-template-columns: 1fr; }
  .fugu-ph-table-wrap { display: none; }
  .fugu-ph-cards { display: grid; }
  .fugu-ph-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fugu-ph-card-meta { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .fugu-ph-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* v1.2.34 榆林任务合同查询 */
.ytc-page { max-width: 1680px; }
.ytc-search { max-width: 1180px; margin-left: auto; margin-right: auto; }
.ytc-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
.ytc-page-size-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d8e0ec;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 14px;
  background: #fff;
}
.ytc-actions { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.ytc-actions .ghost-btn { min-height: 42px; padding: 0 18px; }
.ytc-results-head { max-width: none; }
.ytc-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  margin-bottom: 18px;
}
.ytc-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}
.ytc-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f5f8fc;
  color: #4b5870;
  font-weight: 700;
  text-align: left;
  padding: 10px 10px;
  height: 38px;
  border-bottom: 1px solid #e3e9f2;
  white-space: nowrap;
}
.ytc-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  max-height: 44px;
}
.ytc-table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ytc-project { min-width: 200px; max-width: 240px; }
.ytc-code { min-width: 140px; max-width: 160px; white-space: nowrap; }
.ytc-inst { min-width: 210px; max-width: 260px; }
.ytc-company { min-width: 190px; max-width: 230px; }
.ytc-ins-code { min-width: 200px; max-width: 230px; white-space: nowrap; }
.ytc-drug { min-width: 160px; max-width: 190px; }
.ytc-spec { min-width: 160px; max-width: 210px; }
.ytc-factor { min-width: 80px; max-width: 100px; }
.ytc-price { min-width: 85px; max-width: 105px; color: var(--sales-orange, #ff6b00); font-weight: 700; }
.ytc-qty { min-width: 120px; max-width: 150px; font-weight: 700; }
.ytc-table td:nth-child(1),
.ytc-table td:nth-child(3),
.ytc-table td:nth-child(4),
.ytc-table td:nth-child(5),
.ytc-table td:nth-child(6),
.ytc-table td:nth-child(8),
.ytc-table td:nth-child(9) {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.ytc-cards { display: none; gap: 11px; margin-bottom: 18px; }
.ytc-card {
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(31,65,108,.045);
  padding: 13px 14px;
}
.ytc-card-project {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef4ff;
  color: #3b6fd9;
  font-size: 11px;
  line-height: 1.35;
  word-break: break-word;
}
.ytc-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ytc-card-drug { flex: 1; min-width: 0; }
.ytc-card-drug h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.32; }
.ytc-card-ins span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 2px; }
.ytc-card-ins strong { display: block; font-size: 12px; font-weight: 600; color: #4b5870; word-break: break-all; }
.ytc-card-price { flex: 0 0 auto; text-align: right; }
.ytc-card-price span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 2px; }
.ytc-card-price strong { display: block; color: var(--sales-orange, #ff6b00); font-size: 17px; font-weight: 800; white-space: nowrap; }
.ytc-card-customer,
.ytc-card-code,
.ytc-card-company {
  padding: 7px 0;
}
.ytc-card-customer span,
.ytc-card-code span,
.ytc-card-company span,
.ytc-card-spec-grid span,
.ytc-card-qty span {
  display: block;
  color: #8590a3;
  font-size: 12px;
  margin-bottom: 2px;
}
.ytc-card-customer strong,
.ytc-card-code strong,
.ytc-card-company strong,
.ytc-card-spec-grid strong,
.ytc-card-qty strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #1f2a3d;
  line-height: 1.4;
  word-break: break-word;
}
.ytc-card-spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding: 7px 0;
}
.ytc-card-qty {
  padding: 8px 0 6px;
  border-top: 1px dashed #e8edf4;
  border-bottom: 1px dashed #e8edf4;
  margin: 2px 0 4px;
}
.ytc-card-qty strong { font-size: 16px; color: #1769ff; }
.ytc-card-company-combined { position: relative; }
.ytc-mini-tags {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  font-style: normal;
}
.ytc-mini-tags b {
  padding: 1px 5px;
  border-radius: 4px;
  background: #f0f4fa;
  color: #6e7b90;
  font-size: 10px;
  font-weight: 700;
}
@media (max-width: 980px) {
  .ytc-criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .ytc-page { max-width: 100%; padding-left: 14px; padding-right: 14px; }
  .ytc-criteria-grid { grid-template-columns: 1fr; }
  .ytc-table-wrap { display: none; }
  .ytc-cards { display: grid; }
}

/* v1.2.23 品种目录查询 · 紧凑结果卡（对齐挂网目录风格）
   v1.2.24 府谷/神木共体目录复用同一套 compact result card */
.catalog-results,
.community-results { display: grid; gap: 10px; }
.catalog-results-head,
.community-results-head { margin: 16px 0 8px; }
.catalog-results-head h2,
.community-results-head h2 { margin: 0 0 3px; font-size: 17px; }
.catalog-results-head p,
.community-results-head p { margin: 0; color: #6e7b90; font-size: 12.5px; line-height: 1.45; }
.catalog-results-head b,
.community-results-head b { color: #1769ff; font-weight: 700; }
.catalog-variety-card,
.community-card {
  border: 1px solid #e3e9f2;
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 6px 18px rgba(31,65,108,.045);
  overflow: hidden;
}
.catalog-variety-card .drug-card-head,
.community-card .drug-card-head {
  padding: 12px 14px;
  gap: 10px;
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
}
.catalog-card-main { min-width: 0; flex: 1; }
.catalog-card-main h3 {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.28;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.catalog-code-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.catalog-code-label {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #eef4ff;
  color: #3b6fd9;
  font-size: 9px;
  font-weight: 700;
}
.catalog-variety-card .drug-code {
  flex: 1;
  min-width: 0;
  color: #7d899e;
  font-size: 10.5px;
  line-height: 1.3;
  word-break: break-all;
}
.catalog-price {
  padding: 5px 9px 4px;
  border-radius: 9px;
  background: #fff5ef;
  text-align: right;
  line-height: 1.15;
}
.catalog-price span { display: block; font-size: 9px; color: #a8897c; }
.catalog-price strong { font-size: 17px; color: #e45b2a; line-height: 1.1; }
.catalog-price small { margin-left: 2px; font-size: 10px; color: #b08878; }
.catalog-body { padding: 6px 10px 8px; display: grid; gap: 4px; }
.catalog-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}
.catalog-cell,
.catalog-line {
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid #edf1f6;
  border-radius: 8px;
  background: #fcfdff;
}
.catalog-cell span,
.catalog-line span {
  display: block;
  margin: 0 0 1px;
  color: #939daf;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
}
.catalog-cell strong,
.catalog-line strong {
  display: block;
  color: #243247;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  word-break: break-word;
}
.catalog-line {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
}
.catalog-line span { margin: 0; white-space: nowrap; }
.catalog-line strong { font-size: 11.5px; }

@media (max-width: 600px) {
  .catalog-page .catalog-results-head,
  .community-page .community-results-head { margin: 12px 0 6px; }
  .catalog-page .catalog-results-head h2,
  .community-page .community-results-head h2 { font-size: 15px; margin-bottom: 2px; }
  .catalog-page .catalog-results-head p,
  .community-page .community-results-head p { font-size: 11.5px; line-height: 1.4; }
  .catalog-results,
  .community-results { gap: 8px; }
  .catalog-variety-card,
  .community-card { border-radius: 10px; }
  .catalog-variety-card .drug-card-head,
  .community-card .drug-card-head { padding: 10px 12px; gap: 8px; }
  .catalog-card-main h3 { font-size: 15px; margin-bottom: 2px; line-height: 1.3; }
  .catalog-code-label { font-size: 8.5px; padding: 0 5px; }
  .catalog-variety-card .drug-code,
  .community-card .drug-code { font-size: 10px; }
  .catalog-price { padding: 4px 7px 3px; border-radius: 8px; }
  .catalog-price span { font-size: 8px; }
  .catalog-price strong { font-size: 15px; }
  .catalog-price small { font-size: 9px; }
  .catalog-body { padding: 6px 8px 8px; gap: 4px; }
  .catalog-pair { gap: 4px; }
  .catalog-cell,
  .catalog-line { padding: 5px 8px; border-radius: 7px; }
  .catalog-cell span,
  .catalog-line span { font-size: 9px; }
  .catalog-cell strong { font-size: 12px; line-height: 1.35; font-weight: 600; }
  .catalog-line { gap: 6px; }
  .catalog-line strong { font-size: 12px; line-height: 1.35; font-weight: 600; }
}

/* v1.2.22 榆林配送查询 · 紧凑移动端 */
.delivery-page .delivery-hero { padding-top: 22px; padding-bottom: 14px; }
.delivery-page .delivery-hero h1 { margin-bottom: 6px; }
.delivery-page .delivery-hero p { margin: 0; line-height: 1.55; }
.delivery-page .delivery-search { padding: 12px 14px; }
.delivery-page .delivery-criteria-grid { gap: 10px; }
.delivery-page .delivery-search .criteria-field > span { margin: 0 0 4px 2px; font-size: 10.5px; }
.delivery-page .delivery-search .criteria-field input { height: 46px; border-radius: 11px; font-size: 13.5px; }
.delivery-page .delivery-search .query-btn { height: 46px; border-radius: 11px; }
.delivery-page .delivery-search .query-hint { padding-top: 7px; line-height: 1.45; font-size: 10.5px; }
.delivery-page .delivery-results-head { margin: 16px 0 8px; }
.delivery-page .delivery-results-head h2 { margin: 0 0 2px; font-size: 16px; }
.delivery-page .delivery-results-head p { font-size: 12px; line-height: 1.4; }
.delivery-page .delivery-results { gap: 8px; }
.delivery-page .delivery-card { border-radius: 14px; box-shadow: 0 6px 18px rgba(31,65,108,.045); }
.delivery-page .delivery-card .drug-card-head {
  padding: 10px 12px 8px;
  gap: 8px;
  align-items: flex-start;
  border-bottom: 1px solid #eef2f7;
}
.delivery-page .delivery-tips { margin-top: 14px; margin-bottom: 40px; gap: 10px; }

@media (max-width: 600px) {
  .delivery-page .query-back { padding-top: 8px; margin-bottom: -12px; }
  .delivery-page .delivery-hero { padding: 18px 0 10px; }
  .delivery-page .delivery-hero h1 { font-size: 26px; letter-spacing: -.02em; }
  .delivery-page .delivery-hero p { font-size: 12.5px; line-height: 1.5; }
  .delivery-page .hero-stat { display: none; }
  .delivery-page .delivery-search { padding: 10px; border-radius: 14px; }
  .delivery-page .delivery-criteria-grid { gap: 8px; }
  .delivery-page .delivery-search .criteria-field > span { margin-bottom: 3px; font-size: 10px; }
  .delivery-page .delivery-search .criteria-field input { height: 42px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
  .delivery-page .delivery-search .query-btn { height: 44px; font-size: 14px; }
  .delivery-page .delivery-search .query-hint { padding-top: 6px; font-size: 10px; line-height: 1.4; }
  .delivery-page .delivery-results-head { margin: 12px 0 6px; }
  .delivery-page .delivery-results-head h2 { font-size: 15px; }
  .delivery-page .delivery-results-head p { font-size: 11.5px; }
  .delivery-page .delivery-results { gap: 7px; }
  .delivery-page .delivery-card { border-radius: 12px; }
  .delivery-page .delivery-card .drug-card-head { padding: 8px 10px 7px; gap: 7px; }
  .delivery-page .delivery-card-main h3 { font-size: 14px; margin-bottom: 2px; }
  .delivery-page .delivery-code-row { gap: 5px; }
  .delivery-page .delivery-detail-item { padding: 6px 9px 7px; }
  .delivery-page .delivery-detail-item span { margin-bottom: 1px; }
  .delivery-page .delivery-card-foot { padding: 5px 9px 7px; }
  .delivery-page .pagination { margin: 16px 0 36px; }
  .delivery-page .delivery-tips { margin-bottom: 28px; }
}

/* v1.2.35 集采合同量完成进度 */
.cp-page { max-width: 1560px; }
.cp-source-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cp-source-card { border: 1px solid #e3e9f2; border-radius: 12px; padding: 14px; background: #fff; }
.cp-source-card.ok { border-color: #cfe0ff; }
.cp-source-card.empty { border-color: #f0d5d5; background: #fff8f8; }
.cp-source-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 8px; }
.cp-source-state { font-size: 12px; font-weight: 700; color: #1769ff; }
.cp-source-card.empty .cp-source-state { color: #c0392b; }
.cp-source-meta { display: grid; gap: 6px; }
.cp-source-meta span { display: block; color: #8590a3; font-size: 12px; }
.cp-source-meta b { font-size: 13px; word-break: break-all; }
.cp-catalog-note { margin-top: 10px; color: #6e7b90; font-size: 13px; }
.cp-source-usage { display: inline-block; margin: 0 0 8px; padding: 2px 8px; border-radius: 6px; background: #eef2f7; color: #5b6b82; font-size: 12px; font-weight: 600; }
.cp-source-usage.on { background: #e8f0ff; color: #1769ff; }
.cp-catalog-card.optional { border-color: #e3e9f2; background: #fff; }
.cp-catalog-card.optional .cp-source-state { color: #8590a3; }
.cp-catalog-switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; padding: 10px 12px; border: 1px solid #e3e9f2; border-radius: 10px; background: #f8fbff; }
.cp-catalog-switch-hint { margin: 0; flex: 1 1 220px; color: #6e7b90; font-size: 13px; line-height: 1.45; }
.cp-criteria-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.cp-stats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cp-stats > div { border: 1px solid #e3e9f2; border-radius: 10px; padding: 10px 12px; background: #f8fbff; }
.cp-stats span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 4px; }
.cp-stats b { font-size: 16px; color: #1f2a3d; }
.cp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cp-tabs.cp-tabs--locked { pointer-events: none; }
.cp-tab { border: 1px solid #d8e0ec; background: #fff; border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13px; }
.cp-tab.active { background: #1769ff; color: #fff; border-color: #1769ff; }
.cp-tab-panel { display: none; }
.cp-tab-panel.active { display: block; }
.cp-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #e3e9f2; border-radius: 12px; }
.cp-table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
.cp-table th { background: #f5f8fc; text-align: left; padding: 9px 10px; border-bottom: 1px solid #e3e9f2; white-space: nowrap; }
.cp-table td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.cp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-cards { display: none; gap: 10px; margin-bottom: 12px; }
.cp-card { border: 1px solid #e3e9f2; border-radius: 12px; padding: 12px 14px; background: #fff; }
.cp-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.cp-card-top h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.cp-card-project { display: inline-block; margin-bottom: 6px; padding: 2px 8px; border-radius: 6px; background: #eef4ff; color: #3b6fd9; font-size: 11px; }
.cp-card-sub { color: #6e7b90; font-size: 13px; margin: 6px 0 8px; }
.cp-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cp-card-grid span { display: block; color: #8590a3; font-size: 12px; }
.cp-card-grid strong { font-size: 13px; word-break: break-word; }
.cp-card-detail { color: #4b5870; font-size: 13px; line-height: 1.4; }
.cp-anomaly { border-color: #f3d2b8; }
.cp-task-toolbar { margin: 0 0 10px; }
.cp-task-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.cp-task-filter-label { color: #5b6b82; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cp-status-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-status-chip {
  border: 1px solid #d8e0ec; background: #fff; color: #3b4a63;
  border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; line-height: 1.4;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.cp-status-chip.active { background: #1769ff; color: #fff; border-color: #1769ff; }
.cp-filter-meta { color: #6e7b90; font-size: 12px; }
.cp-status-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: #eef2f7; color: #5b6b82; white-space: nowrap;
}
.cp-status--not-started { background: #eef1f5; color: #6b778a; }
.cp-status--in-progress { background: #e8f0ff; color: #1769ff; }
.cp-status--near { background: #fff3e6; color: #c46b00; }
.cp-status--done { background: #e7f7ee; color: #1a7f46; }
.cp-status--over { background: #d9f5e5; color: #0f6b3a; }
.cp-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; padding: 8px 2px; color: #5b6b82; font-size: 13px;
}
.cp-pager-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cp-pager-btn, .cp-pager-num {
  border: 1px solid #d8e0ec; background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; cursor: pointer; color: #3b4a63;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.cp-pager-num.active { background: #1769ff; color: #fff; border-color: #1769ff; }
.cp-pager-btn:disabled, .cp-pager-num:disabled { opacity: .45; cursor: not-allowed; }
.cp-pager-ellipsis { color: #99a3b5; padding: 0 2px; }
.cp-pager-size { display: inline-flex; align-items: center; gap: 6px; }
.cp-pager-size select {
  min-height: 32px; border: 1px solid #d8e0ec; border-radius: 8px; padding: 0 8px; background: #fff;
}
.cp-pager-mobile { display: none; font-variant-numeric: tabular-nums; }
.cp-rate { min-width: 92px; text-align: right; }
.cp-rate-bar { height: 6px; border-radius: 999px; background: #e8edf4; overflow: hidden; margin-bottom: 4px; }
.cp-rate-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1769ff, #ff6b00); }
.cp-rate strong { font-size: 13px; color: #ff6b00; }
.cp-modal { border: none; border-radius: 14px; padding: 0; max-width: 720px; width: calc(100vw - 24px); }
.cp-modal::backdrop { background: rgba(20, 30, 50, .45); }
.cp-modal-card { padding: 16px; }
.cp-modal-card header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cp-bind-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.cp-bind-form label { display: grid; gap: 4px; font-size: 13px; }
.cp-bind-form input { min-height: 40px; border: 1px solid #d8e0ec; border-radius: 8px; padding: 0 10px; }
.cp-bind-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; }
.cp-bind-item { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid #e3e9f2; border-radius: 10px; padding: 10px; }
@media (max-width: 1100px) {
  .cp-source-grid { grid-template-columns: 1fr; }
  .cp-criteria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .cp-page { padding-left: 14px; padding-right: 14px; }
  .cp-catalog-switch-row { flex-direction: column; align-items: flex-start; }
  .cp-catalog-switch-hint { flex-basis: auto; }
  .cp-criteria-grid { grid-template-columns: 1fr; }
  .cp-table-wrap { display: none; }
  .cp-cards { display: grid; }
  .cp-bind-form { grid-template-columns: 1fr; }
  .cp-pager { flex-direction: column; align-items: stretch; }
  .cp-pager-nav { justify-content: space-between; }
  .cp-pager-pages--desktop { display: none; }
  .cp-pager-mobile { display: inline-block; }
}

/* Historical sales compare */
.hsc-page { max-width: 1560px; }
.hsc-source-grid { grid-template-columns: minmax(0, 420px); }
.hsc-criteria-grid, .hsc-year-grid, .hsc-customer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hsc-suggest-wrap { position: relative; }
.hsc-suggest {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #d8e0ec; border-radius: 10px;
  box-shadow: 0 10px 28px rgba(31, 42, 61, .12); max-height: 260px; overflow: auto; padding: 6px;
  box-sizing: border-box; width: 100%; max-width: 100%;
}
/* 指定客户下拉：覆盖 .criteria-field input 的 width:100%/height:54px，避免复选框被撑满 */
.hsc-customer-suggest {
  max-height: 340px;
  overflow-x: hidden;
  overflow-y: auto;
}
.hsc-suggest-item {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #1f2a3d;
  box-sizing: border-box;
}
.hsc-suggest-item:hover { background: #f3f7ff; }
.hsc-suggest-item.hsc-check,
.hsc-customer-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  column-gap: 8px;
  align-items: start;
  min-height: 36px;
  padding: 8px 10px;
  line-height: 1.35;
}
.hsc-page .criteria-field .hsc-customer-suggest input[type="checkbox"],
.hsc-customer-suggest input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  max-width: 16px;
  margin: 2px 0 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  flex-shrink: 0;
  justify-self: start;
  align-self: start;
  accent-color: #1769ff;
  cursor: pointer;
}
.hsc-customer-name {
  min-width: 0;
  text-align: left;
  line-height: 1.35;
  color: #1f2a3d;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.hsc-customer-count {
  justify-self: end;
  align-self: start;
  white-space: nowrap;
  color: #8b98ab;
  font-size: 12px;
  line-height: 1.3;
  padding-top: 1px;
}
.hsc-suggest-actions { padding: 4px 6px 8px; border-bottom: 1px solid #eef2f7; margin-bottom: 4px; }
.hsc-mode-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 14px 0 10px; }
.hsc-mode-label { font-size: 13px; color: #5b6b82; font-weight: 600; }
.hsc-radio { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: #1f2a3d; }
.hsc-month-block { margin-top: 8px; }
.hsc-month-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.hsc-month-shortcuts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.hsc-month-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hsc-month-chip {
  border: 1px solid #d8e0ec; background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer; color: #3b4a63;
}
.hsc-month-chip.active, .hsc-month-chip[aria-pressed="true"] {
  background: #1769ff; border-color: #1769ff; color: #fff;
}
.hsc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; align-items: center; }
.hsc-selected-customers { margin-top: 10px; }
.hsc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hsc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; background: #eef4ff; color: #1769ff; font-size: 12px;
}
.hsc-chip button { border: 0; background: transparent; color: #5b6b82; cursor: pointer; font-size: 14px; }
.hsc-stats, .hsc-stats-2 {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px;
}
.hsc-stats > div, .hsc-stats-2 > div {
  border: 1px solid #e3e9f2; border-radius: 10px; padding: 10px 12px; background: #f8fbff;
}
.hsc-stats span, .hsc-stats-2 span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 4px; }
.hsc-stats b, .hsc-stats-2 b { font-size: 16px; color: #1f2a3d; }
.hsc-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.hsc-filter-chip {
  border: 1px solid #d8e0ec; background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
}
.hsc-filter-chip.active { background: #1769ff; color: #fff; border-color: #1769ff; }
.hsc-tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.hsc-chg-new { background: #e8f1ff; color: #1769ff; }
.hsc-chg-lost { background: #fce8e6; color: #c0392b; }
.hsc-chg-up { background: #e8f7ee; color: #1a7f46; }
.hsc-chg-down { background: #fdecec; color: #c0392b; }
.hsc-chg-flat { background: #f0f2f5; color: #5b6b82; }
.hsc-pos { color: #1a7f46; }
.hsc-neg { color: #c0392b; }
.hsc-pager {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end;
  margin-top: 12px; color: #5b6b82; font-size: 13px;
}
.hsc-chart-wrap { overflow-x: auto; margin-bottom: 14px; border: 1px solid #e3e9f2; border-radius: 12px; padding: 10px; background: #fff; }
.hsc-chart { width: 100%; min-width: 480px; height: auto; display: block; }
.hsc-chart-label { font-size: 11px; fill: #8590a3; }
.hsc-chart-legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: #5b6b82; margin-top: 6px; }
.hsc-leg-base, .hsc-leg-cmp { display: inline-block; width: 14px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.hsc-leg-base { background: #1769ff; }
.hsc-leg-cmp { background: #2e9b5a; }
.hsc-cards { display: none; gap: 10px; }
.hsc-card { border: 1px solid #e3e9f2; border-radius: 12px; padding: 12px 14px; background: #fff; }
.hsc-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.hsc-card-top h3 { margin: 0; font-size: 15px; line-height: 1.35; }
.hsc-card-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.hsc-card-metrics span { display: block; color: #8590a3; font-size: 12px; }
.hsc-card-detail { margin-top: 8px; color: #5b6b82; font-size: 13px; line-height: 1.6; }
.hsc-link-btn {
  background: none; border: none; color: #1769ff; cursor: pointer; padding: 0;
  font: inherit; text-align: left; text-decoration: underline;
}
.hsc-link-btn.hsc-neg { color: #c0392b; }
.hsc-link-btn.hsc-pos { color: #2e9b5a; }
.hsc-row-down td:first-child { box-shadow: inset 3px 0 0 #e07474; }
.hsc-drill {
  margin-top: 16px; padding: 14px; border: 1px solid #e4ebf5; border-radius: 12px; background: #f8fbff;
}
.hsc-drill-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.hsc-drill-head h3 { margin: 0 0 4px; font-size: 16px; color: #1f2a3d; }
.hsc-evidence { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e4ebf5; }
.hsc-chg-special { background: #f5f0e6; color: #8a6d3b; }
.hsc-pos { color: #2e9b5a; }
.hsc-neg { color: #c0392b; }
@media (max-width: 1100px) {
  .hsc-stats, .hsc-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .hsc-criteria-grid, .hsc-year-grid, .hsc-customer-grid { grid-template-columns: 1fr; }
  .hsc-page .cp-table-wrap { display: none; }
  .hsc-cards { display: grid; }
  .hsc-stats, .hsc-stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hsc-drill .cp-table-wrap { display: block; overflow-x: auto; }
  .hsc-customer-suggest {
    max-width: min(100vw - 32px, 100%);
    left: 0;
    right: auto;
  }
  .hsc-customer-option {
    grid-template-columns: 18px minmax(0, 1fr) auto;
    min-height: 40px;
  }
}

/* 客户备货数量分析 */
.csa-page { max-width: 1560px; }
.csa-cutoff {
  margin-top: 10px; padding: 10px 12px; background: #f3f7fc; border-radius: 10px;
  color: #1f2a3d; font-size: 14px;
}
.csa-cutoff .muted { margin-left: 8px; color: #8590a3; font-size: 12px; }
.csa-param-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.csa-param-block {
  background: #f7f9fc; border: 1px solid #e4ebf5; border-radius: 12px; padding: 12px;
}
.csa-param-label { display: block; font-weight: 600; color: #1f2a3d; margin-bottom: 8px; }
.csa-chip-row, .csa-toolbar .csa-chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.csa-chip, .csa-filter-chip {
  border: 1px solid #c9d6e8; background: #fff; color: #3d4f6a; border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.csa-chip.active, .csa-filter-chip.active {
  background: #1769ff; border-color: #1769ff; color: #fff;
}
.csa-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.csa-summary-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0;
}
.csa-summary-card {
  background: #f5f8fc; border: 1px solid #e4ebf5; border-radius: 12px; padding: 12px 14px;
}
.csa-summary-card span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 4px; }
.csa-summary-card strong { font-size: 20px; color: #1f2a3d; font-variant-numeric: tabular-nums; }
.csa-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px;
}
.csa-search {
  flex: 1 1 180px; min-width: 160px; border: 1px solid #c9d6e8; border-radius: 8px;
  padding: 8px 10px; font-size: 14px;
}
.csa-page-size { display: inline-flex; align-items: center; gap: 6px; color: #5b6b82; font-size: 13px; }
.csa-page-size select { border: 1px solid #c9d6e8; border-radius: 8px; padding: 6px 8px; }
.csa-table-wrap { overflow-x: auto; border: 1px solid #e4ebf5; border-radius: 12px; background: #fff; }
.csa-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.csa-table th, .csa-table td {
  padding: 8px 10px; border-bottom: 1px solid #edf1f7; text-align: left; vertical-align: top;
  white-space: nowrap;
}
.csa-table th { background: #1f4e79; color: #fff; cursor: pointer; position: sticky; top: 0; }
.csa-table tr.csa-row-in td { background: #e8f4ec; }
.csa-status {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  background: #eef2f7; color: #3d4f6a;
}
.csa-status--likely { background: #e8f1ff; color: #1769ff; }
.csa-status--overdue { background: #fdecec; color: #c0392b; }
.csa-status--low { background: #f5f0e6; color: #8a6d3b; }
.csa-status--ok { background: #eef2f7; color: #3d4f6a; }
.csa-pager {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  margin-top: 10px; color: #5b6b82; font-size: 13px;
}
.csa-evidence { margin-top: 16px; padding-top: 12px; border-top: 1px solid #e4ebf5; }
.csa-ev-table td { white-space: normal; max-width: 160px; }
@media (max-width: 1100px) {
  .csa-param-grid { grid-template-columns: 1fr; }
  .csa-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .csa-summary-grid { grid-template-columns: 1fr 1fr; }
  .csa-table th, .csa-table td { font-size: 12px; padding: 6px 8px; }
}

/* ========== 品种争取机会分析 (POA) ========== */
.poa-page { max-width: 1560px; }
.poa-source-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.poa-note { margin-top: 10px; font-size: 12px; }
.poa-criteria-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.poa-mobile-hint { margin-top: 10px; }
.poa-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.poa-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 14px;
}
.poa-summary-card {
  background: #fff; border: 1px solid #e3e9f2; border-radius: 12px; padding: 12px 14px;
}
.poa-summary-card span { display: block; color: #8590a3; font-size: 12px; margin-bottom: 4px; }
.poa-summary-card strong { font-size: 18px; color: #1f2a3d; font-variant-numeric: tabular-nums; }
.poa-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px;
}
.poa-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.poa-filter-chip {
  border: 1px solid #d8e0ec; background: #fff; border-radius: 999px; padding: 6px 12px;
  cursor: pointer; font-size: 13px;
}
.poa-filter-chip.active { background: #1769ff; color: #fff; border-color: #1769ff; }
.poa-search {
  flex: 1; min-width: 160px; border: 1px solid #c9d6e8; border-radius: 8px; padding: 8px 10px;
}
.poa-page-size { display: inline-flex; align-items: center; gap: 6px; color: #5b6b82; font-size: 13px; }
.poa-page-size select { border: 1px solid #c9d6e8; border-radius: 8px; padding: 6px 8px; }
.poa-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e4ebf5; border-radius: 12px; background: #fff; }
.poa-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 920px; }
.poa-main-table { min-width: 1080px; }
.poa-desktop-list { display: block; }
.poa-mobile-list { display: none; }
.poa-card {
  border: 1px solid #e4ebf5; border-radius: 12px; background: #fff; padding: 12px;
  display: flex; flex-direction: column; gap: 8px; min-width: 0;
}
.poa-card-gap { background: #fff8f0; }
.poa-card-title { font-size: 15px; font-weight: 600; color: #1f2a3d; line-height: 1.35; word-break: break-word; }
.poa-card-meta { font-size: 12px; color: #5b6b82; line-height: 1.4; word-break: break-word; }
.poa-card-stats {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px;
  font-size: 12px; color: #334155;
}
.poa-card-stats span { min-width: 0; word-break: break-word; }
.poa-card-tags { min-width: 0; }
.poa-card-actions { display: flex; justify-content: flex-end; }
.poa-card-expand { margin-top: 4px; min-width: 0; }
.poa-table th, .poa-table td {
  padding: 8px 10px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top;
}
.poa-table th { background: #1f4e79; color: #fff; cursor: pointer; white-space: nowrap; }
.poa-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.poa-row-gap td { background: #fff8f0; }
.poa-expand-row td { background: #f8fafc; }
.poa-expand-body { padding: 10px 8px 14px; background: #f8fafc; min-width: 0; }
.poa-detail-table { min-width: 720px; }
.poa-detail-table th { background: #f5f8fc; color: #1f2a3d; cursor: default; }
.poa-status-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.poa-status-chip {
  display: inline-block; font-size: 11px; line-height: 1.3; padding: 2px 7px;
  border-radius: 999px; background: #eef4ff; color: #2b4d8f; border: 1px solid #d5e2f7;
  white-space: nowrap;
}
.poa-muted-note { margin-top: 2px; font-size: 11px; color: #8590a3; font-weight: 400; text-align: right; }
.poa-opp-sections { display: grid; gap: 12px; }
.poa-opp-section {
  border: 1px solid #e4ebf5; border-radius: 10px; background: #fff; padding: 8px 10px 10px;
}
.poa-opp-h {
  margin: 0 0 8px; font-size: 13px; color: #1f2a3d; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.poa-opp-count {
  font-size: 12px; font-weight: 500; color: #5b6b82; background: #f0f4f9;
  border-radius: 999px; padding: 1px 8px;
}
.poa-section-empty { margin: 4px 0 2px; font-size: 12px; }
.poa-evidence-panel {
  margin-top: 12px; padding: 10px 12px; border: 1px solid #d9e4f2;
  border-radius: 10px; background: #fff;
}
.poa-evidence-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px;
}
.poa-evidence-head strong { font-size: 13px; color: #1f2a3d; }
.poa-evidence-btn.active { color: #1769ff; border-color: #1769ff; }
.poa-diagnosis-wrap { margin-top: 10px; }
.poa-diag-link {
  background: none; border: none; padding: 0; color: #5b6b82; font-size: 12px;
  text-decoration: underline; cursor: pointer;
}
.poa-diag-link:hover { color: #1769ff; }
.poa-diagnosis-body { margin-top: 8px; }
.poa-diagnosis {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  background: #f7faff;
}
.poa-diagnosis h4 { margin: 0 0 6px; font-size: 14px; color: #1f2a3d; }
.poa-diagnosis p { margin: 4px 0; font-size: 12px; color: #4b5b70; }
.poa-diagnosis code { font-size: 11px; word-break: break-all; }
.poa-pager {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: flex-end;
  margin-top: 12px; color: #5b6b82; font-size: 13px;
}
@media (max-width: 1100px) {
  .poa-source-grid, .poa-criteria-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .poa-source-grid, .poa-criteria-grid, .poa-summary-grid { grid-template-columns: 1fr; }
  .poa-desktop-list { display: none; }
  .poa-mobile-list { display: flex; flex-direction: column; gap: 10px; }
  .poa-page { overflow-x: hidden; }
  .poa-table, .poa-main-table, .poa-detail-table { min-width: 0; }
  .poa-table th, .poa-table td { font-size: 12px; padding: 6px 8px; }
  .poa-page .hero p { font-size: 13px; }
  .poa-opp-h { font-size: 12px; margin-bottom: 6px; }
  .poa-expand-body { padding: 8px 4px 10px; }
  .poa-opp-section { padding: 6px 8px 8px; overflow-x: auto; max-width: 100%; }
  .poa-card-stats { grid-template-columns: 1fr; }
  .poa-detail-table thead { display: none; }
  .poa-detail-table, .poa-detail-table tbody, .poa-detail-table tr, .poa-detail-table td {
    display: block; width: 100%;
  }
  .poa-detail-table tr {
    border: 1px solid #e4ebf5; border-radius: 8px; padding: 8px; margin-bottom: 8px; background: #fff;
  }
  .poa-detail-table td {
    border: 0; padding: 3px 0; text-align: left !important; white-space: normal;
  }
  .poa-detail-table td::before {
    content: attr(data-label);
    display: block; font-size: 11px; color: #8590a3; margin-bottom: 1px;
  }
}

/* ========== Workbench shell (sidebar + tabs + iframe panes) ========== */
body.wb-shell {
  margin: 0;
  min-height: 100vh;
  background: #eef2f7;
  overflow: hidden;
}
.wb-app {
  --wb-sidebar: 248px;
  --wb-sidebar-collapsed: 72px;
  --wb-header: 52px;
  --wb-tabs: 42px;
  --wb-ink: #1a2740;
  --wb-muted: #6b7a92;
  --wb-line: #e2e8f2;
  --wb-blue: #1769ff;
  --wb-side-bg: #0f1c33;
  display: grid;
  grid-template-columns: var(--wb-sidebar) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  width: 100%;
}
.wb-app.wb-collapsed { grid-template-columns: var(--wb-sidebar-collapsed) minmax(0, 1fr); }
.wb-sidebar {
  background: linear-gradient(180deg, #12233f 0%, #0d182c 100%);
  color: #d7e0ef;
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 40;
  border-right: 1px solid rgba(255,255,255,.06);
}
.wb-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08);
  min-height: var(--wb-header);
  width: 100%; border: 0; border-bottom: 1px solid rgba(255,255,255,.08);
  background: transparent; color: inherit; cursor: pointer; text-align: left;
}
.wb-brand:hover { background: rgba(255,255,255,.04); }
.wb-brand:focus-visible { outline: 2px solid rgba(23,105,255,.55); outline-offset: -2px; }
.wb-brand-mark {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 10px;
  background: linear-gradient(145deg, #287cff, #1056eb); color: #fff; font-weight: 800;
  box-shadow: 0 8px 18px rgba(23,105,255,.28);
}
.wb-brand-text strong { display: block; font-size: 15px; color: #fff; letter-spacing: .02em; }
.wb-brand-text small { display: block; margin-top: 2px; font-size: 11px; color: #8fa0bb; }
.wb-nav { flex: 1; overflow: auto; padding: 12px 10px 16px; }
.wb-nav-home {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: #c5d0e2; cursor: pointer;
  padding: 10px 12px; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 650;
  margin-bottom: 8px;
}
.wb-nav-home:hover { background: rgba(255,255,255,.06); color: #e8eef8; }
.wb-nav-home.is-active {
  background: linear-gradient(90deg, rgba(23,105,255,.95), rgba(23,105,255,.78));
  color: #fff; box-shadow: 0 8px 18px rgba(23,105,255,.25);
}
.wb-nav-home-ico { font-size: 14px; }
.wb-nav-group { margin-bottom: 8px; }
.wb-nav-group-toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: #c5d0e2; cursor: pointer;
  padding: 10px 10px; border-radius: 10px; text-align: left; font-size: 13px; font-weight: 600;
}
.wb-nav-group-toggle:hover { background: rgba(255,255,255,.06); }
.wb-nav-group-ico {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(23,105,255,.22); color: #9ec0ff; font-size: 12px; font-weight: 700; flex: 0 0 auto;
}
.wb-nav-group-ico.batch { background: rgba(46,155,90,.2); color: #8fe0b0; }
.wb-nav-group-label { flex: 1; min-width: 0; }
.wb-nav-chevron { opacity: .7; font-size: 12px; transition: transform .18s; }
.wb-nav-group:not(.is-open) .wb-nav-chevron { transform: rotate(-90deg); }
.wb-nav-children { display: none; padding: 4px 0 6px 2px; }
.wb-nav-group.is-open .wb-nav-children { display: grid; gap: 2px; }
.wb-nav-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  border: 0; background: transparent; color: #a9b6cb; cursor: pointer;
  padding: 9px 10px 9px 12px; border-radius: 10px; text-align: left; font-size: 13px;
}
.wb-nav-item:hover { background: rgba(255,255,255,.06); color: #e8eef8; }
.wb-nav-item.is-active {
  background: linear-gradient(90deg, rgba(23,105,255,.95), rgba(23,105,255,.78));
  color: #fff; box-shadow: 0 8px 18px rgba(23,105,255,.25);
}
.wb-nav-ico {
  width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); font-size: 11px; font-weight: 700; flex: 0 0 auto;
}
.wb-nav-item.is-active .wb-nav-ico { background: rgba(255,255,255,.2); }
.wb-nav-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-sidebar-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.08);
}
.wb-collapse-btn {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: #c9d4e6; cursor: pointer;
}
.wb-ver { font-size: 11px; color: #7f8da3; }
.wb-app.wb-collapsed .wb-brand-text,
.wb-app.wb-collapsed .wb-nav-group-label,
.wb-app.wb-collapsed .wb-nav-label,
.wb-app.wb-collapsed .wb-nav-chevron,
.wb-app.wb-collapsed .wb-ver { display: none; }
.wb-app.wb-collapsed .wb-nav-item,
.wb-app.wb-collapsed .wb-nav-home,
.wb-app.wb-collapsed .wb-nav-group-toggle { justify-content: center; padding-left: 8px; padding-right: 8px; }
.wb-app.wb-collapsed .wb-nav-children { display: grid !important; }
.wb-app.wb-collapsed .wb-nav-group-toggle { display: none; }

.wb-main { min-width: 0; display: flex; flex-direction: column; background: #f3f6fb; }
.wb-header {
  height: var(--wb-header); flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: #fff; border-bottom: 1px solid var(--wb-line);
}
.wb-header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wb-menu-btn {
  display: none; width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--wb-line); background: #fff; cursor: pointer; font-size: 18px;
}
.wb-breadcrumb {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 13px; color: var(--wb-muted); min-width: 0;
}
.wb-breadcrumb strong { color: var(--wb-ink); font-weight: 650; }
.wb-bc-sep { opacity: .45; }
.wb-bc-home {
  border: 0; background: transparent; padding: 0; margin: 0;
  color: var(--wb-muted); cursor: pointer; font: inherit;
}
.wb-bc-home:hover { color: var(--wb-blue); }
.wb-tab.is-pinned { padding-right: 10px; }
.wb-tab-home-ico { margin-right: 4px; opacity: .8; }
.wb-header-search { flex: 1; max-width: 360px; }
.wb-header-search input {
  width: 100%; height: 36px; border: 1px solid var(--wb-line); border-radius: 10px;
  padding: 0 12px; background: #f7f9fc; outline: none; font-size: 13px;
}
.wb-header-search input:focus { border-color: #9cbcff; background: #fff; box-shadow: 0 0 0 3px rgba(23,105,255,.08); }
.wb-header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wb-top-link {
  padding: 7px 11px; border: 1px solid var(--wb-line); border-radius: 9px;
  background: #fff; color: #4a5870; font-size: 12.5px;
}
.wb-top-link:hover { border-color: #b9cff7; color: var(--wb-blue); }

.wb-tabs-bar {
  height: var(--wb-tabs); flex: 0 0 auto;
  display: flex; align-items: stretch; gap: 0;
  background: #f7f9fc; border-bottom: 1px solid var(--wb-line); padding: 0 8px 0 10px;
}
.wb-tabs {
  flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 4px;
  overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; padding-top: 6px;
}
.wb-tab {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 2px;
  max-width: 220px; height: 32px; padding: 0 4px 0 10px;
  border: 1px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0;
  background: transparent; color: #5b6b82;
}
.wb-tab.is-active {
  background: #fff; border-color: var(--wb-line); color: var(--wb-blue);
  box-shadow: 0 -1px 0 #fff inset;
}
.wb-tab-label {
  border: 0; background: transparent; cursor: pointer; color: inherit;
  font-size: 12.5px; font-weight: 600; max-width: 170px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0; height: 100%;
}
.wb-tab-close {
  width: 22px; height: 22px; border: 0; border-radius: 6px; background: transparent;
  color: #8a97ab; cursor: pointer; font-size: 16px; line-height: 1;
}
.wb-tab-close:hover { background: #eef2f7; color: #c0392b; }
.wb-tabs-actions { position: relative; display: flex; align-items: center; padding-left: 4px; }
.wb-tabs-more {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--wb-line);
  background: #fff; cursor: pointer; color: #5b6b82;
}
.wb-tabs-menu {
  position: absolute; right: 0; top: calc(100% + 4px); z-index: 30;
  min-width: 132px; padding: 6px; border: 1px solid var(--wb-line); border-radius: 10px;
  background: #fff; box-shadow: 0 12px 28px rgba(20,40,70,.12);
}
.wb-tabs-menu button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; color: #30415c;
}
.wb-tabs-menu button:hover { background: #f3f7ff; color: var(--wb-blue); }

.wb-content { flex: 1; min-height: 0; position: relative; background: #eef2f7; }
.wb-panes { position: absolute; inset: 0; }
.wb-panes:not(.has-panes) { display: none; }
.wb-pane { position: absolute; inset: 0; background: #eef2f7; }
.wb-pane[hidden] { display: none !important; }
.wb-frame {
  width: 100%; height: 100%; border: 0; background: #eef2f7; display: block;
}

.wb-welcome {
  height: 100%; overflow: auto; padding: 20px 24px 32px;
}
.wb-welcome .site-declaration { margin-top: 0; margin-bottom: 16px; }
.wb-welcome .wb-home-hero {
  padding: 8px 0 18px;
  display: block;
}
.wb-welcome .wb-home-hero h1 {
  margin: 10px 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -.03em;
  color: var(--wb-ink);
}
.wb-welcome .wb-home-hero p {
  margin: 0;
  color: var(--wb-muted);
  font-size: 14px;
  line-height: 1.6;
}
.wb-welcome-section { margin-top: 18px; }
.wb-welcome-section h3 { margin: 0 0 10px; font-size: 14px; color: #3d4f6a; }
.wb-welcome-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.wb-welcome-card {
  display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto;
  column-gap: 10px; row-gap: 2px; text-align: left;
  border: 1px solid #e3eaf4; background: #fff; border-radius: 14px; padding: 14px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(25,45,80,.04); transition: .18s;
}
.wb-welcome-card:hover { border-color: #b9cff7; transform: translateY(-1px); box-shadow: 0 12px 24px rgba(23,105,255,.08); }
.wb-welcome-ico {
  grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; background: #eef5ff; color: var(--wb-blue); font-weight: 700;
}
.wb-welcome-card strong { font-size: 14px; color: var(--wb-ink); }
.wb-welcome-card span:last-child { font-size: 12px; color: #7a879c; line-height: 1.45; }
.wb-home-footer {
  margin-top: 28px;
  padding: 14px 4px 4px;
  color: #8a97ab;
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
  background: transparent;
  border: 0;
}
.wb-home-footer a { color: #5b6b82; text-decoration: underline; text-underline-offset: 2px; }
.wb-home-footer a:hover { color: var(--wb-blue); }
.wb-backdrop { display: none; }

/* Embed mode: module pages inside iframes */
html.wb-embed-html, body.wb-embed {
  background: #f5f7fb !important;
  min-height: 100%;
  overflow-x: hidden;
}
body.wb-embed .site-header,
body.wb-embed .query-back,
body.wb-embed .listing-query-back,
body.wb-embed .sales-query-back,
body.wb-embed > .footer,
body.wb-embed .footer:not(.keep-embed-footer) {
  display: none !important;
}
body.wb-embed .container,
body.wb-embed .spa-page,
body.wb-embed .hsc-page,
body.wb-embed .csa-page,
body.wb-embed .poa-page,
body.wb-embed .cp-page,
body.wb-embed .delivery-page,
body.wb-embed .catalog-page,
body.wb-embed .community-page {
  max-width: none;
  padding-left: 16px;
  padding-right: 16px;
}
body.wb-embed .hero { padding-top: 22px; padding-bottom: 16px; }
body.wb-embed .hero h1 { font-size: clamp(22px, 3vw, 32px); }

@media (max-width: 960px) {
  .wb-app {
    grid-template-columns: 1fr;
  }
  .wb-sidebar {
    position: fixed; inset: 0 auto 0 0; width: min(86vw, 300px);
    transform: translateX(-105%); transition: transform .22s ease; box-shadow: none;
  }
  .wb-app.wb-drawer-open .wb-sidebar { transform: translateX(0); box-shadow: 12px 0 40px rgba(8,18,36,.28); }
  .wb-menu-btn { display: inline-grid; place-items: center; }
  .wb-backdrop {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(12, 20, 36, .42);
  }
  .wb-backdrop[hidden] { display: none !important; }
  .wb-header-search { display: none; }
  .wb-collapse-btn { display: none; }
  .wb-welcome { padding: 14px 14px 28px; }
  .wb-welcome .site-declaration { margin-bottom: 12px; }
  .wb-welcome-grid { grid-template-columns: 1fr; }
  .wb-home-footer { font-size: 11.5px; padding-top: 12px; }
  .wb-tab { max-width: 160px; }
  .wb-tab-label { max-width: 110px; }
  body.wb-embed .container,
  body.wb-embed .spa-page,
  body.wb-embed .hsc-page,
  body.wb-embed .csa-page,
  body.wb-embed .poa-page,
  body.wb-embed .cp-page {
    padding-left: 12px;
    padding-right: 12px;
  }
  body.wb-embed .hero { flex-direction: column; align-items: flex-start; }
  body.wb-embed .criteria-grid { grid-template-columns: 1fr; }
}

/* Collapsible dataset / data-source panels */
.dq-dataset-fold {
  padding: 0;
  overflow: hidden;
  margin: 12px 0 14px;
}
.dq-dataset-summary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  background: linear-gradient(180deg, #fbfcff, #f5f8fc);
  cursor: pointer;
  text-align: left;
  color: #1f2a3d;
}
.dq-dataset-summary:hover { background: #f3f7ff; }
.dq-dataset-summary-left {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}
.dq-dataset-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a2740;
}
.dq-dataset-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.dq-dataset-pill.ok { background: #e8f1ff; color: #1769ff; }
.dq-dataset-pill.bad { background: #fdecec; color: #c0392b; }
.dq-dataset-summary-detail {
  color: #5b6b82;
  font-size: 12.5px;
  line-height: 1.4;
  min-width: 0;
}
.dq-dataset-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d8e0ec;
  border-radius: 9px;
  background: #fff;
  color: #1769ff;
  font-size: 12.5px;
  font-weight: 650;
  min-height: 34px;
}
.dq-dataset-chevron { font-size: 12px; line-height: 1; }
.dq-dataset-body {
  border-top: 1px solid #e8edf5;
  padding: 12px 14px 14px;
  background: #fff;
}
.dq-dataset-fold.is-collapsed { box-shadow: none; }
.dq-dataset-fold .spa-dataset { margin: 0; border: 0; box-shadow: none; padding: 0; background: transparent; }
.dq-dataset-fold .spa-dataset-title { display: none; }
.dq-dataset-fold .panel-title { margin-bottom: 10px; }
.dq-dataset-fold .cp-source-grid { margin-top: 0; }
@media (max-width: 760px) {
  .dq-dataset-summary { align-items: flex-start; padding: 11px 12px; }
  .dq-dataset-summary-detail { width: 100%; }
  .dq-dataset-toggle { margin-top: 2px; }
}

/* ========== v1.2.75 visual refresh: presentation only ========== */
:root {
  --blue: #2563eb;
  --blue-dark: #1746b3;
  --blue-soft: #edf4ff;
  --ink: #14213a;
  --muted: #63718a;
  --line: #dfe7f2;
  --panel: rgba(255,255,255,.97);
  --shadow: 0 18px 46px rgba(18, 45, 84, .09);
}

html { background: #f3f6fb; }
body {
  color: var(--ink);
  background: #f3f6fb;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.page-bg {
  background:
    radial-gradient(circle at 7% 0%, rgba(37,99,235,.10), transparent 30%),
    radial-gradient(circle at 94% 4%, rgba(14,165,164,.075), transparent 26%),
    linear-gradient(180deg,#f8fbff 0%,#f3f6fb 48%,#eef3f9 100%);
}
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(37,99,235,.25);
  outline-offset: 2px;
}

/* Core query surfaces */
.site-header {
  height: 68px;
  background: rgba(255,255,255,.90);
  border-bottom-color: rgba(205,216,232,.8);
  box-shadow: 0 1px 0 rgba(15,35,65,.02);
}
.brand-mark {
  border-radius: 11px;
  background: linear-gradient(145deg,#3478f6 0%,#1d55ce 100%);
  box-shadow: 0 7px 18px rgba(37,99,235,.25);
}
.brand small { font-size: 11px; color: #728099; }
.container { max-width: 1260px; }
.hero { padding: 38px 0 22px; }
.hero h1,.admin-title h1 { letter-spacing: -.035em; }
.hero p,.admin-title p { color: #63718a; line-height: 1.7; }
.eyebrow {
  padding: 5px 9px;
  border: 1px solid #d8e7ff;
  border-radius: 999px;
  background: #f1f6ff;
  font-size: 12px;
  letter-spacing: .075em;
}
.hero-stat,.admin-stat {
  border-color: #dbe5f1;
  background: rgba(255,255,255,.9);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(25,55,95,.07);
}
.search-panel,.panel,.spa-panel,.dq-dataset-fold {
  border-color: #dbe4f0;
  background: rgba(255,255,255,.97);
  border-radius: 16px;
  box-shadow: 0 12px 34px rgba(18,45,84,.07);
}
.search-panel { padding: 18px; }
.criteria-grid { gap: 12px; }
.criteria-field > span,.login-form label { color: #4c5c74; font-size: 14px; }
.criteria-field input,.criteria-field select,.login-form input,
.spa-modal input,.spa-modal select,.hsc-search,.csa-search,.poa-search {
  min-height: 48px;
  border-color: #cfd9e7;
  border-radius: 10px;
  background-color: #fff;
  color: #14213a;
  font-size: 15px;
}
.criteria-field input:hover,.criteria-field select:hover,.login-form input:hover { border-color: #9fb4cf; }
.criteria-field input:focus,.criteria-field select:focus,.login-form input:focus {
  border-color: #4f82ee;
  box-shadow: 0 0 0 4px rgba(37,99,235,.11);
}
.query-hint,.muted,.panel-title p,.field-note { color: #6e7d94; font-size: 13px; }
.primary-btn {
  min-height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg,#3478f6,#2058cf);
  box-shadow: 0 8px 18px rgba(37,99,235,.21);
  font-size: 15px;
}
.primary-btn:hover { box-shadow: 0 11px 24px rgba(37,99,235,.28); }
.primary-btn:active { transform: translateY(0); box-shadow: 0 5px 13px rgba(37,99,235,.2); }
.ghost-btn,.admin-entry,.wb-top-link {
  border-color: #d5dfec;
  background: #fff;
  color: #40516b;
}
.results-head { margin-top: 24px; }
.results-head h2 { font-size: 20px; }
.results-head p,.page-indicator { font-size: 14px; }
.drug-card {
  border-color: #dce5f0;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(18,45,84,.055);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.drug-card:hover { border-color: #bfd1e7; box-shadow: 0 12px 30px rgba(18,45,84,.085); }
.drug-card-head { background: linear-gradient(180deg,#fff,#fbfdff); }
.drug-card-head h3 { color: #12213b; }
.drug-code { color: #65758d; font-size: 13px; }
.detail-item span,.compact-cell span { color: #73829a; font-size: 12px; }
.detail-item strong,.compact-cell strong { color: #1c2b43; font-size: 14px; }
.pagination a,.pagination .disabled,.page-jump input,.page-jump button { min-height: 40px; }
.pagination a { border-color: #cfdbeb; box-shadow: 0 3px 10px rgba(18,45,84,.04); }
.pagination a:hover { border-color: #82a8ef; background: #f3f7ff; }

/* Login and access pages */
.login-page {
  padding: 32px 20px;
  background:
    radial-gradient(circle at 50% -8%, rgba(37,99,235,.15), transparent 38%),
    linear-gradient(180deg,#f8fbff,#edf3fa);
}
.login-card {
  width: min(460px,100%);
  padding: 38px;
  border-color: #d7e2f0;
  border-radius: 20px;
  box-shadow: 0 28px 70px rgba(18,45,84,.13);
}
.login-card h1 { font-size: 28px; letter-spacing: -.025em; }
.login-form { gap: 18px; }
.back-link { font-size: 14px; color: #53657f; }
.access-links { flex-wrap: wrap; gap: 14px 24px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.footer { color: #738199; font-size: 12px; }

/* Data tables and analytical modules */
.spa-dataset-grid,.hsc-stats,.hsc-stats-2,.csa-summary-grid,.poa-summary-grid,.cp-summary-grid {
  gap: 12px;
}
.spa-dataset-grid > div,.hsc-stats > div,.hsc-stats-2 > div,
.csa-summary-card,.poa-summary-card,.cp-summary-card {
  border: 1px solid #dfe7f2;
  border-radius: 12px;
  background: linear-gradient(180deg,#fff,#f8faff);
  box-shadow: 0 4px 14px rgba(18,45,84,.035);
}
.spa-dataset-grid span,.hsc-stats span,.hsc-stats-2 span,
.csa-summary-card span,.poa-summary-card span { color: #687991; font-size: 13px; }
.spa-suggest,.hsc-suggest {
  border-color: #cfdbea;
  border-radius: 12px;
  box-shadow: 0 18px 42px rgba(18,45,84,.16);
}
.spa-suggest-item,.hsc-suggest-item { min-height: 44px; font-size: 14px; }
.spa-selected-item,.hsc-chip,.csa-chip,.csa-filter-chip,.poa-filter-chip,.hsc-month-chip,.hsc-filter-chip {
  border-radius: 999px;
}
.spa-modal-backdrop,.spa-confirm-backdrop { background: rgba(8,19,36,.58); backdrop-filter: blur(3px); }
.spa-modal-card,.spa-confirm-card { border: 1px solid rgba(255,255,255,.7); border-radius: 18px; }
.csa-table-wrap,.poa-table-wrap,.hsc-chart-wrap {
  border-color: #d7e1ee;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(18,45,84,.045);
}
.csa-table,.poa-table,.spa-table { font-size: 14px; }
.csa-table th,.poa-table th,.spa-table th {
  background: #17375f;
  color: #fff;
  font-size: 13px;
  letter-spacing: .015em;
}
.csa-table td,.poa-table td,.spa-table td { color: #263750; }
.csa-table tbody tr:nth-child(even) td,.poa-table tbody tr:nth-child(even) td,.spa-table tbody tr:nth-child(even) td { background-color: #f8fafd; }
.csa-table tbody tr:hover td,.poa-table tbody tr:hover td,.spa-table tbody tr:hover td { background-color: #edf4ff; }
.dq-dataset-summary { min-height: 50px; background: linear-gradient(180deg,#fff,#f6f9fd); }
.dq-dataset-summary-title { font-size: 15px; }
.dq-dataset-summary-detail,.dq-dataset-toggle { font-size: 13px; }

/* Workbench shell */
body.wb-shell { background: #edf2f8; }
.wb-app {
  --wb-sidebar: 264px;
  --wb-sidebar-collapsed: 76px;
  --wb-header: 60px;
  --wb-tabs: 44px;
  --wb-ink: #14213a;
  --wb-muted: #62728a;
  --wb-line: #dce5f0;
  --wb-blue: #2563eb;
}
.wb-sidebar {
  background:
    radial-gradient(circle at 30% -5%, rgba(57,126,255,.24), transparent 28%),
    linear-gradient(180deg,#112643 0%,#0b192d 100%);
  border-right-color: rgba(157,181,216,.13);
  box-shadow: 8px 0 30px rgba(9,24,45,.08);
}
.wb-brand { min-height: var(--wb-header); padding: 13px 16px; }
.wb-brand-mark { width: 38px; height: 38px; border-radius: 11px; }
.wb-brand-text strong { font-size: 16px; }
.wb-brand-text small { font-size: 12px; color: #9fb0c9; }
.wb-nav { padding: 14px 11px 18px; scrollbar-color: rgba(171,192,222,.28) transparent; }
.wb-nav-home,.wb-nav-group-toggle { min-height: 44px; font-size: 14px; border-radius: 10px; }
.wb-nav-item { min-height: 40px; padding: 9px 10px 9px 13px; font-size: 14px; border-radius: 9px; }
.wb-nav-item:hover,.wb-nav-home:hover,.wb-nav-group-toggle:hover { background: rgba(255,255,255,.085); }
.wb-nav-home.is-active,.wb-nav-item.is-active {
  background: linear-gradient(100deg,#2e6fe9,#1f58c8);
  box-shadow: 0 7px 18px rgba(4,13,29,.23), inset 0 1px 0 rgba(255,255,255,.13);
}
.wb-nav-ico { width: 24px; height: 24px; font-size: 12px; }
.wb-nav-group-ico { width: 28px; height: 28px; font-size: 13px; }
.wb-sidebar-foot { min-height: 50px; padding: 9px 13px; }
.wb-collapse-btn { width: 34px; height: 34px; }
.wb-ver { font-size: 12px; color: #8fa0b8; }
.wb-header {
  padding: 0 20px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 1px 0 rgba(18,45,84,.02);
  backdrop-filter: blur(14px);
}
.wb-breadcrumb { font-size: 14px; }
.wb-header-search { max-width: 420px; }
.wb-header-search input {
  height: 40px;
  padding: 0 14px;
  border-color: #d5dfec;
  border-radius: 10px;
  background: #f5f8fc;
  font-size: 14px;
}
.wb-top-link { min-height: 36px; display: inline-flex; align-items: center; padding: 7px 13px; font-size: 13px; }
.wb-tabs-bar { padding: 0 10px 0 14px; background: #f3f6fa; }
.wb-tabs { gap: 5px; padding-top: 7px; }
.wb-tab { height: 34px; max-width: 230px; border-radius: 9px 9px 0 0; }
.wb-tab.is-active { border-color: #d7e1ed; color: #1d5bd2; box-shadow: inset 0 2px 0 #2f6fed; }
.wb-tab-label { font-size: 13px; }
.wb-content,.wb-pane,.wb-frame { background: #edf2f8; }
.wb-welcome {
  padding: 24px clamp(20px,3vw,44px) 34px;
  background:
    radial-gradient(circle at 100% 0%,rgba(37,99,235,.07),transparent 30%),
    #f3f6fb;
}
.wb-welcome .site-declaration {
  margin-bottom: 22px;
  padding: 12px 18px;
  border-color: #d7e3f2;
  border-radius: 12px;
  background: rgba(255,255,255,.78);
  box-shadow: none;
  text-align: left;
}
.wb-welcome .site-declaration p { display: inline; margin-right: 12px; color: #61718a; font-size: 13px; font-weight: 500; }
.wb-welcome .site-declaration p:nth-child(2) { color: #bb2e36; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.wb-welcome .wb-home-hero { padding: 4px 0 12px; }
.wb-welcome .wb-home-hero h1 { margin: 10px 0 6px; font-size: clamp(27px,3vw,38px); }
.wb-welcome .wb-home-hero p { font-size: 15px; }
.wb-welcome-section { margin-top: 22px; }
.wb-welcome-section h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  color: #2b3c57;
  font-size: 15px;
}
.wb-welcome-section h3::before { content: ""; width: 4px; height: 16px; border-radius: 3px; background: #2d6ee8; }
.wb-welcome-section + .wb-welcome-section h3::before { background: #139579; }
.wb-welcome-grid { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); gap: 14px; }
.wb-welcome-card {
  grid-template-columns: 42px 1fr;
  min-height: 94px;
  padding: 16px;
  border-color: #dce5f0;
  border-radius: 14px;
  box-shadow: 0 7px 22px rgba(18,45,84,.05);
}
.wb-welcome-card:hover { border-color: #a9c2ec; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(18,45,84,.10); }
.wb-welcome-ico { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
.wb-welcome-card strong { font-size: 15px; }
.wb-welcome-card span:last-child { color: #687890; font-size: 13px; }
.wb-home-footer { font-size: 13px; color: #738199; }

/* Embedded module spacing */
html.wb-embed-html,body.wb-embed { background: #f3f6fb !important; }
body.wb-embed .container,body.wb-embed .spa-page,body.wb-embed .hsc-page,
body.wb-embed .csa-page,body.wb-embed .poa-page,body.wb-embed .cp-page,
body.wb-embed .delivery-page,body.wb-embed .catalog-page,body.wb-embed .community-page {
  padding-left: clamp(16px,2.1vw,30px);
  padding-right: clamp(16px,2.1vw,30px);
}
body.wb-embed .hero { padding-top: 26px; padding-bottom: 18px; }

@media (max-width: 960px) {
  .wb-header { padding: 0 12px; }
  .wb-welcome { padding: 16px 14px 28px; }
  .wb-welcome .site-declaration p { display: block; margin: 0; }
  .wb-welcome-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
}
@media (max-width: 620px) {
  body { font-size: 15px; }
  .site-header { height: 62px; }
  .hero { padding: 27px 0 17px; }
  .hero h1 { font-size: 28px; }
  .search-panel,.panel,.spa-panel { padding: 14px; border-radius: 14px; }
  .criteria-field > span,.login-form label { font-size: 13px; }
  .criteria-field input,.criteria-field select,.login-form input { font-size: 16px; }
  .detail-item span,.compact-cell span { font-size: 11px; }
  .detail-item strong,.compact-cell strong { font-size: 13px; }
  .login-card { padding: 28px 22px; }
  .login-card h1 { font-size: 25px; }
  .wb-welcome-grid { grid-template-columns: 1fr; }
  .wb-welcome-card { min-height: 88px; padding: 14px; }
  .wb-header-right .wb-top-link:first-child { display: none; }
  body.wb-embed .container,body.wb-embed .spa-page,body.wb-embed .hsc-page,
  body.wb-embed .csa-page,body.wb-embed .poa-page,body.wb-embed .cp-page,
  body.wb-embed .delivery-page,body.wb-embed .catalog-page,body.wb-embed .community-page {
    padding-left: 12px;
    padding-right: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 榆林任务合同：修复 td 被 block 化导致的列错位，并重建宽表阅读秩序 */
.ytc-page { max-width: 1760px; }
.ytc-search {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding: 18px 20px;
}
.ytc-results-head {
  margin: 26px 0 12px;
  padding: 0 2px;
}
.ytc-table-wrap {
  position: relative;
  overflow: auto;
  max-height: calc(100vh - 265px);
  min-height: 280px;
  margin-bottom: 22px;
  border: 1px solid #d7e1ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(18,45,84,.075);
  scrollbar-color: #a9bad1 #eef3f8;
  scrollbar-width: thin;
}
.ytc-table-wrap::after {
  content: "可左右滑动查看全部字段";
  position: sticky;
  left: 14px;
  bottom: 10px;
  display: block;
  width: max-content;
  margin-top: -34px;
  padding: 5px 9px;
  border: 1px solid #dce5f0;
  border-radius: 999px;
  background: rgba(255,255,255,.94);
  color: #6a7890;
  box-shadow: 0 4px 12px rgba(18,45,84,.08);
  font-size: 12px;
  pointer-events: none;
}
.ytc-table {
  width: 100%;
  min-width: 1940px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  color: #22324b;
  font-size: 14px;
  line-height: 1.45;
}
.ytc-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 46px;
  padding: 0 14px;
  border-right: 1px solid rgba(255,255,255,.09);
  border-bottom: 0;
  background: #17375f;
  color: #f8fbff;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 1px 0 #17375f;
}
.ytc-table thead th:first-child { border-radius: 12px 0 0 0; }
.ytc-table thead th:last-child { border-right: 0; border-radius: 0 12px 0 0; }
.ytc-table tbody tr { transition: background-color .14s ease, box-shadow .14s ease; }
.ytc-table tbody td,
.ytc-table td:nth-child(1),
.ytc-table td:nth-child(3),
.ytc-table td:nth-child(4),
.ytc-table td:nth-child(5),
.ytc-table td:nth-child(6),
.ytc-table td:nth-child(8),
.ytc-table td:nth-child(9) {
  display: table-cell;
  max-height: none;
  padding: 13px 14px;
  border-right: 1px solid #edf1f6;
  border-bottom: 1px solid #e7edf5;
  background: #fff;
  vertical-align: middle;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
  -webkit-line-clamp: unset;
  -webkit-box-orient: initial;
}
.ytc-table tbody tr:nth-child(even) td { background: #f8fafd; }
.ytc-table tbody tr:hover td { background: #edf4ff; }
.ytc-table tbody tr:hover td:first-child { box-shadow: inset 4px 0 0 #2f6fed; }
.ytc-table tbody td:last-child { border-right: 0; }
.ytc-table tbody tr:last-child td { border-bottom: 0; }
.ytc-table .num { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.ytc-table .ytc-price { color: #e65c12; font-weight: 800; }
.ytc-table .ytc-qty { color: #1746b3; font-weight: 800; }

.ytc-table th:nth-child(1), .ytc-table td:nth-child(1) { width: 240px; }
.ytc-table th:nth-child(2), .ytc-table td:nth-child(2) { width: 145px; }
.ytc-table th:nth-child(3), .ytc-table td:nth-child(3) { width: 220px; }
.ytc-table th:nth-child(4), .ytc-table td:nth-child(4) { width: 210px; }
.ytc-table th:nth-child(5), .ytc-table td:nth-child(5) { width: 190px; }
.ytc-table th:nth-child(6), .ytc-table td:nth-child(6) { width: 190px; }
.ytc-table th:nth-child(7), .ytc-table td:nth-child(7) { width: 120px; }
.ytc-table th:nth-child(8), .ytc-table td:nth-child(8) { width: 165px; }
.ytc-table th:nth-child(9), .ytc-table td:nth-child(9) { width: 150px; }
.ytc-table th:nth-child(10), .ytc-table td:nth-child(10) { width: 100px; }
.ytc-table th:nth-child(11), .ytc-table td:nth-child(11) { width: 105px; }
.ytc-table th:nth-child(12), .ytc-table td:nth-child(12) { width: 125px; }

.ytc-card {
  border-color: #d8e3ef;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(18,45,84,.065);
}
.ytc-card-project { border-radius: 999px; background: #edf4ff; color: #215dcc; font-size: 12px; }
.ytc-card-customer,.ytc-card-code,.ytc-card-company { border-top: 1px solid #edf1f6; }
.ytc-card-qty { padding: 10px 12px; border: 0; border-radius: 10px; background: #f1f6ff; }
.ytc-card-qty strong { color: #1746b3; font-size: 18px; }

@media (max-width: 1180px) {
  .ytc-table-wrap { display: none; }
  .ytc-cards { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .ytc-search { padding: 14px; }
  .ytc-cards { grid-template-columns: 1fr; gap: 10px; }
  .ytc-card { padding: 14px; }
}

/* 销售查询：仅桌面端重新分配空间；移动端既有样式保持不变 */
@media (min-width: 961px) {
  .sales-page { max-width: 1600px; }
  .sales-page .sales-hero { padding-top: 30px; padding-bottom: 18px; }
  .sales-page .sales-search { padding: 18px 20px; }
  .sales-page .sales-results-head { margin: 24px 0 12px; }
  .sales-page .results-list.sales-results {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 14px;
    width: 100%;
    max-width: none;
  }
  .sales-page .sales-card {
    height: 100%;
    border-color: #d8e2ee;
    border-radius: 14px;
    box-shadow: 0 7px 22px rgba(18,45,84,.055);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
  }
  .sales-page .sales-card:hover {
    border-color: #aec5e5;
    box-shadow: 0 13px 30px rgba(18,45,84,.095);
    transform: translateY(-1px);
  }
  .sales-page .sales-card-head {
    grid-template-columns: 30px minmax(0,1fr) minmax(9.2em,max-content);
    gap: 10px;
    min-height: 102px;
    padding: 13px 14px 10px 12px;
    background: linear-gradient(180deg,#fff,#fbfdff);
  }
  .sales-page .sales-pill-icon { width: 28px; height: 28px; border-radius: 8px; }
  .sales-page .sales-head-left h3 { font-size: 17px; line-height: 1.3; color: #14213a; }
  .sales-page .sales-code,.sales-page .sales-customer-line { font-size: 12px; color: #687890; }
  .sales-page .sales-chips { gap: 6px; margin-top: 4px; }
  .sales-page .sales-chip { padding: 3px 8px; border-radius: 999px; font-size: 11px; }
  .sales-page .sales-date-box { min-width: 9.2em; padding: 5px 9px; border-radius: 8px; }
  .sales-page .sales-date b { font-size: 13px; }
  .sales-page .sales-date span { font-size: 11px; }
  .sales-page .sales-collect { max-width: 9.2em; font-size: 12px; }
  .sales-page .sales-core { background: #f6f9fd; }
  .sales-page .sales-metric { padding-top: 9px; padding-bottom: 9px; }
  .sales-page .sales-metric span { color: #6f7f96; font-size: 11px; }
  .sales-page .sales-metric strong { font-size: 14px; }
  .sales-page .sales-tone-qty strong,
  .sales-page .sales-tone-price strong,
  .sales-page .sales-tone-amount strong { font-size: 16px; }
  .sales-page .sales-detail { background: #fff; }
  .sales-page .sales-kv,
  .sales-page .sales-kv-customer,
  .sales-page .sales-split-cell { min-height: 39px; }
  .sales-page .sales-kv span,
  .sales-page .sales-split-cell span,
  .sales-page .sales-kv-customer span { color: #718199; }
  .sales-page .sales-clip { color: #22324b; }
  .sales-page .sales-pagination { grid-column: 1 / -1; }
}

@media (min-width: 961px) and (max-width: 1279px) {
  .sales-page .results-list.sales-results {
    grid-template-columns: minmax(0, 920px);
    justify-content: center;
  }
}

/* 品种争取机会分析：原始证据紧随其所属明细行 */
.poa-detail-table .poa-evidence-row > td {
  padding: 0;
  border-bottom: 1px solid #c9d8ea;
  background: #f4f8fd;
}
.poa-detail-table .poa-evidence-row:hover > td { background: #f4f8fd; }
.poa-evidence-row .poa-evidence-panel {
  margin: 0;
  padding: 14px 16px 16px;
  border: 0;
  border-left: 4px solid #2f6fed;
  border-radius: 0;
  background: linear-gradient(90deg,#eef5ff 0,#f8fbff 34%,#fff 100%);
  box-shadow: inset 0 1px 0 #dbe6f2;
}
.poa-evidence-row .poa-evidence-head {
  min-height: 36px;
  margin-bottom: 10px;
}
.poa-evidence-row .poa-evidence-head strong {
  color: #1746b3;
  font-size: 14px;
}
.poa-evidence-row .poa-evidence-head .muted {
  flex: 1;
  color: #5d6d85;
}
.poa-evidence-row .poa-table-wrap {
  margin: 0;
  border-color: #cfdaea;
  box-shadow: 0 5px 16px rgba(18,45,84,.05);
}
.poa-evidence-row .poa-detail-table th {
  background: #e8f0fb;
  color: #29405f;
}
.poa-evidence-row .poa-detail-table { min-width: 1320px; }
.poa-evidence-row .poa-detail-table th.num,
.poa-evidence-row .poa-detail-table td.num {
  width: 88px;
  min-width: 88px;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.poa-detail-table th { text-align: left; }
.poa-detail-table th.num,
.poa-detail-table td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.poa-detail-table th.status,
.poa-detail-table td[data-label="我司目标厂家覆盖"] {
  width: 132px;
  min-width: 132px;
  text-align: center;
}
.poa-detail-table th.action,
.poa-detail-table td[data-label="操作"] {
  width: 104px;
  min-width: 104px;
  text-align: center;
}

/* ========== v1.3.0 premium enterprise visual system: presentation only ========== */
:root {
  --blue: #1f5fd1;
  --blue-dark: #17499f;
  --blue-soft: #edf3fc;
  --ink: #152238;
  --muted: #64748b;
  --line: #dce4ee;
  --panel: #ffffff;
  --surface: #f4f7fb;
  --surface-raised: #ffffff;
  --surface-subtle: #f8fafc;
  --navy: #16365d;
  --success: #17845c;
  --danger: #c83b4d;
  --warning: #c46720;
  --radius-card: 14px;
  --radius-control: 9px;
  --shadow: 0 12px 32px rgba(29, 55, 90, .075);
}

html, body { background: var(--surface); }
body {
  color: var(--ink);
  font-family: "Segoe UI Variable Text","Segoe UI","PingFang SC","Microsoft YaHei UI","Microsoft YaHei",sans-serif;
  letter-spacing: 0;
}
.page-bg { background: linear-gradient(180deg,#f8fafc 0,#f4f7fb 220px,#f1f5f9 100%); }
::selection { color: #fff; background: #2b62bc; }

/* Typography and spacing hierarchy */
.hero { padding-top: 34px; padding-bottom: 20px; align-items: center; }
.hero h1,.admin-title h1 {
  margin-top: 11px;
  margin-bottom: 7px;
  color: #12213a;
  font-size: clamp(28px,3vw,40px);
  font-weight: 720;
  line-height: 1.18;
  letter-spacing: -.035em;
}
.hero p,.admin-title p { max-width: 72ch; color: #617089; font-size: 15px; line-height: 1.65; }
.eyebrow {
  padding: 4px 8px;
  border: 1px solid #d6e2f3;
  border-radius: 999px;
  background: #f3f7fc;
  color: #315f9e;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .035em;
}
.results-head { margin: 26px 0 12px; align-items: center; }
.results-head h2 { margin-bottom: 3px; color: #17263d; font-size: 20px; font-weight: 720; letter-spacing: -.015em; }
.results-head p,.page-indicator { color: #697992; }
.page-indicator { font-variant-numeric: tabular-nums; }

/* Surfaces follow one radius and elevation system */
.search-panel,.panel,.spa-panel,.dq-dataset-fold,
.hero-stat,.admin-stat,.drug-card,.sales-card,.ytc-card,
.poa-opp-section,.poa-evidence-panel,.login-card {
  border-color: #d9e2ed;
  border-radius: var(--radius-card);
  background: var(--surface-raised);
  box-shadow: 0 8px 24px rgba(29,55,90,.055);
}
.search-panel,.panel,.spa-panel { padding: 20px; }
.hero-stat,.admin-stat {
  border-left: 3px solid var(--blue);
  border-radius: 10px;
  box-shadow: none;
}
.hero-stat span,.hero-stat small,.admin-stat span { color: #6d7c92; }
.hero-stat strong,.admin-stat strong { color: #14223a; font-variant-numeric: tabular-nums; }

/* Controls */
.criteria-grid { gap: 13px; }
.criteria-field > span,.login-form label {
  margin: 0 0 7px 2px;
  color: #3d4f69;
  font-size: 13px;
  font-weight: 650;
}
.criteria-field input,.criteria-field select,.login-form input,
.spa-modal input,.spa-modal select,.hsc-search,.csa-search,.poa-search,
.poa-page-size select,.page-jump input {
  min-height: 46px;
  border: 1px solid #cbd6e4;
  border-radius: var(--radius-control);
  background-color: #fff;
  color: #17263d;
  box-shadow: inset 0 1px 1px rgba(16,35,61,.025);
}
.criteria-field input::placeholder,.login-form input::placeholder,
.hsc-search::placeholder,.csa-search::placeholder,.poa-search::placeholder { color: #7d899c; opacity: 1; }
.criteria-field input:hover,.criteria-field select:hover,.login-form input:hover,
.hsc-search:hover,.csa-search:hover,.poa-search:hover { border-color: #9caec4; }
.criteria-field input:focus,.criteria-field select:focus,.login-form input:focus,
.hsc-search:focus,.csa-search:focus,.poa-search:focus,.page-jump input:focus {
  border-color: #3970c8;
  box-shadow: 0 0 0 3px rgba(31,95,209,.13);
}
.primary-btn,.page-jump button {
  border-radius: var(--radius-control);
  background: #1f5fd1;
  box-shadow: 0 5px 13px rgba(31,95,209,.19);
  color: #fff;
  font-weight: 680;
  transition: background-color .16s ease, box-shadow .16s ease, transform .08s ease;
}
.primary-btn:hover,.page-jump button:hover { background: #1a53ba; box-shadow: 0 7px 17px rgba(31,95,209,.23); }
.primary-btn:active,.page-jump button:active { transform: translateY(1px); box-shadow: 0 2px 7px rgba(31,95,209,.2); }
.ghost-btn,.admin-entry,.wb-top-link,.text-btn,.poa-evidence-btn {
  border-radius: var(--radius-control);
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .08s ease;
}
.ghost-btn:hover,.admin-entry:hover,.wb-top-link:hover,.poa-evidence-btn:hover { border-color: #9ab4d8; background: #f5f8fc; color: #174fae; }
.ghost-btn:active,.admin-entry:active,.wb-top-link:active,.poa-evidence-btn:active { transform: translateY(1px); }
.query-hint,.muted,.panel-title p,.field-note { color: #687991; }

/* Data presentation */
.csa-table-wrap,.poa-table-wrap,.ytc-table-wrap,.hsc-chart-wrap {
  border-color: #d5dfeb;
  border-radius: 12px;
  box-shadow: none;
}
.csa-table,.poa-table,.spa-table,.ytc-table {
  color: #25364e;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.csa-table th,.poa-table th,.spa-table th,.ytc-table thead th {
  height: 43px;
  background: var(--navy);
  color: #f7faff;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: .01em;
}
.csa-table td,.poa-table td,.spa-table td,.ytc-table tbody td { border-bottom-color: #e5ebf2; }
.csa-table tbody tr:nth-child(even) td,.poa-table tbody tr:nth-child(even) td,
.spa-table tbody tr:nth-child(even) td,.ytc-table tbody tr:nth-child(even) td { background: #f8fafc; }
.csa-table tbody tr:hover td,.poa-table tbody tr:hover td,
.spa-table tbody tr:hover td,.ytc-table tbody tr:hover td { background: #eef4fb; }
.csa-table .num,.poa-table .num,.ytc-table .num { font-variant-numeric: tabular-nums; }
.ytc-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.spa-dataset-grid > div,.hsc-stats > div,.hsc-stats-2 > div,
.csa-summary-card,.poa-summary-card,.cp-summary-card {
  border-color: #dce4ee;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: none;
}
.spa-dataset-grid strong,.hsc-stats strong,.hsc-stats-2 strong,
.csa-summary-card strong,.poa-summary-card strong,.cp-summary-card strong { color: #17263d; font-variant-numeric: tabular-nums; }

/* Result cards */
.drug-card,.sales-card,.ytc-card { box-shadow: 0 5px 16px rgba(29,55,90,.045); }
.drug-card:hover,.sales-card:hover,.ytc-card:hover {
  border-color: #b8c8db;
  box-shadow: 0 9px 22px rgba(29,55,90,.075);
}
.drug-card-head,.sales-card-head { background: #fff; }
.drug-card-head h3,.sales-head-left h3 { color: #14223a; font-weight: 720; }
.drug-code,.sales-code,.sales-customer-line { color: #66778f; }
.detail-item span,.compact-cell span,.sales-metric span,.sales-kv span,.sales-split-cell span { color: #697990; }
.price strong,.sales-tone-price strong { color: #c65f1d; }
.sales-tone-qty strong { color: #168052; }
.sales-tone-amount strong { color: #6f4bc4; }
.sales-core { background: #f7f9fc; }

/* Semantic pills remain pills */
.radio-chip span,.spa-selected-item,.hsc-chip,.csa-chip,.csa-filter-chip,
.poa-filter-chip,.hsc-month-chip,.hsc-filter-chip,.sales-chip,.poa-status-chip,
.ytc-card-project { border-radius: 999px; }
.radio-chip span { border-color: #d5dfeb; color: #56677f; }
.radio-chip input:checked + span,.poa-filter-chip.active {
  border-color: #adc4e7;
  background: #edf3fc;
  color: #174fae;
}

/* Expansion and evidence are visually attached to their parent rows */
.poa-expand-row > td { background: #f7f9fc !important; }
.poa-expand-body { padding: 12px; background: #f7f9fc; }
.poa-opp-sections { gap: 10px; }
.poa-opp-section { border-color: #d9e2ed; box-shadow: none; }
.poa-opp-h { color: #20334e; }
.poa-evidence-row .poa-evidence-panel {
  padding: 13px 15px 15px;
  border-left: 3px solid var(--blue);
  background: #f3f7fc;
  box-shadow: inset 0 1px 0 #d8e2ee;
}
.poa-evidence-row .poa-table-wrap { background: #fff; border-color: #ccd8e6; box-shadow: none; }
.poa-evidence-row .poa-detail-table th { background: #e8eef7; color: #263d5b; }
.poa-evidence-btn.active { border-color: #6f98d5; background: #f1f6fd; color: #174fae; }

/* Workbench shell */
body.wb-shell { background: #edf2f7; }
.wb-app {
  --wb-sidebar: 252px;
  --wb-sidebar-collapsed: 72px;
  --wb-header: 60px;
  --wb-tabs: 42px;
  --wb-ink: #14223a;
  --wb-muted: #62738a;
  --wb-line: #d9e2ed;
  --wb-blue: #1f5fd1;
}
.wb-sidebar {
  background: #0d2038;
  border-right: 1px solid #18324f;
  box-shadow: 6px 0 22px rgba(9,26,47,.08);
}
.wb-brand { min-height: var(--wb-header); border-bottom: 1px solid rgba(189,210,237,.10); }
.wb-brand:hover { background: #112945; }
.wb-brand-mark {
  border-radius: 9px;
  background: #2464d3;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15),0 5px 12px rgba(0,0,0,.18);
}
.wb-brand-text strong { letter-spacing: .01em; }
.wb-brand-text small { color: #91a5bf; }
.wb-nav-home,.wb-nav-group-toggle,.wb-nav-item { border-radius: 8px; }
.wb-nav-home,.wb-nav-group-toggle { color: #bdc9d9; }
.wb-nav-item { color: #aebdd0; }
.wb-nav-item:hover,.wb-nav-home:hover,.wb-nav-group-toggle:hover { background: #142b47; color: #f1f5fb; }
.wb-nav-home.is-active,.wb-nav-item.is-active {
  background: #235fc8;
  color: #fff;
  box-shadow: inset 3px 0 0 #77a8ff;
}
.wb-nav-item.is-active .wb-nav-ico { background: rgba(255,255,255,.14); }
.wb-nav-ico,.wb-nav-group-ico { border-radius: 7px; }
.wb-sidebar-foot { border-top-color: rgba(189,210,237,.1); }
.wb-collapse-btn { border-radius: 8px; }
.wb-header {
  padding: 0 18px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #dce4ee;
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.wb-header-search input { border-radius: 9px; background: #f5f7fa; }
.wb-tabs-bar { padding-left: 12px; border-bottom-color: #d8e1eb; background: #eef2f7; }
.wb-tabs { gap: 2px; padding-top: 6px; }
.wb-tab {
  height: 36px;
  border-color: transparent;
  border-radius: 8px 8px 0 0;
  color: #5e7088;
  background: transparent;
}
.wb-tab:hover { background: #f7f9fc; color: #28496f; }
.wb-tab.is-active {
  border-color: #d7e0eb;
  border-bottom-color: #fff;
  background: #fff;
  color: #174fae;
  box-shadow: inset 0 2px 0 var(--blue);
}
.wb-content,.wb-pane,.wb-frame { background: #edf2f7; }
.wb-welcome {
  padding: 26px clamp(22px,3vw,46px) 38px;
  background: #f2f5f9;
}
.wb-welcome .site-declaration {
  border-left: 3px solid #b2444d;
  border-radius: 9px;
  background: #fff;
  box-shadow: none;
}
.wb-welcome .wb-home-hero { padding: 7px 0 15px; }
.wb-welcome .wb-home-hero h1 { color: #12213a; font-weight: 740; letter-spacing: -.035em; }
.wb-welcome-section h3 { font-size: 14px; font-weight: 700; }
.wb-welcome-section h3::before { width: 3px; height: 15px; border-radius: 2px; background: var(--blue); }
.wb-welcome-section + .wb-welcome-section h3::before { background: var(--blue); }
.wb-welcome-grid { gap: 11px; }
.wb-welcome-card {
  min-height: 88px;
  border-color: #dbe3ed;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
}
.wb-welcome-card:hover { border-color: #aabdd6; background: #fbfdff; box-shadow: 0 8px 19px rgba(29,55,90,.065); transform: translateY(-1px); }
.wb-welcome-ico { border-radius: 9px; }

/* Login and administration */
.login-page { background: #eef3f8; }
.login-card { border-radius: var(--radius-card); box-shadow: 0 22px 54px rgba(25,48,79,.13); }
.login-card::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  margin: -8px 0 24px;
  border-radius: 2px;
  background: var(--blue);
}
.panel-title h2 { color: #18283f; font-weight: 710; }
.panel-icon,.upload-symbol { border-radius: 9px; background: #edf3fc; color: #1f5fd1; }
.file-drop { border-color: #bfcde0; border-radius: 11px; background: #f8fafc; }
.file-drop:hover { border-color: #7899c7; background: #f3f7fc; }
.file-row { border-radius: 10px; }
.field-note { border-radius: 9px; background: #f5f7fa; }

/* Pagination */
.pagination a,.pagination .disabled,.page-jump button { border-radius: 8px; }
.pagination a { border-color: #cbd7e5; box-shadow: none; }
.pagination a:hover { border-color: #8da9cf; background: #f3f7fc; }

@media (min-width: 961px) {
  body.wb-embed .container,body.wb-embed .spa-page,body.wb-embed .hsc-page,
  body.wb-embed .csa-page,body.wb-embed .poa-page,body.wb-embed .cp-page,
  body.wb-embed .delivery-page,body.wb-embed .catalog-page,body.wb-embed .community-page {
    padding-left: clamp(22px,2vw,34px);
    padding-right: clamp(22px,2vw,34px);
  }
  body.wb-embed .hero { padding-top: 28px; }
  .sales-page .sales-card:hover { transform: translateY(-1px); }
}

@media (prefers-reduced-motion: reduce) {
  .primary-btn,.page-jump button,.ghost-btn,.admin-entry,.wb-top-link,.poa-evidence-btn,
  .drug-card,.sales-card,.ytc-card,.wb-welcome-card { transition: none !important; transform: none !important; }
}

/* ========== v1.3.1 visible desktop redesign: stronger hierarchy ========== */
@media (min-width: 961px) {
  body.wb-embed { background: #eef2f7 !important; }
  body.wb-embed .container,body.wb-embed .spa-page,body.wb-embed .hsc-page,
  body.wb-embed .csa-page,body.wb-embed .poa-page,body.wb-embed .cp-page,
  body.wb-embed .delivery-page,body.wb-embed .catalog-page,body.wb-embed .community-page {
    padding-top: 2px;
    padding-bottom: 42px;
  }

  body.wb-embed .hero {
    position: relative;
    min-height: 128px;
    margin: 0 -10px 18px;
    padding: 26px 28px 24px;
    border-bottom: 1px solid #d7e0eb;
    background: #f8fafc;
  }
  body.wb-embed .hero::before {
    content: "";
    position: absolute;
    top: 27px;
    bottom: 27px;
    left: 0;
    width: 4px;
    border-radius: 0 3px 3px 0;
    background: #1f5fd1;
  }
  body.wb-embed .hero h1 { font-size: 34px; letter-spacing: -.04em; }
  body.wb-embed .hero-stat {
    min-width: 154px;
    padding: 15px 18px;
    border: 0;
    border-left: 3px solid #1f5fd1;
    background: #fff;
    box-shadow: 0 7px 19px rgba(29,55,90,.065);
  }
  body.wb-embed .hero-stat strong { font-size: 27px; }

  body.wb-embed .search-panel {
    position: relative;
    margin-top: 0;
    padding: 22px 22px 18px;
    border: 1px solid #d3deeb;
    border-top: 3px solid #245fc2;
    box-shadow: 0 12px 30px rgba(29,55,90,.075);
  }
  body.wb-embed .criteria-field input,
  body.wb-embed .criteria-field select { height: 50px; }
  body.wb-embed .query-btn { height: 50px; min-width: 104px; }
  body.wb-embed .query-hint { padding-top: 11px; font-size: 12px; }

  .catalog-page,.community-page { max-width: 1720px; }
  .catalog-page .catalog-results-head,.community-page .community-results-head {
    margin: 25px 0 12px;
    padding: 0 2px;
  }
  .catalog-page .catalog-results-head h2,.community-page .community-results-head h2 {
    color: #13233b;
    font-size: 21px;
    font-weight: 740;
    letter-spacing: -.02em;
  }
  .catalog-results,.community-results {
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: stretch;
    gap: 14px;
  }
  .catalog-variety-card,.community-card {
    position: relative;
    height: 100%;
    border: 1px solid #d4dfeb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(28,52,85,.045);
    transition: border-color .16s ease,box-shadow .16s ease,transform .12s ease;
  }
  .catalog-variety-card::before,.community-card::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: #2d67c5;
  }
  .catalog-variety-card:hover,.community-card:hover {
    border-color: #9fb5d0;
    box-shadow: 0 11px 25px rgba(28,52,85,.085);
    transform: translateY(-1px);
  }
  .catalog-variety-card .drug-card-head,.community-card .drug-card-head {
    min-height: 84px;
    padding: 15px 16px 13px 18px;
    border-bottom: 1px solid #dfe6ef;
    background: #f8fafc;
  }
  .catalog-card-main h3 {
    margin-bottom: 6px;
    color: #13233b;
    font-size: 17px;
    font-weight: 740;
    line-height: 1.35;
  }
  .catalog-code-label {
    padding: 2px 7px;
    border-radius: 999px;
    background: #e9f0fb;
    color: #245cae;
    font-size: 10px;
  }
  .catalog-variety-card .drug-code,.community-card .drug-code {
    color: #65758b;
    font-size: 11px;
  }
  .catalog-price {
    min-width: 86px;
    padding: 8px 10px 7px;
    border: 1px solid #f0d9c9;
    border-radius: 8px;
    background: #fff8f3;
  }
  .catalog-price span { color: #8c6d5b; font-size: 10px; }
  .catalog-price strong { color: #bd5418; font-size: 20px; }
  .catalog-price small { color: #8a6652; font-size: 11px; }
  .catalog-body { padding: 12px 14px 14px 17px; gap: 8px; }
  .catalog-pair { gap: 8px; }
  .catalog-cell,.catalog-line {
    padding: 9px 11px;
    border: 0;
    border-left: 1px solid #dfe6ef;
    border-radius: 0;
    background: transparent;
  }
  .catalog-cell span,.catalog-line span {
    margin-bottom: 3px;
    color: #748299;
    font-size: 10px;
    font-weight: 600;
  }
  .catalog-cell strong,.catalog-line strong {
    color: #21334c;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.42;
  }
  .catalog-line { grid-template-columns: 68px minmax(0,1fr); align-items: start; }

  .listing-card .drug-card-head { min-height: 76px; padding: 14px 16px 12px 18px; }
  .listing-card .drug-card-head h3 { font-size: 17px; line-height: 1.35; }
  .listing-card .price {
    min-width: 84px;
    padding: 7px 9px;
    border: 1px solid #f0d9c9;
    border-radius: 8px;
    background: #fff8f3;
  }
  .listing-card .price span { color: #8c6d5b; font-size: 10px; }
  .listing-card .price strong { color: #bd5418; font-size: 20px; }
  .listing-card .detail-grid { border-top: 0; }
  .listing-card .detail-item {
    min-height: 58px;
    padding: 10px 13px 11px;
    border-color: #e3e9f1;
    background: #fff;
  }
  .listing-card .detail-item span { margin-bottom: 3px; color: #748299; font-size: 10px; }
  .listing-card .detail-item strong { color: #21334c; font-size: 13px; line-height: 1.42; }
}

@media (min-width: 961px) and (max-width: 1360px) {
  .catalog-results,.community-results { grid-template-columns: 1fr; }
}

/* Desktop query results: source-order rows; mobile cards stay unchanged */
.desktop-result-table-wrap { display: none; }
.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66758c;
  font-size: 12px;
  white-space: nowrap;
}
.page-size-control select {
  min-width: 72px;
  height: 36px;
  padding: 0 28px 0 11px;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  background: #fff;
  color: #243247;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.page-size-control select:hover { border-color: #8eb5ed; }
.page-size-control select:focus-visible { outline: 2px solid #9ec2ff; outline-offset: 2px; }
.page-size-standalone {
  width: max-content;
  margin: 12px 0 22px auto;
  padding: 8px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
}
@media (min-width: 961px) {
  .desktop-source-cards { display: none !important; }
  .desktop-result-table-wrap {
    display: block;
    max-height: calc(100vh - 255px);
    min-height: 260px;
    margin-bottom: 22px;
    overflow: auto;
    border: 1px solid #d3deeb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(29,55,90,.055);
    scrollbar-width: thin;
    scrollbar-color: #a8b8cc #edf2f7;
  }
  .desktop-result-table {
    width: 100%;
    min-width: 1680px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    color: #25364e;
    font-size: 12px;
    line-height: 1.35;
  }
  .desktop-result-table thead th {
    position: sticky;
    z-index: 2;
    top: 0;
    height: 42px;
    padding: 0 6px;
    border-right: 1px solid rgba(255,255,255,.09);
    border-bottom: 1px solid #102d50;
    background: #16365d;
    color: #f7faff;
    font-size: 12px;
    font-weight: 680;
    text-align: left;
    white-space: nowrap;
  }
  .desktop-result-table thead th.is-sortable {
    padding-right: 15px;
    cursor: pointer;
    user-select: none;
  }
  .desktop-result-table thead th.is-sortable:hover { background: #1d4778; }
  .desktop-result-table thead th.is-sortable:focus-visible {
    outline: 2px solid #9ec2ff;
    outline-offset: -3px;
  }
  .desktop-th-label { vertical-align: middle; }
  .desktop-sort-indicator {
    display: inline-block;
    width: 11px;
    margin-left: 3px;
    color: #b9cbe2;
    font-size: 11px;
    text-align: center;
    vertical-align: middle;
  }
  .desktop-result-table th[aria-sort="ascending"] .desktop-sort-indicator,
  .desktop-result-table th[aria-sort="descending"] .desktop-sort-indicator { color: #fff; }
  .desktop-column-resize {
    position: absolute;
    z-index: 3;
    top: 0;
    right: -3px;
    bottom: 0;
    width: 8px;
    cursor: col-resize;
    touch-action: none;
  }
  .desktop-column-resize::after {
    content: "";
    position: absolute;
    top: 9px;
    right: 3px;
    bottom: 9px;
    width: 1px;
    background: rgba(255,255,255,.2);
  }
  .desktop-result-table th:hover .desktop-column-resize::after { background: #9ec2ff; }
  body.desktop-column-dragging,
  body.desktop-column-dragging * { cursor: col-resize !important; user-select: none !important; }
  .desktop-result-table thead th:last-child { border-right: 0; }
  .desktop-result-table tbody td {
    max-width: none;
    height: 44px;
    padding: 8px 4px;
    overflow: hidden;
    border-right: 1px solid #edf1f5;
    border-bottom: 1px solid #e4eaf1;
    background: #fff;
    color: #263850;
    text-overflow: clip;
    white-space: nowrap;
    vertical-align: middle;
  }
  .desktop-result-table tbody tr:nth-child(even) td { background: #f8fafc; }
  .desktop-result-table tbody tr:hover td { background: #eef4fb; }
  .desktop-result-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 #1f5fd1; }
  .desktop-result-table tbody td:last-child { border-right: 0; }
  .desktop-result-table.is-column-sized th,
  .desktop-result-table.is-column-sized td {
    min-width: 0 !important;
    max-width: none !important;
  }
  .desktop-result-table th.num,
  .desktop-result-table td.num {
    min-width: 96px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .sales-page .desktop-result-table { min-width: 2500px; }
  .sales-page .desktop-result-table th:nth-child(1),
  .sales-page .desktop-result-table td:nth-child(1) { min-width: 156px; }
  .sales-page .desktop-result-table th:nth-child(5),
  .sales-page .desktop-result-table td:nth-child(5),
  .sales-page .desktop-result-table th:nth-child(7),
  .sales-page .desktop-result-table td:nth-child(7),
  .sales-page .desktop-result-table th:nth-child(10),
  .sales-page .desktop-result-table td:nth-child(10),
  .sales-page .desktop-result-table th:nth-child(15),
  .sales-page .desktop-result-table td:nth-child(15),
  .sales-page .desktop-result-table th:nth-child(16),
  .sales-page .desktop-result-table td:nth-child(16) { min-width: 190px; }
  .fugu-ph-table-wrap.desktop-native-table-wrap {
    max-height: calc(100vh - 255px);
    min-height: 300px;
    overflow: auto;
    border-color: #d3deeb;
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(29,55,90,.055);
    scrollbar-width: thin;
    scrollbar-color: #a8b8cc #edf2f7;
  }
  .fugu-ph-table.desktop-result-table {
    width: 100%;
    min-width: 2200px;
  }
  .fugu-ph-table.desktop-result-table tbody td {
    display: table-cell;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
    -webkit-line-clamp: unset;
  }
}
