/* =============================================================================
   用户端样式
   在 admin.css 之后加载，只覆盖需要区分的部分。
   换了主色调，让客户端和管理端一眼能分辨，别在管理端上误操作。
   ============================================================================= */

:root {
  --accent:      #3b5bdb;
  --accent-soft: #e3e8fb;
}

/* ---------------------------------------------------------------- 顶部导航 */
/* 顶栏底色通栏，内容限宽居中，跟下面 .page 的内容左右对齐 ——
   不然站点名贴最左、退出贴最右，中间内容却居中，整页看着散 */
.topnav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topnav .inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.topnav .brand {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  padding: 14px 16px 14px 0;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.topnav a.nav {
  padding: 15px 14px;
  color: var(--ink-soft);
  font-size: 14px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.topnav a.nav:hover { color: var(--ink); text-decoration: none; }
.topnav a.nav.on {
  color: var(--accent);
  font-weight: 600;
  border-bottom-color: var(--accent);
}
.topnav .spacer { flex: 1; }
.topnav .me {
  display: flex; align-items: center; gap: 12px;
  font-size: 13px; color: var(--ink-faint);
  padding: 10px 0;
}
.topnav .me b { color: var(--ink); font-size: 14px; }
.topnav .bal {
  background: var(--accent-soft); color: var(--accent);
  padding: 3px 11px; border-radius: 20px;
  font-weight: 600; font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.page { max-width: 1080px; margin: 0 auto; padding: 24px 20px 70px; }
.page > h1 {
  font-size: 21px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em;
}
.page > .lead { color: var(--ink-faint); margin: 0 0 22px; font-size: 14px; }

/* ---------------------------------------------------------------- 引导页 */
.guide-wrap { max-width: 560px; margin: 0 auto; padding: 40px 20px 70px; }
.steps-bar {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 26px; font-size: 13px;
}
.steps-bar .s {
  display: flex; align-items: center; gap: 7px;
  color: var(--ink-faint);
}
.steps-bar .s .n {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface-alt); color: var(--ink-faint);
  font-size: 12px; font-weight: 700;
}
.steps-bar .s.on { color: var(--accent); font-weight: 600; }
.steps-bar .s.on .n { background: var(--accent); color: #fff; }
.steps-bar .s.done .n { background: var(--good); color: #fff; }
.steps-bar .arrow { color: var(--line); }

/* ---------------------------------------------------------------- 公告 */
.notice {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.notice h3 { margin: 0 0 5px; font-size: 14px; font-weight: 600; }
.notice p  { margin: 0; font-size: 13.5px; color: var(--ink-soft); white-space: pre-line; }
.notice img { max-width: 100%; border-radius: 6px; margin-top: 10px; display: block; }

.popup-mask {
  position: fixed; inset: 0; background: rgba(22,32,43,.55);
  display: grid; place-items: center; padding: 20px; z-index: 100;
}
.popup {
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  max-width: 460px; width: 100%; padding: 26px 28px 22px;
  max-height: 84vh; overflow-y: auto;
}
.popup h3 { margin: 0 0 10px; font-size: 17px; }
.popup .body { color: var(--ink-soft); font-size: 14px; white-space: pre-line; }
.popup img { max-width: 100%; border-radius: 8px; margin-top: 12px; display: block; }
.popup .close { margin-top: 20px; text-align: right; }

/* ---------------------------------------------------------------- 只读信息表 */
.kv { border-collapse: collapse; width: 100%; }
.kv th, .kv td {
  text-align: left; padding: 11px 0; border-bottom: 1px solid var(--line-soft);
  font-size: 14px; vertical-align: top;
}
.kv th { width: 112px; color: var(--ink-faint); font-weight: 500; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------- 线路表 */
table.data.lines td {
  vertical-align: middle;
  white-space: normal;
  padding-top: 12px;
  padding-bottom: 12px;
}
table.data.lines tr:hover td { background: transparent; }

/* 流量进度条 */
.bar {
  height: 5px; border-radius: 4px; overflow: hidden;
  background: var(--surface-alt); margin: 5px 0 3px;
}
.bar i { display: block; height: 100%; }

/* 展开的操作区 */
tr.oprow > td {
  background: var(--surface-alt);
  padding: 18px 16px;
  border-bottom: 2px solid var(--line);
}
tr.oprow:hover > td { background: var(--surface-alt); }

.ops {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  align-items: start;
}
.ops .opt { font-weight: 600; margin-bottom: 8px; font-size: 13.5px; }
.ops select {
  width: 100%; padding: 7px 10px; font-size: 13.5px; font-family: inherit;
  border: 1px solid var(--line); border-radius: 7px;
  background: var(--surface); color: var(--ink);
}
.ops .btn { margin-top: 8px; width: 100%; }
.ops .opd {
  font-size: 12px; color: var(--ink-faint); margin-top: 6px; line-height: 1.6;
}
.ops .opd b { color: var(--ink-soft); }

.locked-note {
  margin-top: 16px; padding: 12px 15px;
  background: var(--warn-soft); border-left: 3px solid var(--warn);
  border-radius: 0 8px 8px 0; font-size: 13px; color: #7a3906;
}

/* ------------------------------------------------------ 算术验证码
   输入框和图片并排。图片给个手型光标 —— 它是可以点的（换一张），
   不写明的话没人知道 */
.cap-row { display: flex; gap: 10px; align-items: center; }
.cap-row input { flex: 1; min-width: 0; }
.cap-img {
  height: 44px; width: 120px; flex: none;
  border: 1px solid var(--line); border-radius: 6px;
  cursor: pointer; background: var(--surface-alt);
}