/* ============================================================
   Admin 后台样式
   ============================================================ */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"PingFang SC","Microsoft YaHei",Arial,sans-serif; font-size:14px; color:#333F47; background:#F4F7FA; }

/* ---------- 登录页 ---------- */
.login-page { min-height:100vh; display:flex; align-items:center; justify-content:center; background:linear-gradient(135deg,#1A1A1A,#2F3E46 60%,#0066B3); }
.login-box {
  width:400px; background:#fff; border-radius:16px; padding:42px 40px; box-shadow:0 20px 60px rgba(0,0,0,.35);
}
.login-logo {
  width:64px; height:64px; border-radius:14px; margin:0 auto 18px; display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#0066B3,#00B4D8); color:#fff; font-size:30px; font-weight:800;
}
.login-box h1 { font-size:22px; text-align:center; color:#1A1A1A; }
.login-sub { text-align:center; color:#8A99A6; font-size:12px; letter-spacing:2px; margin:6px 0 28px; }
.login-err { background:rgba(234,67,53,.08); color:#EA4335; border:1px solid rgba(234,67,53,.3); padding:10px 14px; border-radius:8px; margin-bottom:16px; font-size:13px; }
.login-tip { text-align:center; font-size:12px; color:#8A99A6; margin-top:18px; }

/* ---------- 布局 ---------- */
.admin-layout { display:flex; min-height:100vh; }
.sidebar {
  width:230px; background:#1A1A1A; color:#fff; display:flex; flex-direction:column; position:fixed; inset:0 auto 0 0;
  z-index:100;
}
.side-logo { display:flex; align-items:center; gap:10px; padding:20px 22px; font-size:17px; font-weight:700; border-bottom:1px solid rgba(255,255,255,.08); }
.side-logo-mark { width:36px; height:36px; border-radius:9px; background:linear-gradient(135deg,#0066B3,#00B4D8); display:flex; align-items:center; justify-content:center; font-size:18px; }
.side-nav { flex:1; padding:14px 12px; overflow:auto; }
.side-nav a { display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:8px; color:rgba(255,255,255,.75); font-size:14px; margin-bottom:3px; transition:all .2s; text-decoration:none; }
.side-nav a:hover { background:rgba(255,255,255,.08); color:#fff; }
.side-nav a.active { background:linear-gradient(90deg,#0066B3,#0080cc); color:#fff; }
.side-foot { padding:16px 20px; border-top:1px solid rgba(255,255,255,.08); font-size:12px; }
.side-user { color:rgba(255,255,255,.8); margin-bottom:10px; line-height:1.6; }
.side-user small { color:rgba(255,255,255,.45); }
.side-logout { color:rgba(255,255,255,.55); text-decoration:none; }
.side-logout:hover { color:#EA4335; }

.main { margin-left:230px; flex:1; min-width:0; }
.main-head { display:flex; align-items:center; justify-content:space-between; padding:18px 28px; background:#fff; border-bottom:1px solid #E2E8EE; position:sticky; top:0; z-index:50; }
.main-head h2 { font-size:20px; }
.main-head-right a { color:#0066B3; font-size:13px; }
.main-body { padding:26px 28px; }

/* ---------- 卡片 ---------- */
.card { background:#fff; border:1px solid #E2E8EE; border-radius:12px; padding:22px; margin-bottom:20px; }
.card h3 { font-size:16px; margin-bottom:16px; color:#1A1A1A; }
.card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.card-head h3 { margin:0; }

/* 统计卡 */
.stat-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:20px; }
.stat-card { background:#fff; border:1px solid #E2E8EE; border-radius:12px; padding:20px; }
.stat-card .num { font-size:30px; font-weight:800; color:#0066B3; font-variant-numeric:tabular-nums; }
.stat-card .num.orange { color:#F47B20; }
.stat-card .num.green { color:#34A853; }
.stat-card .num.pet { color:#00B4D8; }
.stat-card .lbl { font-size:13px; color:#6B7A84; margin-top:4px; }

/* 表格 */
.table-wrap { overflow:auto; }
table.data { width:100%; border-collapse:collapse; font-size:13px; }
table.data th { background:#F4F7FA; color:#2F3E46; text-align:left; padding:11px 14px; font-weight:600; white-space:nowrap; border-bottom:1px solid #E2E8EE; }
table.data td { padding:11px 14px; border-bottom:1px solid #F0F3F7; vertical-align:middle; }
table.data tr:hover td { background:#F8FBFF; }
table.data .actions { white-space:nowrap; }
table.data .actions button { margin-right:6px; }

/* 徽章 */
.badge { display:inline-block; padding:3px 10px; border-radius:100px; font-size:12px; font-weight:600; }
.badge.new { background:rgba(244,123,32,.12); color:#F47B20; }
.badge.quoted { background:rgba(0,102,179,.12); color:#0066B3; }
.badge.following { background:rgba(0,180,216,.14); color:#0090b0; }
.badge.sample { background:rgba(52,168,83,.12); color:#34A853; }
.badge.closed { background:rgba(107,122,132,.14); color:#6B7A84; }
.badge.in_use { background:rgba(52,168,83,.12); color:#34A853; }
.badge.maintenance { background:rgba(244,123,32,.12); color:#F47B20; }
.badge.scrapped { background:rgba(234,67,53,.12); color:#EA4335; }
.badge.sent { background:rgba(0,180,216,.14); color:#0090b0; }
.badge.received { background:rgba(52,168,83,.12); color:#34A853; }
.badge.rejected { background:rgba(234,67,53,.12); color:#EA4335; }
.badge.done { background:rgba(52,168,83,.12); color:#34A853; }
.badge.processing { background:rgba(0,102,179,.12); color:#0066B3; }
.badge.due { background:rgba(234,67,53,.14); color:#EA4335; }

/* 按钮 */
.btn { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border-radius:6px; font-size:13px; font-weight:600; cursor:pointer; border:none; transition:all .2s; text-decoration:none; }
.btn-primary { background:#0066B3; color:#fff; }
.btn-primary:hover { background:#005091; }
.btn-orange { background:#F47B20; color:#fff; }
.btn-orange:hover { background:#E56E12; }
.btn-green { background:#34A853; color:#fff; }
.btn-gray { background:#E8EDF2; color:#2F3E46; }
.btn-danger { background:rgba(234,67,53,.1); color:#EA4335; }
.btn-danger:hover { background:#EA4335; color:#fff; }
.btn-sm { padding:5px 12px; font-size:12px; }

/* 表单 */
.form-group { margin-bottom:14px; }
.form-label { display:block; font-size:12px; font-weight:600; color:#2F3E46; margin-bottom:5px; }
.form-control { width:100%; padding:9px 12px; border:1.5px solid #E2E8EE; border-radius:7px; font-size:13px; font-family:inherit; transition:all .2s; background:#fff; color:#333F47; }
.form-control:focus { outline:none; border-color:#0066B3; box-shadow:0 0 0 3px rgba(0,102,179,.12); }
textarea.form-control { min-height:80px; resize:vertical; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-row3 { display:grid; grid-template-columns:1fr 1fr 1fr; gap:14px; }

/* 弹窗 */
.modal-mask { position:fixed; inset:0; background:rgba(13,21,27,.55); z-index:1000; display:none; align-items:flex-start; justify-content:center; padding:40px 16px; overflow:auto; }
.modal-mask.open { display:flex; }
.modal-box { background:#fff; border-radius:14px; width:100%; max-width:680px; padding:26px; box-shadow:0 20px 60px rgba(0,0,0,.3); animation:mpop .25s; }
.modal-box.wide { max-width:900px; }
.modal-box.small { max-width:440px; }
@keyframes mpop { from { transform:translateY(20px); opacity:0; } to { transform:none; opacity:1; } }
.modal-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.modal-head h3 { font-size:18px; }
.modal-close { width:32px; height:32px; border:none; background:#F4F7FA; border-radius:50%; cursor:pointer; font-size:15px; color:#6B7A84; }
.modal-foot { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

/* 工具条 */
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; flex-wrap:wrap; }
.toolbar .left { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

/* 分页 */
.pagination { display:flex; gap:6px; margin-top:16px; justify-content:center; }
.pagination button { min-width:34px; height:34px; border:1px solid #E2E8EE; border-radius:6px; background:#fff; cursor:pointer; font-size:13px; }
.pagination button.cur { background:#0066B3; color:#fff; border-color:#0066B3; }

/* 加载/空态 */
.loading { text-align:center; color:#8A99A6; padding:60px 0; }
.empty { text-align:center; color:#8A99A6; padding:40px 0; }

/* 消息 */
.msg { padding:10px 14px; border-radius:8px; margin-bottom:14px; font-size:13px; display:none; }
.msg.ok { display:block; background:rgba(52,168,83,.1); color:#34A853; }
.msg.err { display:block; background:rgba(234,67,53,.08); color:#EA4335; }

/* 时间线 */
.timeline { position:relative; padding-left:22px; }
.timeline::before { content:""; position:absolute; left:6px; top:4px; bottom:4px; width:2px; background:#E2E8EE; }
.timeline .tl-item { position:relative; padding-bottom:16px; }
.timeline .tl-item::before { content:""; position:absolute; left:-21px; top:5px; width:10px; height:10px; border-radius:50%; background:#0066B3; border:2px solid #fff; box-shadow:0 0 0 2px #0066B3; }
.timeline .tl-time { font-size:12px; color:#8A99A6; }
.timeline .tl-text { font-size:13px; color:#333F47; margin-top:2px; }

/* 详情描述 */
.detail-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px 24px; margin-bottom:16px; }
.detail-item { font-size:13px; }
.detail-item .k { color:#8A99A6; font-size:12px; }
.detail-item .v { color:#1A1A1A; font-weight:600; margin-top:2px; word-break:break-all; }

/* 仪表盘布局 */
.dash-grid { display:grid; grid-template-columns:1.6fr 1fr; gap:20px; }
@media (max-width:1100px) { .dash-grid { grid-template-columns:1fr; } .stat-cards { grid-template-columns:repeat(2,1fr); } }

/* 文件上传按钮 */
.file-input { display:none; }
.upload-btn { display:inline-flex; align-items:center; gap:6px; padding:8px 16px; border:1.5px dashed #0066B3; border-radius:7px; color:#0066B3; cursor:pointer; font-size:13px; background:#F0F7FF; }

/* 高亮标签 */
.hl-orange { color:#F47B20; font-weight:700; }
.progress { height:6px; background:#E8EDF2; border-radius:3px; overflow:hidden; }
.progress > i { display:block; height:100%; background:linear-gradient(90deg,#0066B3,#00B4D8); border-radius:3px; }
