:root {
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --soft: #86868b;
  --line: #d2d2d7;
  --line-soft: #e8e8ed;
  --bg: #fbfbfd;
  --card: #ffffff;
  --accent: #0071e3;
  --accent-dark: #0062c4;
  --ok: #1d7a4f;
  --warn: #9a6700;
  --err: #c8102e;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.32, .72, .35, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-dark); text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }

/* 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251, 251, 253, .82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { font-size: 15px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.brand:hover { text-decoration: none; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-links a, .nav-links button {
  color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer;
  transition: color .2s var(--ease);
}
.nav-links a:hover, .nav-links button:hover { color: var(--ink); text-decoration: none; }
.nav-user { color: var(--soft); font-size: 13px; }

/* 布局 */
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.hero { padding: 76px 0 34px; animation: fadeUp .6s var(--ease) both; }
.hero h1 {
  margin: 0; font-size: clamp(34px, 5vw, 50px); line-height: 1.08;
  letter-spacing: -.022em; font-weight: 600;
}
.hero p { margin: 16px 0 0; font-size: clamp(17px, 2vw, 21px); color: var(--muted); font-weight: 400; max-width: 720px; }
.hero .eyebrow { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); margin: 0 0 14px; }

.card {
  background: var(--card); border: 1px solid rgba(0, 0, 0, .06);
  border-radius: var(--radius-lg); padding: 32px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, .04);
}
.card + .card { margin-top: 20px; }
.section-title { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 6px; }
.section-sub { font-size: 14px; color: var(--muted); margin: 0 0 22px; }

main.tool { padding-bottom: 80px; }

/* 分段控件 */
.segmented {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px;
  background: #f0f0f3; margin-bottom: 26px;
}
.segmented button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 8px 20px; border-radius: 9px; font-size: 14px; font-weight: 500;
  transition: all .25s var(--ease);
}
.segmented button:hover { color: var(--ink); }
.segmented button.active {
  background: #fff; color: var(--ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 3px 8px rgba(0, 0, 0, .06);
}

/* 表单 */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; letter-spacing: .01em; }
.field .optional { color: var(--soft); font-weight: 400; }
input[type="text"], input[type="password"], select, textarea {
  width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; outline: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
input[type="text"]:hover, input[type="password"]:hover, select:hover, textarea:hover { border-color: #b8b8bd; }
input[type="text"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}
textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.grid-2 { display: grid; grid-template-columns: 1fr 260px; gap: 16px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 980px; padding: 12px 26px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 500;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { background: #0077ed; box-shadow: 0 6px 18px rgba(0, 113, 227, .22); }
.btn:active { transform: scale(.985); }
.btn:disabled { background: #a7c9ea; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 980px; padding: 11px 22px; cursor: pointer; font-size: 14px;
  transition: all .2s var(--ease);
}
.btn-ghost:hover { border-color: #b8b8bd; background: #fafafa; }
.btn-ghost:active { transform: scale(.985); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #333336; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 22px; }
.hint { color: var(--soft); font-size: 13px; }
.error-text { color: var(--err); font-size: 13px; margin-top: 12px; min-height: 18px; }

/* 拖拽上传 */
.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--radius-md);
  padding: 42px 24px; text-align: center; background: #fcfcfd;
  cursor: pointer; transition: all .25s var(--ease);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent); background: rgba(0, 113, 227, .04);
}
.dropzone .dz-icon { font-size: 30px; line-height: 1; margin-bottom: 12px; color: var(--soft); }
.dropzone .dz-title { font-size: 16px; font-weight: 500; }
.dropzone .dz-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }
.file-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; }
.file-meta .name { font-weight: 500; }
.file-meta .size { color: var(--soft); font-size: 13px; }

/* 进度 */
.progress { height: 4px; background: #ececf0; border-radius: 99px; overflow: hidden; margin-top: 18px; display: none; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }

/* 提示条 */
.notice {
  border: 1px solid var(--line-soft); background: #fafafc; border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 13px; color: var(--muted); margin-top: 18px;
}
.notice.warn { background: #fff9ec; border-color: #f2e2b8; color: #7a5a12; }
.notice.ok { background: #f2faf6; border-color: #cfe8dc; color: #1d6b47; }

/* 统计 */
.stats { display: flex; gap: 32px; flex-wrap: wrap; margin-bottom: 18px; }
.stats span { font-size: 13px; color: var(--muted); }
.stats b { display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); margin-top: 2px; }

/* 表格 */
.tablebox { overflow: auto; max-height: 62vh; border: 1px solid var(--line-soft); border-radius: var(--radius-md); }
table { border-collapse: collapse; width: 100%; font-size: 13px; white-space: nowrap; }
thead th {
  position: sticky; top: 0; z-index: 2; background: #fafafc; text-align: left;
  padding: 11px 14px; font-weight: 500; color: var(--muted); font-size: 12px;
  letter-spacing: .03em; border-bottom: 1px solid var(--line-soft);
}
tbody td { padding: 10px 14px; border-bottom: 1px solid #f2f2f5; vertical-align: top; }
tbody tr { transition: background .18s var(--ease); }
tbody tr:hover { background: #fafafc; }
tbody tr:last-child td { border-bottom: 0; }
td.addr { white-space: normal; min-width: 220px; max-width: 340px; }
td.mono { font-family: "SF Mono", Consolas, Menlo, monospace; font-size: 12px; }
.empty { text-align: center; color: var(--soft); padding: 34px 0; font-size: 14px; }

.badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; line-height: 1.7; }
.badge.ok { background: #eaf6ef; color: var(--ok); }
.badge.warn { background: #fdf4e3; color: var(--warn); }
.badge.err { background: #fdecef; color: var(--err); }

/* 登录类页面 */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 48px 20px 72px; }
.auth-card {
  width: 100%; max-width: 440px; animation: fadeUp .55s var(--ease) both;
}
.auth-card .mark { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.auth-card h1 { font-size: 40px; line-height: 1.1; letter-spacing: -.024em; font-weight: 600; margin: 12px 0 8px; }
.auth-card .sub { font-size: 16px; color: var(--muted); margin: 0 0 30px; }
.auth-form { display: flex; flex-direction: column; gap: 4px; }
.auth-form .btn { width: 100%; margin-top: 14px; padding: 13px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; font-size: 14px; }
.auth-foot { text-align: center; color: var(--soft); font-size: 12px; padding: 24px 0 34px; }
.rule { height: 1px; background: var(--line-soft); border: 0; margin: 26px 0; }

/* 结果卡片隐藏 */
[hidden] { display: none !important; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(16px);
  background: rgba(29, 29, 31, .94); color: #fff; padding: 11px 22px; border-radius: 980px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 60;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .hero { padding: 52px 0 26px; }
  .card { padding: 22px; border-radius: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats { gap: 22px; }
  .auth-card h1 { font-size: 32px; }
}
