/* 仓储工作管理系统 网页后台样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
[v-cloak] { display: none; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f2f4f7; color: #1f2937; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }

/* ---- 登录页 ---- */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e3a5f, #2563eb); }
.login-box { width: 340px; background: #fff; border-radius: 10px; padding: 34px 30px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-title { font-size: 22px; font-weight: 700; text-align: center; color: #1e293b; }
.login-sub { text-align: center; color: #64748b; margin: 6px 0 22px; font-size: 13px; }
.login-input { width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 6px; margin-bottom: 12px; font-size: 15px; outline: none; }
.login-input:focus { border-color: #2563eb; }
.login-btn { width: 100%; padding: 12px; font-size: 15px; }
.login-err { color: #dc2626; margin-top: 10px; text-align: center; min-height: 20px; }

/* ---- 框架 ---- */
.frame { display: flex; min-height: 100vh; }
.side { width: 208px; background: #1e293b; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; }
.side-title { padding: 18px 16px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #334155; }
.side-title small { display: block; font-weight: 400; font-size: 11px; color: #94a3b8; margin-top: 3px; }
.menu { flex: 1; overflow-y: auto; padding: 8px 0; }
.menu a { display: block; padding: 11px 18px; color: #cbd5e1; font-size: 14px; border-left: 3px solid transparent; }
.menu a:hover { background: #334155; color: #fff; }
.menu a.on { background: #2563eb; color: #fff; border-left-color: #93c5fd; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.top { background: #fff; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid #e2e8f0; }
.top .u { color: #475569; font-size: 13px; }
.top .u b { color: #1e293b; }
.top .exit { margin-left: 12px; color: #dc2626; cursor: pointer; }
.content { padding: 18px; overflow: auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 16px; }
.card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .num { font-size: 26px; font-weight: 700; color: #1e293b; margin-top: 4px; }
.card .lbl { color: #64748b; font-size: 13px; }
.card.hl .num { color: #2563eb; }

/* ---- 通用组件 ---- */
.panel { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); padding: 16px; margin-bottom: 16px; }
.panel h3 { font-size: 15px; margin-bottom: 12px; color: #1e293b; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .grow { flex: 1; }
.btn { padding: 8px 14px; border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; font-size: 13px; cursor: pointer; color: #334155; }
.btn:hover { background: #f1f5f9; }
.btn-primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-danger { color: #dc2626; border-color: #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password], input[type=number], select, textarea {
  padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 13px; outline: none; background: #fff; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: #2563eb; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: middle; }
th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: #e2e8f0; color: #334155; }
.tag-blue { background: #dbeafe; color: #1d4ed8; }
.tag-green { background: #dcfce7; color: #15803d; }
.tag-red { background: #fee2e2; color: #b91c1c; }
.tag-amber { background: #fef3c7; color: #b45309; }
.tag-purple { background: #ede9fe; color: #6d28d9; }
.empty { text-align: center; color: #94a3b8; padding: 28px 0; }
.note { color: #64748b; font-size: 12px; }

/* ---- 弹窗 ---- */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.dialog { background: #fff; border-radius: 10px; width: 560px; max-width: 92vw; max-height: 86vh; overflow: auto; padding: 20px 22px; }
.dialog.wide { width: 760px; }
.dialog h4 { margin-bottom: 14px; font-size: 15px; color: #1e293b; }
.form-row { display: flex; align-items: center; margin-bottom: 10px; gap: 10px; }
.form-row label { width: 96px; text-align: right; color: #475569; font-size: 13px; flex-shrink: 0; }
.form-row input, .form-row select { flex: 1; }
.form-row textarea { flex: 1; min-height: 60px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

/* ---- 组织树 ---- */
.tree, .tree ul { list-style: none; }
.tree ul { padding-left: 20px; }
.tree li { margin: 2px 0; }
.tree .node { padding: 5px 8px; border-radius: 6px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.tree .node:hover { background: #f1f5f9; }
.tree .cnt { color: #94a3b8; font-size: 12px; }
.tree .leaf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px; padding: 4px 18px; }

/* ---- 概览 ---- */
.day-input { width: 150px; }
.flex2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .flex2 { grid-template-columns: 1fr; } }
