/* ============================================================
   121电竞 · 应用页样式
   沿用展示站的新拟物硬阴影语言：3px 描边 + 无模糊硬投影 + 高对比色块
   ============================================================ */

:root {
  --purple: #6d24ff;
  --purple-dark: #4313a8;
  --purple-soft: #f0e9ff;
  --lime: #d4ff3f;
  --lilac: #dcc2fc;
  --pink: #ffe9f3;
  --paper: #fffafc;
  --white: #ffffff;
  --ink: #241b31;
  --ink-soft: #3d3350;
  --muted: #6b6279;
  --line: #e7dff0;
  --green: #1f8a4c;
  --amber: #b26a00;
  --rose: #c02b4a;
  --shadow: 5px 5px 0 var(--ink);
  --radius: 0px;
}

/* hidden 属性必须永远生效：.field / .modal 自己设了 display，
   会盖掉浏览器默认的 [hidden]{display:none} */
[hidden] { display: none !important; }

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* 顶部两块淡色光晕：用固定图层代替 background-attachment:fixed。
   fixed 背景在 Chrome 里无法走合成滚动，滚动/切换时每帧都要整屏重绘，
   是「画面一格一格走」的主要来源；固定定位的伪元素由合成器直接搬运。 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 8%, #f0e9ff 0, transparent 38%),
    radial-gradient(circle at 88% 4%, #ffe9f3 0, transparent 34%);
}

a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 ---------- */

/* 顶栏是 JS 渲染的：先占住高度，否则脚本一执行整页内容就往下跳 66px（切页时看得见） */
#topbar { min-height: 66px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 850;
  font-size: 17px;
  letter-spacing: -.2px;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--lime);
  background: var(--purple);
  border: 2px solid var(--purple-dark);
  box-shadow: 3px 3px 0 var(--lilac);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: -.5px;
}

.topnav { display: flex; gap: 4px; margin-left: 10px; flex-wrap: wrap; }
.topnav a {
  padding: 7px 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  border: 2px solid transparent;
}
.topnav a:hover { background: var(--purple-soft); text-decoration: none; }
.topnav a.active { color: var(--white); background: var(--purple); border-color: var(--purple-dark); }

.spacer { flex: 1; }

.userchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--white);
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 750;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.userchip .role-tag {
  padding: 1px 6px;
  color: var(--purple-dark);
  background: var(--lime);
  border: 1px solid var(--purple);
  font-size: 10px;
  font-weight: 850;
}
/* 打手名下有被存起来的单（v45）：和「空闲/忙碌」并排的提醒标 */
.userchip .role-hold { background: #e2fbf6; color: #0f766e; border-color: #0f766e; }

/* ---------- 布局 ---------- */

.page { max-width: 1180px; margin: 0 auto; padding: 28px 20px 72px; }
.page.narrow { max-width: 480px; padding-top: 46px; }

.page-head { margin: 0 0 20px; }
.page-head h1 { margin: 0 0 6px; font-size: 30px; font-weight: 850; letter-spacing: -.6px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }

/* ---------- 卡片 ---------- */

.card {
  position: relative;
  padding: 20px;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: 3px 3px 0 var(--line); border-width: 2px; }
.card.tint-purple { background: var(--purple-soft); }
.card.tint-pink { background: var(--pink); }

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 850;
}

/* 余额卡 */
.balance-card { background: var(--purple); color: var(--white); border-color: var(--purple-dark); box-shadow: 6px 6px 0 var(--lilac); }
.balance-card .label { font-size: 12px; font-weight: 750; opacity: .85; letter-spacing: .5px; }
.balance-card .value { margin: 6px 0 2px; font-size: 42px; font-weight: 850; line-height: 1.1; letter-spacing: -1.5px; }
.balance-card .sub { font-size: 12px; opacity: .8; }

/* 统计小卡 */
.stat { padding: 16px; background: var(--white); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--lilac); }
.stat .k { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.stat .v { margin-top: 4px; font-size: 25px; font-weight: 850; letter-spacing: -.8px; }

/* ---------- 表单 ---------- */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 12px; font-weight: 800; }
.field .hint { color: var(--muted); font-size: 11px; font-weight: 600; }

