/* 域名检测工具 —— 样式
 *
 * 设计取向：克制的浅色界面，白底 + 系统灰分层，蓝色只用在主操作与信息态。
 * 刻意避免的写法（读起来像模板生成的那种）：深色霓虹底、顶部径向光晕、
 * 卡片左侧彩色竖条、渐变进度条、每个数字一个高饱和色。
 * 判定色沿用 Apple 系统色板，只出现在徽章和分布条这类小面积元素上。 */

:root {
  color-scheme: light;

  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f5f5f7;
  --surface-3: #ebebed;
  --fill: rgba(120, 120, 128, 0.12);
  --text: #1d1d1f;
  --text-2: #424245;
  --text-3: #6e6e73;
  --separator: rgba(60, 60, 67, 0.13);
  --separator-soft: rgba(60, 60, 67, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-soft: rgba(0, 113, 227, 0.1);
  --on-accent: #ffffff;

  /* Apple 系统色：判定档位 */
  --normal: #34c759;
  --notice: #0071e3;
  --soft: #8e8e93;
  --blocked: #ff3b30;
  --unknown: #ff9500;
  --error: #af52de;

  --radius-card: 16px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --fill: rgba(120, 120, 128, 0.24);
  --text: #f5f5f7;
  --text-2: #d1d1d6;
  --text-3: #98989d;
  --separator: rgba(84, 84, 88, 0.65);
  --separator-soft: rgba(84, 84, 88, 0.42);
  --accent: #0a84ff;
  --accent-hover: #3a9bff;
  --accent-soft: rgba(10, 132, 255, 0.18);
  --on-accent: #ffffff;

  --normal: #30d158;
  --notice: #0a84ff;
  --soft: #98989d;
  --blocked: #ff453a;
  --unknown: #ff9f0a;
  --error: #bf5af2;

  --shadow-1: none;
  --shadow-2: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 16px 40px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code, kbd { font-family: var(--mono); font-size: 0.9em; }
kbd {
  background: var(--fill); border-radius: 5px; padding: 1px 6px;
  font-size: 0.8em; color: var(--text-2);
}
.muted { color: var(--text-3); font-size: 13px; }

.skip {
  position: absolute; left: -999px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.4); outline-offset: 2px; }

/* ---------- 顶栏 ---------- */

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px clamp(16px, 4vw, 40px) 18px;
  max-width: 1340px; margin: 0 auto;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M14.8 6.6l2.8 7.4 7.4 2.8-7.4 2.8-2.8 7.4-2.8-7.4-7.4-2.8 7.4-2.8z' fill='%23fff'/%3E%3Cpath d='M23 18.6l1.15 3.05 3.05 1.15-3.05 1.15-1.15 3.05-1.15-3.05-3.05-1.15 3.05-1.15z' fill='%23fff' fill-opacity='.72'/%3E%3C/svg%3E");
  background-size: 100%;
}
.brand-text { display: flex; align-items: baseline; gap: 9px; }
h1 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.brand-sub {
  font-size: 12px; color: var(--text-3);
  padding-left: 9px; border-left: 1px solid var(--separator);
}

.topbar-right { display: flex; align-items: center; gap: 10px; }

.status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; color: var(--text-3);
  background: var(--surface); border: 1px solid var(--separator-soft);
  border-radius: 980px; padding: 5px 13px 5px 11px; white-space: nowrap;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-dot.ok { background: var(--normal); }
.status-dot.warn { background: var(--unknown); }
.status-dot.bad { background: var(--blocked); }

.icon-btn {
  appearance: none; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--separator-soft);
  color: var(--text-2); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.small { width: 30px; height: 30px; border-radius: var(--radius-sm); font-size: 15px; }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- 布局 ---------- */

main {
  max-width: 1340px; margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 56px;
  display: flex; flex-direction: column; gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--separator-soft);
  border-radius: var(--radius-card);
  padding: 22px;
  box-shadow: var(--shadow-1);
  min-width: 0;
}

.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.card-head h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }

/* ---------- 概览 ---------- */

