/* 快快打单系统（自研复刻）— 第一阶段骨架样式：左侧深色菜单 + 右侧内容区（照原系统风格） */
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #303133; background: #f0f2f5; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #2d3a4b; }
.login-card { background: #fff; width: 380px; max-width: 92vw; border-radius: 8px; padding: 28px 30px; box-shadow: 0 8px 30px rgba(0,0,0,.3); }
.login-title { margin: 0 0 18px; text-align: center; font-size: 22px; color: #2d3a4b; }
.login-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab { flex: 1; padding: 9px 0; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; cursor: pointer; font-size: 14px; }
.tab.active { background: #409eff; border-color: #409eff; color: #fff; }
.login-card label { display: block; font-size: 13px; color: #606266; margin-bottom: 12px; }
.login-card input { width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 14px; }
.primary-btn { width: 100%; padding: 11px 0; background: #409eff; color: #fff; border: 0; border-radius: 4px; font-size: 15px; cursor: pointer; }
.ghost-btn { padding: 9px 18px; background: #fff; color: #409eff; border: 1px solid #409eff; border-radius: 4px; cursor: pointer; font-size: 14px; }
.ghost-btn.small { padding: 5px 12px; font-size: 13px; }
.msg { min-height: 18px; font-size: 13px; color: #f56c6c; margin: 8px 0 0; }
.msg.ok { color: #67c23a; }
.register-box { margin-top: 22px; border-top: 1px dashed #dcdfe6; padding-top: 14px; }
.register-box h3 { margin: 0 0 10px; font-size: 14px; color: #606266; }
.register-box .ghost-btn { width: 100%; }
.hint { font-size: 12px; color: #909399; }

/* 主框架 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; flex: none; background: #304156; color: #bfcbd9; display: flex; flex-direction: column; }
.logo { height: 56px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; color: #fff; background: #2b2f3a; letter-spacing: 2px; }
.sidebar nav { overflow-y: auto; padding: 8px 0; }
.menu-item { padding: 12px 20px; cursor: pointer; font-size: 14px; user-select: none; }
.menu-item:hover { background: #263445; color: #fff; }
.menu-item.open { color: #fff; }
.submenu { display: none; background: #1f2d3d; }
.submenu.show { display: block; }
.submenu div { padding: 10px 20px 10px 38px; font-size: 13px; cursor: pointer; color: #bfcbd9; }
.submenu div:hover { color: #409eff; }
.submenu div.active { color: #409eff; background: #001528; }
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; box-shadow: 0 1px 4px rgba(0,21,41,.08); }
.crumb { font-size: 15px; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 14px; font-size: 13px; color: #606266; }
.balance-info { color: #e6a23c; font-weight: 600; }
.content { padding: 20px; overflow-y: auto; }

/* 内容组件 */
.cards { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.card { background: #fff; border-radius: 6px; padding: 18px 22px; min-width: 180px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.card .k { font-size: 13px; color: #909399; }
.card .v { font-size: 24px; font-weight: 700; margin-top: 6px; color: #303133; }
.panel { background: #fff; border-radius: 6px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.panel h3 { margin: 0 0 14px; font-size: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #ebeef5; padding: 9px 8px; text-align: left; }
th { color: #909399; font-weight: 600; background: #fafafa; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; background: #ecf5ff; color: #409eff; font-size: 12px; }
.tag.warn { background: #fdf6ec; color: #e6a23c; }
.tag.good { background: #f0f9eb; color: #67c23a; }
.empty { color: #909399; padding: 26px; text-align: center; }
.placeholder { color: #909399; font-size: 14px; line-height: 1.9; }
.kv { display: grid; grid-template-columns: 130px 1fr; row-gap: 10px; font-size: 14px; }
.kv .k { color: #909399; }

/* ===== 完整版新增组件 ===== */
.content input, .content select, .content textarea {
  padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; font-family: inherit; background: #fff; color: #303133;
}
.content input:focus, .content select:focus, .content textarea:focus { outline: none; border-color: #409eff; }
.content label { font-size: 13px; color: #606266; }
.content label > input, .content label > select, .content label > textarea { display: block; margin-top: 4px; width: 100%; }
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar label > input, .toolbar label > select { display: inline-block; width: auto; margin: 0 0 0 4px; }
.primary-btn.small { width: auto; padding: 8px 18px; font-size: 13px; }
.primary-btn:disabled, .ghost-btn:disabled, .mini-btn:disabled { opacity: .55; cursor: not-allowed; }
.primary-btn.danger-bg { background: #f56c6c; }
.mini-btn { padding: 4px 10px; font-size: 12px; background: #fff; color: #409eff; border: 1px solid #dcdfe6; border-radius: 3px; cursor: pointer; margin: 1px 2px 1px 0; white-space: nowrap; }
.mini-btn:hover { border-color: #409eff; }
.mini-btn.danger { color: #f56c6c; }
.mini-btn.danger:hover { border-color: #f56c6c; }
td.ops { white-space: nowrap; }
.tag.warn { background: #fdf6ec; color: #e6a23c; }
.err-text { color: #f56c6c; }
.inline-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.inline-form.wrap label.wide { flex: 1 1 320px; }
.inline-form label { display: block; }
.edit-form { background: #fafafa; border: 1px solid #ebeef5; border-radius: 6px; padding: 16px; margin: 14px 0; }
.edit-form h4 { margin: 0 0 12px; font-size: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.form-block { margin-bottom: 18px; }
.form-block h4 { margin: 0 0 10px; font-size: 14px; color: #303133; }
.form-block > label { display: block; max-width: 520px; }
.parcel-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 8px; }
.parcel-row label { flex: 0 1 130px; }
.rate-row { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid #ebeef5; border-radius: 4px; margin-bottom: 8px; cursor: pointer; max-width: 560px; }
.rate-row:hover { border-color: #409eff; }
.rate-row .rate-name { font-weight: 600; }
.rate-row .rate-price { color: #e6a23c; font-weight: 700; font-size: 16px; }
.success-box { background: #f0f9eb; border: 1px solid #c2e7b0; color: #529b2e; border-radius: 6px; padding: 14px 16px; line-height: 1.9; margin: 14px 0; word-break: break-all; }
.success-box code { background: #fff; padding: 1px 6px; border-radius: 3px; }
.key-box { background: #f5f7fa; border: 1px solid #e4e7ed; border-radius: 4px; padding: 7px 12px; font-size: 13px; word-break: break-all; }
.check-row { display: inline-flex; align-items: center; gap: 6px; margin: 4px 14px 4px 0; font-size: 13px; cursor: pointer; }
.check-row input { width: auto; margin: 0; }
.tab-btn { padding: 7px 16px; border: 1px solid #dcdfe6; background: #fff; border-radius: 4px; cursor: pointer; font-size: 13px; }
.tab-btn.active { background: #409eff; border-color: #409eff; color: #fff; }
.panel.inset { box-shadow: none; border: 1px solid #ebeef5; margin-top: 16px; }
.thread { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 8px; background: #f5f7fa; font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.bubble.user { align-self: flex-start; }
.bubble.staff { align-self: flex-end; background: #ecf5ff; }
.bubble-meta { font-size: 12px; color: #909399; margin-bottom: 4px; }
.toast { position: fixed; top: 22px; left: 50%; transform: translateX(-50%) translateY(-8px); background: #303133; color: #fff; padding: 10px 22px; border-radius: 4px; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 999; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: #67c23a; }
.toast.err { background: #f56c6c; }
table input[type="number"], table input[type="text"] { padding: 5px 8px; }
.rv-note { margin-right: 4px; }
