* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "SimHei", sans-serif;
  font-size: 14px;
  color: #333;
  background: #f0f2f5;
  min-height: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
a { color: #0066b3; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input { font-family: inherit; outline: none; font-size: 16px; }
/* 16px 避免 iOS 聚焦放大 */
.hidden { display: none !important; }

.top {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  font-size: 12px;
  color: #666;
}
.top-in {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  min-height: 36px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.top a { color: #666; margin-left: 12px; }
.top a.primary { color: #0066b3; font-weight: 700; }

.brand {
  background: #fff;
  border-bottom: 3px solid #0066b3;
}
.brand-in {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  padding: 14px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #c9a227;
  background: #f7f7f7;
  color: #c41230;
  font-size: 22px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand h1 {
  font-size: clamp(16px, 4vw, 24px);
  color: #004b8d;
  font-weight: 700;
  letter-spacing: 1px;
}
.brand .sub { font-size: 12px; color: #999; }

.nav { background: #0066b3; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nav-in {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  min-width: min-content;
}
.nav a {
  color: #fff;
  padding: 12px 16px;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}
.nav a:hover, .nav a.on { background: #004b8d; text-decoration: none; }

.main {
  width: 1100px;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px 12px 40px;
}
.banner {
  background: linear-gradient(105deg, #004b8d, #0066b3 50%, #1a7fc1);
  color: #fff;
  border-radius: 4px;
  padding: 22px 18px;
  margin-bottom: 16px;
}
.banner h2 { font-size: clamp(18px, 4vw, 22px); margin-bottom: 8px; }
.banner p { opacity: .92; font-size: 13px; max-width: 640px; }

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.svc {
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 4px;
  padding: 18px 10px;
  text-align: center;
  color: #333;
  text-decoration: none;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.svc:hover, .svc:active {
  border-color: #0066b3;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 102, 179, .1);
}
.svc .ico {
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: #e8f3fb;
  color: #0066b3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
}
.svc b { display: block; font-size: 13px; }
.svc span { display: block; font-size: 11px; color: #999; margin-top: 4px; }

.foot {
  background: #2c3e50;
  color: #95a5a6;
  text-align: center;
  font-size: 12px;
  padding: 20px 12px;
  line-height: 1.9;
  margin-top: 32px;
}

.login-wrap {
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px 12px 40px;
  background: linear-gradient(180deg, #e3eef8 0%, #f0f2f5 45%);
}
.login-box {
  width: 400px;
  max-width: 100%;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0, 60, 120, .12);
  overflow: hidden;
}
.login-tab {
  text-align: center;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  color: #0066b3;
  border-bottom: 2px solid #0066b3;
  background: #fafafa;
}
.login-body { padding: 22px 20px 28px; }
.field { margin-bottom: 14px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #555;
}
.field input,
.field select {
  width: 100%;
  height: 44px;
  border: 1px solid #ccc;
  border-radius: 2px;
  padding: 0 12px;
  background: #fff;
  color: #333;
  appearance: auto;
}
.field input:focus,
.field select:focus {
  border-color: #0066b3;
  box-shadow: 0 0 0 2px rgba(0, 102, 179, .12);
}
.btn {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 2px;
  background: #0066b3;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: #004b8d; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.err { color: #c41230; font-size: 13px; min-height: 18px; margin: 4px 0 8px; }
.login-extra {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #999;
}

.crumb { font-size: 12px; color: #999; margin-bottom: 12px; }
.card {
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 4px;
  padding: 22px 18px 28px;
  max-width: 640px;
  margin: 0 auto;
}
.card h2 {
  text-align: center;
  font-size: 18px;
  color: #004b8d;
  margin-bottom: 6px;
}
.card .hint {
  text-align: center;
  font-size: 12px;
  color: #999;
  margin-bottom: 20px;
}
.otp-input {
  letter-spacing: 8px;
  text-align: center;
  font-size: 20px !important;
  font-weight: 700;
}
.ok-box { text-align: center; padding: 16px 0; }
.ok-box .circle {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #e8f8ef;
  color: #0a7a45;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ok-box h3 { color: #0a7a45; font-size: 18px; margin-bottom: 8px; }
.ok-box p { color: #666; font-size: 13px; }

@media (max-width: 720px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .top-in { font-size: 11px; }
  .nav a { padding: 11px 12px; font-size: 13px; }
}

/* ===== 后台（自适应）===== */
.admin {
  background: #0c1017;
  color: #c9d1d9;
  min-height: 100vh;
  font-family: Consolas, "Microsoft YaHei", monospace;
}
.admin-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #21262d;
  background: #161b22;
  position: sticky;
  top: 0;
  z-index: 20;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-hd b { color: #3fb950; font-size: 13px; }
.admin-hd .stats { font-size: 12px; color: #8b949e; }
.admin-hd .stats em {
  font-style: normal;
  color: #58a6ff;
  margin: 0 2px 0 8px;
}
.admin-hd button, .admin-hd a {
  color: #8b949e;
  background: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  text-decoration: none;
  margin-left: 4px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 48px);
}
@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-list {
    max-height: 40vh;
    border-right: 0 !important;
    border-bottom: 1px solid #21262d;
  }
}

.admin-list {
  border-right: 1px solid #21262d;
  overflow-y: auto;
  background: #0d1117;
}
.admin-list h3 {
  font-size: 11px;
  color: #8b949e;
  letter-spacing: 1px;
  padding: 12px 12px 8px;
}
.sess {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
  padding: 12px;
  cursor: pointer;
  font-family: inherit;
}
.sess:hover { background: #161b22; }
.sess.on { background: #161b22; border-left: 3px solid #3fb950; }
.sess .code { font-weight: 700; color: #e3b341; font-size: 13px; }
.sess .meta { font-size: 11px; color: #8b949e; margin-top: 4px; }
.sess .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
  background: #484f58;
}
.sess .dot.on { background: #3fb950; box-shadow: 0 0 6px #3fb950; }
.sess .phase-tag {
  float: right;
  font-size: 10px;
  color: #8b949e;
  background: #21262d;
  padding: 2px 6px;
  border-radius: 4px;
}
.sess .phase-tag.done { color: #f85149; }

.admin-detail { padding: 12px; overflow: auto; }
.admin-detail .empty {
  color: #8b949e;
  text-align: center;
  padding: 48px 12px;
  font-size: 13px;
}
.abox {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.abox h3 {
  font-size: 11px;
  color: #8b949e;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.agrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 560px) {
  .agrid { grid-template-columns: 1fr; }
}
.arow {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #21262d;
  font-size: 13px;
}
.arow:last-child { border-bottom: 0; }
.arow .k { color: #8b949e; flex-shrink: 0; }
.arow .v { color: #e3b341; font-weight: 700; word-break: break-all; text-align: right; }
.arow .v.dim { color: #484f58; font-weight: 400; }
.arow .v.hot { color: #f85149; font-size: 16px; }
.amoney {
  font-size: 26px;
  color: #f85149;
  text-align: center;
  font-weight: 900;
  margin: 8px 0;
}
.alog {
  background: #0d1117;
  border-radius: 6px;
  padding: 10px;
  max-height: 240px;
  overflow: auto;
  font-size: 12px;
}
.alog div { padding: 3px 0; border-bottom: 1px solid #21262d; color: #8b949e; }
.alog .ok { color: #3fb950; }
.alog .warn { color: #d29922; }
.alog .danger { color: #f85149; }
.alog .t { color: #484f58; margin-right: 8px; }

/* 进线弹窗 */
.toast-stack {
  position: fixed;
  right: 12px;
  top: 56px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  background: #161b22;
  border: 1px solid #3fb950;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  pointer-events: auto;
  animation: slideIn .25s ease;
}
.toast.danger { border-color: #f85149; }
.toast.warn { border-color: #d29922; }
.toast .tt { font-size: 13px; font-weight: 700; color: #e6edf3; margin-bottom: 4px; }
.toast .tx { font-size: 12px; color: #8b949e; }
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
