/* 采购商务平台 · 管理后台公共样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6f9; color: #1a202c; }
:root { --primary: #1f4e79; --tech: #00a3a3; --bg: #f4f6f9; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 200px; background: var(--primary); color: #fff; padding: 20px 0; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow: auto; }
.sidebar .logo { padding: 0 20px 16px; font-size: 18px; font-weight: 600; border-bottom: 1px solid rgba(255,255,255,.15); margin-bottom: 12px; line-height: 1.3; }
.sidebar .logo-sub { font-size: 12px; font-weight: 400; opacity: .75; margin-top: 6px; }
.nav-group { font-size: 11px; opacity: .5; padding: 12px 20px 6px; letter-spacing: 1px; }
.nav-item { padding: 14px 20px; cursor: pointer; font-size: 14px; opacity: .85; display: block; color: #fff; text-decoration: none; }
.nav-item.active, .nav-item:hover { background: rgba(255,255,255,.12); opacity: 1; }
.nav-item.locked { opacity: .4; cursor: not-allowed; }
/* v1.3.69：审批待办数量红标（仅 >0 时显示，挂在菜单名右侧） */
.nav-badge {
  display: inline-block; min-width: 18px; height: 18px; line-height: 18px;
  padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: #e02020; color: #fff; font-size: 11px; font-weight: 600;
  text-align: center; vertical-align: middle;
}
.main { flex: 1; padding: 24px; overflow: auto; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.topbar h2 { font-size: 20px; }
.topbar .who { color: #5a6573; font-size: 13px; }
a.logout { color: rgba(255,255,255,.8); font-size: 13px; cursor: pointer; }

/* ---------- 卡片 ---------- */
.cards { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px 24px; box-shadow: 0 2px 8px rgba(0,0,0,.05); min-width: 160px; flex: 1; }
.stat-card .v { font-size: 28px; font-weight: 600; color: var(--tech); }
.stat-card .l { color: #5a6573; font-size: 13px; margin-top: 6px; }
.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 12px; }
.panel { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }

/* ---------- 表格 ---------- */
table { width: 100%; background: #fff; border-radius: 10px; border-collapse: collapse; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
th, td { padding: 12px 16px; text-align: left; font-size: 13px; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
th { background: #f7f9fc; color: #5a6573; font-weight: 500; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: #f7fbff; }
.empty { color: #8a93a0; padding: 40px; text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.t-blue { background: #e6f1fb; color: #185fa5; }
.t-green { background: #eaf3de; color: #3b6d11; }
.t-orange { background: #faeeda; color: #854f0b; }
.t-gray { background: #f1efe8; color: #5f5e5a; }
.t-teal { background: #e1f5ee; color: #0f6e56; }
.t-red { background: #fde8e4; color: #c8412c; }

/* ---------- 按钮 ---------- */
.btn { width: 100%; height: 44px; border: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 15px; cursor: pointer; }
.btn:hover { background: #173c5d; }
.btn-sm { padding: 6px 14px; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-outline { background: #eef1f5; color: #1a202c; }
.btn-outline:hover { background: #e1e6ee; }
.btn-danger { background: #e0533d; color: #fff; }
.btn-danger:hover { background: #c8412c; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #173c5d; }
.btn-sm + .btn-sm { margin-left: 8px; }
.btn:disabled, .btn-sm:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #5a6573; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; height: 42px; border: 1px solid #d8dee8; border-radius: 8px; padding: 0 12px; font-size: 14px; font-family: inherit; }
.field input[type="radio"], .field input[type="checkbox"] { width: auto; height: auto; vertical-align: middle; margin-right: 6px; padding: 0; }
.field textarea { height: 84px; padding: 10px; resize: none; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.field-inline .field { flex: 1; min-width: 180px; margin-bottom: 0; }
.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar input[type=text], .toolbar input:not([type]), .toolbar select { height: 38px; border: 1px solid #d8dee8; border-radius: 8px; padding: 0 12px; font-size: 14px; }
.form-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.form-grid > .field { flex: 1; min-width: 220px; }
.form-grid > .field.full { flex-basis: 100%; }
.hint { font-size: 12px; color: #8a93a0; margin-top: 6px; }
.req { color: #e0533d; }

/* ---------- 子标签页 ---------- */
.sub-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sub-tab { padding: 8px 16px; border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.sub-tab.active { background: var(--primary); color: #fff; }

/* ---------- 弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: #fff; width: 420px; max-width: 92vw; border-radius: 12px; padding: 24px; box-shadow: 0 8px 30px rgba(0,0,0,.2); max-height: 90vh; overflow: auto; }
.modal-title { font-size: 17px; font-weight: 600; color: var(--primary); }
.modal-sub { color: #5a6573; font-size: 13px; margin: 8px 0 12px; }
.modal-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

/* ---------- 供应商资质 ---------- */
.ql-info { font-size: 13px; color: #2a3340; line-height: 1.95; }
.ql-info b { color: #5a6573; font-weight: 500; }
.ql-block { margin-top: 16px; }
.ql-label { font-size: 13px; color: #1f4e79; font-weight: 600; margin-bottom: 8px; }
.ql-imgs { display: flex; gap: 12px; flex-wrap: wrap; }
.ql-img { width: 150px; height: 150px; object-fit: cover; border: 1px solid #e2e8f0; border-radius: 8px; cursor: pointer; }
.ql-img:hover { border-color: #1f4e79; }
.ql-empty { color: #8a93a0; font-size: 13px; }

/* ---------- 登录 ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; width: 380px; padding: 40px 32px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.login-card h1 { font-size: 22px; color: var(--primary); margin-bottom: 6px; }
.login-card .sub { color: #5a6573; font-size: 13px; margin-bottom: 24px; }
.idtabs { display: flex; gap: 8px; margin-bottom: 20px; }
.idtab { flex: 1; text-align: center; padding: 10px 0; border-radius: 8px; background: #f1f4f8; color: #5a6573; font-size: 14px; cursor: pointer; user-select: none; }
.idtab.active { background: var(--primary); color: #fff; }
.err { color: #e0533d; font-size: 13px; margin-top: 12px; min-height: 18px; }
.reg-entry { margin-top: 16px; text-align: center; font-size: 13px; color: #5a6573; }
.reg-entry a { color: var(--primary); text-decoration: none; cursor: pointer; }
.reg-entry a:hover { text-decoration: underline; }

.field-inline { flex-direction: row; align-items: center; gap: 8px; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #3a4250; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.reg-notice { margin-bottom: 16px; padding: 12px; background: #f6f8fb; border-left: 4px solid var(--primary); border-radius: 6px; font-size: 13px; color: #3a4654; line-height: 1.7; }

/* v1.3.88 发布短信选择弹窗 */
.sms-toolbar { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; }
.sms-count { font-size: 13px; color: #3a6df0; font-weight: 600; }
.sms-list { max-height: 46vh; overflow: auto; border: 1px solid #e6e9ef; border-radius: 8px; }
.sms-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid #f0f2f6; cursor: pointer; }
.sms-item:last-child { border-bottom: none; }
.sms-item:hover { background: #f7f9fc; }
.sms-item input[type="checkbox"] { width: 16px; height: 16px; margin: 0; flex: 0 0 auto; }
.sms-name { font-weight: 600; color: #1a202c; min-width: 140px; }
.sms-brands { flex: 1; color: #5a6573; font-size: 13px; word-break: break-all; }
.sms-phone { color: #8a93a3; font-size: 13px; flex: 0 0 auto; }

/* ---------- 详情页 ---------- */
.kv { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 13px; color: #2a3340; line-height: 2; }
.kv .k { color: #5a6573; }
.section-title { font-size: 15px; font-weight: 600; color: var(--primary); margin: 20px 0 12px; }
.muted { color: #8a93a0; font-size: 13px; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
