/* 叮叮跨境ERP - 高密度作业型样式（货叮咚风格） */

* { -webkit-font-smoothing: antialiased; box-sizing: border-box; }
body { font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif; font-size: 13px; }
button { font-size: 13px; }

/* 滚动条 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ===== 侧边导航 ===== */
.nav-group-title {
  padding: 10px 14px 4px; font-size: 11px; color: #8a93a6; font-weight: 600;
  display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none;
}
.nav-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 26px; font-size: 13px;
  color: #b6bdcc; cursor: pointer; border-left: 2px solid transparent; transition: all .15s;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item.active { color: #ff6a00; background: rgba(255,106,0,.12); border-left-color: #ff6a00; font-weight: 600; }
.nav-item .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }

/* ===== 顶栏按钮 ===== */
.top-btn { padding: 5px 12px; border-radius: 6px; cursor: pointer; border: none; transition: all .15s; font-weight: 500; }
.top-btn:hover { opacity: .88; }
.top-select { padding: 5px 8px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 12px; background: #fafafa; outline: none; cursor: pointer; }

/* ===== 状态标签（ERP 高密度小标签）===== */
.st { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.st-gray   { background: #f3f4f6; color: #6b7280; }
.st-orange { background: #fff3e8; color: #e04e00; }
.st-blue   { background: #e8f1ff; color: #1d6fe0; }
.st-cyan   { background: #e0f7fa; color: #00838f; }
.st-green  { background: #e8f8ee; color: #0f9d58; }
.st-red    { background: #fdecec; color: #d93025; }
.st-purple { background: #f3e8ff; color: #7c3aed; }

/* 平台标签 */
.pf { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pf-shopee { background: #fff1ec; color: #ee4d2d; }
.pf-tiktok { background: #f3f4f6; color: #161823; }
.pf-1688   { background: #fff5e6; color: #e67e22; }
.pf-tb     { background: #fff0f3; color: #e0407b; }
.pf-pdd    { background: #ffeef0; color: #e02e24; }

/* ===== 卡片/面板 ===== */
.card { background: #fff; border-radius: 8px; border: 1px solid #ebeef2; }
.card-hd { padding: 12px 16px; border-bottom: 1px solid #f2f4f7; display: flex; align-items: center; justify-content: space-between; }
.card-t { font-size: 14px; font-weight: 600; color: #1f2329; }
.card-bd { padding: 16px; }

/* ===== 统计小卡（工作台）===== */
.stat { background: #fff; border: 1px solid #ebeef2; border-radius: 8px; padding: 14px 16px; cursor: pointer; transition: all .15s; }
.stat:hover { border-color: #ffb37a; box-shadow: 0 4px 12px rgba(255,106,0,.08); }
.stat .v { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat .l { font-size: 12px; color: #8a93a6; margin-top: 2px; }

/* ===== 高密度表格 ===== */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
  background: #fafbfc; color: #646a73; font-weight: 500; font-size: 12px; text-align: left;
  padding: 9px 12px; border-bottom: 1px solid #ebeef2; white-space: nowrap;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid #f5f6f8; color: #1f2329; vertical-align: middle; }
.tbl tbody tr:hover { background: #fafbfc; }
.tbl .mono { font-family: Consolas, monospace; font-size: 12px; color: #646a73; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 10px 12px; }
.pager .btn-plain:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; font-weight: 500; transition: all .15s; white-space: nowrap; }
.btn-pri { background: #ff6a00; color: #fff; } .btn-pri:hover { background: #f25c05; }
.btn-plain { background: #fff; color: #1f2329; border-color: #dcdfe6; } .btn-plain:hover { border-color: #ff6a00; color: #ff6a00; }
.btn-blue { background: #1d6fe0; color: #fff; } .btn-blue:hover { background: #1a5fc4; }
.btn-green { background: #0f9d58; color: #fff; } .btn-green:hover { background: #0d8a4d; }
.btn-red-plain { background: #fff; color: #d93025; border-color: #f5c6c6; } .btn-red-plain:hover { background: #fdecec; }
.btn-danger { background: #d93025; color: #fff; } .btn-danger:hover { background: #c22a1f; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 4px; }
.btn-link { background: none; border: none; color: #1d6fe0; cursor: pointer; padding: 0; font-size: 12px; }
.btn-link:hover { text-decoration: underline; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 工具栏 ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar input[type=text], .toolbar select {
  padding: 6px 10px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 12px; outline: none; background: #fff;
}
.toolbar input[type=text]:focus, .toolbar select:focus { border-color: #ff6a00; }

/* tab 页签 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid #ebeef2; margin-bottom: 12px; overflow-x: auto; }
.tab { padding: 8px 16px; cursor: pointer; color: #646a73; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 13px; }
.tab:hover { color: #ff6a00; }
.tab.on { color: #ff6a00; border-bottom-color: #ff6a00; font-weight: 600; }

/* 采集箱卡片 */
.col-card { background: #fff; border: 1px solid #ebeef2; border-radius: 8px; padding: 12px; transition: all .15s; position: relative; }
.col-card:hover { border-color: #ffb37a; box-shadow: 0 4px 12px rgba(0,0,0,.05); }
.col-card.sel { border-color: #ff6a00; background: #fffaf5; }
.col-card .img { width: 100%; aspect-ratio: 1; border-radius: 6px; background: #f7f8fa; display: flex; align-items: center; justify-content: center; font-size: 40px; margin-bottom: 8px; }

/* 批量操作条 */
.batchbar { display: flex; align-items: center; gap: 8px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; padding: 8px 14px; margin-bottom: 12px; font-size: 12px; color: #b45309; }

/* 进度条 */
.pbar { height: 6px; background: #f0f2f5; border-radius: 3px; overflow: hidden; }
.pbar > div { height: 100%; border-radius: 3px; background: linear-gradient(90deg,#ff9a4d,#ff6a00); }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 90; display: flex; align-items: center; justify-content: center; animation: fade .18s; }
.dialog { background: #fff; border-radius: 10px; width: 92%; max-width: 640px; max-height: 86vh; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(0,0,0,.18); animation: up .22s; }
.dialog-hd { padding: 14px 20px; border-bottom: 1px solid #f2f4f7; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.dialog-bd { padding: 20px; overflow-y: auto; }
.dialog-ft { padding: 12px 20px; border-top: 1px solid #f2f4f7; display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from{opacity:0} to{opacity:1} }
@keyframes up { from{transform:translateY(16px);opacity:0} to{transform:translateY(0);opacity:1} }

/* toast */
.toast { background: #1f2329; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; display: flex; gap: 8px; align-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.18); animation: tin .25s; }
.toast.success { background: #0f9d58; } .toast.error { background: #d93025; } .toast.warning { background: #e67e22; }
@keyframes tin { from{transform:translateX(30px);opacity:0} to{transform:translateX(0);opacity:1} }

/* 表单 */
.fm-label { font-size: 12px; color: #646a73; margin-bottom: 4px; display: block; }
.fm-input { width: 100%; padding: 7px 10px; border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; outline: none; }
.fm-input:focus { border-color: #ff6a00; box-shadow: 0 0 0 2px rgba(255,106,0,.1); }

/* 通知项 */
.nf { padding: 10px 16px; border-bottom: 1px solid #f7f8fa; display: flex; gap: 10px; cursor: pointer; font-size: 12px; }
.nf:hover { background: #fafbfc; }
.nf:last-child { border-bottom: none; }

/* mini 趋势条 */
.spark { display: inline-flex; align-items: flex-end; gap: 1.5px; height: 16px; }
.spark i { width: 3px; background: #c6cdd8; border-radius: 1px; }
.spark i.up { background: #0f9d58; }

/* ===== 空状态占位 ===== */
.empty { padding: 56px 24px; text-align: center; }
.empty-ic { font-size: 44px; margin-bottom: 12px; filter: grayscale(.15); }
.empty-t { font-size: 15px; font-weight: 600; color: #1f2329; }
.empty-d { font-size: 12px; color: #8a93a6; margin-top: 6px; max-width: 460px; margin-left: auto; margin-right: auto; line-height: 1.7; }

/* ===== 工作台新手引导 ===== */
.hero {
  background: linear-gradient(120deg, #ff6a00 0%, #ff9040 60%, #ffb37a 100%);
  border-radius: 10px; padding: 32px 36px; color: #fff; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
  background: rgba(255,255,255,.12); border-radius: 50%;
}
.hero h1 { font-size: 24px; font-weight: 700; margin: 8px 0 6px; }
.hero-badge { display: inline-block; font-size: 11px; letter-spacing: 1px; background: rgba(255,255,255,.2); padding: 2px 10px; border-radius: 20px; }
.hero-sub { font-size: 13px; opacity: .92; }
.hero-tip { font-size: 12px; margin-top: 10px; background: rgba(255,255,255,.16); display: inline-block; padding: 3px 10px; border-radius: 6px; }
.step-card { border-top: 3px solid transparent; }
.step-card:nth-child(1) { border-top-color: #ff6a00; }
.step-no {
  width: 22px; height: 22px; border-radius: 50%; background: #fff3e8; color: #e04e00;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px;
}

/* 授权店铺平台选项 */
.asp {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #dcdfe6;
  border-radius: 8px; cursor: pointer; font-size: 13px; transition: all .15s;
}
.asp:hover { border-color: #ffb37a; }
.asp.on { border-color: #ff6a00; background: #fff7ed; color: #e04e00; font-weight: 600; }

/* ===== 仿官方 OAuth 授权页（全屏跳转体验） ===== */
.oauth-mask { position: fixed; inset: 0; z-index: 90; background: #eef1f5; display: flex; align-items: center; justify-content: center; animation: oauthIn .25s ease; }
@keyframes oauthIn { from { opacity: 0; } to { opacity: 1; } }
.oauth-win { width: 460px; max-width: 94vw; box-shadow: 0 12px 48px rgba(15,23,42,.18); border-radius: 10px; overflow: hidden; }
.oauth-urlbar { background: #f1f3f6; border-bottom: 1px solid #e2e6ec; padding: 7px 12px; font-size: 11px; color: #6b7280; display: flex; gap: 6px; align-items: center; font-family: Consolas, monospace; overflow: hidden; white-space: nowrap; }
.oauth-lock { flex: none; }
.oauth-page { background: #fff; }
.oauth-top { display: flex; align-items: center; gap: 10px; padding: 16px 22px; color: #fff; }
.oauth-logo { font-size: 22px; }
.oauth-brand { font-size: 16px; font-weight: 700; }
.oauth-tag { margin-left: auto; font-size: 11px; border: 1px solid rgba(255,255,255,.5); padding: 2px 10px; border-radius: 999px; }
.oauth-body { padding: 22px; }
.oauth-t { font-size: 16px; font-weight: 700; color: #1f2937; }
.oauth-d { font-size: 12px; color: #6b7280; margin: 6px 0 14px; line-height: 1.6; }
.oauth-btn { display: block; width: 100%; margin-top: 16px; padding: 10px 0; border-radius: 6px; border: none; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.oauth-btn:hover { opacity: .92; }
.oauth-btn-plain { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; margin-top: 16px; }
.oauth-fineprint { font-size: 11px; color: #9ca3af; margin-top: 10px; text-align: center; }
.oauth-scopes { border: 1px solid #eceef2; border-radius: 8px; overflow: hidden; }
.oauth-scope { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f3f4f6; }
.oauth-scope:last-child { border-bottom: none; }
.oauth-scope b { font-size: 12px; color: #1f2937; }
.oauth-scope p { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.oauth-ck { margin-left: auto; color: #0f9d58; font-weight: 700; }
.oauth-loading { padding: 40px 0; text-align: center; color: #6b7280; font-size: 13px; }
.oauth-spin { width: 28px; height: 28px; margin: 0 auto 12px; border: 3px solid #e5e7eb; border-top-color: #ff6a00; border-radius: 50%; animation: oauthSpin .8s linear infinite; }
@keyframes oauthSpin { to { transform: rotate(360deg); } }
.oauth-ok { text-align: center; padding: 26px 0 14px; }
.oauth-ok-ic { width: 52px; height: 52px; margin: 0 auto 14px; border: 3px solid; border-radius: 50%; font-size: 26px; line-height: 48px; font-weight: 700; }
