/* 京东外卖商户采集系统 —— 通用样式（移动优先 + PC后台） */
:root {
  --jd-red: #e1251b;
  --jd-orange: #ff6a00;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #222;
  --muted: #888;
  --line: #e6e8eb;
  --green: #27ae60;
  --blue: #3498db;
  --reasonA: #e74c3c;
  --reasonB: #e67e22;
  --reasonC: #3498db;
  --reasonD: #27ae60;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 15px; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* 移动端布局 */
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); position: relative; }
.topbar { background: var(--jd-red); color: #fff; padding: 14px 16px; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10; }
.topbar .back { font-size: 15px; cursor: pointer; opacity: .9; }
.content { padding: 14px; padding-bottom: 90px; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; display: flex; background: #fff; border-top: 1px solid var(--line); }
.bottom-nav a { flex: 1; text-align: center; padding: 8px 0; font-size: 12px; color: var(--muted); }
.bottom-nav a.active { color: var(--jd-red); }
.bottom-nav a .ic { font-size: 20px; display: block; }

/* 按钮 */
.btn { display: inline-block; padding: 12px 18px; border-radius: 8px; border: none; font-size: 15px; cursor: pointer; text-align: center; background: #eee; color: #333; }
.btn-primary { background: var(--jd-red); color: #fff; }
.btn-orange { background: var(--jd-orange); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: #555; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 卡片 */
.card { background: var(--card); border-radius: 10px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.stat-row { display: flex; gap: 10px; }
.stat { flex: 1; background: #fff; border-radius: 10px; padding: 14px 10px; text-align: center; }
.stat .num { font-size: 22px; font-weight: 700; color: var(--jd-red); }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.field label .req { color: var(--jd-red); margin-left: 2px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fff; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row2 { display: flex; gap: 8px; }
.row2 > * { flex: 1; }

/* 意向标签 */
.tag { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 12px; color: #fff; }
.tag.A { background: var(--reasonA); }
.tag.B { background: var(--reasonB); }
.tag.C { background: var(--reasonC); }
.tag.D { background: var(--reasonD); }

/* 上传区 */
.upload-box { border: 1.5px dashed var(--line); border-radius: 8px; padding: 14px; text-align: center; color: var(--muted); cursor: pointer; margin-bottom: 10px; position: relative; }
.upload-box.has { border-style: solid; border-color: var(--green); color: var(--green); }
.upload-box img.preview { width: 100%; max-height: 140px; object-fit: contain; border-radius: 6px; margin-top: 8px; }
.upload-box .del { position: absolute; top: 4px; right: 6px; background: rgba(0,0,0,.5); color: #fff; border-radius: 50%; width: 22px; height: 22px; line-height: 22px; font-size: 14px; }
.badge-yes { color: var(--green); font-size: 12px; }
.badge-no { color: var(--muted); font-size: 12px; }

/* 商户卡片 */
.m-card { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.m-card .name { font-size: 16px; font-weight: 600; }
.m-card .meta { font-size: 13px; color: var(--muted); margin-top: 4px; }
.m-card .acts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.m-card .acts .btn { padding: 7px 12px; font-size: 13px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 460px; max-height: 86vh; overflow: auto; padding: 18px; }
.modal h3 { margin: 0 0 14px; font-size: 17px; }
.modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 20px; }

/* Toast */
.toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%,-50%); background: rgba(0,0,0,.82); color: #fff; padding: 12px 20px; border-radius: 8px; font-size: 14px; z-index: 200; max-width: 80%; text-align: center; }
.toast.err { background: rgba(225,37,27,.92); }

/* 登录页 */
.login-wrap { max-width: 420px; margin: 8vh auto 0; padding: 24px; }
.login-wrap .logo { text-align: center; font-size: 22px; font-weight: 700; color: var(--jd-red); margin-bottom: 6px; }
.login-wrap .sub { text-align: center; color: var(--muted); margin-bottom: 24px; font-size: 13px; }

/* PC 后台 */
.pc { display: flex; min-height: 100vh; }
.pc .side { width: 200px; background: #1f2430; color: #cfd3da; flex-shrink: 0; }
.pc .side h2 { color: #fff; font-size: 16px; padding: 18px 16px; margin: 0; border-bottom: 1px solid #2c3242; }
.pc .side a { display: block; padding: 13px 18px; color: #cfd3da; cursor: pointer; border-left: 3px solid transparent; }
.pc .side a:hover, .pc .side a.active { background: #2c3242; color: #fff; border-left-color: var(--jd-red); }
.pc .main { flex: 1; padding: 20px 26px; overflow: auto; }
.pc .main h2 { margin: 0 0 16px; font-size: 20px; }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filter-bar .field { margin: 0; }
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 13px; }
.table th, .table td { border: 1px solid var(--line); padding: 9px 10px; text-align: left; }
.table th { background: #fafafa; font-weight: 600; }
.table tr:hover { background: #fcfcfc; }
.pc-stat { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.pc-stat .stat { min-width: 130px; }
.pie-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; background: #fff; padding: 16px; border-radius: 8px; border: 1px solid var(--line); }
.rank li { list-style: none; padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