.overview { display: flex; flex-direction: column; gap: 18px; }
.overview-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.overview-title { min-width: 0; }
.ov-title { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.ov-sub { margin: 6px 0 0; color: var(--text-3); font-size: 13.5px; }

.callout {
  display: flex; align-items: center; gap: 13px;
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 11px 12px 11px 14px;
  max-width: 440px;
}
.callout-illo { flex: none; }
.callout-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.callout-text strong { font-size: 14px; font-weight: 600; color: var(--text); }
.callout-text strong span { color: var(--accent); font-variant-numeric: tabular-nums; }
.callout-text > span { font-size: 12.5px; color: var(--text-3); }

.dist { display: flex; height: 8px; border-radius: 980px; overflow: hidden; background: var(--surface-3); }
.dist-seg { height: 100%; transition: width .3s ease; min-width: 2px; }
.dist-empty { width: 100%; background: var(--surface-3); }

/* 看板：指标卡本身也是筛选入口 */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(102px, 1fr)); gap: 10px; }
.metric {
  appearance: none; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--radius); padding: 12px 14px 11px;
  display: flex; flex-direction: column; gap: 1px;
  font: inherit; color: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.metric:hover { background: var(--surface-3); }
.metric:active { transform: scale(.985); }
.metric[aria-pressed="true"] {
  background: var(--surface); border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
}
.metric-k { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.metric-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
/* 数字只在有值时着色：全 0 的看板不该看起来像圣诞树 */
.metric-v { font-size: 24px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; color: var(--text-3); }
.metric.has-value .metric-v { color: var(--metric-color, var(--text)); }
.metric-p { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-height: 15px; }

/* ---------- 输入 ---------- */

textarea#domains {
  width: 100%; min-height: 210px; resize: vertical;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 14px 16px;
  font: 13px/1.75 var(--mono);
  outline: none;
  transition: border-color .15s, background .15s;
}
textarea#domains::placeholder { color: var(--text-3); }
textarea#domains:focus { border-color: var(--accent); background: var(--surface); }

.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.primary-actions { margin-top: 18px; }

/* ---------- 按钮 ---------- */

.btn {
  appearance: none; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; border-radius: 980px;
  padding: 9px 18px;
  font: 500 14px var(--font);
  transition: background .15s, color .15s, opacity .15s;
}
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); }
/* 检测中的按钮里放一个转圈，给出「它真的在工作」的即时反馈 */
.btn.primary.is-busy .btn-label::before {
  content: ""; display: inline-block; vertical-align: -1px;
  width: 12px; height: 12px; margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.subtle { background: var(--surface-2); color: var(--text-2); }
.btn.subtle:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn.text { background: transparent; color: var(--accent); padding: 9px 10px; }
.btn.text:hover:not(:disabled) { background: var(--accent-soft); }
.btn.text.danger { color: var(--blocked); }
.btn.text.danger:hover:not(:disabled) { background: rgba(255, 59, 48, 0.1); }
.btn.tiny { padding: 6px 14px; font-size: 13px; background: var(--surface); color: var(--accent); flex: none; }
.btn.tiny:hover { background: var(--surface-2); }
.btn:disabled { opacity: .38; cursor: not-allowed; }
.file-btn { display: inline-flex; align-items: center; }

/* ---------- 设置 ---------- */

.field { display: flex; flex-direction: column; gap: 8px; }
.field-top { display: flex; align-items: baseline; justify-content: space-between; }
.field-top label { font-size: 14px; color: var(--text-2); }
.field-top output { font: 600 15px var(--mono); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 980px;
  background: var(--surface-3); outline: none; margin: 6px 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22), 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}
:root[data-theme="dark"] input[type="range"]::-webkit-slider-thumb { background: #d1d1d6; }
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%; border: none;
  background: #fff; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.22);
}

.hint { margin: 0; font-size: 12.5px; color: var(--text-3); line-height: 1.5; }

