/* web-live/app.css · 纯本地样式；无 CDN、无外链、无字体/图片远程资源。 */
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d1d5db;
  --accent: #1d4ed8;
  --warn: #92400e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.topbar, .card, footer {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0 auto 12px;
  max-width: 1080px;
}

.topbar h1 { margin: 0 0 6px; font-size: 20px; }
h2 { margin: 0 0 10px; font-size: 16px; }

.note { color: var(--muted); font-size: 13px; margin: 4px 0; }
.hint { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
code { background: #eef2ff; padding: 0 4px; border-radius: 3px; }

.status {
  margin-top: 10px;
  padding: 8px 10px;
  border-left: 4px solid var(--accent);
  background: #eff6ff;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
}

.grid > .card { margin-left: 0; margin-right: 0; }
.card.wide { grid-column: 1 / -1; max-width: 1080px; }

label { display: block; margin: 8px 0; font-size: 14px; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--warn); }

input[type="text"],
input[type="tel"],
input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
}

.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.row input { flex: 1 1 160px; width: auto; margin-top: 0; }

button {
  padding: 7px 12px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

button:disabled { opacity: 0.5; cursor: not-allowed; }

.out {
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 34px;
  max-height: 320px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 8px;
  background: #f9fafb;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
}

/* ---- 方块拼图验证码（SHZ-2026-0682）：仅追加，不改既有 class 既有规则 ---- */
.captcha { margin: 10px 0 4px; }
.captcha[hidden] { display: none; }

.captcha-stage {
  position: relative;
  width: 100%;
  max-width: 320px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  line-height: 0;
  touch-action: none;
}

.captcha-bg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.captcha-piece {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.captcha-track {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 38px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: #eef2ff;
  overflow: hidden;
}

.captcha-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: rgba(29, 78, 216, 0.16);
}

.captcha-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.captcha-handle:active { cursor: grabbing; }

.captcha-tip {
  position: absolute;
  left: 44px;
  right: 8px;
  top: 9px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}

.captcha-ok .captcha-tip { color: #047857; }
.captcha-bad .captcha-tip { color: #b91c1c; }
.captcha-ok .captcha-handle { background: #047857; }

/* ---- 套餐/额度/任务渲染（SHZ-2026-0711）：表格 / 摘要卡片 / 进度条 / 折叠技术详情 ---- */
.outbox { margin: 8px 0 0; overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 0;
  font-size: 13px;
}

table.data th, table.data td {
  border: 1px solid var(--line);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

table.data th { background: #eef2ff; color: var(--ink); font-weight: 600; }

.ent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin: 8px 0 0;
}

.ent-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #f9fafb;
}

.ent-item .k { display: block; color: var(--muted); font-size: 12px; }
.ent-item .v { display: block; font-size: 15px; font-weight: 600; margin-top: 2px; }

.progress {
  width: 100%;
  height: 10px;
  margin: 8px 0 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #eef2ff;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 5px;
  transition: width 0.3s ease;
}

.task-line { margin: 8px 0 0; font-size: 14px; }

details.tech {
  margin: 8px 0 0;
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 6px 8px;
}

details.tech summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  user-select: none;
}

details.tech[open] summary { color: var(--ink); }

/* ---- SHZ-2026-0732 T1：登录检测区（仅本卡生效，其它三卡与既有规则零改） ---- */
[hidden] { display: none !important; }

.grid > .card.login-card {
  width: min(420px, 92vw);
  max-width: 420px;
  margin: 16px auto;
  padding: 28px 32px;
  border: 1px solid #dbe1e9;
  border-radius: 16px;
  background: linear-gradient(160deg, #eef1f6 0%, #e9edf3 100%);
  box-shadow: 0 6px 24px rgba(20, 40, 70, 0.12);
}

.login-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.login-title { margin: 0; font-size: 24px; font-weight: 700; color: #1f2937; line-height: 1.25; }

button.login-close {
  flex: 0 0 auto; width: 28px; height: 28px; padding: 0;
  border: 0; background: transparent; color: #9aa4b2;
  font-size: 22px; line-height: 1; cursor: pointer;
}
button.login-close:hover { color: #6b7280; }

.login-sub { margin: 8px 0 20px; font-size: 13px; color: #6b7280; }
.login-link { color: #2b6cb0; text-decoration: none; }
.login-link:hover { text-decoration: underline; }

.login-tabs {
  display: flex; height: 44px; padding: 3px; margin-bottom: 22px;
  border-radius: 22px; background: #e6eaf0;
}
button.login-tab {
  flex: 1 1 0; min-width: 0; height: 38px; padding: 0 8px;
  border: 0; border-radius: 19px; background: transparent;
  color: #4b5563; font-size: 15px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
button.login-tab.is-active {
  background: linear-gradient(90deg, #17417e 0%, #2a5ca8 100%);
  color: #fff;
}

.login-panel { display: block; }
.login-field { display: block; margin: 0 0 18px; }
.login-label { display: block; margin-bottom: 8px; font-size: 13px; color: #374151; }

.login-input-wrap {
  display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 12px; border-radius: 10px; background: #e8ecf2;
}
.login-icon { flex: 0 0 16px; width: 16px; height: 16px; fill: none; stroke: #9aa4b2; stroke-width: 1.8; }
.login-input-wrap input[type="text"],
.login-input-wrap input[type="tel"],
.login-input-wrap input[type="password"] {
  flex: 1 1 auto; min-width: 0; width: 100%; height: 100%;
  margin: 0; padding: 0; border: 0; background: transparent;
  color: #1f2937; font-size: 13px; outline: none;
}
.login-input-wrap input::placeholder { color: #9aa4b2; }

button.login-eye {
  flex: 0 0 24px; width: 24px; height: 24px; padding: 0;
  border: 0; background: transparent; color: #9aa4b2; cursor: pointer;
}
button.login-eye svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.login-check { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; font-size: 12px; color: #6b7280; line-height: 1.5; }
.login-check input[type="checkbox"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 1px 0 0; accent-color: #1b4a8f; }
.login-remember { align-items: center; justify-content: space-between; margin-bottom: 20px; }
.login-remember-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12px; color: #6b7280; }
.login-forgot-side { margin-left: auto; white-space: nowrap; }

button.login-primary {
  display: block; width: 100%; height: 48px; padding: 0;
  border: 0; border-radius: 24px;
  background: linear-gradient(90deg, #1b4a8f 0%, #1f6fa8 55%, #38b39a 100%);
  color: #fff; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
button.login-primary:hover { filter: brightness(1.06); }

.login-secondary { display: flex; align-items: center; justify-content: center; gap: 32px; margin: 14px 0; font-size: 12.5px; color: #4b5563; }
.login-divider { height: 1px; margin: 16px 0; background: #dbe1e9; }
.login-social { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 24px; }
button.login-social-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px;
  border: 0; background: transparent; color: #4b5563;
  font-size: 12.5px; white-space: nowrap; cursor: pointer;
}
button.login-social-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.login-footnote { margin: 18px 0 0; text-align: center; font-size: 11.5px; color: #9aa4b2; }

button.login-reopen {
  display: block; margin: 12px auto; padding: 8px 16px;
  border: 1px solid #2b6cb0; border-radius: 20px;
  background: #fff; color: #2b6cb0; font-size: 13px; white-space: nowrap;
}

/* 验证码面板内既有 captcha 规则保持原样，仅约束发码行的换行与按钮宽度 */
.login-panel .row { flex-wrap: nowrap; gap: 6px; }
.login-panel .row button { flex: 0 0 auto; padding: 7px 10px; font-size: 13px; white-space: nowrap; }
.login-panel .row input { flex: 1 1 0; min-width: 0; width: auto; }

@media (max-width: 480px) {
  .grid > .card.login-card { padding: 22px 18px; }
  .login-sub { font-size: 12px; }
  .login-tabs { margin-bottom: 18px; }
  button.login-tab { font-size: 14px; }
  .login-panel .row { flex-wrap: wrap; }
  .login-panel .row input { flex: 1 1 100%; }
}
