/* ============================================================
   轻舟 · 资产台 — 日式留白盒画廊
   和纸白 #fbfaf7 / 墨色 #1c1c1c / 唯一点缀绿 #2f7d5c
   无卡片、无阴影、无圆角，一切以 1px #eceae4 细线划分
   ============================================================ */

:root {
  --paper: #fbfaf7;
  --ink: #1c1c1c;
  --muted: #6b675f;
  --line: #eceae4;
  --line-strong: #d6d3ca;
  --green: #2f7d5c;
  --err: #9c3d31;
  --serif: Georgia, "Times New Roman", "SimSun", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: Consolas, "Courier New", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.9;
}

a { color: inherit; }

::selection { background: rgba(47, 125, 92, .14); }

/* ---------- 页头：极简顶条 ---------- */

.hdr {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: baseline;
  gap: 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 20;
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: var(--ink);
}

.brand .name {
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: .18em;
  line-height: 1.3;
}

.brand .sub {
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--muted);
  line-height: 1.3;
}

.nav { display: flex; gap: 28px; flex-wrap: wrap; }

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  letter-spacing: .06em;
  padding: 4px 0;
  transition: color .15s;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 7px;
}

.nav a.active { color: var(--ink); }

.nav a.active::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 50%;
  margin-top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.hend { margin-left: auto; display: flex; gap: 22px; align-items: baseline; }

.out {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .08em;
}

.out:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}

/* ---------- 版心 ---------- */

.layout { display: flex; flex-direction: column; min-height: 100vh; }

.main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 64px 24px 56px;
}

/* ---------- 扉页式页头 ---------- */

.page-head { padding: 6px 0 44px; }

.ph-brand {
  display: block;
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--muted);
  margin-bottom: 20px;
}

.page-head h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1.3;
}

.page-head h1 span {
  margin-left: .45em;
  font-size: .58em;
  letter-spacing: .08em;
  color: var(--muted);
}

.page-head p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  max-width: 56ch;
}

/* ---------- KPI：浮在空白里的数字 ---------- */

.hero.kpi {
  display: flex;
  gap: 64px;
  flex-wrap: wrap;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}

.hero.kpi b {
  display: block;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: .02em;
}

.hero.kpi span {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--muted);
}

/* ---------- 区块：细线代替卡片 ---------- */

.card {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  border-top: 1px solid var(--line);
  padding: 36px 0 30px;
  margin: 0;
}

.main > .card:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 48px; }

.card h2 {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .05em;
  margin-bottom: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 词条式细线列表（表格） ---------- */

.card { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; min-width: 520px; }

th {
  text-align: left;
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line-strong);
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .16em;
}

td {
  text-align: left;
  padding: 14px 14px 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}

th:last-child, td:last-child { text-align: right; }

tr:hover td { background: rgba(28, 28, 28, .015); }

td b { font-weight: 600; }

/* ---------- 徽标：纯文字 + 色点 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.6;
}

.badge::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a9a69d;
}

.badge.active { color: var(--green); }
.badge.active::before { background: var(--green); }

.badge.paused { color: var(--muted); }
.badge.paused::before { background: #a9a69d; }

.badge.verifying { color: var(--green); }
.badge.verifying::before { background: var(--green); animation: breathe 1.4s ease-in-out infinite; }

/* ---------- 等宽编号 ---------- */

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0;
}

/* ---------- 权限标记 ---------- */

.perm-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  background: none;
  border: none;
  padding: 0;
  border-radius: 0;
  letter-spacing: .02em;
}

/* ---------- 通知：细线之间的一句话 ---------- */

.notice { display: none; }

.notice.show {
  display: block;
  margin: 0 0 10px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.8;
}

.notice.err { color: var(--err); }
.notice.err::before { content: "— "; color: var(--err); }

.notice.ok { color: var(--green); }
.notice.ok::before { content: "— "; color: var(--green); }

/* ---------- Loading：呼吸的小绿点 ---------- */

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  padding: 16px 0;
  letter-spacing: .04em;
}

.loading::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: breathe 1.8s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: .25; }
  50% { opacity: 1; }
}

/* ---------- 按钮：细线矩形 / 文字 ---------- */

button, .btn {
  font: inherit;
  font-size: 13.5px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  color: var(--ink);
  padding: 8px 20px;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: .06em;
  line-height: 1.7;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}

button:hover, .btn:hover { border-color: var(--ink); color: var(--ink); }

