:root {
  --bg:         #0E1116;
  --surface:    #161B22;
  --surface-2:  #1F2630;
  --border:     #2A323D;
  --text:       #E6EAF0;
  --text-dim:   #8B95A3;
  --accent:     #4F8DF7;
  --accent-weak:#1C2D4A;
  --low:        #3FB37F;
  --mid:        #E0A23C;
  --high:       #E0524D;
  --danger:     #E0524D;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 顶部导航 */
.topbar { border-bottom: 1px solid var(--border); background: var(--surface); }
.bar-inner {
  max-width: 960px; margin: 0 auto; padding: 0 20px; height: 52px;
  display: flex; align-items: center; gap: 28px;
}
.brand { font-weight: 600; font-size: 15px; letter-spacing: .3px; }
.nav { display: flex; gap: 22px; flex: 1; }
.nav a {
  color: var(--text-dim); padding: 16px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); text-decoration: none; }
.nav a.active { color: var(--text); border-bottom-color: var(--accent); }
.user-box { display: flex; align-items: center; gap: 12px; color: var(--text-dim); }
.uname { font-size: 13px; }
.inline { display: inline; margin: 0; }
.link-btn {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 13px; padding: 0;
}
.link-btn:hover { color: var(--text); }

/* 免责浮条 */
.disclaimer-bar {
  max-width: 960px; margin: 0 auto; padding: 6px 20px;
  color: var(--text-dim); font-size: 12px; border-bottom: 1px solid var(--border);
}

/* 内容区 */
.content { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 24px; margin-bottom: 22px;
}
.auth-card { max-width: 380px; margin: 48px auto; }
.page-title { font-size: 22px; font-weight: 600; margin: 0 0 18px; }
.section-title { font-size: 16px; font-weight: 600; margin: 22px 0 10px; color: var(--text); }
.muted { color: var(--text-dim); font-size: 13px; }
.hint { color: var(--text-dim); font-size: 12px; margin: -4px 0 18px; }

/* 表单 */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-dim); }
input {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--text); padding: 9px 11px; font-size: 14px; outline: none;
}
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }

.btn {
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 18px;
  font-size: 14px; cursor: pointer; background: var(--surface-2); color: var(--text);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn.danger { color: var(--danger); border-color: transparent; background: transparent; }
.btn.danger:hover { background: rgba(224,82,77,.12); }

.alert { border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.alert.error { background: rgba(224,82,77,.12); color: #F0B3B0; border: 1px solid rgba(224,82,77,.35); }
.alert.info { background: var(--accent-weak); color: #B9CDF5; border: 1px solid rgba(79,141,247,.35); }

/* 上传区 */
.dropzone {
  border: 1.5px dashed var(--border); border-radius: 10px; padding: 42px 20px;
  text-align: center; color: var(--text-dim); cursor: pointer; margin-bottom: 16px;
  transition: border-color .15s, background .15s;
}
.dropzone:hover { border-color: var(--text-dim); }
.dropzone.drag { border-style: solid; border-color: var(--accent); background: var(--accent-weak); color: var(--text); }
.dropzone.picked { border-style: solid; border-color: var(--accent); color: var(--text); }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; color: var(--text-dim); font-weight: 500; padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.data-table tbody tr { border-left: 3px solid transparent; }
.data-table tbody tr:hover { background: var(--accent-weak); border-left-color: var(--accent); }
.col-op { width: 1%; white-space: nowrap; }
.mono { font-family: var(--mono); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot.done { background: var(--low); }
.dot.failed { background: var(--high); }

.pager { display: flex; gap: 8px; margin-top: 16px; align-items: center; }

/* 结果卡片 */
.detail-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.back-link { font-size: 13px; }
.sample-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px; margin-bottom: 16px;
}
.sample-id { font-family: var(--mono); font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }
.tier-badge {
  display: inline-block; font-size: 16px; font-weight: 600; padding: 8px 16px;
  border-radius: 8px; color: #fff;
}
.tier-低 { background: var(--low); }
.tier-中 { background: var(--mid); }
.tier-高 { background: var(--high); }
.tier-无法判定 { background: #5A6573; }
.tier-pill { display: inline-block; padding: 2px 10px; border-radius: 6px; color: #fff; font-size: 12px; }
.pred-line { margin: 12px 0; color: var(--text); }
.tier-note { color: var(--text-dim); font-size: 12px; margin-top: 6px; }

/* signature 条形 */
.sig-cap { color: var(--text-dim); font-size: 12px; margin-top: 16px; }
.sig-list { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.sig-row { display: grid; grid-template-columns: 200px 90px 1fr; align-items: center; gap: 10px; font-size: 12px; }
.sig-name { color: var(--text); }
.sig-key { color: var(--text-dim); font-family: var(--mono); }
.sig-val { color: var(--text); font-family: var(--mono); width: 64px; text-align: right; }
.bar-track {
  position: relative; height: 8px; background: var(--surface-2); border-radius: 4px;
}
.bar-fill { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--accent); }

.limit-note {
  margin-top: 18px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-dim); font-size: 12px; background: var(--surface);
}
