/* ==========================================================================
   希程接单平台 （移动端优先）
   ========================================================================== */
:root {
  --blue: #2f6bff;
  --blue-deep: #1654e0;
  --blue-soft: #eef4ff;
  --ink: #0f172a;
  --ink-2: #33415c;
  --muted: #7a889e;
  --line: #edf1f7;
  --bg: #f4f6fb;
  --card: #ffffff;
  --red: #f5333f;
  --green: #0aa06e;
  --amber: #f59e0b;
  --radius: 16px;
  --shadow-sm: 0 2px 10px rgba(23, 43, 88, .05);
  --shadow-md: 0 8px 26px rgba(23, 43, 88, .09);
  --tab-h: 58px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #e9edf5;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body { display: flex; justify-content: center; }

.phone {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .04), 0 20px 60px rgba(15, 23, 42, .08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app {
  flex: 1;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 10px);
  min-height: 0;
}

/* ---------------------------------------------------------------- 通用组件 */
.screen-center {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.spinner {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 3px solid #d8e2f6;
  border-top-color: var(--blue);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: transform .12s ease, opacity .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary {
  background: linear-gradient(135deg, #3d7bff, var(--blue-deep));
  color: #fff;
  box-shadow: 0 6px 14px rgba(47, 107, 255, .28);
}
.btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #d92c39);
  color: #fff;
  box-shadow: 0 6px 14px rgba(217, 44, 57, .26);
}
.btn-ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid #cddcff;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-md { padding: 11px 20px; font-size: 15px; }
.btn-lg { padding: 13px 22px; font-size: 16px; width: 100%; }
.btn-block { width: 100%; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid #dbe7ff;
}

.muted { color: var(--muted); }
.tiny { font-size: 12px; }

/* ---------------------------------------------------------------- 顶部品牌区 */
.topbar {
  position: relative;
  padding: calc(14px + var(--safe-t)) 16px 18px;
  background:
    radial-gradient(120% 90% at 92% -10%, rgba(255, 255, 255, .45), transparent 60%),
    linear-gradient(135deg, #4a86ff 0%, #2f6bff 48%, #1f56e6 100%);
  color: #fff;
  overflow: hidden;
}
.topbar::after {
  content: "";
  position: absolute;
  right: -60px; top: -70px;
  width: 190px; height: 190px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.topbar-row { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.brand { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 12px;
  opacity: .85;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-mark {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
  color: #fff;
  backdrop-filter: blur(4px);
  overflow: hidden;
  display: none;
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.topbar-user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: 46%;
  flex: 0 1 auto;
  min-width: 0;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .3);
  padding: 5px 10px 5px 6px;
  border-radius: 999px;
  font-size: 13px;
  color: #fff;
}
.topbar-user .nick {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.topbar-user .role-badge { flex: 0 0 auto; }
.topbar-user .avatar-xs {
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; color: var(--blue);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
}
.stat-line {
  position: relative; z-index: 1;
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, .92);
}
.stat-line b {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
}
.stat-line .dot-live {
  width: 7px; height: 7px; border-radius: 50%;
  background: #7dffc0;
  box-shadow: 0 0 0 0 rgba(125, 255, 192, .7);
  animation: pulse 2s infinite;
  align-self: center;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(125,255,192,.6); }
  70% { box-shadow: 0 0 0 8px rgba(125,255,192,0); }
  100% { box-shadow: 0 0 0 0 rgba(125,255,192,0); }
}
.stat-note {
  margin-left: auto;
  font-size: 11px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: 3px 8px;
  border-radius: 999px;
}

/* ---------------------------------------------------------------- 内容区 */
.view { padding: 0 0 8px; }
.view.has-savebar { padding-bottom: calc(var(--tab-h) + 88px); }
.section {
  padding: 14px 16px 0;
}
.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.section-title { font-size: 17px; font-weight: 800; letter-spacing: .3px; }
.section-sub { font-size: 12px; color: var(--muted); }
.section-head .spacer { flex: 1; }

.notice {
  margin: 12px 16px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #ffe9b8;
  color: #8a5a00;
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.notice .ico { font-size: 14px; line-height: 1.3; }

/* ---------------------------------------------------------------- 分类条 */
.cat-wrap {
  position: relative;
  background: #fff;
  border-bottom: 1px solid #f0f4fa;
}
.cat-wrap.is-sub {
  background: transparent;
  border-bottom: 0;
  padding-top: 2px;
}
.cat-scroll {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 8px;
}
.cat-spacer {
  flex: 0 0 68px;
  height: 1px;
}
.cat-wrap.is-sub .cat-scroll { padding: 8px 16px 4px; }
.cat-scroll::-webkit-scrollbar { display: none; }

/* 一级：文字标签 + 蓝色下划线 */
.cat-tabs { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.cat-tab {
  flex: 0 0 auto;
  position: relative;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 13px 12px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s ease;
}
.cat-tab.active {
  color: var(--blue);
  font-weight: 700;
}
.cat-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 5px;
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--blue);
}

/* 右侧固定「三横」按钮：弹出全部游戏 */
/* 右侧固定「三横」按钮：弹出全部游戏 */
.cat-more {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 52px;
  padding: 0 12px 0 26px;
  width: 62px;
  border: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 26%, #fff 100%);
  cursor: pointer;
}
.cat-more .bar {
  display: block;
  width: 17px;
  height: 2px;
  border-radius: 2px;
  background: #7d8b9f;
  transition: background .15s;
}
.cat-more:active .bar { background: var(--blue); }

/* 二级：白底胶囊，选中为浅蓝底 + 蓝边 */
.sub-tabs { display: flex; gap: 8px; flex: 1; min-width: 0; }
.sub-tab {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(23, 43, 88, .05);
  transition: all .15s ease;
}
.sub-tab.active {
  background: var(--blue-soft);
  border-color: #b9cffd;
  color: var(--blue);
  font-weight: 700;
  box-shadow: none;
}

/* 首页「全部订单 ›」 */
.link-more {
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  padding: 6px 4px 6px 10px;
  cursor: pointer;
  white-space: nowrap;
}

/* 列表小标题 */
.list-summary {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 16px 8px;
}

/* ---------------------------------------------------------------- 选游戏弹层 */
.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 4px;
}
.picker-card {
  border: 1px solid #eef2f9;
  background: #fbfcfe;
  border-radius: 12px;
  padding: 10px 5px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  min-width: 0;
  transition: all .15s ease;
}
.picker-card.active {
  border-color: #b9cffd;
  background: var(--blue-soft);
  box-shadow: 0 0 0 2px rgba(47, 107, 255, .1);
}
.picker-card .thumb.sm { width: 42px; height: 42px; border-radius: 11px; font-size: 15px; }
.picker-all {
  width: 42px; height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, #4a86ff, #1f56e6);
  box-shadow: 0 6px 14px rgba(47, 107, 255, .25);
}
.picker-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  max-width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.picker-card.active .picker-name { color: var(--blue); }

/* 固定游戏列表 */
/* 游戏封面（渐变 + 字标） */
.thumb {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  border-radius: 14px;
  width: 58px;
  height: 58px;
  font-size: 20px;
  letter-spacing: .5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .16);
}
.thumb::before {
  content: attr(data-badge);
  position: absolute;
  left: 4px; top: 2px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .5px;
  background: rgba(255, 255, 255, .32);
  color: #fff;
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1.4;
}
.thumb[data-badge=""]::before { display: none; }
.thumb::after {
  content: "";
  position: absolute;
  right: -14px; bottom: -16px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
}
.thumb span { position: relative; z-index: 1; text-shadow: 0 2px 6px rgba(0, 0, 0, .18); }

/* 官方图标模式：图片铺满，去掉角标和装饰圆 */
.thumb.has-img { background: #eef2f8; }
.thumb.has-img::before,
.thumb.has-img::after { display: none; }
.thumb.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.thumb.sm { width: 44px; height: 44px; border-radius: 12px; font-size: 16px; }
.thumb.sm::before { content: none; }

/* ---------------------------------------------------------------- 订单卡片 */
.order-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.section + .order-list { padding-top: 2px; }

.order-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f2f5fa;
  position: relative;
}
.order-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* 左：标题 + 标签 */
.order-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.order-title {
  font-size: 14.5px;
  margin: 0;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.order-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 1px; }
.tag {
  font-size: 11px;
  color: #5b7bb5;
  background: #f2f6ff;
  border: 1px solid #e3ecff;
  padding: 1px 7px;
  border-radius: 999px;
  line-height: 1.55;
}

/* 右：价格在上、按钮紧随其下（间距收紧） */
.order-side {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 1px;
  color: var(--red);
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1;
  white-space: nowrap;
}
.price .cur { font-size: 12px; font-weight: 700; }
.price .amount {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.price .unit {
  font-size: 11px;
  font-weight: 600;
  opacity: .8;
  margin-left: 1px;
}

.order-card .btn-contact.is-off,
.order-card .btn-contact.is-off:disabled {
  background: #eef1f6;
  color: #a3aec0;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.order-card .btn-contact {
  flex: 0 0 auto;
  padding: 6px 12px;
  font-size: 12.5px;
  letter-spacing: -.2px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(47, 107, 255, .22);
}

.empty {
  margin: 8px 16px;
  padding: 34px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: var(--radius);
  border: 1px dashed #dbe3f0;
  font-size: 13px;
}
.empty .big { font-size: 26px; display: block; margin-bottom: 8px; }

/* ---------------------------------------------------------------- 我的 */
.profile-card {
  margin: 14px 16px 0;
  background: #fff;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
}
.avatar {
  width: 58px; height: 58px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #4a86ff, #1f56e6);
  box-shadow: 0 8px 18px rgba(47, 107, 255, .28);
  flex: 0 0 auto;
}
.profile-info { min-width: 0; }
.profile-name { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.profile-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b45309;
  border: 1px solid #ffe2b8;
}
.role-badge.user { background: #eef4ff; color: #2f6bff; border-color: #dbe7ff; }

.menu-group {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  background: #fff;
  width: 100%;
  border-left: 0; border-right: 0; border-top: 0;
  font: inherit;
  text-align: left;
  color: var(--ink);
}
.menu:last-child { border-bottom: 0; }
.menu:active { background: #f7f9fe; }
.menu .ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: #eef4ff;
  color: var(--blue);
  font-size: 15px;
  flex: 0 0 auto;
}
.menu .label { font-size: 14px; font-weight: 600; }
.menu .value { margin-left: auto; font-size: 12px; color: var(--muted); max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .chev { color: #c2ccdb; font-size: 16px; margin-left: 4px; }
.menu.danger { color: #d63a45; }
.menu.danger .ico { background: #fff0f1; color: #d63a45; }

.foot-note {
  text-align: center;
  color: #9aa8bd;
  font-size: 11px;
  padding: 18px 24px 10px;
  line-height: 1.7;
}

/* ---------------------------------------------------------------- 登录/注册 */
.auth-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(48px + var(--safe-t)) 22px calc(24px + var(--safe-b));
  background:
    radial-gradient(90% 60% at 85% 0%, #dbe8ff 0%, transparent 55%),
    linear-gradient(180deg, #eef4ff 0%, #f7f9fd 42%, #f4f6fb 100%);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-logo {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, #4a86ff, #1654e0);
  color: #fff; display: grid; place-items: center;
  font-size: 22px; font-weight: 800;
  box-shadow: 0 12px 24px rgba(47, 107, 255, .3);
  display:none
}
.auth-title { font-size: 26px; font-weight: 800; letter-spacing: .5px; }
.auth-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 18px 18px 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid #f0f4fb;
}
.seg {
  display: flex;
  background: #f2f5fb;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}
.seg button {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  padding: 9px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: all .16s ease;
}
.seg button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 3px 10px rgba(23, 43, 88, .1);
}

.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}
.field .control {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f7f9fd;
  border: 1px solid #e7edf8;
  border-radius: 12px;
  padding: 0 12px;
  transition: border-color .15s, background .15s;
}
.field .control:focus-within {
  border-color: #b9cffd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47, 107, 255, .1);
}
.field .control .ico { color: #9fb0ca; font-size: 15px; }
.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  padding: 12px 0;
  color: var(--ink);
}
.field input::placeholder { color: #aab6c9; }
.field .hint { font-size: 11px; color: #9aa8bd; margin-top: 5px; padding-left: 2px; }

.auth-note {
  margin-top: 14px;
  font-size: 11px;
  color: #8c9ab0;
  line-height: 1.6;
  background: #f7f9fd;
  border-radius: 10px;
  padding: 9px 11px;
}
.auth-switch {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-switch button {
  border: 0; background: none; color: var(--blue);
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 4px;
}

.auth-admin-tip {
  margin-top: auto;
  padding-top: 22px;
  text-align: center;
  font-size: 11px;
  color: #9aa8bd;
  line-height: 1.8;
}

/* ---------------------------------------------------------------- 底部导航 */
.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  border-top: 1px solid #ebeff7;
  display: flex;
  z-index: 40;
}
.tabbar[hidden] { display: none; }
.tab {
  flex: 1;
  border: 0;
  background: none;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #98a5ba;
  cursor: pointer;
  padding: 8px 0 6px;
  font-size: 10.5px;
  font-weight: 600;
  position: relative;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--blue); }
.tab.active::after {
  content: "";
  position: absolute;
  top: 0;
  width: 22px; height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--blue);
}
.tab .dot {
  position: absolute;
  top: 7px;
  margin-left: 18px;
  width: 6px; height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* ---------------------------------------------------------------- 管理端 */
.site-panel {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f2f5fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.site-head { display: flex; align-items: center; gap: 8px; }
.site-title { font-size: 14px; font-weight: 800; }
.site-hint { font-size: 11px; color: var(--muted); }
.site-head .spacer { flex: 1; }
.site-field {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7f9fd;
  border: 1px solid #e7edf8;
  border-radius: 10px;
  padding: 0 12px;
}
.site-field .k { font-size: 12px; color: var(--muted); width: 60px; flex: 0 0 auto; }
.site-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 0;
  color: var(--ink);
}
.site-field:focus-within { border-color: #b9cffd; background: #fff; }
.site-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  padding: 4px 2px 0;
  cursor: pointer;
  user-select: none;
}
.site-switch input { display: none; }
.site-switch .track {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: #dfe6f1;
  position: relative;
  transition: background .16s;
  flex: 0 0 auto;
}
.site-switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  transition: transform .16s;
}
.site-switch input:checked + .track { background: var(--blue); }
.site-switch input:checked + .track::after { transform: translateX(14px); }

.admin-toolbar {
  margin: 12px 16px 0;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.admin-toolbar .row { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-hint {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-hint b { color: var(--blue); }

.admin-item.dirty {
  border-color: #b9cffd;
  box-shadow: 0 0 0 2px rgba(47, 107, 255, .12), var(--shadow-sm);
}
.admin-item {
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f2f5fa;
}
.admin-item .head { display: flex; align-items: center; gap: 10px; }
.admin-item .title { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; }
.admin-item .path { font-size: 11px; color: var(--muted); }
.admin-item .controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-input {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f7f9fd;
  border: 1px solid #e7edf8;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13px;
  color: var(--muted);
}
.price-input input {
  width: 74px;
  border: 0; outline: 0; background: transparent;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  padding: 9px 0;
  text-align: right;
}
.price-input input::-webkit-outer-spin-button,
.price-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.switch input { display: none; }
.switch .track {
  width: 34px; height: 20px;
  border-radius: 999px;
  background: #dfe6f1;
  position: relative;
  transition: background .16s;
  flex: 0 0 auto;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .2);
  transition: transform .16s;
}
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(14px); }

.save-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  /* 紧贴在底部状态栏之上，不随列表滚动 */
  bottom: calc(var(--tab-h) + var(--safe-b));
  width: 100%;
  max-width: 480px;
  z-index: 45;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid #eaeff8;
  box-shadow: 0 -6px 20px rgba(23, 43, 88, .08);
  backdrop-filter: blur(12px);
}
.save-bar .info {
  font-size: 12px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.save-bar .btn { flex: 0 0 auto; }
.save-bar .info b { color: var(--ink); }

/* ---------------------------------------------------------------- 浮层 / 弹窗 */
.layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 23, 42, .42);
  animation: fadeIn .16s ease;
}
.layer.center { align-items: center; padding: 22px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 480px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 8px 18px calc(18px + var(--safe-b));
  animation: slideUp .22s cubic-bezier(.22, .8, .3, 1);
  max-height: 88vh;
  overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }

.modal {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px 16px;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.94); opacity: .5; } to { transform: scale(1); opacity: 1; } }

.sheet-grab {
  width: 38px; height: 4px;
  border-radius: 4px;
  background: #e3e9f4;
  margin: 2px auto 12px;
}
.sheet h3, .modal h3 { margin: 0 0 4px; font-size: 17px; }
.sheet .sub, .modal .sub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.sheet-close {
  position: absolute;
  right: 14px; top: 12px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 0;
  background: #f2f5fb;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
}
.sheet-inner { position: relative; }

.contact-box {
  border-radius: 16px;
  background: linear-gradient(150deg, #f1f6ff, #e7efff);
  border: 1px solid #dbe7ff;
  padding: 14px;
  margin-bottom: 14px;
}
.contact-box .game { font-size: 12px; color: #5b7bb5; }
.contact-box .order-name { font-size: 15px; font-weight: 800; margin: 4px 0 6px; }
.contact-box .order-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.contact-box .order-meta b { color: var(--ink); }

.contact-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8faff;
  border: 1px solid #eaf0fa;
  border-radius: 12px;
  padding: 11px 12px;
}
.contact-row .k { font-size: 12px; color: var(--muted); width: 56px; flex: 0 0 auto; }
.contact-row .v { font-size: 14px; font-weight: 700; flex: 1; word-break: break-all; }
.copy-btn {
  flex: 0 0 auto;
  border: 1px solid #cddcff;
  background: #fff;
  color: var(--blue);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  cursor: pointer;
}
.contact-tip {
  font-size: 11px;
  color: #8c9ab0;
  line-height: 1.7;
  background: #fbfcfe;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px dashed #e3e9f4;
}

.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions .btn { flex: 1; }

.toast-wrap {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tab-h) + var(--safe-b) + 26px);
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: 100%;
  max-width: 480px;
  padding: 0 24px;
}
.toast {
  background: rgba(20, 32, 56, .92);
  color: #fff;
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  animation: toastIn .2s ease;
  max-width: 100%;
  text-align: center;
}
.toast.ok { background: rgba(10, 125, 88, .95); }
.toast.err { background: rgba(190, 40, 52, .95); }
body.has-savebar .toast-wrap { bottom: calc(var(--tab-h) + var(--safe-b) + 86px); }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* 小屏适配 */
@media (max-width: 360px) {
  .brand-name { font-size: 19px; }
  .brand-sub { font-size: 11px; }
  .topbar-user { font-size: 12px; padding: 4px 8px 4px 5px; max-width: 44%; }
  .topbar-user .role-badge { display: none; }
  .stat-line .stat-note { display: none; }
  .order-list { padding: 0 12px; }
  .order-card { padding: 11px 10px; gap: 9px; }
  .thumb { width: 40px; height: 40px; font-size: 14px; border-radius: 11px; }
  .order-body { gap: 5px; }
  .price .amount { font-size: 18px; }
  .order-title { font-size: 12.5px; line-height: 1.35; }
  .order-card .btn-contact.is-off,
.order-card .btn-contact.is-off:disabled {
  background: #eef1f6;
  color: #a3aec0;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.order-card .btn-contact { padding: 5px 8px; font-size: 11.5px; }
  .tag { font-size: 10.5px; padding: 1px 6px; }
  .order-tags { gap: 4px; }
  .price .cur { font-size: 11px; }
  .price .unit { font-size: 10px; }
  /* 四列宫格：小屏收窄内边距，避免「跑跑卡丁车」被截断 */
  .picker-card { padding: 9px 3px 7px; }
  .picker-name { font-size: 11px; }
  .picker-card .thumb.sm, .picker-all { width: 40px; height: 40px; }
}

/* ---------------------------------------------------------------- 注册协议 */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
}
.agree-check {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  outline: none;
}
.agree-toggle { flex: 1; min-width: 12px; align-self: stretch; cursor: pointer; }
.agree-box {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  margin-top: 1px;
  border-radius: 5px;
  border: 1.5px solid #c9d4e5;
  background: #fff;
  position: relative;
  transition: all .15s ease;
}
.agree-box.on {
  background: var(--blue);
  border-color: var(--blue);
}
.agree-box.on::after {
  content: "";
  position: absolute;
  left: 5px; top: 1.5px;
  width: 5px; height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.agree-text { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; }
@keyframes agreeShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.agree-row.shake { animation: agreeShake .3s ease; }
.agree-row.shake .agree-text { color: #d63a45; }
.agree-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

/* 左侧竖排「用户协议」贴边 */
/* 全站常驻：左下角竖排「用户协议」（手机端） */
.agree-side {
  position: fixed;
  left: 4px;
  bottom: calc(var(--tab-h) + var(--safe-b) + 14px);
  z-index: 60;
  border: 1px solid #d8e3f6;
  background: rgba(255, 255, 255, .94);
  color: #6b7f9e;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 10px 5px;
  border-radius: 8px;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: upright;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(6px);
}
.agree-side:hover { color: var(--blue); border-color: #b9cffd; }
.agree-side:active { color: var(--blue); border-color: #b9cffd; }

/* 协议正文 */
.agree-body {
  max-height: 56vh;
  overflow-y: auto;
  padding: 12px 14px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.agree-body .md { font-size: 13px; line-height: 1.75; color: var(--ink-2); }
.agree-body .md-h1 { font-size: 17px; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.agree-body .md-h2 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 14px 0 6px; }
.agree-body .md-h3, .agree-body .md-h4 { font-size: 13.5px; font-weight: 700; margin: 10px 0 4px; }
.agree-body .md-p { margin: 6px 0; }
.agree-body .md-ol, .agree-body .md-ul { margin: 6px 0; padding-left: 20px; }
.agree-body .md-ol li, .agree-body .md-ul li { margin: 3px 0; }
.agree-body .md-hr { border: 0; border-top: 1px dashed #dde5f2; margin: 12px 0; }
.agree-body strong { color: var(--ink); font-weight: 700; }

/* 文档内图片（营业执照等） */
.agree-body .md-figure { margin: 10px 0; }
.agree-body .md-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
}
.agree-body .md-img.is-broken,
.md-img.is-broken {
  display: none !important;
}

/* 图片查看层（点开大图，可双指放大 / 横向拖动） */
.img-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 14, 26, .94);
  display: grid;
  place-items: center;
  padding: 16px;
  animation: pop .16s ease;
}
.img-viewer .img-viewer-scroll {
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.img-viewer img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
}
.img-viewer .img-viewer-close {
  position: absolute;
  top: calc(12px + var(--safe-t, 0px));
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ---------------------------------------------------------------- 接单按钮 */
.btn-order { min-width: 92px; }
.btn-order.is-off,
.btn-order.is-locked {
  background: #eef1f6;
  color: #9aa7ba;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 1;
}
.order-card .btn-contact.is-off,
.order-card .btn-contact.is-locked {
  background: #eef1f6;
  color: #9aa7ba;
  box-shadow: none;
  cursor: not-allowed;
}

/* ---------------------------------------------------------------- 我的：余额 */
.balance-card {
  margin: 12px 16px 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3d7bff, #1c55e2);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 22px rgba(47, 107, 255, .24);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: "";
  position: absolute;
  right: -30px; top: -40px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.balance-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.balance-label { font-size: 12px; opacity: .85; }
.balance-amount {
  display: block;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.btn-withdraw {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .96);
  color: var(--blue-deep);
  font-weight: 700;
  padding: 8px 18px;
  box-shadow: none;
}

/* ---------------------------------------------------------------- 我的：订单/提现 */
.order-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.order-tabs::-webkit-scrollbar { display: none; }
.order-tab {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.order-tab.active {
  background: var(--blue-soft);
  border-color: #b9cffd;
  color: var(--blue);
  font-weight: 700;
}

.order-cards { display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 12px; }
.my-order {
  background: #fff;
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #f2f5fa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.my-order-head { display: flex; align-items: flex-start; gap: 10px; }
.my-order-title {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
}
.my-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 12px;
  color: var(--muted);
}
.my-order-meta .ok-text { color: var(--green); font-weight: 600; }
/* 「约定 N 天完成」黄色提示 */
.deadline-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: #b45309;
  background: #fff7e8;
  border: 1px solid #ffe2b8;
  border-radius: 999px;
  padding: 1px 9px;
  line-height: 1.6;
}
.my-order-meta .bad-text { color: #d63a45; }
.my-order-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn-settle { min-width: 84px; }
/* 5 分钟内可自行取消接单申请 */
.btn-cancel { color: var(--muted); }
.btn-cancel:hover:not(:disabled) { color: #d63a45; border-color: #ffd5d9; }
.btn-cancel .cancel-left {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.status-pill {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-pill.wait { background: #fff7e8; color: #b45309; border-color: #ffe2b8; }
.status-pill.doing { background: var(--blue-soft); color: var(--blue); border-color: #dbe7ff; }
.status-pill.ok { background: #eafaf3; color: #0a8f63; border-color: #c8f0e0; }
.status-pill.bad { background: #fff0f1; color: #d63a45; border-color: #ffd7db; }

.withdraw-list { display: flex; flex-direction: column; gap: 8px; }
.withdraw-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
}
.wd-main { flex: 1; min-width: 0; }
.wd-amount { font-size: 15px; font-weight: 800; color: var(--ink); }
.wd-time { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------------------------------------------------------------- 提现记录页 */
.balance-hint {
  font-size: 11.5px;
  opacity: .85;
  position: relative;
  z-index: 1;
  align-self: flex-end;
}
.withdraw-cards { display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 12px; }

/* 驳回原因 / 状态说明 */
.reject-box {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #fff0f1;
  border: 1px solid #ffd7db;
  font-size: 12px;
  line-height: 1.5;
}
.reject-box.pending-box {
  background: #fff7e8;
  border-color: #ffe2b8;
}
.reject-label {
  flex: 0 0 auto;
  font-weight: 700;
  color: #c22c38;
}
.pending-box .reject-label { color: #b45309; }
.reject-text { color: #8a3a42; word-break: break-word; }
.pending-box .reject-text { color: #8a5a00; }

/* 订单分页 */
.load-more-wrap { display: flex; justify-content: center; padding: 4px 16px 16px; }
.load-more { min-width: 200px; }