button.primary, .btn.primary { border-color: var(--green); color: var(--green); }
button.primary:hover, .btn.primary:hover { background: rgba(47, 125, 92, .07); border-color: var(--green); }

button.tiny, .btn.tiny { padding: 4px 14px; font-size: 12px; letter-spacing: .04em; }

button.tiny + button.tiny, button.tiny + a.btn.tiny, a.btn.tiny + button.tiny, a.btn.tiny + a.btn.tiny { margin-left: 8px; }

button:disabled, .btn:disabled {
  opacity: 1;
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
  cursor: default;
}

button.authorized:disabled, button.authorized:disabled:hover {
  color: var(--green);
  border-color: transparent;
  background: transparent;
  cursor: default;
}

/* ---------- Tabs：文字 + 绿色小方块 ---------- */

.tabs { display: flex; gap: 24px; margin-bottom: 14px; }

.tabs a {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  letter-spacing: .08em;
  text-decoration: none;
}

.tabs a::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 9px;
  background: transparent;
  vertical-align: 2px;
}

.tabs a:hover { color: var(--ink); }

.tabs a.active { color: var(--ink); }
.tabs a.active::before { background: var(--green); }

/* ---------- 表单：墨线输入 ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 36px; }

.field label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .1em;
  margin-bottom: 4px;
}

.field input, .field textarea, .field select {
  width: 100%;
  font: inherit;
  font-size: 14px;
  padding: 6px 2px;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}

.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--green);
}

.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.7; }

.form-actions { grid-column: span 2; margin-top: 6px; display: flex; justify-content: flex-end; gap: 12px; }

/* ads 页顶部的独立 select */
select#account, select#datePreset {
  font: inherit;
  font-size: 13.5px;
  padding: 7px 4px;
  background: transparent;
  color: var(--ink);
  border: none;
  border-bottom: 1px solid var(--line-strong);
}

select#account:focus, select#datePreset:focus { outline: none; border-bottom-color: var(--green); }

/* ---------- 弹窗：一页和纸 ---------- */

#confirmOverlay .card, #inviteOverlay .card {
  background: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 38px 42px;
  max-width: calc(100vw - 48px);
}

#confirmOverlay .card h2, #inviteOverlay .card h2 { margin-bottom: 14px; }

/* ---------- 页脚：版权页 ---------- */

.colophon {
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 24px 44px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px 40px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--muted);
}

/* ---------- 登录扉页 ---------- */

.s3wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

.s3mark {
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .3em;
  color: var(--muted);
  margin-bottom: 34px;
}

.s3wrap h1 {
  font-family: var(--serif);
  font-size: clamp(44px, 8vw, 72px);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: 1.2;
  margin: 0 0 30px;
  color: var(--ink);
}

.s3line { width: 40px; height: 2px; background: var(--green); margin-bottom: 32px; }

.s3wrap p {
  font-size: 14.5px;
  color: var(--muted);
  letter-spacing: .1em;
  line-height: 1.9;
  margin-bottom: 52px;
  max-width: 40em;
}

.s3cta {
  align-self: flex-start;
  font-size: 15px;
  letter-spacing: .14em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 9px;
  transition: color .15s, border-color .15s;
}

.s3cta span { margin-left: 14px; display: inline-block; }

.s3cta:hover { color: var(--green); border-bottom-color: var(--green); }

.s3err {
  margin-top: 34px;
  padding: 12px 0;
  color: var(--err);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
  line-height: 1.8;
}

.s3foot {
  padding: 26px 28px 40px;
  max-width: 1040px;
  margin: 0 auto;
  font-size: 12px;
  letter-spacing: .24em;
  color: var(--muted);
}

.s3foot a { color: var(--muted); text-decoration: none; }
.s3foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }

/* ---------- 响应式 ---------- */

@media (max-width: 720px) {
  .hdr { padding: 16px 20px; gap: 14px 22px; }
  .nav { gap: 16px 20px; order: 3; width: 100%; padding-top: 4px; }
  .nav a.active::before { left: -10px; }
  .main { padding: 40px 20px 40px; }
  .page-head { padding-bottom: 32px; }
  .page-head h1 { font-size: 28px; }
  .hero.kpi { gap: 30px 44px; padding: 22px 0 26px; }
  .hero.kpi > div { min-width: 38%; }
  .hero.kpi b { font-size: 34px; }
  .card { padding: 28px 0 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { grid-column: span 1; }
  #confirmOverlay .card, #inviteOverlay .card { padding: 28px 24px; }
  .colophon { padding: 18px 20px 36px; }
}
