* { box-sizing: border-box; }
body { margin:0; font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif; background:#f4f6f9; color:#222; font-size:14px; }
a { color:#1a6bd0; }

/* 登录 */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#e8f0fb,#f4f6f9); }
.login-box { width:340px; background:#fff; border:1px solid #e3e6ec; border-radius:12px; padding:32px 28px; box-shadow:0 8px 30px rgba(0,0,0,.06); }
.login-logo { font-size:24px; font-weight:800; color:#1a6bd0; text-align:center; }
.login-sub { text-align:center; color:#888; font-size:13px; margin:8px 0 24px; }
.login-box label { display:block; color:#666; margin-bottom:6px; font-size:13px; }
.login-box select { width:100%; padding:10px; border:1px solid #d6dbe3; border-radius:6px; font-size:14px; }
.login-tip { color:#999; font-size:12px; text-align:center; margin-top:14px; line-height:1.6; }

/* 布局 */
.top { background:#fff; border-bottom:1px solid #e3e6ec; padding:11px 18px; display:flex; align-items:center; position:sticky; top:0; z-index:20; }
.logo { font-size:17px; font-weight:700; color:#1a6bd0; }
.user-chip { margin-left:auto; color:#555; font-size:13px; }
.user-chip b { color:#1a6bd0; }
.tabs { display:flex; gap:2px; background:#fff; border-bottom:1px solid #e3e6ec; padding:0 14px; overflow-x:auto; }
.tab { padding:11px 14px; cursor:pointer; border-bottom:2px solid transparent; color:#555; white-space:nowrap; font-size:14px; }
.tab.active { color:#1a6bd0; border-bottom-color:#1a6bd0; font-weight:600; }
.tab:hover { color:#1a6bd0; }
.page { display:none; padding:16px 18px 60px; }
.page.active { display:block; }

/* 卡片/工具条 */
.card { background:#fff; border:1px solid #e3e6ec; border-radius:8px; padding:16px; margin-bottom:14px; }
.toolbar { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:12px; }
.toolbar label { color:#666; font-size:13px; }
input[type=text], input[type=number], input[type=password], select, textarea { border:1px solid #d6dbe3; border-radius:5px; padding:7px 9px; font-size:13px; background:#fff; color:#222; font-family:inherit; }
input:focus, select:focus, textarea:focus { outline:none; border-color:#1a6bd0; }
button { border:1px solid #d6dbe3; background:#fff; border-radius:5px; padding:7px 13px; cursor:pointer; font-size:13px; color:#333; font-family:inherit; }
button:hover { border-color:#1a6bd0; color:#1a6bd0; }
button.primary { background:#1a6bd0; color:#fff; border-color:#1a6bd0; }
button.primary:hover { background:#155bb3; color:#fff; }
button.danger { color:#c0392b; border-color:#e6b8b3; }
button.sm { padding:4px 9px; font-size:12px; }
button:disabled { opacity:.45; cursor:not-allowed; }

/* 统计 */
.stat-row { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.stat { background:#fff; border:1px solid #e3e6ec; border-radius:8px; padding:12px 16px; min-width:100px; }
.stat .num { font-size:22px; font-weight:700; color:#1a6bd0; }
.stat .lbl { color:#888; font-size:12px; margin-top:3px; }

/* 提示 */
.warn { background:#fff7e6; border:1px solid #f5d9a0; color:#a86b00; padding:9px 12px; border-radius:6px; margin-bottom:12px; font-size:13px; }
.info { background:#eaf3ff; border:1px solid #b9d4f7; color:#1a6bd0; padding:9px 12px; border-radius:6px; margin-bottom:12px; font-size:13px; }

/* 表格 */
.table-wrap { overflow:auto; max-height:62vh; border:1px solid #e3e6ec; border-radius:6px; background:#fff; }
table { border-collapse:collapse; width:100%; font-size:12.5px; }
th, td { border-bottom:1px solid #edf0f4; border-right:1px solid #f0f2f5; padding:6px 8px; text-align:left; white-space:nowrap; }
th { background:#f7f9fc; position:sticky; top:0; z-index:5; font-weight:600; color:#444; }
td.name { max-width:200px; overflow:hidden; text-overflow:ellipsis; }
td.num, th.num { text-align:right; }
td.inp input, td.inp select { width:84px; padding:4px 6px; }
td.ro { background:#fafbfc; color:#555; }
tr.changed { background:#fffbe8 !important; }
tr.custom-row { background:#fff2f0 !important; }
.row-actions button { padding:3px 7px; font-size:11px; margin-right:3px; }

/* 状态徽章 */
.badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:11px; white-space:nowrap; }
.b-draft { background:#eef1f5; color:#666; }
.b-submitted { background:#e6f0ff; color:#1a6bd0; }
.b-first_passed { background:#e6f0ff; color:#3a7fd5; }
.b-second_passed { background:#fff0e0; color:#c47a00; }
.b-final_passed { background:#e6f7ec; color:#1a8a4a; }
.b-rejected { background:#fdecec; color:#c0392b; }
.rev-pass { color:#1a8a4a; font-weight:600; }
.rev-reject { color:#c0392b; font-weight:600; }

/* 挂单标签 */
.tabs-review { display:flex; gap:6px; margin-bottom:12px; flex-wrap:wrap; align-items:center; }
.tab-review { padding:8px 14px; border:1px solid #d6dbe3; border-radius:6px; background:#fff; cursor:pointer; font-size:13px; color:#555; }
.tab-review.active { background:#1a6bd0; color:#fff; border-color:#1a6bd0; font-weight:600; }
.tab-review .cnt { display:inline-block; margin-left:6px; background:rgba(0,0,0,.08); border-radius:8px; padding:0 6px; font-size:11px; }
.tab-review.active .cnt { background:rgba(255,255,255,.25); }

/* 搜索下拉 */
.searchbox { position:relative; display:inline-block; }
.search-results { position:absolute; top:100%; left:0; background:#fff; border:1px solid #d6dbe3; border-radius:6px; z-index:30; min-width:340px; max-height:320px; overflow:auto; box-shadow:0 6px 20px rgba(0,0,0,.12); display:none; }
.search-results.show { display:block; }
.search-results .item { padding:8px 12px; cursor:pointer; border-bottom:1px solid #f0f2f5; font-size:13px; }
.search-results .item:hover { background:#eaf3ff; }
.search-results .item .sub { color:#999; font-size:11px; margin-top:2px; }
.search-results .empty { padding:12px; color:#999; font-size:13px; }

/* Toast & Modal */
.toast { position:fixed; bottom:28px; left:50%; transform:translateX(-50%); background:#333; color:#fff; padding:10px 20px; border-radius:6px; font-size:13px; z-index:100; display:none; box-shadow:0 4px 16px rgba(0,0,0,.2); }
.toast.ok { background:#1a8a4a; }
.toast.err { background:#c0392b; }
.modal { position:fixed; inset:0; background:rgba(0,0,0,.4); z-index:80; display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-box { background:#fff; border-radius:10px; padding:22px; width:420px; max-width:100%; max-height:85vh; overflow:auto; }
.modal-box h3 { margin:0 0 14px; font-size:17px; }
.modal-box .m-label { color:#666; font-size:13px; margin:12px 0 5px; }
.modal-box textarea { width:100%; min-height:80px; }
.modal-actions { margin-top:18px; display:flex; gap:10px; justify-content:flex-end; }
.hist-row { border-bottom:1px solid #f0f2f5; padding:8px 0; font-size:12.5px; }
.hist-row .t { color:#999; font-size:11px; }

/* 导入 */
.drop { border:2px dashed #c8d4e3; border-radius:8px; padding:22px; text-align:center; color:#888; cursor:pointer; margin-bottom:12px; }
.drop:hover { border-color:#1a6bd0; color:#1a6bd0; }
.drop input { display:none; }
.file-line { padding:8px 0; border-bottom:1px solid #f0f2f5; font-size:13px; }

@media (max-width:600px){
  .tabs{gap:0}
  .tab{padding:10px 10px;font-size:13px}
  .page{padding:12px 10px 50px}
  .search-results{min-width:280px}
}