.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; position: relative; padding: 10px 0; }
.switch + .switch { border-top: 1px solid var(--separator-soft); }
/* 原生输入铺满开关：透明但保留真实尺寸，否则既难点也不可自动化操作 */
.switch input { position: absolute; top: 10px; left: 0; width: 46px; height: 28px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch-ui {
  flex: none; width: 46px; height: 28px; border-radius: 980px; margin-top: 1px;
  background: var(--surface-3); position: relative;
  transition: background .22s;
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform .22s;
}
:root[data-theme="dark"] .switch-ui::after { background: #d1d1d6; }
.switch input:checked + .switch-ui { background: var(--normal); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid rgba(0, 113, 227, 0.4); outline-offset: 2px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-title { font-size: 14px; color: var(--text); }
.switch-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }

/* ---------- 进度 ---------- */

.progress-card { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.progress-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.progress-track { height: 4px; border-radius: 980px; background: var(--surface-3); overflow: hidden; }
.progress-bar { height: 100%; width: 0; border-radius: 980px; background: var(--accent); transition: width .2s ease; }

/* ---------- 结果 ---------- */

.results { padding: 22px 0 0; }
.results-head { padding: 0 22px; margin-bottom: 18px; }
.results-tools { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }

.filters {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 0 22px 16px;
}

.segmented {
  display: flex; flex-wrap: wrap; gap: 2px;
  background: var(--surface-2); border-radius: var(--radius); padding: 3px;
}
.seg {
  appearance: none; cursor: pointer; border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 8px;
  font: 400 13.5px var(--font); color: var(--text-2);
  transition: background .15s, box-shadow .15s, color .15s;
  white-space: nowrap;
}
.seg:hover { color: var(--text); }
.seg[aria-selected="true"] {
  background: var(--surface); color: var(--text); font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
}
.seg b { font-weight: 400; font-variant-numeric: tabular-nums; color: var(--text-3); }
.seg[aria-selected="true"] b { color: var(--text-2); }
.seg.is-immortal[aria-selected="true"] { color: var(--accent); }
.seg.is-immortal[aria-selected="true"] b { color: var(--accent); }

.search {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid transparent;
  border-radius: var(--radius); padding: 7px 12px;
  transition: border-color .15s, background .15s;
}
.search:focus-within { background: var(--surface); border-color: var(--accent); }
.search svg { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.search input {
  border: 0; background: transparent; outline: none;
  font: 13.5px var(--font); color: var(--text); width: 170px;
}
.search input::placeholder { color: var(--text-3); }

.table-wrap { overflow: auto; max-height: 620px; border-top: 1px solid var(--separator-soft); }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }

thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface); color: var(--text-3);
  text-align: left; font-weight: 400; font-size: 12.5px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--separator-soft);
  white-space: nowrap;
}
thead th:first-child { padding-left: 22px; }
thead th:last-child { padding-right: 22px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--text); }
th[data-dir]::after { content: " ↓"; color: var(--accent); }
th[data-dir="asc"]::after { content: " ↑"; }

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--separator-soft);
  vertical-align: middle;
}
tbody td:first-child { padding-left: 22px; }
tbody td:last-child { padding-right: 22px; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr:focus-visible { outline: 3px solid rgba(0, 113, 227, 0.4); outline-offset: -3px; }

.col-idx { width: 52px; }
.col-num, .col-time, .col-code { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
td.col-idx .num { color: var(--text-3); }

.host { font: 13.5px var(--mono); word-break: break-all; color: var(--text); }
.tag-immortal {
  display: inline-flex; align-items: center; margin-left: 7px;
  font: 500 11px var(--font); color: var(--accent);
  background: var(--accent-soft); border-radius: 5px; padding: 2px 6px;
  vertical-align: 1px;
}
.tag-sub {
  display: inline-flex; align-items: center; margin-left: 7px;
  font: 400 11px var(--font); color: var(--text-3);
  background: var(--fill); border-radius: 5px; padding: 2px 6px;
  vertical-align: 1px;
}

.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 400; white-space: nowrap; color: var(--text-2);
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--text-3); flex: none; }
.badge.normal::before { background: var(--normal); }
.badge.notice::before { background: var(--notice); }
.badge.soft::before { background: var(--soft); }
.badge.blocked::before { background: var(--blocked); }
.badge.unknown::before { background: var(--unknown); }
.badge.error::before { background: var(--error); }
.badge.invalid { color: var(--text-3); }
.badge.invalid::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); border-radius: 50%; }
.badge.pending { color: var(--accent); }
.badge.pending::before { background: var(--accent); border-radius: 50%; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .2; } }

.desc { color: var(--text-3); font-size: 13px; max-width: 440px; }
.desc .why { margin-left: 6px; }
.cached-mark { color: var(--text-3); font-size: 11.5px; margin-left: 6px; }
/* 说明可能很长，最多两行，全文在详情里看 —— 保持行高一致才好扫读 */
.desc .clamp {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.sub-hint {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px; font: 11.5px var(--mono); color: var(--accent);
}

.empty {
  display: flex; flex-direction: column; align-items: center;
  gap: 6px; padding: 40px 24px 52px; text-align: center;
}
.empty-illo { width: 128px; height: 128px; margin-bottom: 6px; }
.empty-title { margin: 0; font-size: 15px; font-weight: 600; }
.empty-hint { margin: 0 0 14px; font-size: 13.5px; color: var(--text-3); max-width: 420px; line-height: 1.55; }

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 14px 22px; border-top: 1px solid var(--separator-soft);
}
.pager-size { font-size: 13px; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.pager-size select {
  background: var(--surface-2); color: var(--text);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 6px 8px; font: 13px var(--font); cursor: pointer;
}
.pager-nav { display: flex; align-items: center; gap: 6px; }
#page-info { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; padding: 0 6px; }

.foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--text-3); font-size: 12.5px; padding: 4px 2px;
}