input[type='text'], input[type='email'], input[type='password'], input[type='number'],
input[type='date'], input[type='search'], select, textarea {
  width: 100%;
  padding: 11px 12px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 0;
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--lilac);
  outline-offset: 0;
}
textarea { min-height: 92px; resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 18px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 13px;
  font-weight: 850;
  font-family: inherit;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: 2px 2px 0 var(--ink); }

.btn-primary { color: var(--white); background: var(--purple); border-color: var(--purple-dark); box-shadow: 4px 4px 0 var(--lime); }
.btn-primary:hover:not(:disabled) { box-shadow: 5px 5px 0 var(--lime); }
.btn-primary:active:not(:disabled) { box-shadow: 2px 2px 0 var(--lime); }
.btn-primary:disabled { box-shadow: 2px 2px 0 var(--lime); }

.btn-lime { background: var(--lime); border-color: var(--purple); box-shadow: 4px 4px 0 var(--purple); }
.btn-danger { color: var(--white); background: var(--rose); border-color: #7d1730; box-shadow: 4px 4px 0 var(--pink); }
.btn-lilac { background: var(--lilac); border-color: var(--purple-dark); box-shadow: 4px 4px 0 var(--purple); }
.btn-sm { padding: 7px 11px; font-size: 12px; box-shadow: 3px 3px 0 currentColor; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; box-shadow: none; border-color: var(--line); font-weight: 700; }
.btn-ghost:hover:not(:disabled) { box-shadow: none; transform: none; background: var(--purple-soft); }
.btn-row { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

/* ---------- 徽标 / 状态 ---------- */

.tag {
  display: inline-block;
  padding: 2px 8px;
  border: 2px solid var(--ink);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
.tag-green { color: var(--green); border-color: var(--green); background: #e8f7ee; }
.tag-amber { color: var(--amber); border-color: var(--amber); background: #fff4e0; }
.tag-rose { color: var(--rose); border-color: var(--rose); background: #fdeaef; }
.tag-purple { color: var(--purple-dark); border-color: var(--purple); background: var(--purple-soft); }
.tag-grey { color: var(--muted); border-color: var(--line); background: #f6f3fa; }
.tag-lime { color: var(--purple-dark); border-color: var(--purple); background: var(--lime); }
/* 订单「进行中」：蓝色，与待确认（橙）区分开，避免两个橙色标签混在一起 */
.tag-blue { color: #1d4ed8; border-color: #1d4ed8; background: #e8efff; }
/* 订单「存单」（v45）：青绿，和进行中（蓝）、待确认（橙）都区分开 */
.tag-teal { color: #0f766e; border-color: #0f766e; background: #e2fbf6; }

/* 打手档位标签：魔王pro 红 / 魔王 橙 / pro 蓝 / s 绿（与后台筛选、Vue 演示一致） */
.tag-level-demon-pro { color: var(--rose); border-color: var(--rose); background: #fdeaef; }
.tag-level-demon { color: var(--amber); border-color: var(--amber); background: #fff4e0; }
.tag-level-pro { color: #1d4ed8; border-color: #1d4ed8; background: #e8efff; }
.tag-level-s { color: var(--green); border-color: var(--green); background: #e8f7ee; }

/* ---------- 表格 ---------- */

.table-wrap { overflow-x: auto; border: 3px solid var(--ink); background: var(--white); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.data th, table.data td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data thead th {
  position: sticky;
  top: 0;
  color: var(--white);
  background: var(--purple);
  border-bottom: 2px solid var(--purple-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .3px;
  white-space: nowrap;
}
table.data tbody tr:hover { background: #faf7ff; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num { font-variant-numeric: tabular-nums; font-weight: 750; }
table.data td.actions { white-space: nowrap; }
table.data .empty { padding: 34px 12px; color: var(--muted); text-align: center; }

/* ---------- 分页 ---------- */

.pager { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.pager .info { color: var(--muted); font-size: 12px; font-weight: 700; }

/* ---------- 筛选条 ---------- */

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 16px;
  margin-bottom: 16px;
  background: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--lilac);
}
.filters .field { margin: 0; }
.filters .field > label { font-size: 11px; }

/* ---------- 弹层 ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 27, 49, .55);
}
.modal-backdrop[hidden] { display: none; }

.modal {
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 22px;
  background: var(--white);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 var(--lilac);
}
.modal h3 { margin: 0 0 4px; font-size: 18px; font-weight: 850; }
.modal .modal-desc { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- 图片裁剪（横幅 / 照片墙共用） ---------- */
.crop-modal { width: min(720px, 100%); }
.crop-modal .modal-desc { margin-bottom: 12px; }
.crop-stage {
  position: relative; overflow: hidden; width: 100%;
  border: 3px solid var(--ink); background: #211a2b;
  cursor: grab; touch-action: none; user-select: none;
}
.crop-stage:active { cursor: grabbing; }
.crop-stage canvas { display: block; width: 100%; height: 100%; }
/* 三分线：帮着把人像 / 主体放在交叉点上 */
.crop-grid { position: absolute; inset: 0; pointer-events: none; }
.crop-grid i { position: absolute; background: rgba(255, 255, 255, .38); }
.crop-grid i.h { left: 0; right: 0; height: 1px; }
.crop-grid i.v { top: 0; bottom: 0; width: 1px; }
.crop-bar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.crop-bar label { font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.crop-bar input[type="range"] { flex: 1; accent-color: var(--purple); }
.crop-bar .btn { flex: 0 0 auto; }
.crop-note { margin: 8px 0 0; font-size: 11px; font-weight: 700; color: var(--muted); }

/* 弹窗内的目标对象（例如「重置密码」要显示是哪位打手） */
.modal-target {
  margin: -8px 0 14px;
  padding: 8px 10px;
  font-size: 12px;
  background: var(--lilac-soft, #f4edff);
  border: 2px solid var(--ink);
}
.modal-target b { font-weight: 800; }
.modal-target-plain { background: var(--white); }
.level-preview { display: flex; align-items: center; gap: 8px; min-height: 38px; }
.level-preview .muted { font-size: 11px; }

/* 必填星号与字段级错误：错误要贴着出问题的那个输入框 */
.field .req { color: var(--rose); }
.field.invalid input { border-color: var(--rose); background: #fff6f8; }
.field-error {
  margin: 0;
  padding: 8px 10px;
  color: var(--rose);
  background: #fdeaef;
  border: 2px solid var(--rose);
  font-size: 12px;
  font-weight: 750;
}

/* 二次确认里的「危险操作」框 */
.danger-note {
  padding: 10px 12px;
  margin: 0 0 14px;
  color: var(--rose);
  background: #fdeaef;
  border: 2px solid var(--rose);
  font-size: 12px;
  font-weight: 750;
}

/* ---------- toast ---------- */

#toast-host {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  display: grid;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  padding: 11px 18px;
  color: var(--white);
  background: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--lilac);
  font-size: 13px;
  font-weight: 750;
  animation: toast-in .16s ease-out;
}
.toast.ok { background: var(--green); border-color: #0f5c30; box-shadow: 4px 4px 0 var(--lime); }
.toast.err { background: var(--rose); border-color: #7d1730; box-shadow: 4px 4px 0 var(--pink); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 图片缩略图 / 报单说明（后台与打手端共用） ---------- */

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  padding: 0;
  border: 2px solid var(--ink);
  background: #f6f3fa;
  overflow: hidden;
  cursor: zoom-in;
}

/* ---------- 图片查看器（全屏，带固定返回按钮） ---------- */

.img-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(12, 10, 16, .94);
}
.iv-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: #fff;
}
.iv-bar .btn {
  color: var(--ink);
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 rgba(255, 255, 255, .28);
}
.iv-bar .iv-x { margin-left: auto; min-width: 44px; }
.iv-count { font-size: 13px; font-weight: 800; letter-spacing: .5px; color: #e9e4f2; }
.iv-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 14px 24px;
}
.iv-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
  border: 2px solid rgba(255, 255, 255, .35);
}
.iv-nav {
  position: fixed;
  top: 50%;
  z-index: 301;
  width: 46px;
  height: 62px;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 2px solid rgba(255, 255, 255, .45);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.iv-nav:hover { background: rgba(255, 255, 255, .26); }
.iv-prev { left: 12px; }
.iv-next { right: 12px; }

/* 历史订单：紧凑行（管理后台「订单记录」用它，减少纵向占位） */
.data.rows-compact td { padding: 7px 9px; font-size: 12px; }
.data.rows-compact .num { font-size: 12px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  padding: 0;
  color: var(--white);
  background: var(--rose);
  border: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.report-quote {
  padding: 12px 14px;
  background: #faf7ff;
  border: 2px solid var(--line);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 空态 / 提示条 ---------- */

.empty-state { padding: 40px 20px; color: var(--muted); text-align: center; font-size: 13px; }

.alert {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 2px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--lilac);
}
.alert-warn { background: #fff4e0; border-color: var(--amber); color: #7a4a00; }
.alert-info { background: var(--purple-soft); border-color: var(--purple); color: var(--purple-dark); }
.alert-err { background: #fdeaef; border-color: var(--rose); color: #8f1f38; }

/* ---------- 后台侧栏 ---------- */

.admin-shell { display: grid; grid-template-columns: 216px minmax(0, 1fr); gap: 20px; max-width: 1320px; margin: 0 auto; padding: 24px 20px 72px; }
.admin-nav { position: sticky; top: 78px; align-self: start; background: var(--white); border: 3px solid var(--ink); box-shadow: var(--shadow); }
.admin-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; color: var(--ink); border-bottom: 2px solid var(--line); font-size: 13px; font-weight: 800; }
.admin-nav a:last-child { border-bottom: 0; }
.admin-nav a:hover { background: var(--purple-soft); text-decoration: none; }
.admin-nav a.active { color: var(--white); background: var(--purple); }
.admin-nav a.active .count { color: var(--purple-dark); background: var(--lime); }
.admin-nav .count { padding: 1px 6px; background: var(--purple-soft); border: 1px solid var(--line); font-size: 11px; font-weight: 850; }

/* ---------- 登录页 ---------- */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 34px 18px; }
.auth-card { width: min(430px, 100%); padding: 28px; background: var(--white); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--lilac); }
.auth-card h1 { margin: 0 0 4px; font-size: 25px; font-weight: 850; letter-spacing: -.5px; }
.auth-card .sub { margin: 0 0 22px; color: var(--muted); font-size: 13px; }
.auth-foot { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.auth-foot a { font-weight: 750; }

/* 登录页身份切换：老板端 / 打手端 —— 两个入口都必须在这一屏可见 */
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 20px; border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--lilac); }
.auth-switch > * { display: block; padding: 9px 6px; text-align: center; font-size: 13px; font-weight: 850; color: var(--ink); background: var(--white); }
.auth-switch > * + * { border-left: 3px solid var(--ink); }
.auth-switch a:hover { background: var(--purple-soft); text-decoration: none; }
.auth-switch .on { color: var(--white); background: var(--purple); }
.auth-switch .on a { color: inherit; }
.auth-hint { margin: -6px 0 14px; color: var(--muted); font-size: 12px; text-align: center; }
.auth-hint a { font-weight: 800; }

/* ---------- 详情键值对 ---------- */

.kv { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px 14px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 750; }
.kv dd { margin: 0; font-weight: 700; word-break: break-all; }

/* ---------- 订单时间线（老板详情 / 客服抽屉共用） ---------- */

.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px dashed var(--line); }
.timeline li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12px; font-weight: 750; }
.timeline li::before {
  content: "";
  position: absolute; left: -20px; top: 11px;
  width: 8px; height: 8px; border: 2px solid var(--ink); background: var(--lime);
}
.timeline em { color: var(--muted); font-style: normal; font-weight: 600; }

/* ---------- 响应式 ---------- */

@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { position: static; display: flex; overflow-x: auto; }
  .admin-nav a { border-bottom: 0; border-right: 2px solid var(--line); white-space: nowrap; }
  .admin-nav a:last-child { border-right: 0; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .page { padding: 20px 14px 60px; }
  .page-head h1 { font-size: 23px; }
  .balance-card .value { font-size: 34px; }
  .topbar-inner { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .topnav { order: 3; width: 100%; margin-left: 0; }
  .topnav a { padding: 6px 9px; font-size: 12px; }
  .userchip { max-width: 150px; }
  .card { padding: 16px; }
  .modal { padding: 18px; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   打手主页（老板端 / 打手端 / 管理端共用）
   —— profile-view.js 渲染，三处入口同一套皮
   ============================================================ */

.muted { color: var(--muted); }
.small { font-size: 12px; }
.spacer { flex: 1 1 auto; }
.empty-note {
  margin: 0; padding: 22px 4px; color: var(--muted); font-size: 13px; text-align: center;
}

/* ---------- 头部档案 ---------- */

.profile-hero {
  position: relative; margin-bottom: 18px; overflow: hidden;
  background: var(--white); border: 3px solid var(--ink); box-shadow: var(--shadow);
}
.profile-cover {
  height: 92px; border-bottom: 3px solid var(--ink);
  position: relative;
  background:
    linear-gradient(115deg, var(--purple) 0%, #8b5cf6 42%, var(--lilac) 74%, var(--lime) 100%);
  background-size: cover; background-position: center;
}
/* 有横幅照片时加高到 200px；没上传就保持原来 92px 的彩色带 */
.profile-cover.has-banner { height: 200px; }
.profile-cover .cover-upload {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font: inherit; font-size: 12px; font-weight: 850; padding: 7px 14px;
  border: 2px dashed var(--ink); background: rgba(255, 255, 255, .84); color: var(--ink);
  cursor: pointer; box-shadow: 3px 3px 0 rgba(36, 27, 49, .18);
}
.profile-cover .cover-upload:hover { background: var(--white); }
.profile-cover .cover-actions {
  position: absolute; right: 10px; bottom: 10px; display: flex; gap: 6px;
  opacity: 0; transition: opacity .15s;
}
.profile-cover:hover .cover-actions, .profile-cover:focus-within .cover-actions { opacity: 1; }
.profile-cover .cover-actions button {
  font: inherit; font-size: 11px; font-weight: 850; padding: 4px 9px;
  border: 2px solid var(--white); background: rgba(36, 27, 49, .74); color: var(--white);
  cursor: pointer;
}
.profile-cover .cover-actions button.del { border-color: #ffd0d9; color: #ffd0d9; }
@media (hover: none) {
  .profile-cover .cover-actions { opacity: 1; }
}
@media (max-width: 640px) {
  .profile-cover.has-banner { height: 150px; }
}

/* ---------- 主页照片墙（最多 2 张，4:3） ---------- */

.photo-wall .section-head { margin-bottom: 12px; }
.wall-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wall-slot {
  position: relative; display: block; width: 100%; padding: 0;
  aspect-ratio: 4 / 3; border: 2px solid var(--ink); background: var(--paper);
  overflow: hidden; font: inherit; color: var(--ink);
}
.wall-slot.filled { box-shadow: 4px 4px 0 var(--lilac); cursor: zoom-in; }
.wall-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wall-slot .wall-no {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  font-size: 10px; font-weight: 850; padding: 1px 6px;
  background: var(--ink); color: var(--white);
}
.wall-slot .wall-ops {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  display: flex; gap: 6px; opacity: 0; transition: opacity .15s;
}
.wall-slot.filled:hover .wall-ops, .wall-slot.filled:focus-within .wall-ops { opacity: 1; }
.wall-slot .wall-ops button {
  font: inherit; font-size: 11px; font-weight: 850; padding: 3px 8px;
  border: 2px solid var(--ink); background: var(--white); cursor: pointer;
}
.wall-slot .wall-ops button.del { background: #ffe9ee; color: #c02b4a; border-color: #c02b4a; }
.wall-slot.empty {
  display: grid; place-items: center; align-content: center; gap: 6px;
  text-align: center; cursor: pointer; border-style: dashed;
  background: repeating-linear-gradient(45deg, #fbf7ff 0 10px, #f4edff 10px 20px);
}
.wall-slot.empty .plus {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 2px dashed var(--purple); color: var(--purple);
  font-size: 22px; font-weight: 900;
}
.wall-slot.empty b { font-size: 12.5px; }
.wall-slot.empty span { font-size: 11px; color: var(--muted); font-weight: 700; }
.wall-hint { margin: 10px 0 0; font-size: 11.5px; font-weight: 700; color: var(--muted); line-height: 1.6; }
@media (hover: none) {
  .wall-slot .wall-ops { opacity: 1; }
}
@media (max-width: 560px) {
  .wall-grid { grid-template-columns: 1fr; }
}

/* 照片放大（原图） */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  padding: 24px; background: rgba(20, 12, 35, .76);
}
.photo-lightbox img {
  max-width: min(92vw, 960px); max-height: 84vh;
  border: 3px solid var(--white); box-shadow: 0 14px 44px rgba(0, 0, 0, .5);
  background: var(--white);
}
.photo-lightbox .plb-close {
  position: absolute; top: 18px; right: 20px;
  font: inherit; font-size: 12.5px; font-weight: 850; padding: 6px 12px;
  border: 2px solid var(--white); background: transparent; color: var(--white); cursor: pointer;
}
.profile-body {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 20px;
  align-items: start; padding: 0 22px 20px;
}
/* 头像要压在横幅上方：cover 是定位元素，默认绘制顺序会盖住非定位的头像，
 * 所以这里给头像容器也加上定位 + z-index，头像盖住横幅 */
.profile-avatar-wrap {
  position: relative; z-index: 2;
  margin-top: -48px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.profile-id { padding-top: 14px; min-width: 0; }
.profile-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.profile-name-row h1 { margin: 0; font-size: 26px; font-weight: 850; letter-spacing: -.6px; }
.profile-no { color: var(--muted); font-size: 12px; font-weight: 800; }
.profile-contact { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 10px; font-size: 13px; }
.contact-item { display: inline-flex; align-items: center; gap: 6px; }
.contact-item b { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.contact-empty { color: var(--muted); font-size: 12px; }
.copy-btn {
  padding: 1px 6px; font-size: 11px; font-weight: 800; color: var(--purple-dark);
  background: var(--purple-soft); border: 2px solid var(--ink); cursor: pointer;
}
.copy-btn:hover { background: var(--lime); }
.profile-bio { margin: 12px 0 0; max-width: 62ch; color: var(--ink-soft); font-size: 13.5px; line-height: 1.7; }

/* v41 员工主页（客服 / 管理员）：身份标、加入时间、联系方式格子 */
.tag-lilac { color: var(--purple-dark); border-color: var(--purple); background: var(--lilac, #efe8ff); }
.profile-meta { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.contact-cell { border: 2px solid var(--line); background: var(--paper-2, #faf8ff); padding: 10px 12px; }
.contact-cell span { display: block; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.contact-cell b { font-size: 14px; word-break: break-all; }

/* v42 员工主页改版：头部与打手主页同构 —— 头像半压横幅 + 右侧姓名/联系方式/签名 + 两格信息条 */
.staff-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.staff-stats .pstat .v.sm { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
@media (max-width: 640px) {
  .staff-stats { grid-template-columns: 1fr 1fr; }
}

.profile-stats {
  grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-top: 18px;
}
.pstat { padding: 12px 14px; background: var(--paper); border: 3px solid var(--ink); }
.pstat .v { font-size: 24px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pstat .k { margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .4px; }
.pstat-lime { background: var(--lime); }

.profile-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.profile-section { margin-bottom: 18px; }
.profile-section .section-head { margin-bottom: 12px; }

/* ---------- 头像 ---------- */

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid var(--ink); background: var(--white);
  font-weight: 850; object-fit: cover; flex: none; overflow: hidden;
}
.avatar-xl { width: 104px; height: 104px; font-size: 38px; box-shadow: 5px 5px 0 var(--lilac); }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-sm { width: 28px; height: 28px; font-size: 12px; }
.avatar-fallback { background: var(--lime); color: var(--ink); }
.avatar-edit {
  padding: 3px 8px; font-size: 11px; font-weight: 800; color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--purple);
  cursor: pointer; white-space: nowrap;
}
.avatar-edit:hover { background: var(--lime); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--purple); }

/* ---------- 星级 ---------- */

.rating { display: inline-flex; letter-spacing: 1px; font-size: 14px; line-height: 1; }
.rating-on { color: #f5a623; }
.rating-off { color: #ded7e8; }

.rating-picker { display: flex; align-items: center; gap: 4px; }
.rating-star {
  padding: 0 2px; font-size: 26px; line-height: 1; color: #ded7e8;
  background: none; border: 0; cursor: pointer;
}
.rating-star.on { color: #f5a623; }
.rating-star:hover { transform: translateY(-1px); }
.rating-text { margin-left: 8px; color: var(--muted); font-size: 12px; font-weight: 800; }

/* ---------- 评价列表 ---------- */

.review-list { display: grid; gap: 10px; }
.review-item { padding: 12px 14px; background: var(--paper); border: 3px solid var(--ink); }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.review-author { font-size: 12px; font-weight: 850; }
.review-content { margin: 8px 0 4px; font-size: 13px; line-height: 1.7; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

/* ---------- 抽屉（后台打手列表点昵称） ---------- */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end;
  background: rgba(36, 27, 49, .42);
}
.drawer {
  width: min(760px, 100%); height: 100%; display: flex; flex-direction: column;
  background: var(--paper); border-left: 3px solid var(--ink);
  box-shadow: -8px 0 0 rgba(36, 27, 49, .18);
  animation: drawer-in .18s ease-out;
}
@keyframes drawer-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--white); border-bottom: 3px solid var(--ink);
}
.drawer-head strong { font-size: 14px; }
.drawer-link { font-size: 12px; font-weight: 800; color: var(--purple-dark); }
.drawer-close {
  width: 30px; height: 30px; font-size: 20px; line-height: 1; font-weight: 850;
  background: var(--white); border: 3px solid var(--ink); cursor: pointer;
}
.drawer-close:hover { background: var(--pink); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px; }
.drawer .profile-body { padding: 0 14px 16px; }
.drawer .profile-cover.has-banner { height: 150px; }
.drawer .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.drawer .profile-name-row h1 { font-size: 22px; }

/* ---------- 打手管理列表：昵称可点 ---------- */

.nick-link {
  padding: 0; font: inherit; font-weight: 850; color: var(--purple-dark);
  background: none; border: 0; border-bottom: 2px solid var(--lilac); cursor: pointer;
}
.nick-link:hover { color: var(--purple); border-bottom-color: var(--purple); }

@media (max-width: 760px) {
  .profile-body { grid-template-columns: 1fr; }
  .profile-avatar-wrap { margin-top: -48px; align-items: flex-start; }
  .profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-name-row h1 { font-size: 22px; }
}

/* ---------- 金币系统（v7）：全局金币金额展示（1元=10金币） ---------- */

.coin-amount {
  display: inline-flex; align-items: center; gap: 3px;
  color: #E6A23C; font-weight: 800; white-space: nowrap; vertical-align: baseline;
}
.coin-amount .coin-icon { flex: 0 0 auto; }
.coin-amount .coin-num {
  color: #E6A23C; font-weight: 900; font-variant-numeric: tabular-nums;
}
.coin-amount .coin-unit { font-size: 0.82em; font-weight: 800; color: #E6A23C; }
.coin-amount.lg .coin-num { font-size: 1.35em; }
.coin-amount.sm .coin-num { font-size: 0.9em; }

/* ============================================================
   圆角规范（v78）—— 去掉直角，但不做胶囊
   参照网易云桌面版：大容器 12 / 控件与列表 8 / 小徽标 6
   想整体调软硬只改这三个变量即可
   ============================================================ */

:root {
  --r-lg: 12px;
  --r-md: 8px;
  --r-sm: 6px;
}

/* ---------- 容器 ---------- */
.card,
.stat,
.balance-card,
.table-wrap,
.filters,
.admin-nav,
.auth-card,
.profile-hero,
.alert,
.toast,
.modal,
.pool-card,
.team-bar,
.wallet-hero,
.drop-zone,
.empty-card,
.report-quote,
.field-error,
.danger-note,
.mbar-modal,
.cmz .post,
.cmz .composer,
.cmz .pub-modal,
.cmz .new-dir-box,
.cmz-author-drawer {
  border-radius: var(--r-lg, 12px);
}

/* ---------- 中等块（缩略图 / 舞台 / 徽章块） ---------- */
.thumb,
.modal-target,
.crop-stage,
.wall-slot,
.mbar-cover {
  border-radius: var(--r-md, 8px);
}

/* ---------- 控件：按钮 / 输入 / 导航项 ---------- */
.btn,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
input[type='date'],
input[type='search'],
input[type='tel'],
input[type='url'],
select,
textarea,
.topnav a,
.userchip,
.brand-mark,
.admin-nav a,
.tab,
.pager a,
.pager button,
.cmz .btn-mini,
.cmz .author-btn {
  border-radius: var(--r-md, 8px);
}

/* ---------- 小徽标 ---------- */
.tag,
.tag-green,
.tag-amber,
.tag-rose,
.tag-purple,
.tag-grey,
.tag-lime,
.tag-blue,
.tag-teal,
.admin-nav .count,
.userchip .role-tag,
.cmz .badge {
  border-radius: var(--r-sm, 6px);
}

/* auth-switch 是两格连续切换，圆角要裁掉子格背景 */
.auth-switch { border-radius: var(--r-md, 8px); overflow: hidden; }

