/* ==========================================================================
   cc王者陪伴 · 暗色电竞主题
   1 元 = 10 积分
   ========================================================================== */

:root {
  --bg: #0A0A0F;
  --bg-2: #101018;
  --panel: #16161F;
  --panel-2: #1E1E2A;
  --panel-3: #262635;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .16);
  --text: #EDEDF2;
  --text-2: #9C9CB0;
  --text-3: #6B6B7E;
  --brand: #7C5CFF;
  --brand-2: #22D3EE;
  --gold: #F5C451;
  --red: #FF5C6C;
  --green: #34D399;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 8px 30px rgba(0, 0, 0, .45);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.desktop-shell {
  background:
    radial-gradient(900px 500px at 20% -10%, rgba(124, 92, 255, .18), transparent 60%),
    radial-gradient(700px 400px at 85% 0%, rgba(34, 211, 238, .12), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--brand-2); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
p { margin: 0; }
input, select, textarea, button { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 输入 / 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: var(--panel-3); }
.textarea { resize: vertical; min-height: 84px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; min-width: 0; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
  transition: transform .08s, opacity .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-3); border-color: var(--line-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #7C5CFF, #5B3FE0); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(124, 92, 255, .32); }
.btn-primary:hover { background: linear-gradient(135deg, #8A6DFF, #6B4DF0); }
.btn-gold { background: linear-gradient(135deg, #F5C451, #E0A63C); border-color: transparent; color: #2A1D00; }
.btn-danger { background: rgba(255, 92, 108, .14); border-color: rgba(255, 92, 108, .4); color: #FF8C97; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn-xs { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- 卡片 / 通用 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card + .card { margin-top: 12px; }
.panel-title { font-size: 15px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.panel-title .more { font-size: 12px; color: var(--text-2); font-weight: 400; cursor: pointer; }
.muted { color: var(--text-2); }
.muted-3 { color: var(--text-3); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb8 { margin-bottom: 8px; } .mb12 { margin-bottom: 12px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; } .between { justify-content: space-between; } .align { align-items: center; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.price { color: var(--gold); font-weight: 600; }
.price small { font-size: 11px; font-weight: 400; }
.point-num { color: var(--gold); font-weight: 700; font-size: 22px; }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  background: rgba(124, 92, 255, .14); border: 1px solid rgba(124, 92, 255, .35);
  color: #B7A4FF; font-size: 11px; line-height: 1.7;
}
.tag.cyan { background: rgba(34, 211, 238, .12); border-color: rgba(34, 211, 238, .32); color: #7FE7F7; }
.tag.gold { background: rgba(245, 196, 81, .12); border-color: rgba(245, 196, 81, .32); color: #F5C451; }
.tag.gray { background: rgba(255,255,255,.06); border-color: var(--line-2); color: var(--text-2); }

.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11px; line-height: 1.8; }
.b-pending  { background: rgba(245, 196, 81, .16);  color: #F5C451; }
.b-accepted { background: rgba(34, 211, 238, .16);  color: #6FE3F5; }
.b-finished { background: rgba(124, 92, 255, .18);  color: #B7A4FF; }
.b-settled  { background: rgba(52, 211, 153, .16);  color: #5FE3AE; }
.b-cancelled{ background: rgba(255,255,255,.08);    color: var(--text-3); }

.avatar {
  border-radius: 50%; object-fit: cover; background: var(--panel-3);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 600; flex: none;
}
.avatar.ring { border: 2px solid rgba(124, 92, 255, .55); }

.empty { text-align: center; color: var(--text-3); padding: 46px 16px; font-size: 13px; }
.empty .big { font-size: 30px; display: block; margin-bottom: 10px; opacity: .5; }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel-2) 50%, var(--panel) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; height: 14px; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Toast ---------- */
#toast-box { position: fixed; left: 50%; top: 22px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: 90vw; }
.toast {
  background: rgba(30, 30, 42, .97); border: 1px solid var(--line-2); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow);
  animation: tin .2s ease-out;
}
.toast.ok { border-color: rgba(52, 211, 153, .5); }
.toast.err { border-color: rgba(255, 92, 108, .55); color: #FFC3C9; }
@keyframes tin { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ---------- 弹层 ---------- */
.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .62); z-index: 9000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: tin .15s ease-out; }
.modal { background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; width: 100%; max-width: 420px; max-height: 86vh; overflow: auto; box-shadow: var(--shadow); }
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 18px; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ==========================================================================
   客户端（手机版式，桌面居中）
   ========================================================================== */
.phone {
  max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  position: relative; padding-bottom: 76px; overflow-x: hidden;
}
@media (min-width: 760px) {
  body.desktop-shell .phone {
    border-left: 1px solid var(--line); border-right: 1px solid var(--line);
    box-shadow: 0 0 60px rgba(0, 0, 0, .6);
  }
}

.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 10, 15, .86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px; display: flex; align-items: center; justify-content: space-between;
}
.topbar .brand { font-weight: 700; font-size: 16px; letter-spacing: .5px; }
.topbar .brand i { font-style: normal; background: linear-gradient(135deg, #7C5CFF, #22D3EE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.topbar .balance { font-size: 12px; color: var(--gold); background: rgba(245,196,81,.1); border: 1px solid rgba(245,196,81,.3); padding: 4px 11px; border-radius: 999px; }

.page { padding: 16px; }

/* 轮播 */
.hero { position: relative; border-radius: var(--r); overflow: hidden; height: 158px; background: linear-gradient(135deg, #2A1E5C, #14314A); border: 1px solid var(--line); }
.hero-track { display: flex; height: 100%; transition: transform .45s cubic-bezier(.4,0,.2,1); }
.hero-item { flex: 0 0 100%; padding: 24px 22px; display: flex; flex-direction: column; justify-content: center; position: relative; background-size: cover; background-position: center; }
.hero-item h3 { font-size: 19px; margin-bottom: 6px; }
.hero-item p { font-size: 13px; color: rgba(255,255,255,.72); }
.hero-item::after { content: ""; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(124,92,255,.55), transparent 68%); }
.hero-dots { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.hero-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.32); display: block; transition: width .25s; }
.hero-dots i.on { width: 16px; border-radius: 3px; background: #fff; }

.notice-bar { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; overflow: hidden; }
.notice-bar .ic { color: var(--brand-2); font-size: 12px; flex: none; }
.notice-bar .txt { flex: 1; overflow: hidden; height: 20px; position: relative; }
.notice-bar .txt span { display: block; font-size: 12.5px; color: var(--text-2); animation: roll 9s linear infinite; white-space: nowrap; }
@keyframes roll { 0%, 12% { transform: translateY(0); } 45%, 55% { transform: translateY(-20px); } 88%, 100% { transform: translateY(-40px); } }

/* 游戏入口 */
.game-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: linear-gradient(135deg, rgba(124,92,255,.22), rgba(34,211,238,.14)); border: 1px solid rgba(124,92,255,.4); font-size: 13px; font-weight: 500; }

/* 服务项目 */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.svc {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px;
  cursor: pointer; transition: border-color .15s, transform .08s;
}
.svc:hover { border-color: rgba(124,92,255,.5); }
.svc:active { transform: scale(.98); }
.svc .nm { font-size: 13.5px; font-weight: 500; }
.svc .ds { font-size: 11px; color: var(--text-3); margin: 4px 0 8px; height: 32px; overflow: hidden; }

/* 陪玩师卡片 */
.staff-card { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px; cursor: pointer; transition: border-color .15s; }
.staff-card:hover { border-color: rgba(124,92,255,.45); }
.staff-card + .staff-card { margin-top: 10px; }
.staff-card .avatar { width: 52px; height: 52px; font-size: 19px; }
.staff-card .meta { flex: 1; min-width: 0; }
.staff-card .nm { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.staff-card .rk { font-size: 11.5px; color: var(--brand-2); margin-top: 2px; }
.staff-card .it { font-size: 11.5px; color: var(--text-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-card .sc-rt { text-align: right; flex: none; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; gap: 10px; }

.stars { color: var(--gold); font-size: 11px; letter-spacing: 1px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 200;
  background: rgba(16, 16, 24, .96); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line); display: flex; padding: 7px 0 9px;
}
.tabbar a { flex: 1; text-align: center; color: var(--text-3); font-size: 11px; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 0; }
.tabbar a.on { color: var(--brand); }
.tabbar a .ic { font-size: 17px; line-height: 1; }
.tabbar a.on .ic { filter: drop-shadow(0 0 8px rgba(124,92,255,.8)); }

/* 列表行 */
.lrow { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: none; }
.lrow .k { color: var(--text-2); font-size: 13px; }
.lrow .v { font-size: 13.5px; }

/* 订单卡 */
.order-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.order-card + .order-card { margin-top: 12px; }
.order-card .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .no { font-size: 11px; color: var(--text-3); }

/* 步骤条 */
.steps { display: flex; align-items: center; margin: 16px 0 6px; }
.steps .st { flex: 1; text-align: center; position: relative; font-size: 11px; color: var(--text-3); }
.steps .st i { display: block; width: 20px; height: 20px; line-height: 20px; border-radius: 50%; background: var(--panel-3); margin: 0 auto 5px; font-style: normal; font-size: 11px; color: var(--text-3); }
.steps .st.on { color: var(--brand); }
.steps .st.on i { background: var(--brand); color: #fff; box-shadow: 0 0 12px rgba(124,92,255,.6); }
.steps .st::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 1px; background: var(--line-2); z-index: -1; }
.steps .st:first-child::before { display: none; }

/* ==========================================================================
   后台（陪玩师端 / 管理后台）桌面版式
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }
.layout .layout .side {
  width: 214px; flex: none; background: var(--bg-2); border-right: 1px solid var(--line);
  padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.layout .side .logo { font-size: 15px; font-weight: 700; padding: 0 10px 4px; }
.layout .side .logo i { font-style: normal; background: linear-gradient(135deg, #7C5CFF, #22D3EE); -webkit-background-clip: text; background-clip: text; color: transparent; }
.layout .side .role { font-size: 11px; color: var(--text-3); padding: 0 10px 16px; }
.layout .side nav a {
  display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 9px;
  color: var(--text-2); font-size: 13.5px; margin-bottom: 3px; cursor: pointer;
}
.layout .side nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.layout .side nav a.on { background: rgba(124,92,255,.16); color: #C3B4FF; box-shadow: inset 2px 0 0 var(--brand); }
.layout .side .foot { margin-top: 20px; padding: 10px; border-top: 1px solid var(--line); font-size: 11px; color: var(--text-3); }

.main { flex: 1; min-width: 0; padding: 22px 26px 60px; }
.main-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; flex-wrap: wrap; }
.main-head h2 { font-size: 19px; }
.main-head .sub { font-size: 12px; color: var(--text-3); margin-top: 3px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 15px 16px; }
.stat .lb { font-size: 12px; color: var(--text-2); }
.stat .vl { font-size: 25px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; }
.stat .vl.gold { color: var(--gold); }
.stat .vl.cyan { color: var(--brand-2); }
.stat .vl.green { color: var(--green); }
.stat .vl.purple { color: #B7A4FF; }

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.tb th { text-align: left; font-weight: 500; color: var(--text-2); font-size: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); white-space: nowrap; }
table.tb td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tb tr:last-child td { border-bottom: none; }
table.tb tr:hover td { background: rgba(255,255,255,.02); }
table.tb .act { display: flex; gap: 6px; flex-wrap: wrap; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }
.toolbar .grow-sp { flex: 1; }

.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs-line button {
  background: none; border: none; color: var(--text-2); padding: 10px 14px; cursor: pointer;
  font-size: 13.5px; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs-line button.on { color: #C3B4FF; border-bottom-color: var(--brand); }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 18px; padding: 30px 26px; box-shadow: var(--shadow); }
.login-card .ttl { font-size: 20px; font-weight: 700; text-align: center; }
.login-card .sb { font-size: 12px; color: var(--text-3); text-align: center; margin: 6px 0 24px; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 10px 4px 0; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar { width: 100%; max-width: 44px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #7C5CFF, #4B32B8); min-height: 3px; transition: height .4s; }
.chart .bl { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.chart .bv { font-size: 11px; color: var(--text-2); }

.code-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; letter-spacing: .5px; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.gap-note { background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25); color: #9FE9F7; border-radius: 10px; padding: 10px 13px; font-size: 12.5px; }

@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .layout .side { width: 100%; height: auto; position: static; display: flex; flex-direction: column; }
  .layout .side nav { display: flex; overflow-x: auto; gap: 4px; }
  .layout .side nav a { white-space: nowrap; }
  .layout .side .foot { display: none; }
  .main { padding: 16px 14px 50px; }
}
