:root{
  --bg:#f4f7fb;
  --panel:#ffffff;
  --text:#102033;
  --muted:#66758a;
  --line:#dfe7f1;
  --line-strong:#c9d6e6;
  --soft:#f8fbff;
  --blue:#2563eb;
  --blue-soft:#eaf2ff;
  --green:#0f9f6e;
  --green-soft:#eafaf2;
  --orange:#f97316;
  --orange-soft:#fff4e8;
  --red:#dc2626;
  --red-soft:#fff1f2;
  --shadow:0 12px 28px rgba(15,35,65,.07);
  --radius:18px;
}
*{box-sizing:border-box}
html{height:100%}
body{
  min-height:100%;
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",Arial,sans-serif;
  font-size:14px;
  line-height:1.55;
}
a{color:var(--blue);text-decoration:none}
a:hover{text-decoration:none}

.topbar{
  min-height:64px;
  padding:0 24px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:18px;
  position:sticky;
  top:0;
  z-index:20;
  backdrop-filter:saturate(160%) blur(8px);
  box-shadow:0 8px 22px rgba(20,62,105,.05);
}
.brand{font-size:18px;font-weight:900;color:var(--text);white-space:nowrap;letter-spacing:.2px}
.nav-links{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.nav-links a{
  color:#41546a;
  padding:8px 12px;
  border-radius:999px;
  font-weight:700;
}
.nav-links a:hover,.nav-links a.active{background:var(--blue-soft);color:var(--blue)}
.spacer{flex:1}.user-pill{border:1px solid var(--line);background:var(--soft);border-radius:999px;padding:7px 12px;color:#41546a;font-weight:700;white-space:nowrap}.logout-link{padding:8px 12px;border-radius:999px;background:#f1f5f9;color:#475569!important;font-weight:700;white-space:nowrap}
.container{width:min(1560px,100%);margin:22px auto 42px;padding:0 22px}

h1,h2,h3,p{margin-top:0}h1{font-size:27px;line-height:1.24;margin-bottom:8px;letter-spacing:-.02em}h2{font-size:18px;line-height:1.3;margin-bottom:10px;letter-spacing:-.01em}h3{font-size:16px;line-height:1.35;margin-bottom:8px}.muted{color:var(--muted)}.hero-subtitle{max-width:900px;margin:0;color:var(--muted);line-height:1.7}.ok{color:var(--green)}.err{color:var(--red)}.warn{color:#a16207}

.card,.section-card,.page-hero{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.section-card{padding:22px;margin-bottom:18px}.page-hero{padding:24px 28px;margin-bottom:18px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:#fff}.compact-hero{padding:22px 24px}.page-hero h1,.product-search-panel-simple h1,.login-panel h1{margin-bottom:6px}.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:14px}.section-title-row h1,.section-title-row h2{margin-bottom:6px}.title-meta{white-space:nowrap;margin-top:4px}

.btn,button{
  min-height:40px;
  border:0;
  border-radius:12px;
  padding:9px 16px;
  background:var(--blue);
  color:#fff;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-weight:800;
  font-size:14px;
  text-decoration:none;
  line-height:1.2;
}
.btn:hover,button:hover{filter:brightness(.98)}.btn.secondary,button.secondary,.reset-filter{background:var(--blue-soft);color:var(--blue)}.btn.ghost,button.ghost{background:#f8fafc;color:#475569;border:1px solid var(--line)}.btn.danger,button.danger{background:var(--red);color:#fff}.btn.small,button.small{min-height:32px;padding:6px 10px;border-radius:9px;font-size:12px}button:disabled{opacity:.45;cursor:not-allowed}

input,select,textarea{
  border:1px solid #ccd8e6;
  border-radius:12px;
  background:#fff;
  color:var(--text);
  font:inherit;
  outline:none;
}
input:focus,select:focus,textarea:focus{border-color:#93b7ff;box-shadow:0 0 0 3px rgba(37,99,235,.12)}input,select{height:42px;padding:0 12px}input[type=file]{height:auto;padding:10px;background:#fff}.stack-form,.account-form{display:grid;gap:14px}.input-grid{display:grid;gap:14px}.three-cols{grid-template-columns:repeat(3,minmax(0,1fr))}.two-cols{grid-template-columns:repeat(2,minmax(0,1fr))}.detail-form label,.stack-form label,.account-form label,.input-grid label,.toolbar-form label{display:grid;gap:6px;color:#41546a;font-weight:800}.detail-form input,.detail-form select,.stack-form input,.stack-form select,.stack-form textarea,.account-form input,.input-grid input,.input-grid select,.input-grid textarea{width:100%}.form-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.upload-inline-form{display:flex;gap:12px;align-items:center;flex-wrap:wrap}

.message,.notice-box{border-radius:14px;padding:13px 15px;line-height:1.7}.message{background:var(--orange-soft);border:1px solid #fed7aa}.ok-message{background:var(--green-soft);border-color:#c6f0d8;color:#176b45}.err-message{background:var(--red-soft);border-color:#fecdd3;color:#991b1b}.notice-box{background:var(--soft);border:1px dashed #b8cde6;color:#465b72}.notice-box strong{display:block;color:var(--text);margin-bottom:2px}.notice-box span{display:block;color:var(--muted)}

.table-card{padding:0;overflow:hidden}.table-card>.section-title-row{padding:22px 22px 0;margin-bottom:14px}.table-wrap{width:100%;overflow:auto;border-top:1px solid var(--line)}table{width:100%;border-collapse:separate;border-spacing:0;background:#fff}th,td{padding:12px 14px;text-align:left;border-bottom:1px solid #edf2f7;vertical-align:middle;white-space:nowrap}th{background:#f7fbff;color:#334155;font-size:13px;font-weight:900}tbody tr:hover{background:#fbfdff}.empty-cell{text-align:center;color:var(--muted);padding:34px 14px}.table-link{font-weight:800}.flow-type{display:inline-flex;min-width:44px;justify-content:center;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:900}.flow-type.in{background:var(--green-soft);color:#08704d}.flow-type.out{background:var(--red-soft);color:#b42318}

.toolbar-card{padding:16px 18px}.quick-filter-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:14px}.toolbar-search,.toolbar-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.toolbar-search input{min-width:320px;flex:1}.toolbar-form input,.toolbar-form select{min-width:170px}.toolbar-form .toolbar-grow{flex:1;min-width:280px}.toolbar-form .toolbar-grow input{width:100%}.stats-grid{display:grid;grid-template-columns:repeat(6,minmax(130px,1fr));gap:14px;margin:0 0 18px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow)}.stat-card span{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}.stat-card strong{font-size:25px;line-height:1.2;color:#0f172a}

.login-page-shell{min-height:calc(100vh - 70px);display:flex;align-items:center;justify-content:center;padding:24px}.login-panel{max-width:440px;width:100%;padding:30px}.login-form{display:grid;gap:14px;margin-top:18px}.login-form label{display:grid;gap:6px;font-weight:800;color:#41546a}.login-form button{width:100%;margin-top:4px}.small-note{font-size:13px;margin:16px 0 0;color:var(--muted)}

/* 商品资料管理 */
.products-unified-page{display:grid;gap:18px}.product-search-panel-simple{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px 26px}.product-search-form-simple{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:14px}.product-search-form-simple input{min-width:360px;flex:1;height:44px}.filter-summary{margin-top:12px;color:var(--muted)}.filter-summary strong{font-size:18px;color:var(--text)}.product-card-table-split{display:grid;grid-template-columns:300px minmax(0,1fr);gap:18px;align-items:start}.product-card-list-pane{padding:0;overflow:hidden;background:#eef5fc}.product-card-list-pane>.section-title-row{padding:18px 18px 0;margin-bottom:0}.compact-title-row h2{font-size:18px}.product-card-scroll{height:640px;overflow:auto;padding:12px}.inventory-product-card{background:#fff;border:1px solid #e1ebf7;border-radius:15px;margin-bottom:10px;box-shadow:0 6px 14px rgba(15,35,65,.04);transition:.14s}.inventory-product-card:hover{border-color:#9bc5ff;transform:translateY(-1px)}.inventory-product-card.is-active{border-color:var(--blue);box-shadow:0 0 0 2px rgba(37,99,235,.12),0 8px 20px rgba(37,99,235,.10)}.inventory-card-main{display:block;color:var(--text);padding:13px 13px 9px}.inventory-card-title-line{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.inventory-card-title-line strong{font-size:15px;line-height:1.35;word-break:break-word}.inventory-card-title-line span{max-width:84px;border-radius:999px;background:var(--orange-soft);color:#c2410c;padding:3px 7px;font-size:12px;font-weight:900;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inventory-card-tags{display:flex;flex-wrap:wrap;gap:6px;margin:9px 0}.inventory-card-tags em{font-style:normal;border:1px solid var(--line);background:var(--soft);border-radius:999px;padding:3px 7px;color:#52657a;font-size:12px;max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inventory-card-stock-line{display:grid;gap:3px}.inventory-card-stock-line b{color:#be123c;font-size:14px}.inventory-card-stock-line small{color:var(--muted);font-size:12px;word-break:break-all}.inventory-card-actions{display:flex;gap:7px;padding:0 13px 13px}.inventory-card-actions form{margin:0}.empty-card-list{min-height:220px;display:grid;place-items:center;text-align:center;color:var(--muted);padding:20px}.product-sku-table-pane{padding:0;overflow:hidden;min-height:480px}.product-sku-table-pane>.section-title-row{padding:22px 24px 0;margin-bottom:10px}.selected-product-table-card{border-top:1px solid var(--line);padding-top:0}.selected-product-table-card h2{padding:18px 24px 0;margin-bottom:10px}.sku-inventory-table{table-layout:fixed;width:100%}.sku-inventory-table th,.sku-inventory-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;padding:11px 9px;font-size:13px;line-height:1.45}.sku-inventory-table th:nth-child(1),.sku-inventory-table td:nth-child(1){width:15%}.sku-inventory-table th:nth-child(2),.sku-inventory-table td:nth-child(2){width:11%}.sku-inventory-table th:nth-child(3),.sku-inventory-table td:nth-child(3){width:14%}.sku-inventory-table th:nth-child(4),.sku-inventory-table td:nth-child(4){width:13%}.sku-inventory-table th:nth-child(5),.sku-inventory-table td:nth-child(5){width:6%}.sku-inventory-table th:nth-child(6),.sku-inventory-table td:nth-child(6),.sku-inventory-table th:nth-child(7),.sku-inventory-table td:nth-child(7),.sku-inventory-table th:nth-child(8),.sku-inventory-table td:nth-child(8),.sku-inventory-table th:nth-child(9),.sku-inventory-table td:nth-child(9){width:8%;text-align:center}.sku-inventory-table th:nth-child(10),.sku-inventory-table td:nth-child(10){width:11%}.row-actions-inline,.sku-row-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.selected-product-edit-card{margin:18px 22px 22px}.inline-edit-card{border:1px solid var(--line);border-radius:16px;background:#fbfdff;padding:18px}.product-basic-form{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.product-basic-form .form-actions{grid-column:1/-1}.product-maintenance-details summary{cursor:pointer;font-weight:900}.product-maintenance-details[open] summary{margin-bottom:18px}.maintenance-inline-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.empty-detail-pane{min-height:360px;display:grid;place-items:center;text-align:center;padding:40px;color:var(--muted)}

/* 库存确认 / 扫码转换 */
.action-panel{max-width:1080px;margin-left:auto;margin-right:auto}.confirm-merge-panel{display:grid;gap:16px}.confirm-type-select{height:52px}.confirm-compact-note{border:1px solid var(--line);background:var(--soft);border-radius:14px;padding:14px 16px}.confirm-notice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.confirm-notice-grid div{background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px}

/* 账号管理 */
.accounts-layout{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}.account-create-card{position:sticky;top:84px}.summary-pill{display:inline-flex;align-items:center;border-radius:999px;background:var(--blue-soft);color:var(--blue);padding:7px 12px;font-weight:900}.inline-password-form{display:flex;gap:8px;align-items:center}.inline-password-form input{width:150px;height:36px}.self-badge{display:inline-flex;margin-left:8px;border-radius:999px;background:var(--green-soft);color:#08704d;padding:2px 7px;font-size:12px;font-weight:900}

.error-panel{max-width:760px;margin:auto;padding:26px}.two{display:grid;grid-template-columns:1fr 1fr;gap:18px}

@media(max-width:1280px){
  .stats-grid{grid-template-columns:repeat(3,minmax(130px,1fr))}
  .product-card-table-split{grid-template-columns:280px minmax(0,1fr)}
  .sku-inventory-table th,.sku-inventory-table td{font-size:12px;padding:10px 7px}
}
@media(max-width:980px){
  .topbar{align-items:flex-start;flex-wrap:wrap;padding:12px 16px}.nav-links{order:3;width:100%;overflow:auto;flex-wrap:nowrap;padding-bottom:2px}.container{padding:0 14px}.page-hero{display:block}.page-hero .btn{margin-top:14px}.three-cols,.two-cols,.two,.maintenance-inline-grid,.accounts-layout,.product-card-table-split{grid-template-columns:1fr}.account-create-card{position:static}.product-card-scroll{height:auto;max-height:460px}.sku-inventory-table-wrap{overflow:auto}.sku-inventory-table{min-width:860px}.product-basic-form{grid-template-columns:1fr 1fr}.confirm-notice-grid{grid-template-columns:1fr}.toolbar-search input,.product-search-form-simple input{min-width:220px}.table-wrap table{min-width:900px}
}
@media(max-width:640px){
  body{font-size:13px}.container{margin-top:14px}.section-card,.page-hero,.product-search-panel-simple{padding:16px;border-radius:14px}h1{font-size:22px}h2{font-size:17px}.stats-grid{grid-template-columns:1fr}.toolbar-search,.toolbar-form,.product-search-form-simple,.upload-inline-form,.form-actions{align-items:stretch;flex-direction:column}.toolbar-search input,.toolbar-form input,.toolbar-form select,.toolbar-form .toolbar-grow,.product-search-form-simple input,.btn,button{width:100%;min-width:0}.product-basic-form{grid-template-columns:1fr}.inventory-card-actions,.row-actions-inline{flex-direction:column;align-items:stretch}.inventory-card-actions .btn,.inventory-card-actions button,.row-actions-inline .btn,.row-actions-inline button{width:100%}.login-page-shell{padding:8px}.login-panel{padding:22px}
}

/* 商品资料管理：参考货品查询系统的左侧卡片 + 右侧明细布局 */
.products-query-style-page .product-search-panel-simple{padding:22px 26px}.product-query-split{display:grid;grid-template-columns:320px minmax(0,1fr);gap:18px;align-items:start}.product-query-list-pane{padding:0;overflow:hidden;background:#eef5fc;border-color:#d9e6f5}.query-list-header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:18px 18px 10px}.query-list-header h2{font-size:18px;margin-bottom:4px}.query-count-pill{display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:30px;border-radius:999px;background:var(--blue-soft);color:var(--blue);font-weight:900;font-size:13px}.query-product-card-scroll{height:650px;overflow:auto;padding:10px 12px 14px}.query-product-card{border-radius:16px;margin-bottom:10px;box-shadow:0 6px 16px rgba(15,35,65,.045)}.query-product-card:hover{transform:none;border-color:#93c5fd;background:#fbfdff}.query-product-card.is-active{border-color:var(--blue);box-shadow:0 0 0 2px rgba(37,99,235,.14),0 10px 22px rgba(37,99,235,.10)}.query-card-main{padding:12px 13px 9px}.query-card-topline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}.query-card-topline strong{font-size:15px;line-height:1.35;color:#0f172a;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.query-stock-badge{display:inline-flex;align-items:center;border-radius:999px;background:var(--green-soft);color:#047857;font-size:12px;font-weight:900;padding:3px 8px;white-space:nowrap}.query-stock-badge.is-zero{background:var(--red-soft);color:#be123c}.query-card-spec{margin-top:8px;display:block;border-radius:12px;background:var(--orange-soft);color:#c2410c;padding:7px 9px;font-size:13px;font-weight:800;line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.query-card-meta{display:grid;gap:5px;margin-top:9px}.query-card-meta span{color:#5b6b80;font-size:12px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.query-card-actions{display:flex;gap:8px;padding:0 13px 13px}.query-card-actions .btn,.query-card-actions button{min-height:34px}.product-query-detail-pane{padding:0;overflow:hidden;min-height:560px;background:#fff}.query-detail-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:24px 26px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}.detail-eyebrow{display:inline-flex;margin-bottom:8px;border-radius:999px;background:var(--blue-soft);color:var(--blue);font-size:12px;font-weight:900;padding:5px 9px}.query-detail-main-title h2{font-size:26px;line-height:1.25;margin-bottom:9px}.detail-subline{display:flex;gap:8px;flex-wrap:wrap}.detail-subline span{display:inline-flex;max-width:280px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:1px solid var(--line);border-radius:999px;background:#fff;color:#52657a;padding:5px 9px;font-size:13px;font-weight:800}.query-detail-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.query-detail-actions form{margin:0}.query-stock-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:18px 24px}.query-stock-summary-card{border:1px solid var(--line);border-radius:16px;background:#fff;padding:16px 18px;box-shadow:0 8px 18px rgba(15,35,65,.045)}.query-stock-summary-card.primary{border-color:#bcd2ff;background:#f7fbff}.query-stock-summary-card span{display:block;color:var(--muted);font-size:13px;font-weight:800;margin-bottom:6px}.query-stock-summary-card strong{display:block;color:#0f172a;font-size:28px;line-height:1.1}.query-detail-card{margin:0 24px 18px;border:1px solid var(--line);border-radius:18px;background:#fff;overflow:hidden;box-shadow:0 8px 18px rgba(15,35,65,.04)}.query-detail-card-title{padding:18px 20px 12px;border-bottom:1px solid var(--line);background:#fbfdff}.query-detail-card-title h2{font-size:18px;margin-bottom:4px}.query-info-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0}.query-info-item{min-height:84px;padding:16px 18px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.query-info-item:nth-child(3n){border-right:0}.query-info-item:nth-last-child(-n+3){border-bottom:0}.query-info-item span{display:block;color:var(--muted);font-size:12px;font-weight:900;margin-bottom:8px}.query-info-item strong{display:block;color:#0f172a;font-size:15px;line-height:1.45;word-break:break-word}.query-info-item.code-item strong{font-family:Consolas,Monaco,monospace}.query-table-card .table-wrap{border-top:0}.query-detail-table{table-layout:fixed;min-width:0}.query-detail-table th,.query-detail-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere}.query-detail-table th:nth-child(1),.query-detail-table td:nth-child(1){width:18%}.query-detail-table th:nth-child(2),.query-detail-table td:nth-child(2){width:14%}.query-detail-table th:nth-child(3),.query-detail-table td:nth-child(3){width:17%}.query-detail-table th:nth-child(4),.query-detail-table td:nth-child(4){width:15%}.query-detail-table th:nth-child(5),.query-detail-table td:nth-child(5){width:7%}.query-detail-table th:nth-child(n+6),.query-detail-table td:nth-child(n+6){width:9%;text-align:center}.query-edit-card{margin:0 24px 24px}.products-query-style-page .product-maintenance-details{margin-top:0}

@media(max-width:1280px){.product-query-split{grid-template-columns:300px minmax(0,1fr)}.query-stock-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.query-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.query-info-item:nth-child(3n){border-right:1px solid var(--line)}.query-info-item:nth-child(2n){border-right:0}.query-info-item:nth-last-child(-n+3){border-bottom:1px solid var(--line)}.query-info-item:nth-last-child(-n+2){border-bottom:0}}
@media(max-width:980px){.product-query-split{grid-template-columns:1fr}.query-product-card-scroll{height:auto;max-height:460px}.query-detail-hero{flex-direction:column}.query-stock-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.query-detail-table{min-width:840px}}
@media(max-width:640px){.products-query-style-page .product-search-panel-simple{padding:16px}.query-list-header,.query-detail-hero{padding:16px}.query-stock-summary-grid{grid-template-columns:1fr;padding:14px}.query-detail-card,.query-edit-card{margin:0 14px 14px}.query-info-grid{grid-template-columns:1fr}.query-info-item,.query-info-item:nth-child(2n),.query-info-item:nth-child(3n){border-right:0}.query-info-item:nth-last-child(-n+2){border-bottom:1px solid var(--line)}.query-info-item:last-child{border-bottom:0}.detail-subline span{max-width:100%}.query-card-actions{flex-direction:row}.query-card-actions .btn,.query-card-actions button{width:auto}}

/* Real product information header layout: 货品名称/品牌/货品编码/箱规/重量/厂家/生产日期/保质期 + inventory */
.real-product-info-table{font-size:12px;table-layout:fixed;min-width:1180px}
.real-product-info-table th,.real-product-info-table td{padding:10px 7px;line-height:1.4;word-break:break-word;overflow-wrap:anywhere}
.real-product-info-table th:nth-child(1),.real-product-info-table td:nth-child(1){width:12%}
.real-product-info-table th:nth-child(2),.real-product-info-table td:nth-child(2){width:7%}
.real-product-info-table th:nth-child(3),.real-product-info-table td:nth-child(3){width:11%}
.real-product-info-table th:nth-child(4),.real-product-info-table td:nth-child(4){width:9%}
.real-product-info-table th:nth-child(5),.real-product-info-table td:nth-child(5){width:6%}
.real-product-info-table th:nth-child(6),.real-product-info-table td:nth-child(6){width:10%}
.real-product-info-table th:nth-child(7),.real-product-info-table td:nth-child(7){width:10%}
.real-product-info-table th:nth-child(8),.real-product-info-table td:nth-child(8){width:8%}
.real-product-info-table th:nth-child(9),.real-product-info-table td:nth-child(9){width:7%}
.real-product-info-table th:nth-child(n+10),.real-product-info-table td:nth-child(n+10){width:5%;text-align:center}
.real-product-form{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:980px){.real-product-info-table{min-width:1100px}.real-product-form{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.real-product-form{grid-template-columns:1fr}}

/* 全站自定义确认弹窗：替代浏览器原生 confirm，适合本地与阿里云部署 */
body.modal-open{overflow:hidden}
.app-modal-backdrop{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(15,23,42,.42);
  backdrop-filter:blur(4px);
}
.app-modal-backdrop[hidden]{display:none!important}
.app-modal{
  width:min(460px,100%);
  background:#fff;
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 24px 70px rgba(15,23,42,.28);
  overflow:hidden;
}
.app-modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 20px 10px;
}
.app-modal-header h2{margin:0;font-size:18px;color:#0f172a}
.app-modal-close{
  width:34px;
  min-height:34px;
  padding:0;
  border-radius:999px;
  background:#f1f5f9;
  color:#475569;
  font-size:22px;
  line-height:1;
}
.app-modal-message{
  margin:0;
  padding:4px 20px 18px;
  color:#41546a;
  line-height:1.7;
  white-space:pre-wrap;
}
.app-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 20px 18px;
  border-top:1px solid var(--line);
  background:#f8fbff;
}
@media(max-width:640px){
  .app-modal-backdrop{align-items:flex-end;padding:12px}
  .app-modal{border-radius:18px}
  .app-modal-actions{flex-direction:column-reverse}
  .app-modal-actions .btn,.app-modal-actions button{width:100%}
}

/* 商品信息区域：取消横向滚动，按卡片网格展示 */
.real-product-info-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  border-top:1px solid var(--line);
  overflow:hidden;
}
.real-product-info-grid .info-cell{
  min-width:0;
  min-height:86px;
  padding:14px 16px;
  border-right:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fff;
}
.real-product-info-grid .info-cell:nth-child(4n){border-right:0}
.real-product-info-grid .info-cell:nth-last-child(-n+4){border-bottom:0}
.real-product-info-grid .info-cell span{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-size:12px;
  font-weight:900;
  line-height:1.35;
}
.real-product-info-grid .info-cell strong{
  display:block;
  color:#0f172a;
  font-size:15px;
  line-height:1.45;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.real-product-info-grid .info-cell-wide{grid-column:span 2}
.real-product-info-grid .code-cell strong{font-family:Consolas,Monaco,monospace;letter-spacing:.01em}
.real-product-info-grid .stock-cell{background:#fbfdff}
.real-product-info-grid .stock-cell strong{font-size:22px;line-height:1.2}
.product-query-detail-pane,.query-detail-card,.query-table-card{max-width:100%;min-width:0}
.query-table-card .table-wrap,.sku-inventory-table-wrap{overflow:visible}

@media(max-width:1280px){
  .real-product-info-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .real-product-info-grid .info-cell:nth-child(4n){border-right:1px solid var(--line)}
  .real-product-info-grid .info-cell:nth-child(3n){border-right:0}
  .real-product-info-grid .info-cell:nth-last-child(-n+4){border-bottom:1px solid var(--line)}
  .real-product-info-grid .info-cell:nth-last-child(-n+3){border-bottom:0}
}
@media(max-width:780px){
  .real-product-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .real-product-info-grid .info-cell,.real-product-info-grid .info-cell:nth-child(3n),.real-product-info-grid .info-cell:nth-child(4n){border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
  .real-product-info-grid .info-cell:nth-child(2n){border-right:0}
  .real-product-info-grid .info-cell:nth-last-child(-n+3){border-bottom:1px solid var(--line)}
  .real-product-info-grid .info-cell:nth-last-child(-n+2){border-bottom:0}
  .real-product-info-grid .info-cell-wide{grid-column:span 2}
}
@media(max-width:520px){
  .real-product-info-grid{grid-template-columns:1fr}
  .real-product-info-grid .info-cell,.real-product-info-grid .info-cell:nth-child(2n),.real-product-info-grid .info-cell:nth-child(3n),.real-product-info-grid .info-cell:nth-child(4n){border-right:0;border-bottom:1px solid var(--line)}
  .real-product-info-grid .info-cell:last-child{border-bottom:0}
  .real-product-info-grid .info-cell-wide{grid-column:span 1}
}

/* 右侧商品信息：参考货品查询系统的表格卡片样式，分组展示避免横向滑动 */
.product-info-table-card{
  border-radius:18px;
  overflow:hidden;
  background:#fff;
}
.product-info-heading-row{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  padding:18px 20px 14px;
  background:#fbfdff;
}
.product-info-table-stack{
  display:grid;
  gap:16px;
  padding:16px 20px 20px;
  overflow:visible;
}
.product-info-table-block{
  min-width:0;
}
.product-info-table-block h3{
  margin:0 0 8px;
  color:#0b2a4a;
  font-size:16px;
  font-weight:950;
  letter-spacing:.01em;
}
.product-info-compact-table{
  width:100%;
  min-width:0;
  border-collapse:separate;
  border-spacing:0;
  table-layout:fixed;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 8px 18px rgba(15,35,65,.04);
}
.product-info-compact-table th,
.product-info-compact-table td{
  padding:13px 14px;
  border-bottom:1px solid var(--line);
  color:#102033;
  line-height:1.45;
  text-align:left;
  vertical-align:middle;
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.product-info-compact-table th{
  background:#eef6ff;
  color:#213955;
  font-size:13px;
  font-weight:950;
}
.product-info-compact-table td{
  background:#fff;
  font-size:14px;
  font-weight:750;
}
.product-info-compact-table tbody tr:nth-child(even) td{background:#f4f8ff}
.product-info-compact-table tr:last-child td{border-bottom:0}
.product-info-compact-table .strong-text{font-weight:950;color:#0f172a}
.product-info-compact-table .code-text{font-family:Consolas,Monaco,monospace;font-weight:900;letter-spacing:.01em}
.stock-info-compact-table th,
.stock-info-compact-table td{text-align:center}
.stock-info-compact-table .stock-number{font-size:20px;font-weight:950;color:#0f172a}
.stock-info-table-block .product-info-compact-table{max-width:560px}

@media(max-width:1160px){
  .product-info-compact-table th,
  .product-info-compact-table td{padding:12px 10px;font-size:13px}
  .stock-info-compact-table .stock-number{font-size:18px}
}
@media(max-width:820px){
  .product-info-table-stack{padding:14px;gap:14px}
  .product-info-table-block h3{font-size:15px}
  .product-info-compact-table,
  .product-info-compact-table thead,
  .product-info-compact-table tbody,
  .product-info-compact-table tr,
  .product-info-compact-table th,
  .product-info-compact-table td{display:block;width:100%}
  .product-info-compact-table thead{display:none}
  .product-info-compact-table tr{border-bottom:0}
  .product-info-compact-table td{
    display:grid;
    grid-template-columns:96px minmax(0,1fr);
    gap:12px;
    padding:12px 14px;
    border-bottom:1px solid var(--line);
    text-align:left!important;
  }
  .product-info-table-block:nth-child(1) td:nth-child(1)::before{content:"货品名称"}
  .product-info-table-block:nth-child(1) td:nth-child(2)::before{content:"货品编码"}
  .product-info-table-block:nth-child(1) td:nth-child(3)::before{content:"品牌"}
  .product-info-table-block:nth-child(1) td:nth-child(4)::before{content:"箱规"}
  .product-info-table-block:nth-child(1) td:nth-child(5)::before{content:"重量"}
  .product-info-table-block:nth-child(2) td:nth-child(1)::before{content:"厂家名称"}
  .product-info-table-block:nth-child(2) td:nth-child(2)::before{content:"厂家所在地"}
  .product-info-table-block:nth-child(2) td:nth-child(3)::before{content:"生产日期"}
  .product-info-table-block:nth-child(2) td:nth-child(4)::before{content:"保质期"}
  .product-info-table-block:nth-child(3) td:nth-child(1)::before{content:"当前库存"}
  .product-info-table-block:nth-child(3) td:nth-child(2)::before{content:"可用库存"}
  .product-info-table-block:nth-child(3) td:nth-child(3)::before{content:"最低库存"}
  .product-info-compact-table td::before{
    color:var(--muted);
    font-size:12px;
    font-weight:950;
  }
  .stock-info-table-block .product-info-compact-table{max-width:none}
}

/* 商品信息恢复为单表横向滑动样式：字段集中展示，保留锁定库存隐藏 */
.product-info-scroll-wrap{
  width:100%;
  overflow-x:auto!important;
  overflow-y:hidden;
  border-top:1px solid var(--line);
  -webkit-overflow-scrolling:touch;
}
.product-info-scroll-table{
  min-width:1280px;
  table-layout:fixed;
}
.product-info-scroll-table th,
.product-info-scroll-table td{
  white-space:normal;
  word-break:break-word;
  overflow-wrap:anywhere;
  vertical-align:middle;
}
.product-info-scroll-table th{
  background:#eef6ff;
}
.product-info-scroll-table .strong-text{font-weight:950;color:#0f172a}
.product-info-scroll-table .code-text{font-family:Consolas,Monaco,monospace;font-weight:900;letter-spacing:.01em}
.product-info-scroll-table .stock-number{text-align:center;font-weight:950;color:#0f172a}
.product-info-scroll-table th:nth-child(1),.product-info-scroll-table td:nth-child(1){width:150px}
.product-info-scroll-table th:nth-child(2),.product-info-scroll-table td:nth-child(2){width:90px}
.product-info-scroll-table th:nth-child(3),.product-info-scroll-table td:nth-child(3){width:130px}
.product-info-scroll-table th:nth-child(4),.product-info-scroll-table td:nth-child(4){width:130px}
.product-info-scroll-table th:nth-child(5),.product-info-scroll-table td:nth-child(5){width:90px}
.product-info-scroll-table th:nth-child(6),.product-info-scroll-table td:nth-child(6){width:130px}
.product-info-scroll-table th:nth-child(7),.product-info-scroll-table td:nth-child(7){width:130px}
.product-info-scroll-table th:nth-child(8),.product-info-scroll-table td:nth-child(8){width:110px}
.product-info-scroll-table th:nth-child(9),.product-info-scroll-table td:nth-child(9){width:100px}
.product-info-scroll-table th:nth-child(n+10),.product-info-scroll-table td:nth-child(n+10){width:95px;text-align:center}
@media(max-width:820px){
  .product-info-scroll-table{min-width:1180px}
}


/* 条码查询 */
.barcode-search-card{margin-bottom:18px}
.barcode-search-form input{min-width:420px}
.barcode-help-text{margin:10px 0 0;color:var(--muted);line-height:1.7}
.barcode-result-card .section-title-row{align-items:center}
.barcode-table-wrap{max-height:620px}
.barcode-lookup-table{min-width:1460px;table-layout:fixed}
.barcode-lookup-table th,.barcode-lookup-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;vertical-align:middle}
.barcode-lookup-table th:nth-child(1),.barcode-lookup-table td:nth-child(1){width:120px}
.barcode-lookup-table th:nth-child(2),.barcode-lookup-table td:nth-child(2){width:190px;text-align:center}
.barcode-lookup-table th:nth-child(3),.barcode-lookup-table td:nth-child(3){width:230px}
.barcode-lookup-table th:nth-child(4),.barcode-lookup-table td:nth-child(4){width:160px}
.barcode-lookup-table th:nth-child(5),.barcode-lookup-table td:nth-child(5){width:110px}
.barcode-lookup-table th:nth-child(6),.barcode-lookup-table td:nth-child(6){width:90px}
.barcode-lookup-table th:nth-child(7),.barcode-lookup-table td:nth-child(7){width:90px}
.barcode-lookup-table th:nth-child(8),.barcode-lookup-table td:nth-child(8){width:190px}
.barcode-lookup-table th:nth-child(9),.barcode-lookup-table td:nth-child(9){width:90px;text-align:center}
.barcode-lookup-table th:nth-child(10),.barcode-lookup-table td:nth-child(10){width:190px;text-align:center}
.barcode-image-preview{max-width:160px;width:100%;height:58px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:10px;padding:6px;box-shadow:0 4px 14px rgba(15,23,42,.06)}
.barcode-image-link{display:inline-flex;align-items:center;justify-content:center}
.barcode-image-missing{display:inline-block;border-radius:999px;background:#f8fafc;color:#64748b;border:1px solid var(--line);padding:5px 9px;font-weight:900;font-size:12px}
.barcode-code{font-family:Consolas,Monaco,monospace;font-weight:950;color:#0f172a;background:#f8fbff;border:1px solid var(--line);border-radius:10px;padding:6px 8px;display:inline-block}
.barcode-missing{display:inline-block;border-radius:999px;background:var(--red-soft);color:#b42318;padding:5px 9px;font-weight:900;font-size:12px}
.barcode-note-box{margin-top:18px}
@media(max-width:640px){.barcode-search-form input{min-width:100%}}
.pagination-row{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:16px 22px;border-top:1px solid var(--line);background:#fbfdff;flex-wrap:wrap}.pagination-row .disabled{opacity:.45;cursor:not-allowed;pointer-events:none}
@media(max-width:640px){.pagination-row{justify-content:stretch}.pagination-row .btn,.pagination-row span.btn{width:100%}}
.inline-error-list{margin:8px 0 0 18px;padding:0;line-height:1.7}.compact-message-card{padding:16px 18px}

/* 条码查询页：紧凑布局 + 批量入库预览 */
.hidden-form{display:none}
.barcode-result-title-row{align-items:center}
.barcode-bulk-panel{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0 22px 14px}
.bulk-batch-label{display:flex;align-items:center;gap:8px;color:#41546a;font-weight:900}
.bulk-batch-label input{width:220px;height:38px}
.compact-muted{font-size:13px}
.barcode-table-wrap{max-height:620px;overflow:auto}
.barcode-lookup-table{width:100%;min-width:0!important;table-layout:fixed;font-size:13px}
.barcode-lookup-table th,.barcode-lookup-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere;vertical-align:middle;padding:10px 8px;line-height:1.45}
.barcode-lookup-table th:nth-child(1),.barcode-lookup-table td:nth-child(1){width:8%;text-align:center}
.barcode-lookup-table th:nth-child(2),.barcode-lookup-table td:nth-child(2){width:12%;text-align:center}
.barcode-lookup-table th:nth-child(3),.barcode-lookup-table td:nth-child(3){width:23%}
.barcode-lookup-table th:nth-child(4),.barcode-lookup-table td:nth-child(4){width:13%}
.barcode-lookup-table th:nth-child(5),.barcode-lookup-table td:nth-child(5){width:8%}
.barcode-lookup-table th:nth-child(6),.barcode-lookup-table td:nth-child(6){width:7%;text-align:center}
.barcode-lookup-table th:nth-child(7),.barcode-lookup-table td:nth-child(7){width:7%;text-align:center}
.barcode-lookup-table th:nth-child(8),.barcode-lookup-table td:nth-child(8){width:8%;text-align:center}
.barcode-lookup-table th:nth-child(9),.barcode-lookup-table td:nth-child(9){width:14%;text-align:center}
.barcode-select-cell{display:grid;gap:7px;justify-items:center}
.barcode-check-line{display:inline-flex;align-items:center;justify-content:center;gap:4px;font-size:12px;color:#52657a;font-weight:900}
.barcode-check-line input{width:16px;height:16px}
.barcode-qty-input{width:54px;height:32px;text-align:center;padding:0 4px;border-radius:9px;font-weight:900}
.barcode-image-preview{max-width:104px;width:100%;height:52px;object-fit:contain;background:#fff;border:1px solid var(--line);border-radius:10px;padding:5px;box-shadow:0 4px 12px rgba(15,23,42,.05)}
.barcode-image-link{display:inline-flex;align-items:center;justify-content:center}
.barcode-image-code{display:block;margin-top:4px;font-size:12px;font-weight:900;color:#334155;font-family:Consolas,Monaco,monospace}
.barcode-product-cell strong{display:block;font-size:14px;color:#0f172a;line-height:1.45}
.barcode-product-cell small{display:block;margin-top:4px;color:var(--muted);font-size:12px;line-height:1.35}
.barcode-action-cell .btn{width:72px;min-height:34px;padding:7px 10px}
@media(max-width:1100px){
  .barcode-lookup-table{min-width:980px!important}
  .barcode-table-wrap{overflow:auto}
}
@media(max-width:640px){
  .barcode-search-form input{min-width:100%}
  .barcode-bulk-panel{padding:0 14px 12px}
  .bulk-batch-label{width:100%;align-items:flex-start;flex-direction:column}.bulk-batch-label input{width:100%}
}

/* 入库扫码：连续扫码待入库清单 */
.scan-workbench-card{max-width:1420px;margin-left:auto;margin-right:auto}
.scan-workbench-card .title-meta{display:inline-flex;align-items:center;min-height:30px;border:1px solid #bfd2f5;background:var(--blue-soft);color:var(--blue);border-radius:999px;padding:4px 10px;font-weight:900;font-size:12px}
.scan-top-grid{align-items:end}
.scan-inline-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.scan-auto-preview-toggle{display:inline-flex!important;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 12px;color:#41546a;font-weight:900}
.scan-auto-preview-toggle input{width:16px;height:16px;padding:0;margin:0;accent-color:var(--blue)}
.scan-paste-box{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end;border:1px solid var(--line);background:#fbfdff;border-radius:16px;padding:14px}
.scan-paste-box textarea{width:100%;resize:vertical;min-height:92px}
.scan-pending-panel{border:1px solid var(--line);border-radius:16px;background:#fff;overflow:hidden}
.scan-pending-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.scan-pending-header h3{margin-bottom:4px}
.scan-pending-header p{margin:0}
.scan-status-pill{display:inline-flex;align-items:center;border-radius:999px;background:var(--green-soft);color:#047857;padding:5px 10px;font-size:12px;font-weight:900;white-space:nowrap}
.scan-pending-table-wrap{border-top:0;max-height:360px;overflow:auto}
.scan-pending-table{table-layout:fixed;min-width:0}
.scan-pending-table th,.scan-pending-table td{white-space:normal;word-break:break-word;overflow-wrap:anywhere}
.scan-pending-table th:nth-child(1),.scan-pending-table td:nth-child(1){width:54%}
.scan-pending-table th:nth-child(2),.scan-pending-table td:nth-child(2){width:28%;text-align:center}
.scan-pending-table th:nth-child(3),.scan-pending-table td:nth-child(3){width:18%;text-align:center}
.scan-code-cell{font-family:Consolas,Monaco,monospace;font-weight:900;color:#0f172a}
.scan-qty-control{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.scan-qty-control .btn{width:32px;min-height:32px;padding:0}
.scan-qty-input{width:72px;height:34px;text-align:center;font-weight:900;padding:0 6px}
.scan-submit-actions{align-items:center}
@media(max-width:820px){
  .scan-paste-box{grid-template-columns:1fr}
  .scan-pending-header{flex-direction:column}
  .scan-pending-table{min-width:640px}
  .scan-inline-actions .btn,.scan-submit-actions .btn,.scan-paste-box .btn{width:100%}
  .scan-auto-preview-toggle{width:100%;justify-content:center}
}

/* 入库扫码与库存确认：统一卡片样式、减少页面层级 */
.scan-unified-panel,.confirm-unified-panel{max-width:1220px;margin-left:auto;margin-right:auto}
.scan-unified-panel{display:grid;gap:16px}.scan-method-stack{display:grid;gap:16px}.scan-method-card{border:1px solid var(--line);background:#fff;border-radius:18px;padding:18px;box-shadow:0 8px 18px rgba(15,35,65,.045)}.scan-method-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;align-items:start;margin-bottom:14px}.method-index{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 10px;border-radius:999px;background:var(--blue-soft);color:var(--blue);font-size:12px;font-weight:900;white-space:nowrap}.method-index.muted-index{background:#f1f5f9;color:#64748b}.scan-method-head h2{margin:0 0 4px}.scan-method-head p{margin:0}.scan-sub-card{box-shadow:none}.scan-paste-box{margin-top:2px}.compact-notice{padding:11px 13px;border-style:solid;background:#fbfdff}.scan-rule-box{margin-top:2px}.scan-inline-actions{padding:2px 0}.scan-submit-actions{padding-top:2px}.scan-pending-panel{box-shadow:none}.scan-pending-table{min-width:0!important}.scan-pending-table-wrap table{min-width:0!important}.scan-pending-table th,.scan-pending-table td{padding:10px 12px}.scan-status-pill{background:var(--green-soft);color:#047857}.scan-file-form{gap:14px}

.confirm-unified-panel{display:grid;gap:16px}.confirm-mode-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.confirm-mode-card{min-height:118px;padding:16px;text-align:left;display:grid;align-content:start;gap:8px;border:1px solid var(--line);background:#fff;color:#0f172a;border-radius:18px;box-shadow:0 8px 18px rgba(15,35,65,.045)}.confirm-mode-card:hover{filter:none;border-color:#b7cdf8;background:#fbfdff}.confirm-mode-card[aria-pressed="true"]{border-color:#8bb4ff;background:#f7fbff;box-shadow:0 0 0 3px rgba(37,99,235,.10),0 8px 18px rgba(15,35,65,.05)}.confirm-mode-card strong{font-size:17px;line-height:1.35}.confirm-mode-card em{font-style:normal;color:var(--muted);font-size:13px;line-height:1.55}.confirm-upload-card{border:1px solid var(--line);background:#fff;border-radius:18px;padding:18px;display:grid;gap:14px}.confirm-upload-grid{align-items:end}.confirm-actions-row{align-items:center}.confirm-process-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.confirm-process-card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px 15px;box-shadow:0 8px 18px rgba(15,35,65,.04)}.confirm-process-card strong{display:block;color:#0f172a;margin-bottom:5px}.confirm-process-card span{display:block;color:var(--muted);line-height:1.65}.confirm-merge-panel .section-title-row{margin-bottom:0}

@media(max-width:980px){
  .scan-unified-panel,.confirm-unified-panel{max-width:100%}.confirm-mode-grid,.confirm-process-grid{grid-template-columns:1fr}.scan-method-head{grid-template-columns:1fr}.scan-method-head .method-index{width:max-content}.scan-pending-table{min-width:0!important}.scan-pending-table-wrap table{min-width:0!important}
}
@media(max-width:640px){
  .scan-method-card,.confirm-upload-card{padding:14px}.confirm-mode-card{min-height:auto}.scan-inline-actions{align-items:stretch;flex-direction:column}.scan-inline-actions .btn,.scan-auto-preview-toggle{width:100%;justify-content:center}.scan-pending-table th:nth-child(1),.scan-pending-table td:nth-child(1){width:46%}.scan-pending-table th:nth-child(2),.scan-pending-table td:nth-child(2){width:34%}.scan-pending-table th:nth-child(3),.scan-pending-table td:nth-child(3){width:20%}
}

/* 条码查询页：专业紧凑版 */
.barcode-search-professional{display:grid;gap:12px}.barcode-search-professional .toolbar-search{align-items:center}.barcode-search-professional .barcode-search-form input{min-width:520px}.barcode-search-tips{display:flex;gap:8px;flex-wrap:wrap}.barcode-search-tips span{display:inline-flex;align-items:center;min-height:28px;padding:4px 10px;border:1px solid var(--line);border-radius:999px;background:#f8fbff;color:#53677d;font-size:12px;font-weight:900}.barcode-professional-card{overflow:hidden}.barcode-bulk-professional{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:0 22px 14px}.bulk-summary{min-height:36px;display:inline-flex;align-items:center;padding:0 12px;border-radius:999px;background:#f8fbff;border:1px solid var(--line);color:#334155;font-weight:900;font-size:13px}.professional-barcode-table-wrap{overflow:auto;max-height:660px}.professional-barcode-table{width:100%;min-width:0!important;table-layout:fixed;font-size:13px}.professional-barcode-table th,.professional-barcode-table td{padding:11px 10px;vertical-align:middle;line-height:1.45}.professional-barcode-table th:nth-child(1),.professional-barcode-table td:nth-child(1){width:90px;text-align:center}.professional-barcode-table th:nth-child(2),.professional-barcode-table td:nth-child(2){width:150px;text-align:center}.professional-barcode-table th:nth-child(3),.professional-barcode-table td:nth-child(3){width:auto}.professional-barcode-table th:nth-child(4),.professional-barcode-table td:nth-child(4){width:180px}.professional-barcode-table th:nth-child(5),.professional-barcode-table td:nth-child(5){width:86px;text-align:center}.professional-barcode-table th:nth-child(6),.professional-barcode-table td:nth-child(6){width:92px;text-align:center}.professional-barcode-table .barcode-select-cell{display:grid;gap:7px;justify-items:center}.professional-barcode-table .barcode-select{width:17px;height:17px;accent-color:var(--blue)}.professional-barcode-table .barcode-qty-input{width:56px;height:32px;text-align:center;padding:0 4px;border-radius:9px;font-weight:900}.professional-barcode-table .barcode-image-preview{max-width:122px;width:100%;height:54px;object-fit:contain}.professional-barcode-table .barcode-product-cell strong{font-size:14px}.professional-barcode-table .barcode-product-cell small,.barcode-spec-cell span{display:block;margin-top:4px;color:var(--muted);font-size:12px}.barcode-spec-cell{color:#334155}.barcode-stock-cell{font-size:16px;font-weight:950;color:#0f172a}.professional-barcode-table .barcode-action-cell .btn{width:68px;min-height:34px}.confirm-inbound-template-tip{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border:1px dashed #b7cdf8;background:#f8fbff;border-radius:14px;padding:12px 14px;color:#41546a}.confirm-inbound-template-tip strong{color:#0f172a}.confirm-inbound-template-tip span{line-height:1.6}.confirm-inbound-template-tip[hidden]{display:none!important}
@media(max-width:1100px){.professional-barcode-table{min-width:760px!important}.barcode-search-professional .barcode-search-form input{min-width:320px}}
@media(max-width:720px){.barcode-search-professional .barcode-search-form input{min-width:100%}.barcode-bulk-professional{padding:0 14px 12px;align-items:stretch}.barcode-bulk-professional .btn,.bulk-summary{width:100%;justify-content:center}.professional-barcode-table{min-width:720px!important}}

.status-disabled{color:#b42318;font-weight:800}

/* 本次优化：入库扫码左右布局 + 库存日报精简 */
.inventory-daily-stats{grid-template-columns:repeat(4,minmax(150px,1fr))}
.daily-product-table-wrap table,.daily-history-table-wrap table{min-width:860px}
.scan-entry-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:stretch}
.scan-live-panel{border:1px solid var(--line);background:#fbfdff;border-radius:16px;padding:14px;display:grid;align-content:start;gap:10px}
.scan-entry-tip{margin:0;line-height:1.7}
.scan-entry-grid .scan-paste-box{grid-template-columns:1fr;align-items:stretch;margin-top:0}
.paste-actions-row{justify-content:flex-end;margin-top:2px}
.scan-pending-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.scan-pending-tools .btn{min-height:32px;padding:6px 12px;border-radius:9px}
@media(max-width:900px){
  .inventory-daily-stats{grid-template-columns:repeat(2,minmax(130px,1fr))}
  .scan-entry-grid{grid-template-columns:1fr}
  .paste-actions-row{justify-content:stretch}.paste-actions-row .btn{width:100%}
  .scan-pending-tools{justify-content:flex-start}
}
@media(max-width:640px){
  .inventory-daily-stats{grid-template-columns:1fr}
}

/* 2026-06-23 全站视觉统一优化：只调整展示样式，不改变业务逻辑 */
:root{
  --bg:#eef3f9;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e2e8f0;
  --line-strong:#cbd5e1;
  --soft:#f8fafc;
  --blue:#1d4ed8;
  --blue-soft:#eaf2ff;
  --green:#059669;
  --green-soft:#ecfdf5;
  --orange:#ea580c;
  --orange-soft:#fff7ed;
  --red:#dc2626;
  --red-soft:#fff1f2;
  --shadow:0 14px 38px rgba(15,23,42,.07);
  --shadow-soft:0 8px 24px rgba(15,23,42,.055);
  --radius:18px;
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(circle at 0% 0%, rgba(37,99,235,.10), transparent 28%),
    radial-gradient(circle at 100% 0%, rgba(14,165,233,.10), transparent 24%),
    linear-gradient(180deg,#f8fbff 0%,var(--bg) 42%,#f4f7fb 100%);
  color:var(--text);
  letter-spacing:.01em;
}
body::selection{background:#bfdbfe;color:#0f172a}
[hidden]{display:none!important}

.topbar{
  min-height:68px;
  padding:0 28px;
  background:rgba(255,255,255,.92);
  border-bottom:1px solid rgba(203,213,225,.78);
  box-shadow:0 10px 30px rgba(15,23,42,.06);
}
.brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  color:#0f172a!important;
  letter-spacing:-.02em;
}
.brand::before{
  content:"";
  width:30px;
  height:30px;
  border-radius:10px;
  background:linear-gradient(135deg,#1d4ed8,#0ea5e9);
  box-shadow:0 8px 20px rgba(29,78,216,.24);
}
.nav-links{
  gap:4px;
  padding:6px;
  border:1px solid rgba(226,232,240,.8);
  background:#f8fafc;
  border-radius:999px;
}
.nav-links a{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  padding:7px 13px;
  color:#475569;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease;
}
.nav-links a:hover{
  background:#eef6ff;
  color:#1d4ed8;
  transform:translateY(-1px);
}
.nav-links a.active{
  color:#fff;
  background:linear-gradient(135deg,#1d4ed8,#2563eb);
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}
.user-pill{
  background:#fff;
  border-color:#dbe5f1;
  color:#334155;
  box-shadow:0 6px 14px rgba(15,23,42,.04);
}
.logout-link{
  background:#f1f5f9;
  border:1px solid #e2e8f0;
  color:#475569!important;
}
.logout-link:hover{background:#e2e8f0}
.container{width:min(1580px,100%);margin:24px auto 46px;padding:0 24px}

.page-hero,.section-card,.card{
  border-color:rgba(226,232,240,.94);
  box-shadow:var(--shadow);
}
.page-hero{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
}
.page-hero::after{
  content:"";
  position:absolute;
  right:-72px;
  top:-86px;
  width:210px;
  height:210px;
  border-radius:50%;
  background:rgba(37,99,235,.07);
  pointer-events:none;
}
.page-hero>*{position:relative;z-index:1}
.page-hero h1,.product-search-panel-simple h1,.login-panel h1{
  color:#0f172a;
  font-weight:950;
  letter-spacing:-.035em;
}
.hero-subtitle,.muted{color:var(--muted)}
.section-card{background:rgba(255,255,255,.98)}
.section-title-row h2,.section-title-row h1{letter-spacing:-.02em}
.title-meta,.summary-pill,.query-count-pill{
  border:1px solid #dbeafe;
  background:#eff6ff;
  color:#1d4ed8;
  border-radius:999px;
  padding:6px 11px;
  font-size:12px;
  font-weight:900;
}

.btn,button{
  border-radius:11px;
  box-shadow:0 8px 18px rgba(29,78,216,.14);
  transition:transform .14s ease,box-shadow .14s ease,background .14s ease,filter .14s ease,border-color .14s ease;
}
.btn:hover,button:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(29,78,216,.18);
  filter:none;
}
.btn:active,button:active{transform:translateY(0);box-shadow:0 6px 12px rgba(29,78,216,.12)}
.btn.secondary,button.secondary,.reset-filter{
  border:1px solid #cfe0ff;
  background:#eff6ff;
  color:#1d4ed8;
  box-shadow:none;
}
.btn.ghost,button.ghost{
  background:#fff;
  color:#475569;
  border:1px solid #dbe5f1;
  box-shadow:none;
}
.btn.danger,button.danger,.danger{
  background:#dc2626;
  box-shadow:0 8px 18px rgba(220,38,38,.14);
}
.btn.small,button.small{border-radius:9px;font-weight:900}
button:disabled,.btn.disabled{transform:none;box-shadow:none}

input,select,textarea{
  border-color:#d5dfec;
  background:#fff;
  transition:border-color .14s ease,box-shadow .14s ease,background .14s ease;
}
input:hover,select:hover,textarea:hover{border-color:#b8c8da}
input:focus,select:focus,textarea:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 4px rgba(37,99,235,.12);
}
label{letter-spacing:.005em}
input[type=file]{border-style:dashed;background:#fbfdff}
textarea{line-height:1.7}

.message,.notice-box{
  border-radius:15px;
  box-shadow:0 8px 18px rgba(15,23,42,.035);
}
.ok-message{border-left:4px solid var(--green)}
.err-message{border-left:4px solid var(--red)}
.notice-box{background:#f8fbff;border-color:#cfe0ff}
.global-message-card{padding:16px 18px}

.table-card{border-radius:18px;background:#fff}
.table-wrap{border-top-color:#e9eef5}
table{font-size:13px}
th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f8fbff;
  color:#334155;
  border-bottom:1px solid #dbe5f1;
  letter-spacing:.02em;
}
td{color:#1f2937}
tbody tr:nth-child(even){background:#fcfdff}
tbody tr:hover{background:#f3f8ff}
.empty-cell{background:#fff;color:#7c8aa0}
.code-text,.scan-code-cell{
  font-family:"SFMono-Regular",Consolas,"Liberation Mono",monospace;
  letter-spacing:.01em;
}
.stock-number,.stock-after,.stock-change{font-weight:950}
.stock-change.in,.flow-type.in{color:#047857;background:#ecfdf5;border-color:#bbf7d0}
.stock-change.out,.flow-type.out{color:#b91c1c;background:#fff1f2;border-color:#fecdd3}
.flow-type{
  border:1px solid #dbe5f1;
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
  font-weight:950;
}
.pagination-row{background:#fbfdff}
.pagination-row .disabled{opacity:.55}

.stats-grid{gap:16px}
.stat-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg,#fff 0%,#fbfdff 100%);
  box-shadow:var(--shadow-soft);
}
.stat-card::after{
  content:"";
  position:absolute;
  right:-34px;
  bottom:-42px;
  width:108px;
  height:108px;
  border-radius:50%;
  background:rgba(37,99,235,.06);
}
.stat-card span,.stat-card strong{position:relative;z-index:1}
.stat-card strong{font-size:28px;letter-spacing:-.03em}

.login-page-shell{
  min-height:calc(100vh - 48px);
  background:radial-gradient(circle at center,rgba(37,99,235,.10),transparent 44%);
}
.login-panel{
  border:1px solid rgba(226,232,240,.95);
  box-shadow:0 24px 60px rgba(15,23,42,.14);
}
.login-brand-block::before{
  content:"";
  display:block;
  width:44px;
  height:44px;
  margin-bottom:16px;
  border-radius:15px;
  background:linear-gradient(135deg,#1d4ed8,#0ea5e9);
  box-shadow:0 12px 28px rgba(29,78,216,.25);
}
.login-form button{min-height:44px}

.product-search-panel-simple,.product-list-pane,.product-detail-pane,.query-detail-card,.inline-edit-card,.product-maintenance-details,
.scan-method-card,.confirm-mode-card,.confirm-upload-card,.confirm-process-card,.barcode-result-card,.barcode-search-card{
  border-color:#e2e8f0;
  box-shadow:var(--shadow-soft);
}
.inventory-product-card{
  border-color:#e4ebf3;
  background:linear-gradient(135deg,#fff 0%,#fbfdff 100%);
  transition:transform .14s ease,box-shadow .14s ease,border-color .14s ease;
}
.inventory-product-card:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 26px rgba(15,23,42,.08);
  border-color:#bfdbfe;
}
.inventory-product-card.is-active,.query-product-card.is-active{
  border-color:#93c5fd;
  background:linear-gradient(135deg,#eff6ff 0%,#fff 100%);
  box-shadow:0 0 0 3px rgba(37,99,235,.10),0 12px 26px rgba(15,23,42,.07);
}
.query-stock-badge{
  border:1px solid #bbf7d0;
  background:#ecfdf5;
  color:#047857;
}
.query-stock-badge.is-zero{
  border-color:#fecdd3;
  background:#fff1f2;
  color:#b91c1c;
}
.query-detail-hero{
  border-radius:18px;
  background:linear-gradient(135deg,#f8fbff,#ffffff);
  border:1px solid #e2e8f0;
}
.detail-eyebrow{color:#1d4ed8;font-weight:950;letter-spacing:.08em}
.product-info-scroll-wrap{border-radius:14px;border:1px solid #e2e8f0}
.product-maintenance-details summary{
  cursor:pointer;
  font-weight:950;
  color:#0f172a;
}
.product-maintenance-details[open] summary{margin-bottom:16px}

.scan-unified-panel,.confirm-unified-panel{max-width:1280px}
.scan-method-primary{border-color:#cfe0ff;background:linear-gradient(135deg,#ffffff 0%,#f8fbff 100%)}
.scan-method-file{background:#fff}
.scan-method-card,.confirm-upload-card{padding:20px}
.method-index{
  background:linear-gradient(135deg,#eff6ff,#dbeafe);
  color:#1d4ed8;
  border:1px solid #bfdbfe;
}
.scan-live-panel,.scan-paste-box,.scan-pending-panel{
  border-color:#dbe5f1;
  background:#ffffff;
}
.scan-live-panel input{min-height:48px;font-size:16px;font-weight:800}
.scan-paste-box textarea{min-height:118px}
.scan-pending-header{background:#f8fbff}
.scan-status-pill{border:1px solid #bbf7d0}
.scan-pending-table-wrap{max-height:420px}
.scan-submit-actions{
  padding:14px 0 0;
  border-top:1px solid #edf2f7;
}

.confirm-mode-card{
  box-shadow:none;
  border-color:#dbe5f1;
}
.confirm-mode-card[aria-pressed="true"]{
  border-color:#60a5fa;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 100%);
}
.confirm-process-card{background:#fbfdff}

.barcode-search-professional{padding:18px}
.barcode-search-tips span{background:#fff;color:#475569}
.barcode-image-preview{
  padding:4px;
  border:1px solid #e2e8f0;
  border-radius:10px;
  background:#fff;
}
.professional-barcode-table{font-size:13px}
.barcode-stock-cell{color:#0f172a}
.barcode-note-box{margin-bottom:28px}

.toolbar-card{
  background:rgba(255,255,255,.98);
}
.quick-filter-row{
  padding-bottom:12px;
  border-bottom:1px solid #edf2f7;
}
.quick-filter-row:last-child{border-bottom:0;padding-bottom:0}
.toolbar-form,.toolbar-search{gap:14px}

.accounts-layout{align-items:start}
.account-create-card,.account-list-card{box-shadow:var(--shadow-soft)}
.accounts-table-wrap{border-radius:14px;border:1px solid #e2e8f0;overflow:auto}

.app-modal-backdrop{background:rgba(15,23,42,.50);backdrop-filter:blur(4px)}
.app-modal{
  border:1px solid #e2e8f0;
  border-radius:20px;
  box-shadow:0 28px 80px rgba(15,23,42,.25);
}
.app-modal-header{background:#f8fbff;border-bottom:1px solid #e2e8f0}

@media(max-width:1120px){
  .topbar{align-items:flex-start;flex-wrap:wrap;padding:14px 18px;gap:12px}
  .nav-links{order:3;width:100%;overflow:auto;flex-wrap:nowrap;border-radius:18px;justify-content:flex-start}
  .nav-links a{white-space:nowrap}
}
@media(max-width:720px){
  .container{padding:0 14px;margin-top:16px}
  .page-hero,.section-card,.card{border-radius:16px}
  .page-hero::after{display:none}
  .brand::before{width:26px;height:26px;border-radius:9px}
  .user-pill,.logout-link{font-size:12px;padding:6px 10px}
  table{font-size:12px}
  th,td{padding:10px 11px}
  .stat-card strong{font-size:24px}
}

/* 商品资料页：禁止浏览器滚动锚定干扰，配合脚本保留左右区域位置 */
.products-unified-page,
.products-unified-page .product-card-scroll,
.products-unified-page .product-detail-pane,
.products-unified-page .product-info-scroll-wrap{
  overflow-anchor:none;
}

/* 商品资料页滚动性能优化：减少滚动时重绘和多层阴影，保留原业务与页面结构 */
html{scroll-behavior:auto!important}
.topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important;box-shadow:0 2px 10px rgba(15,23,42,.045)!important}
.products-unified-page,
.products-unified-page *{
  scroll-behavior:auto!important;
}
.products-unified-page .product-query-split{
  align-items:start;
}
.products-unified-page .product-query-list-pane,
.products-unified-page .product-query-detail-pane{
  contain:layout paint;
}
.products-unified-page .query-product-card-scroll,
.products-unified-page .product-card-scroll{
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  contain:layout paint;
  background:#eef5fc;
}
.products-unified-page .inventory-product-card,
.products-unified-page .query-product-card{
  box-shadow:none!important;
  background:#fff!important;
  transition:border-color .08s linear,background-color .08s linear!important;
  transform:none!important;
  contain:layout paint style;
  content-visibility:auto;
  contain-intrinsic-size:168px;
}
.products-unified-page .inventory-product-card:hover,
.products-unified-page .query-product-card:hover{
  transform:none!important;
  box-shadow:none!important;
  background:#fbfdff!important;
}
.products-unified-page .inventory-product-card.is-active,
.products-unified-page .query-product-card.is-active{
  box-shadow:0 0 0 2px rgba(37,99,235,.14)!important;
}
.products-unified-page .product-search-panel-simple,
.products-unified-page .product-list-pane,
.products-unified-page .product-detail-pane,
.products-unified-page .query-detail-card,
.products-unified-page .inline-edit-card,
.products-unified-page .product-maintenance-details{
  box-shadow:0 4px 14px rgba(15,23,42,.045)!important;
}
.products-unified-page .query-detail-hero,
.products-unified-page .product-search-panel-simple,
.products-unified-page .stat-card,
.products-unified-page .inventory-product-card,
.products-unified-page .query-detail-card{
  background-image:none!important;
}
.products-unified-page th{
  position:static;
}
.products-unified-page .product-info-scroll-wrap{
  overscroll-behavior-x:contain;
  scrollbar-gutter:stable;
}
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    transition:none!important;
    animation:none!important;
    scroll-behavior:auto!important;
  }
}


/* 商品资料页最终优化：双栏稳定滚动 + 专业简洁商品详情卡片 */
.products-unified-page,
.products-unified-page *{
  scroll-behavior:auto!important;
}
.products-unified-page,
.products-unified-page .product-card-scroll,
.products-unified-page .product-detail-pane{
  overflow-anchor:none;
}
.products-unified-page .product-query-split{
  align-items:stretch!important;
}
.products-unified-page .product-query-list-pane,
.products-unified-page .product-query-detail-pane{
  min-height:0!important;
  background:#fff;
}
.products-unified-page .query-product-card-scroll{
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
}
.products-unified-page .query-product-card{
  box-shadow:none!important;
  transform:none!important;
  transition:border-color .08s ease,background-color .08s ease!important;
}
.products-unified-page .query-product-card:hover{
  transform:none!important;
  box-shadow:none!important;
}
.products-unified-page .query-product-card.is-active{
  border-color:#2563eb!important;
  box-shadow:0 0 0 2px rgba(37,99,235,.14)!important;
}

@media(min-width:981px){
  .products-unified-page .product-query-split{
    height:calc(100vh - 220px);
    min-height:660px;
    max-height:820px;
    overflow:hidden;
  }
  .products-unified-page .product-query-list-pane,
  .products-unified-page .product-query-detail-pane{
    height:100%;
    max-height:none!important;
    overflow:hidden!important;
    display:flex;
    flex-direction:column;
  }
  .products-unified-page .query-list-header,
  .products-unified-page .query-detail-hero{
    flex:0 0 auto;
  }
  .products-unified-page .query-product-card-scroll{
    flex:1 1 auto;
    min-height:0;
    height:auto!important;
    max-height:none!important;
    overflow-y:auto;
    overflow-x:hidden;
  }
  .products-unified-page .product-query-detail-pane{
    overflow-y:auto!important;
    scrollbar-gutter:stable;
  }
  .products-unified-page .product-maintenance-details{
    margin-top:18px;
  }
}

/* 左侧商品卡片：信息更紧凑，减少点击时布局变化 */
.products-unified-page .query-card-main{
  padding:14px 14px 10px;
}
.products-unified-page .query-card-topline{
  align-items:start;
}
.products-unified-page .query-card-topline strong{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  white-space:normal!important;
  overflow:hidden;
  min-height:40px;
}
.products-unified-page .query-card-spec{
  border-radius:13px;
  padding:8px 10px;
}
.products-unified-page .query-card-meta{
  gap:6px;
}
.products-unified-page .query-card-meta span{
  line-height:1.45;
}

/* 右侧头部 */
.products-unified-page .query-detail-hero{
  padding:22px 24px 18px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
  border-bottom:1px solid #e2e8f0;
}
.products-unified-page .detail-eyebrow{
  background:#eef4ff;
  color:#2563eb;
  border:1px solid #dbe8ff;
}
.products-unified-page .query-detail-main-title h2{
  max-width:920px;
  margin-bottom:10px;
  font-size:25px;
  line-height:1.32;
  letter-spacing:.01em;
}
.products-unified-page .detail-subline span{
  background:#fff;
  border-color:#dbe8f7;
  color:#52657a;
}
.products-unified-page .query-detail-actions .btn,
.products-unified-page .query-detail-actions .danger{
  min-height:38px;
  padding:0 14px;
  border-radius:11px;
}

/* 右侧商品详情：去掉横向表格，改为清晰卡片布局 */
.product-info-pro-card{
  margin:18px 24px 22px!important;
  border:1px solid #dbe8f7!important;
  border-radius:24px!important;
  overflow:hidden;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(15,23,42,.055)!important;
}
.product-info-pro-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:20px 22px 12px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.product-info-pro-header h2{
  margin:0 0 5px;
  font-size:20px;
  line-height:1.25;
}
.product-status-pill{
  display:inline-flex;
  align-items:center;
  height:30px;
  padding:0 11px;
  border-radius:999px;
  background:#eef4ff;
  color:#2563eb;
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.product-kpi-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  padding:16px 22px 10px;
}
.product-kpi-card{
  min-width:0;
  min-height:112px;
  padding:18px 18px 16px;
  border:1px solid #e2e8f0;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.product-kpi-card span,
.product-detail-clean-item span{
  display:block;
  margin-bottom:10px;
  color:#60728a;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
}
.product-kpi-card strong{
  display:block;
  color:#0f172a;
  font-size:30px;
  line-height:1.25;
  font-weight:950;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.product-kpi-card.is-primary{
  border-color:#9fe6c2;
  background:linear-gradient(180deg,#f0fdf4 0%,#ffffff 100%);
}
.product-kpi-card.is-primary strong{
  color:#047857;
}
.product-kpi-card.is-code strong{
  font-family:Consolas,Monaco,monospace;
  font-size:18px;
  line-height:1.45;
  letter-spacing:.01em;
}

.product-detail-clean-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  padding:8px 22px 22px;
}
.product-detail-clean-item{
  min-width:0;
  min-height:98px;
  padding:18px 18px 16px;
  border:1px solid #e2e8f0;
  border-radius:18px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.product-detail-clean-item.is-wide{
  grid-column:span 2;
  min-height:112px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.product-detail-clean-item strong{
  display:block;
  color:#0f172a;
  font-size:16px;
  line-height:1.58;
  font-weight:850;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.product-detail-clean-item.is-wide strong{
  font-size:21px;
  line-height:1.45;
  font-weight:950;
}

.products-unified-page .query-edit-card{
  margin:0 24px 24px!important;
  border-radius:22px;
}

@media(max-width:1360px){
  .product-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media(max-width:980px){
  .products-unified-page .product-query-list-pane,
  .products-unified-page .product-query-detail-pane{
    height:auto;
    overflow:visible!important;
  }
  .products-unified-page .query-product-card-scroll{
    max-height:480px!important;
  }
  .product-info-pro-card{
    margin:14px 16px 18px!important;
  }
  .product-kpi-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    padding:14px 16px 8px;
  }
  .product-detail-clean-grid{
    grid-template-columns:1fr;
    padding:8px 16px 18px;
  }
  .product-detail-clean-item.is-wide{
    grid-column:span 1;
  }
}
@media(max-width:560px){
  .product-kpi-grid{
    grid-template-columns:1fr;
  }
}


/* 商品资料页点击稳定性修复：禁止商品卡片延迟渲染导致滚动条重新计算 */
.products-unified-page .inventory-product-card,
.products-unified-page .query-product-card{
  content-visibility:visible!important;
  contain:none!important;
  contain-intrinsic-size:auto!important;
}
.products-unified-page .query-product-card.is-active{
  transform:none!important;
}
.products-unified-page .query-product-card,
.products-unified-page .query-product-card *{
  backface-visibility:hidden;
}
.products-unified-page .query-product-card-scroll{
  overflow-anchor:none!important;
  scroll-behavior:auto!important;
}


/* 商品资料页：完整资料详情展示，压缩垂直空间，确保正式字段和库存字段都清楚可见 */
.product-info-complete-card{
  margin:18px 24px 22px!important;
  border:1px solid #dbe8f7!important;
  border-radius:22px!important;
  overflow:hidden;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(15,23,42,.05)!important;
}
.complete-info-header{
  padding:18px 20px 12px!important;
  border-bottom:1px solid #edf2f7;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
}
.complete-stock-strip{
  display:grid;
  grid-template-columns:1fr 1fr 1fr 1.35fr 1.55fr;
  gap:10px;
  padding:14px 20px 10px;
}
.complete-stock-item{
  min-width:0;
  min-height:84px;
  padding:14px 14px 12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
}
.complete-stock-item.is-primary{
  border-color:#9fe6c2;
  background:linear-gradient(180deg,#f0fdf4 0%,#ffffff 100%);
}
.complete-stock-item span,
.complete-info-item span{
  display:block;
  margin-bottom:8px;
  color:#64748b;
  font-size:12px;
  font-weight:900;
  letter-spacing:.02em;
}
.complete-stock-item strong{
  display:block;
  color:#0f172a;
  font-size:28px;
  line-height:1.2;
  font-weight:950;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.complete-stock-item.is-primary strong{
  color:#047857;
}
.complete-stock-item.is-code strong{
  font-family:Consolas,Monaco,monospace;
  font-size:17px;
  line-height:1.35;
}
.complete-info-section{
  padding:8px 20px 14px;
}
.complete-info-section + .complete-info-section{
  padding-top:0;
}
.complete-info-section-title{
  margin:0 0 10px;
  color:#334155;
  font-size:13px;
  font-weight:950;
  letter-spacing:.03em;
}
.complete-info-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.complete-info-item{
  min-width:0;
  min-height:82px;
  padding:14px 14px 12px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#fff;
}
.complete-info-item.is-wide{
  grid-column:span 2;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.complete-info-item strong{
  display:block;
  color:#0f172a;
  font-size:15px;
  line-height:1.45;
  font-weight:850;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.complete-info-item.is-wide strong{
  font-size:19px;
  line-height:1.38;
  font-weight:950;
}
@media(max-width:1360px){
  .complete-stock-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .complete-info-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .complete-info-item.is-wide{
    grid-column:span 2;
  }
}
@media(max-width:980px){
  .product-info-complete-card{
    margin:14px 16px 18px!important;
  }
  .complete-stock-strip,
  .complete-info-section{
    padding-left:16px;
    padding-right:16px;
  }
}
@media(max-width:560px){
  .complete-stock-strip,
  .complete-info-grid{
    grid-template-columns:1fr;
  }
  .complete-info-item.is-wide{
    grid-column:span 1;
  }
}

/* 商品资料页排版再优化：压缩卡片高度，完整信息一屏内更容易查看 */
.products-unified-page .product-info-complete-card{
  margin:14px 22px 18px!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 6px 18px rgba(15,23,42,.045)!important;
}
.products-unified-page .complete-info-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:16px 18px 10px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%)!important;
}
.products-unified-page .complete-info-header h2{
  font-size:20px;
  margin:0 0 4px;
}
.products-unified-page .complete-info-header .muted{
  font-size:13px;
  line-height:1.45;
}
.products-unified-page .product-status-pill{
  height:30px;
  padding:0 12px;
  font-size:12px;
  background:#eef4ff;
  border:1px solid #dbe8ff;
}
.products-unified-page .complete-stock-strip{
  grid-template-columns:1fr 1fr 1fr 1.35fr 1.55fr!important;
  gap:10px!important;
  padding:12px 18px 8px!important;
}
.products-unified-page .complete-stock-item{
  min-height:68px!important;
  padding:12px 13px 10px!important;
  border-radius:15px!important;
  box-shadow:none!important;
}
.products-unified-page .complete-stock-item span,
.products-unified-page .complete-info-item span{
  margin-bottom:6px!important;
  font-size:12px!important;
  color:#64748b!important;
}
.products-unified-page .complete-stock-item strong{
  font-size:24px!important;
  line-height:1.2!important;
}
.products-unified-page .complete-stock-item.is-code strong{
  font-size:15px!important;
  line-height:1.35!important;
}
.products-unified-page .complete-info-section{
  padding:6px 18px 12px!important;
}
.products-unified-page .complete-info-section + .complete-info-section{
  padding-top:0!important;
}
.products-unified-page .complete-info-section-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 8px!important;
  font-size:13px!important;
  color:#334155!important;
}
.products-unified-page .complete-info-section-title::before{
  content:"";
  display:inline-block;
  width:4px;
  height:14px;
  border-radius:99px;
  background:#2563eb;
}
.products-unified-page .complete-info-grid{
  grid-template-columns:2fr 1fr 1fr 1fr 1fr!important;
  gap:10px!important;
}
.products-unified-page .complete-info-item{
  min-height:66px!important;
  padding:12px 13px 10px!important;
  border-radius:15px!important;
  box-shadow:none!important;
  background:linear-gradient(180deg,#ffffff 0%,#fcfdff 100%)!important;
}
.products-unified-page .complete-info-item.is-wide{
  grid-column:span 2!important;
  min-height:66px!important;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)!important;
}
.products-unified-page .complete-info-item strong{
  font-size:14px!important;
  line-height:1.42!important;
  font-weight:850!important;
}
.products-unified-page .complete-info-item.is-wide strong{
  font-size:18px!important;
  line-height:1.36!important;
  font-weight:950!important;
}
.products-unified-page .query-detail-hero{
  padding:18px 22px 14px!important;
}
.products-unified-page .query-detail-main-title h2{
  font-size:23px!important;
  line-height:1.28!important;
  margin-bottom:8px!important;
}
.products-unified-page .detail-subline span{
  padding:4px 9px!important;
  font-size:12px!important;
}
@media(max-width:1500px){
  .products-unified-page .complete-info-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  .products-unified-page .complete-info-item.is-wide{
    grid-column:span 2!important;
  }
}
@media(max-width:1360px){
  .products-unified-page .complete-stock-strip{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .products-unified-page .complete-info-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  .products-unified-page .complete-info-item.is-wide{
    grid-column:span 3!important;
  }
}
@media(max-width:980px){
  .products-unified-page .complete-stock-strip{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    padding-left:16px!important;
    padding-right:16px!important;
  }
  .products-unified-page .complete-info-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .products-unified-page .complete-info-item.is-wide{
    grid-column:span 2!important;
  }
}
@media(max-width:560px){
  .products-unified-page .complete-stock-strip,
  .products-unified-page .complete-info-grid{
    grid-template-columns:1fr!important;
  }
  .products-unified-page .complete-info-item.is-wide{
    grid-column:span 1!important;
  }
}

/* 商品资料页：分类筛选与分类字段展示 */
.products-unified-page .product-category-filter-form select{
  min-width:180px;
  height:44px;
  border:1px solid #d7e2f0;
  border-radius:12px;
  background:#fff;
  color:#0f172a;
  padding:0 12px;
  font-weight:800;
}
.products-unified-page .query-card-meta span:nth-child(2){
  color:#2563eb;
  font-weight:850;
}
@media(max-width:720px){
  .products-unified-page .product-category-filter-form select{
    width:100%;
    min-width:0;
  }
}

/* 商品资料页：页内分类维护，不新增独立分类管理页面 */
.products-unified-page .product-category-inline-tools{
  margin-top:12px;
  border:1px solid #dbe7f5;
  border-radius:14px;
  background:#f8fbff;
  padding:0;
  overflow:hidden;
}
.products-unified-page .product-category-inline-tools>summary{
  cursor:pointer;
  list-style:none;
  padding:12px 16px;
  font-weight:900;
  color:#0f172a;
  border-bottom:1px solid transparent;
}
.products-unified-page .product-category-inline-tools[open]>summary{
  border-bottom-color:#dbe7f5;
}
.products-unified-page .product-category-inline-tools>summary::-webkit-details-marker{
  display:none;
}
.products-unified-page .category-tools-body{
  padding:14px 16px 16px;
}
.products-unified-page .category-tools-note{
  color:#64748b;
  font-size:13px;
  line-height:1.7;
  margin-bottom:12px;
}
.products-unified-page .category-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}
.products-unified-page .category-count-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #d7e2f0;
  color:#334155;
  font-size:13px;
  font-weight:800;
}
.products-unified-page .category-count-chip strong{
  color:#2563eb;
}
.products-unified-page .category-batch-grid{
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:12px;
}
.products-unified-page .category-batch-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;
  gap:10px;
  align-items:end;
  padding:12px;
  border:1px solid #dbe7f5;
  border-radius:14px;
  background:#fff;
}
.products-unified-page .category-batch-form:last-child{
  grid-template-columns:minmax(0,1fr) auto;
}
.products-unified-page .category-batch-form label{
  display:grid;
  gap:6px;
  color:#334155;
  font-size:13px;
  font-weight:850;
}
.products-unified-page .category-batch-form select,
.products-unified-page .category-batch-form input{
  height:40px;
  border:1px solid #d7e2f0;
  border-radius:10px;
  background:#fff;
  padding:0 10px;
  color:#0f172a;
  font-weight:750;
  min-width:0;
}
.products-unified-page .category-batch-form button{
  min-height:40px;
  white-space:nowrap;
}
@media(max-width:1080px){
  .products-unified-page .category-batch-grid,
  .products-unified-page .category-batch-form,
  .products-unified-page .category-batch-form:last-child{
    grid-template-columns:1fr;
  }
}

/* 销量测算：近三天平均销量与可售卖天数 */
.sales-forecast-toolbar{display:grid;gap:10px}.sales-formula-note{margin:0;line-height:1.7}.sales-forecast-stats{grid-template-columns:repeat(5,minmax(130px,1fr))}.sales-forecast-table-wrap table{min-width:1120px}.sales-status-pill{display:inline-flex;align-items:center;justify-content:center;min-height:28px;padding:4px 10px;border-radius:999px;border:1px solid #e2e8f0;background:#f8fafc;color:#475569;font-size:12px;font-weight:950;white-space:nowrap}.sales-status-pill.danger{background:#fff1f2;border-color:#fecdd3;color:#b91c1c}.sales-status-pill.warning{background:#fffbeb;border-color:#fde68a;color:#92400e}.sales-status-pill.ok{background:#ecfdf5;border-color:#bbf7d0;color:#047857}.sales-status-pill.muted{background:#f8fafc;border-color:#e2e8f0;color:#64748b}
@media(max-width:980px){.sales-forecast-stats{grid-template-columns:repeat(2,minmax(130px,1fr))}}
@media(max-width:560px){.sales-forecast-stats{grid-template-columns:1fr}}

/* 条码查询页：批量更新条码图片 */
.barcode-image-folder-card{
  display:grid;
  gap:14px;
  padding:20px 22px;
  border:1px solid #dbe8f7;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.barcode-image-folder-title{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}
.barcode-image-folder-title h2{
  margin:0 0 5px;
  font-size:19px;
  line-height:1.25;
}
.barcode-image-upload-grid{
  display:grid;
  gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.barcode-image-folder-form{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.folder-upload-box{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:46px;
  min-width:260px;
  flex:1 1 280px;
  padding:10px 14px;
  border:1px dashed #93b4e8;
  border-radius:14px;
  background:#fff;
  color:#334155;
  font-weight:900;
  cursor:pointer;
}
.folder-upload-box input{
  max-width:260px;
  font-size:13px;
}
@media(max-width:980px){
  .barcode-image-upload-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .barcode-image-folder-form{align-items:stretch}
  .folder-upload-box{min-width:0;flex-direction:column;align-items:flex-start}
  .folder-upload-box input{max-width:100%}
}
