:root {
  --bx-bg: #f4f6f9;
  --bx-side: #16233a;
  --bx-side-text: #c9d3e3;
  --bx-accent: #2f6fed;
  --bx-border: #e4e8ef;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bx-bg); color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; }
#app { height: 100%; }

.layout { display: flex; height: 100%; }
.side { width: 208px; flex: none; background: var(--bx-side); color: var(--bx-side-text); display: flex; flex-direction: column; }
.brand { padding: 20px 20px 16px; font-size: 18px; font-weight: 700; color: #fff; letter-spacing: 1px; }
.brand small { display: block; font-size: 12px; font-weight: 400; color: #8fa0bb; letter-spacing: 0; margin-top: 2px; }
.nav a { display: block; padding: 11px 22px; color: var(--bx-side-text); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.nav a:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav a.active { background: rgba(47,111,237,.18); color: #fff; border-left-color: var(--bx-accent); }
.side-foot { margin-top: auto; padding: 14px 20px; font-size: 13px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot a { color: #8fa0bb; cursor: pointer; margin-right: 12px; }
.main { flex: 1; overflow: auto; padding: 20px 24px 40px; min-width: 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 20px; }
.card { background: #fff; border: 1px solid var(--bx-border); border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--bx-border); border-radius: 8px; padding: 14px 16px; }
.stat .v { font-size: 24px; font-weight: 700; }
.stat .l { color: #6b7280; font-size: 13px; margin-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.muted { color: #6b7280; font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.right { text-align: right; }
.totals { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; }
.totals b { font-size: 16px; }
.warn-list { margin: 0; padding-left: 18px; }
.src-cell { line-height: 1.35; }
.src-cell .en { color: #6b7280; font-size: 12px; }
.cand-opt { display: flex; justify-content: space-between; gap: 12px; }
.cand-opt .tag { color: #6b7280; font-size: 12px; }
.items-table .el-input__wrapper, .items-table .el-select__wrapper { padding: 0 6px; }
.items-table .el-input-number { width: 100%; }
.login-wrap { height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #16233a, #2f4a7a); }
.login-box { width: 360px; background: #fff; border-radius: 10px; padding: 32px 28px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-box h1 { margin: 0 0 4px; font-size: 22px; }
.drop-hint { font-size: 13px; color: #6b7280; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 12px 16px; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav a { padding: 8px 12px; border-left: none; }
  .side-foot { margin: 0; border: none; padding: 8px 16px; }
  .main { padding: 12px 16px 32px; }
}

.hdr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0 12px; }
.hdr-grid .wide { grid-column: span 2; }
.hdr-grid .el-form-item { margin-bottom: 10px; }
.hdr-grid .el-form-item__label { margin-bottom: 2px !important; line-height: 18px !important; font-size: 12px; color: #6b7280; }
@media (max-width: 480px) { .hdr-grid .wide { grid-column: span 1; } }