/* ---------- 弹层 ---------- */

.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.32);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: saturate(160%) blur(6px);
}
.modal-card {
  background: var(--surface); border-radius: var(--radius-card);
  width: min(600px, 100%); max-height: 84vh; overflow: auto;
  box-shadow: var(--shadow-pop);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  position: sticky; top: 0; background: var(--surface);
  border-bottom: 1px solid var(--separator-soft);
}
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 6px 20px 20px; }
.kv { display: grid; grid-template-columns: 108px 1fr; gap: 0; }
.kv dt, .kv dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--separator-soft); font-size: 13.5px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); word-break: break-word; }
.kv dd code { background: var(--surface-2); padding: 2px 7px; border-radius: 5px; }
/* 必须是 inline-flex：flex 是块级，会把按钮挤到下一行 */
.kv .kv-actions { display: inline-flex; gap: 8px; flex-wrap: wrap; vertical-align: middle; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.toast {
  background: var(--surface); border-radius: var(--radius);
  padding: 12px 16px; font-size: 13.5px; max-width: 380px;
  box-shadow: var(--shadow-2), 0 0 0 0.5px var(--separator-soft);
  animation: toast-in .22s cubic-bezier(.22, 1, .36, 1);
}
.toast.good { color: var(--normal); }
.toast.bad { color: var(--blocked); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- 平台页面（登录 / 控制台 / 管理后台） ---------- */

.page { max-width: 1180px; margin: 0 auto; padding: 6px clamp(16px, 4vw, 40px) 56px; display: flex; flex-direction: column; gap: 16px; }

.nav-links { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-link {
  color: var(--text-3); text-decoration: none; font-size: 14px;
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.is-on { color: var(--text); font-weight: 500; background: var(--surface-2); }
.account-chip { font-size: 13.5px; color: var(--text); padding: 7px 12px; }

.auth-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-wrap { width: min(400px, 100%); }
.auth-card { padding: 30px 28px; display: flex; flex-direction: column; gap: 22px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-actions { display: flex; gap: 10px; }
.auth-actions .btn { flex: 1; }
.auth-hint { margin: 0; font-size: 12.5px; color: var(--text-3); text-align: center; }

.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field label { font-size: 13.5px; color: var(--text-2); }
.input {
  appearance: none; width: 100%;
  background: var(--surface-2); color: var(--text);
  border: 1px solid transparent; border-radius: var(--radius);
  padding: 11px 14px; font: 14px var(--font); outline: none;
  transition: border-color .15s, background .15s;
}
.input:focus { border-color: var(--accent); background: var(--surface); }
.form-error {
  margin: 0 0 14px; padding: 10px 13px; border-radius: var(--radius);
  background: rgba(255, 59, 48, 0.1); color: var(--blocked);
  font-size: 13.5px; line-height: 1.45;
}

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form .input { width: 240px; }

.kv { display: grid; grid-template-columns: 120px 1fr; gap: 0; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--separator-soft); font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { color: var(--text); word-break: break-word; }
.kv dt:last-of-type, .kv dd:last-of-type { border-bottom: 0; }

.code-block {
  background: var(--surface-2); border-radius: var(--radius);
  padding: 14px 16px; margin: 12px 0 8px;
  font: 12.5px/1.7 var(--mono); color: var(--text-2);
  overflow: auto; white-space: pre;
}

.secret-box {
  background: var(--surface-2); border: 1px dashed var(--separator);
  border-radius: var(--radius); padding: 14px 16px; margin: 14px 0;
  font: 13px var(--mono); word-break: break-all; user-select: all;
}

.key-prefix { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); background: var(--fill); padding: 3px 8px; border-radius: 6px; }
.row-inline { display: flex; gap: 2px; white-space: nowrap; }
.muted { color: var(--text-3); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }
