/* 任务平台 —— 中性黑。颜色只给状态，其余全是灰阶。 */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #171717;
  --surface-3: #1f1f1f;
  --popover: #161616;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --line-3: rgba(255, 255, 255, .24);
  --text: #ededed;
  --text-2: #a1a1a1;
  --text-3: #6e6e6e;
  --primary: #f2f2f2;
  --primary-ink: #0a0a0a;

  --ok: #4ade80;      --ok-bg: rgba(74, 222, 128, .10);
  --warn: #fbbf24;    --warn-bg: rgba(251, 191, 36, .10);
  --bad: #f87171;     --bad-bg: rgba(248, 113, 113, .10);
  --info: #93c5fd;    --info-bg: rgba(147, 197, 253, .10);
  --mute-bg: rgba(255, 255, 255, .06);

  --r-sm: 6px; --r: 10px; --r-lg: 14px;
  --shadow-pop: 0 1px 2px rgba(0,0,0,.4), 0 16px 40px rgba(0,0,0,.55);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
          "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, 0, 0, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  /* 下拉箭头 / 勾选标记，用在原生控件上 */
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --i-tick-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ededed' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --i-tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
/* 带 display 的类（.field 是 grid）会盖掉浏览器对 [hidden] 的 display:none，按协议藏字段时就藏不住 */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
/* 极淡的胶片颗粒，压掉纯黑的塑料感 */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid rgba(255,255,255,.55); outline-offset: 2px; }
::selection { background: rgba(255,255,255,.22); }
.num, td.num, .kpi-value { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.nowrap { white-space: nowrap; }
/* 长地址单行截断，悬停看全（title 属性） */
.trunc { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic { width: 16px; height: 16px; flex: none; }

/* ── 顶栏 ─────────────────────────────────────────── */
.top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(10, 10, 10, .78); backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in {
  max-width: 1160px; margin: 0 auto; height: 60px; padding: 0 20px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 15px; letter-spacing: .02em; white-space: nowrap; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 6px; background: var(--primary); flex: none;
  display: grid; place-items: center;
}
.brand-mark::after { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--bg); }
.nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--text-2); white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { color: var(--text); background: var(--surface-3); }
.who { display: flex; align-items: center; gap: 4px; color: var(--text-2); white-space: nowrap; }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--text-2); font: inherit; cursor: pointer; padding: 4px 2px; display: inline-flex; align-items: center; gap: 6px; }
.linkbtn:hover { color: var(--text); }
@media (max-width: 640px) {
  .top-in { gap: 12px; padding: 0 14px; }
  .brand-name, .user-name, .langsw .dd-label { display: none; }
}

.subnav { border-bottom: 1px solid var(--line); background: rgba(10,10,10,.6); position: relative; z-index: 2; }
.subnav-in { max-width: 1160px; margin: 0 auto; padding: 0 20px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.subnav-in::-webkit-scrollbar { display: none; }
.subnav a { padding: 12px 12px 11px; color: var(--text-2); border-bottom: 2px solid transparent; white-space: nowrap; transition: color .15s var(--ease), border-color .15s var(--ease); }
.subnav a:hover { color: var(--text); }
.subnav a.on { color: var(--text); border-bottom-color: var(--primary); }

/* ── 下拉菜单（语言 / 用户）：<details data-dd>，无脚本也能开合 ─────────── */
.dd { position: relative; }
.dd > summary { list-style: none; cursor: pointer; user-select: none; }
.dd > summary::-webkit-details-marker { display: none; }
.dd-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px;
  border-radius: 9px; color: var(--text-2); border: 1px solid transparent;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.dd-btn:hover, .dd[open] > .dd-btn { background: var(--surface-2); color: var(--text); border-color: var(--line); }
.dd-btn .chev { width: 14px; height: 14px; opacity: .6; transition: transform .2s var(--ease); }
.dd[open] > .dd-btn .chev { transform: rotate(180deg); }
.dd-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; min-width: 184px; padding: 6px;
  background: var(--popover); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-pop);
  transform-origin: top right; animation: pop .16s var(--ease-out);
}
.dd-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); background: none; border: 0; font: inherit; text-align: left; cursor: pointer;
  white-space: nowrap; transition: background .12s var(--ease), color .12s var(--ease);
}
.dd-item:hover, .dd-item:focus-visible { background: var(--surface-3); color: var(--text); outline: none; }
.dd-item.on { color: var(--text); }
.dd-item .tick { margin-left: auto; color: var(--text); }
.dd-head { display: grid; gap: 1px; padding: 8px 10px 10px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.dd-head strong { color: var(--text); font-weight: 600; }
.dd-head .faint { font-size: 12.5px; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 0; }
.avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text);
  font-size: 12px; font-weight: 650; text-transform: uppercase;
}
.user-btn { padding-left: 6px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* ── 页面 ─────────────────────────────────────────── */
main { position: relative; z-index: 1; max-width: 1160px; margin: 0 auto; padding: 32px 20px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
h1 { font-size: clamp(22px, 2.6vw, 28px); line-height: 1.25; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; font-weight: 600; }
.lede { color: var(--text-2); margin: 6px 0 0; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); margin-bottom: 10px; transition: color .15s var(--ease); }
.back:hover { color: var(--text); }
.back .ic { width: 14px; height: 14px; transition: transform .15s var(--ease); }
.back:hover .ic { transform: translateX(-2px); }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.card-pad { padding: 20px; }

/* 四张数字卡同一个样子 */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 18px 20px; }
.kpi-label { color: var(--text-2); font-size: 13px; }
.kpi-value { font-size: clamp(22px, 2.4vw, 28px); font-weight: 650; margin-top: 6px; letter-spacing: -.01em; white-space: nowrap; }
.kpi-sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 按钮 / 表单 ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font: inherit; font-weight: 550;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease),
              transform .1s var(--ease), opacity .15s, box-shadow .15s var(--ease);
}
.btn:hover { background: var(--surface-3); border-color: var(--line-3); color: var(--text); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn-primary:hover { background: #fff; color: var(--primary-ink); border-color: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm .ic { width: 14px; height: 14px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line); }
.btn-danger:hover { color: var(--bad); border-color: rgba(248,113,113,.4); }
/* 确认框里「删除 / 停用」那种不可逆操作的确认键 */
.btn-danger-solid { background: var(--bad); border-color: var(--bad); color: #1a0505; }
.btn-danger-solid:hover { background: #fca5a5; border-color: #fca5a5; color: #1a0505; }
.btn.busy { pointer-events: none; opacity: .7; }
.btn.busy::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.btn.busy .ic { display: none; }
.btn.done { border-color: rgba(74,222,128,.35); }
.btn.done .ic { color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }

/* align-content:start 是必须的：.field 自己是 grid，放进 .grid2 后会被拉伸到整行高度，
   不固定的话「有提示文字」和「没提示文字」的两栏，输入框不在同一条水平线上。 */
.field { display: grid; align-content: start; gap: 6px; margin-bottom: 16px; }
.field > label { color: var(--text-2); font-size: 13px; }
.field .hint { color: var(--text-3); font-size: 12.5px; line-height: 1.5; }
.field .hint strong { color: var(--text-2); font-weight: 600; }
input[type=text], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; background-color: var(--bg); color: var(--text); font: inherit;
  border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; min-height: 42px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s var(--ease);
}
input[type=text]:hover, input[type=password]:hover, input[type=number]:hover, select:hover, textarea:hover { border-color: var(--line-3); }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(255,255,255,.45); box-shadow: 0 0 0 3px rgba(255,255,255,.07); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:disabled, select:disabled, textarea:disabled { opacity: .5; cursor: not-allowed; }
/* 下拉框：去掉系统外观，统一成带细箭头的样子 */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 38px;
  background-image: var(--i-chev); background-repeat: no-repeat;
  background-position: right 12px center; background-size: 16px;
}
select option { background: var(--surface); color: var(--text); }
input[type=number]::-webkit-inner-spin-button { opacity: .35; }

/* 复选框：白底黑勾 */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; cursor: pointer;
  width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-3);
  background: var(--bg) center / 12px no-repeat;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
input[type=checkbox]:hover { border-color: rgba(255,255,255,.45); }
input[type=checkbox]:checked { background-color: var(--primary); border-color: var(--primary); background-image: var(--i-tick); }
input[type=checkbox]:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--text-2); cursor: pointer; }
.check:hover { color: var(--text); }
/* 开关：表示「开/关」的设置项用这个，比方框直观 */
.switch input[type=checkbox] {
  position: relative; width: 34px; height: 20px; border-radius: 999px; border: 0;
  background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2);
}
.switch input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text-2); transition: transform .2s var(--ease-out), background-color .2s var(--ease);
}
.switch input[type=checkbox]:checked { background: var(--primary); box-shadow: none; }
.switch input[type=checkbox]:checked::before { transform: translateX(14px); background: var(--primary-ink); }
.switch .faint { font-size: 12.5px; }

.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 760px) { .grid2, .grid4 { grid-template-columns: 1fr; } }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline { display: inline; margin: 0; }
/* 输入框后面贴一个单位（%） */
.affix { position: relative; display: inline-flex; align-items: center; }
.affix input { padding-right: 28px; -moz-appearance: textfield; }
.affix input::-webkit-inner-spin-button, .affix input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.affix > span { position: absolute; right: 11px; color: var(--text-3); pointer-events: none; }

/* ── 行内提示条（表单内的错误、一次性密码等） ─────────── */
.flash { display: grid; gap: 8px; margin-bottom: 20px; }
.flash div {
  padding: 11px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface-2);
  display: flex; gap: 10px; align-items: flex-start;
}
.flash div::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; margin-top: 8px; background: var(--text-2); }
.flash .ok { border-color: rgba(74,222,128,.25); }
.flash .ok::before { background: var(--ok); }
.flash .error { border-color: rgba(248,113,113,.3); }
.flash .error::before { background: var(--bad); }

/* ── 操作结果的浮动提示 ───────────────────────────── */
.toasts {
  position: fixed; top: 72px; left: 50%; z-index: 60; transform: translateX(-50%);
  display: grid; gap: 8px; width: min(460px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: 11px 10px 11px 14px;
  background: rgba(24, 24, 24, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-pop);
  animation: toast-in .32s var(--ease-out) both;
}
.toast-ic { width: 18px; height: 18px; margin-top: 1px; }
.toast.ok .toast-ic { color: var(--ok); }
.toast.error { border-color: rgba(248,113,113,.3); }
.toast.error .toast-ic { color: var(--bad); }
.toast-msg { flex: 1; min-width: 0; line-height: 1.5; padding-top: 1px; }
.toast-x {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; margin: -2px 0;
  border: 0; border-radius: 7px; background: none; color: var(--text-3); cursor: pointer;
}
.toast-x:hover { background: var(--surface-3); color: var(--text); }
.toast-x .ic { width: 14px; height: 14px; }
.toast.out { animation: toast-out .22s var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px) scale(.98); } }

