/* 一号上线准备：共用基础视觉；品牌主题色继续由店铺配置决定。 */
:root{--bg:#f6f4ef;--panel:#fffefb;--ink:#26372f;--ink-2:#647067;--ink-3:#738077;--line:#dddcd1;--line-2:#eeeae1;--brand:#345d49;--brand-soft:#edf3ec;--brand-ink:#264b38;--radius:14px;--shadow:0 3px 16px #263b2c08;--shadow-lg:0 18px 52px #25372b24}
body{line-height:1.65}button,input,select,textarea{font:inherit}button,a,input,select,textarea{-webkit-tap-highlight-color:transparent}button:disabled{cursor:wait;opacity:.58}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #ad7e3c;outline-offset:3px}textarea{resize:vertical}input,select,textarea{max-width:100%}p,td,.hint-text{overflow-wrap:anywhere}
#login-view{background:radial-gradient(ellipse at 10% 10%,#e4eddf,transparent 60%),radial-gradient(ellipse at 95% 95%,#eee1cd,transparent 60%),#f6f4ef}.login-card{border-radius:22px;padding:32px;box-shadow:var(--shadow-lg)}.login-card .sub{letter-spacing:.5px}.login-card .brand{margin-bottom:20px}
#sidebar{background:linear-gradient(165deg,#203b30,#162b24);border-right:1px solid #244a37}#sidebar .logo{padding-top:22px;padding-bottom:22px}#sidebar nav a{border-radius:9px;margin:2px 0;padding-top:9px;padding-bottom:9px}#sidebar nav a.active{background:#416c53;box-shadow:inset 3px 0 #d6bd86}#sidebar nav .group{letter-spacing:1px;color:#a5b7a8}#topbar{background:#fffefbec;border-bottom:1px solid var(--line)}#content{margin:0 auto;padding:24px 26px 80px}
.card{border-radius:14px;border-color:var(--line);box-shadow:var(--shadow);overflow:hidden}.card>header{background:#faf9f4;border-bottom:1px solid var(--line-2);padding:16px 20px;flex-wrap:wrap;gap:8px}.card>.body{padding:20px}.card h3{letter-spacing:.2px}.btn{border-radius:9px;min-height:36px;transition:background .15s,box-shadow .15s}.btn.primary{box-shadow:0 2px 5px #24493216}.toolbar{flex-wrap:wrap;gap:10px}.table-wrap{border:1px solid var(--line-2);border-radius:10px;max-width:100%;overscroll-behavior-x:contain}table{font-variant-numeric:tabular-nums}th{background:#f3f4ec;color:#526253}td,th{padding:12px 14px}tbody tr:hover{background:#f7f8f1}.f>input,.f>select,.f>textarea{min-height:40px;border-radius:9px}.banner{border-radius:10px;line-height:1.75}.hint-text,.muted{line-height:1.75}.modal{border-radius:18px;box-shadow:var(--shadow-lg);max-height:calc(100dvh - 32px)}.modal>.body{overscroll-behavior:contain}.modal>header,.modal>footer{background:#faf9f4}
.agent-intro{background:linear-gradient(115deg,#eaf1e6,#faf6ed);border:1px solid #d9e2d1;border-radius:16px;padding:22px;margin-bottom:18px}.agent-intro h2{margin:0 0 8px;font-size:24px}.agent-intro p{margin:6px 0;color:#526253}.agent-jumps,.agent-examples{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.agent-examples .btn{font-size:12px;background:#f5f5ed}.agent-section{scroll-margin-top:85px}.agent-status{font-size:13px;color:#526253}.agent-output{scroll-margin-top:85px}.agent-output[aria-busy=true]{opacity:.7}.agent-result-actions{display:flex;gap:8px;align-items:center;margin-top:12px}
body.release-voice{background:#f6f4ef;color:#26372f}.release-voice h1,.release-voice .box h2{color:#26372f}.release-voice .lead{color:#647067}.release-voice .box{background:#fffefb;border-color:#dddcd1;box-shadow:var(--shadow)}.release-voice button{background:#fffefb;color:#345d49;border-color:#cccfc2}.release-voice button.main{background:#345d49;color:white}.release-voice pre{background:#edf1e8;color:#304637;border-color:#d8dfd2}.release-voice textarea,.release-voice input{background:white;color:#26372f}
@media(max-width:700px){#content{padding:14px 12px 78px}.login-card{padding:25px 22px}.card>header,.card>.body{padding:14px}.toolbar>*{max-width:100%}.grid.c2,.grid.c3,.grid.c4{grid-template-columns:minmax(0,1fr)}.modal{width:100%;max-height:calc(100dvh - 20px)}.modal-backdrop{padding:10px}.modal>.body{padding:14px}.agent-intro{padding:16px}.agent-intro h2{font-size:21px}.agent-jumps .btn{flex:1;white-space:nowrap}td,th{padding:10px 12px}.row-actions{flex-wrap:wrap}.release-voice{padding:12px}.agent-section textarea{min-height:88px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
@media(max-width:860px){#btn-menu{display:inline-flex!important;align-items:center;justify-content:center;min-width:40px;min-height:40px}#sidebar.open{box-shadow:14px 0 36px #18342842}#topbar{gap:10px}}
@media print{body{background:white}.agent-jumps,.agent-examples,.agent-result-actions{display:none}.card{box-shadow:none}}

/* ============================================================
   ★ 2026-10-25 修：整页横向溢出（老杨截图里左侧菜单被切掉）
   ------------------------------------------------------------
   症状：表格太宽时，整个页面（不只是表格）能往右滚，左侧菜单被挤出屏幕。
   原因：表格 11 列 + 表头 white-space:nowrap，把 body 撑宽了。
         .table-wrap 虽然 overflow:auto，但里面的 table width:100% 遇到
         nowrap 会突破容器宽度，浏览器就把整个文档撑开了。
   修法：把溢出**关在表格容器里**，不让它传染到整页。
   ============================================================ */

/* 1. 页面本身绝不允许横向滚动（纵向照常） */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* 2. 放表格的那块（#content / main）也不许被撑开 */
#content, main {
  max-width: 100%;
  overflow-x: clip;      /* clip 比 hidden 好：不创建新的滚动容器，sticky 仍能工作 */
}

/* 3. 表格容器：自己内部横向滚动，不许往外顶 */
.table-wrap {
  overflow-x: auto;
  overflow-y: auto;
  max-width: 100%;
}

/* 4. 表格本身：内容多就按内容宽排，交给容器滚 */
.table-wrap > table {
  min-width: max-content;
}

/* 5. 钉住的最后一列（操作列）别太宽 */
.table-wrap th:last-child,
.table-wrap td:last-child {
  max-width: 220px;
}

/* ============================================================
   ★ 2026-10-26 老杨：「缩窄其他列，让 11 列都装得下」
   ------------------------------------------------------------
   症状：处理加工表格 11 列，默认内边距 7px 10px + 字号 13px，
        总宽 1641px。老杨的窗口比这窄一点，操作列就被挤出屏幕，
        他以为"按钮没做出来 / 权限不够"。
   修法：把表格内边距压小（10px → 5px）、字号压到 12.5px、
        去掉不必要的换行，让同样内容占的宽度少 20~25%。
   为什么不删列：每列都有用（来源收购单、出豆率这些他都要看）。
   ============================================================ */

/* 表格整体紧凑一点（只作用在 .table-wrap 里的表，不影响别处） */
.table-wrap table { font-size: 12.5px; }
.table-wrap th,
.table-wrap td { padding: 7px 5px; }

/* 日期列窄一点：单号+日期分两行显示，省一半宽度 */
.table-wrap td:first-child { white-space: nowrap; }

/* 操作列：两颗按钮挤一点，别让它们把列撑太宽 */
.table-wrap td:last-child button {
  padding: 4px 8px;
  font-size: 12px;
  white-space: nowrap;
}
.table-wrap td:last-child > div { gap: 4px !important; }

/* 窄屏（<1500px）再压一档字号和间距，保证还是 11 列装得下 */
@media (max-width: 1500px) {
  .table-wrap table { font-size: 12px; }
  .table-wrap th,
  .table-wrap td { padding: 6px 4px; }
  .table-wrap td:last-child button { padding: 3px 6px; font-size: 11.5px; }
}

@media (max-width: 1200px) {
  .table-wrap table { font-size: 11.5px; }
  .table-wrap th,
  .table-wrap td { padding: 5px 3px; }
  .table-wrap td:last-child button { padding: 3px 5px; font-size: 11px; }
}

/* ============================================================
   ★ 2026-10-25 老杨：「那就加个左右拉动的！能找到删除作废按钮」
   ------------------------------------------------------------
   .table-wrap 本来就有 overflow:auto，但滚动条默认又细又灰，
   藏在表格底下，老杨根本看不见、也不知道能拖。
   这里把滚动条加粗、加颜色、让它常驻（不悬停也显示）。
   ============================================================ */

/* 横向滚动条：加粗到 14px，给个明显的颜色 */
.table-wrap::-webkit-scrollbar {
  height: 14px;
  width: 14px;
}
.table-wrap::-webkit-scrollbar-track {
  background: #eef1f4;
  border-radius: 7px;
}
.table-wrap::-webkit-scrollbar-thumb {
  background: #9aa8b8;          /* 明显一点的灰蓝 */
  border-radius: 7px;
  border: 2px solid #eef1f4;    /* 留个边，看起来更立体 */
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: #6b7c8f;
}
/* 右下角那块小方块（横竖滚动条交界）也给它填上，不然是个白洞 */
.table-wrap::-webkit-scrollbar-corner {
  background: #eef1f4;
}

/* Firefox：细的 scrollbar-width 不支持调颜色，但至少给个颜色 */
.table-wrap {
  scrollbar-color: #9aa8b8 #eef1f4;
  scrollbar-width: auto;
}

/* 表格里的按钮不许被压成两行，也不许因为换行显得碎 */
.table-wrap td button { white-space: nowrap; }

/* 钉住的最后一列（操作列）：底下那层白底要盖住滚过来的内容，
   再加一道左侧阴影，让人一眼看出"这列是浮在上面的" */
.table-wrap td[style*="position:sticky"],
.table-wrap th[style*="position:sticky"] {
  background: #fff;
}