/* ── 对话框 ───────────────────────────────────────── */
.modal {
  width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: 16px;
  background: var(--popover); color: var(--text); box-shadow: var(--shadow-pop);
}
.modal-wide { width: min(520px, calc(100vw - 32px)); }
.modal[open] { animation: modal-in .22s var(--ease-out); }
.modal::backdrop { background: rgba(0,0,0,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fade .2s var(--ease); }
.modal-body { padding: 22px; margin: 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h2 { font-size: 16px; }
.modal-msg { margin: 0 0 22px; line-height: 1.6; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.modal .x { margin: -6px -8px 0 0; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }

/* 详情列表（对话框里的「申请人 / 金额 / 地址」） */
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 18px; margin: 0 0 18px; }
.dl dt { color: var(--text-3); }
.dl dd { margin: 0; min-width: 0; }
.addr { display: flex; align-items: center; gap: 8px; }
.addr code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.payable { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ── 状态胶囊（全站唯一带颜色的东西）───────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: 12px; font-weight: 550; white-space: nowrap;
  background: var(--mute-bg); color: var(--text-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* 「正常」是大多数行的状态：底色和文字保持中性，只留一个绿点，
   这样一整列不会糊成一片绿，冷却/异常才抓得住眼睛。 */
.pill.ok { background: var(--mute-bg); color: var(--text-2); }
.pill.ok::before { background: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.info { background: var(--info-bg); color: var(--info); }
.pill.live::before { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ── 表格 ─────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--text-3); font-weight: 500; font-size: 12.5px; white-space: nowrap; background: var(--surface); }
tbody tr:last-child td { border-bottom: 0; }
tbody td { transition: background-color .12s var(--ease); }
tbody tr:hover td { background: rgba(255,255,255,.02); }
td.num, th.num { text-align: right; white-space: nowrap; }
.sub { color: var(--text-3); font-size: 12.5px; margin-top: 2px; }
td.actions { white-space: nowrap; text-align: right; }
.empty { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty strong { display: block; color: var(--text-2); font-weight: 550; margin-bottom: 4px; }

/* ── 任务卡 ───────────────────────────────────────── */
.tasks { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.task {
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
  transition: border-color .2s var(--ease), transform .25s var(--ease-out), box-shadow .25s var(--ease);
}
.task:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.task-title { font-size: 16px; font-weight: 600; }
.task-desc { color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.task-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.meter { height: 4px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--text-2); border-radius: 99px; animation: fill .9s var(--ease-out) .15s both; }
@keyframes fill { from { width: 0; } }
/* 任务的要求条目（来自任务类型的标准说明） */
.task-req { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; color: var(--text-2); font-size: 13px; }
.task-req li { position: relative; padding-left: 14px; }
.task-req li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--text-3); }
.task-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--text-3); font-size: 12.5px; margin-top: 8px; }

.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 14px 18px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface-2);
  margin-bottom: 20px;
}

/* ── 做任务页 ─────────────────────────────────────── */
.steps { display: grid; gap: 14px; }
/* minmax(0, 1fr)：授权链接是一整串不换行的网址，用 1fr 会把卡片撑宽、压到右边栏上 */
.step { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 16px; padding: 22px; }
.step-n {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--text-2); font-weight: 600; font-variant-numeric: tabular-nums;
}
.step h2 { margin-bottom: 4px; font-size: 16px; }
.step p { margin: 0 0 14px; color: var(--text-2); }
.linkbox {
  display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; margin-bottom: 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r);
}
.linkbox code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.timer { font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; transition: color .3s; }
.timer.urgent { color: var(--warn); }
.done-hero { padding: 40px 28px; text-align: center; }
.done-hero .tick {
  width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ok-bg); color: var(--ok);
  animation: pop-in .5s var(--ease-out) both;
}
.done-hero .tick.wait { background: var(--info-bg); color: var(--info); }
.done-hero .tick path { stroke-dasharray: 30; animation: draw .5s var(--ease) .2s both; }
.done-hero .tick.wait path { stroke-dasharray: none; animation: none; }
.spin { animation: spin 1s linear infinite; }
@keyframes pop-in { from { opacity: 0; transform: scale(.6); } }
@keyframes draw { from { stroke-dashoffset: 30; } }
/* 不确定进度：平台确认时的细线 */
.progress { position: relative; height: 3px; width: 180px; margin: 0 auto 22px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 40%; border-radius: 99px;
  background: var(--info); animation: slide 1.3s var(--ease) infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.howto { margin: 0; padding-left: 18px; color: var(--text-2); }
.howto li { margin: 4px 0; }

/* ── 结算卡 ───────────────────────────────────────── */
.settle { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); overflow: hidden; }
.settle-sum {
  padding: 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px;
  background: radial-gradient(600px 260px at 0% 0%, rgba(255,255,255,.035), transparent 70%);
}
.settle-amt { font-size: clamp(30px, 3.4vw, 40px); font-weight: 650; letter-spacing: -.02em; line-height: 1.15; margin: 6px 0 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.settle-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.settle-facts div { display: grid; gap: 2px; }
.settle-facts dt { color: var(--text-3); font-size: 12.5px; }
.settle-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.settle-main { padding: 24px; }
/* 领取页「已选设置」：注册地区 · 代理 */
.opts { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.opts strong { color: var(--text-2); font-weight: 550; }
/* 开关下面展开的输入区 */
.proxy-choice .reveal-box { display: grid; gap: 6px; margin-top: 4px; animation: rise .2s var(--ease) both; }
/* 发任务时的标准说明预览 */
.preset-preview { padding: 12px 14px; margin: -4px 0 16px; background: var(--bg); }
.preset-preview .pre { white-space: pre-line; color: var(--text-2); font-size: 13px; line-height: 1.6; }
/* 结算进度：提交 → 审核打款 → 计入已结算，当前这一步亮起 */
.settle-steps { list-style: none; margin: auto 0 0; padding: 26px 0 0; display: grid; gap: 0; counter-reset: st; }
.settle-steps li {
  position: relative; padding: 0 0 14px 30px; color: var(--text-3); font-size: 13px; counter-increment: st;
}
.settle-steps li:last-child { padding-bottom: 0; }
.settle-steps li::before {
  content: counter(st); position: absolute; left: 0; top: -1px; width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-3);
}
.settle-steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 10px; top: 21px; bottom: 1px; width: 1px; background: var(--line-2);
}
.settle-steps li.cur { color: var(--text); }
.settle-steps li.cur::before { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.settle-steps li.done { color: var(--text-2); }
.settle-steps li.done::before { content: ""; background: var(--surface-3) var(--i-tick-light) center / 11px no-repeat; }
.settle-main .flow { color: var(--text-3); font-size: 12.5px; margin: 14px 0 0; }
.settle-foot { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 4px 24px 16px; }
.settle-foot details.fold { margin-top: 12px; }
@media (max-width: 760px) {
  .settle { grid-template-columns: 1fr; }
  .settle-sum { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ── 柱状图（HTML 柱子，字号不随宽度缩放） ───────────────── */
.chart { position: relative; padding: 18px 20px 16px; }
.plot { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 180px auto; column-gap: 12px; }
.plot-y { position: relative; min-width: 34px; }
.plot-y span, .plot-x span { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plot-y span { position: absolute; right: 0; transform: translateY(50%); }
.plot-area { position: relative; }
.plot-gl { position: absolute; left: 0; right: 0; height: 1px; background: rgba(255,255,255,.07); }
.plot-gl:first-child { background: rgba(255,255,255,.12); }
.plot-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.plot-col { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; }
.plot-bar {
  width: 100%; max-width: 24px; min-height: 2px; border-radius: 4px 4px 0 0; background: #d4d4d4;
  transform-origin: 50% 100%; transition: background-color .15s var(--ease);
  /* backwards 而不是 both：动画结束后不留合成层，否则个别柱子底边会有 1px 的亚像素错位 */
  animation: grow .7s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 14ms + 80ms);
}
.plot-bar.zero { height: 2px !important; border-radius: 1px; background: rgba(255,255,255,.12); }
/* 指着一根柱子时其余变暗 */
.plot-cols:has(.plot-col:hover, .plot-col:focus-visible) .plot-bar:not(.zero) { background: #5c5c5c; }
.plot-col:hover .plot-bar:not(.zero), .plot-col:focus-visible .plot-bar:not(.zero) { background: #fff; }
.plot-x { grid-column: 2; display: flex; gap: 2px; margin-top: 8px; }
/* 标签比柱子宽时向两边溢出、保持居中（text-align 做不到，flex 居中可以） */
.plot-x span { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; }
@keyframes grow { from { transform: scaleY(0); } }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; transform: translate(-50%, calc(-100% + 4px));
  background: var(--popover); border: 1px solid var(--line-2); border-radius: 9px; padding: 7px 11px;
  white-space: nowrap; box-shadow: var(--shadow-pop); opacity: 0;
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.chart-tip.on { opacity: 1; transform: translate(-50%, -100%); }
.chart-tip b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.chart-tip span { color: var(--text-2); font-size: 12px; }
@media (max-width: 640px) { .plot { grid-template-rows: 150px auto; column-gap: 8px; } .chart { padding: 16px 14px 14px; } }

/* ── 登录 / 注册 ──────────────────────────────────── */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; position: relative; z-index: 1; }
.auth-side {
  position: relative; overflow: hidden; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; padding: 36px 44px;
  background: radial-gradient(1200px 600px at 0% 100%, rgba(255,255,255,.05), transparent 60%), #080808;
}
.auth-side canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.auth-side > * { position: relative; }
.auth-tag { color: var(--text-3); font-size: 12.5px; display: flex; justify-content: space-between; }
.auth-main { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.auth-lang { position: absolute; top: 20px; right: 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { margin-bottom: 6px; }
.auth-card .lede { margin-bottom: 28px; }
.auth-card .btn { width: 100%; margin-top: 6px; }
.auth-alt { margin-top: 22px; color: var(--text-2); text-align: center; }
.auth-alt a { color: var(--text); border-bottom: 1px solid var(--line-2); transition: border-color .15s; }
.auth-alt a:hover { border-color: var(--text); }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}

.reveal { animation: rise .45s var(--ease) both; }
.reveal:nth-child(2) { animation-delay: .04s; }
.reveal:nth-child(3) { animation-delay: .08s; }
.reveal:nth-child(4) { animation-delay: .12s; }
.reveal:nth-child(5) { animation-delay: .16s; }
.reveal:nth-child(6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

details.fold { margin-top: 14px; }
details.fold summary { cursor: pointer; color: var(--text-2); list-style: none; display: inline-flex; gap: 8px; align-items: center; transition: color .15s; }
details.fold summary:hover { color: var(--text); }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::before {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s var(--ease); margin-right: 2px;
}
details.fold[open] summary::before { transform: rotate(45deg) translate(-1px, -1px); }
details.fold[open] > :not(summary) { animation: rise .25s var(--ease) both; }
.temp-pw { font-family: var(--mono); font-size: 15px; background: var(--bg); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); user-select: all; }
.inv-link { font-family: var(--mono); font-size: 13px; background: var(--bg); padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line-2); user-select: all; word-break: break-all; }
.stack { display: grid; gap: 14px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.split > .card:last-child { position: sticky; top: 80px; }
@media (max-width: 960px) {
  .split { grid-template-columns: 1fr; }
  .split > .card:last-child { position: static; }
}
.ev { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ev:last-child { border-bottom: 0; }
/* 动作记录在卡片里滚，不把整页拉长；底部渐隐提示还有更多 */
.ev-list {
  max-height: 560px; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 32px), transparent);
}
.ev time { color: var(--text-3); font-variant-numeric: tabular-nums; }
.ev .k { color: var(--text-2); }

/* 筛选：一组相连的分段标签（带数量），而不是散落的胶囊 */
.filters {
  display: flex; gap: 2px; padding: 3px; margin-bottom: 14px; width: max-content; max-width: 100%;
  overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
}
.filters::-webkit-scrollbar { display: none; }
.filters a {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 7px;
  color: var(--text-2); font-size: 13px; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.filters a:hover { color: var(--text); background: var(--surface-2); }
.filters a.on { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.filters .n { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.filters a.on .n { color: var(--text-2); }

/* 任务表单里的「去向」选项：没勾上的那张卡变暗 */
.target { padding: 12px 14px; border-radius: var(--r); transition: border-color .15s var(--ease), opacity .2s var(--ease); }
.target:has(input[type=checkbox]:checked) { border-color: var(--line-2); }
.target:has(input[type=checkbox]:not(:checked)) .target-opts { opacity: .4; }
.target .grid2 { margin-top: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
