:root {
  --brand: #0A84FF;
  --brand-2: #5E9EFF;
  --brand-soft: #EAF3FF;
  --brand-soft-2: #F0F6FF;
  --brand-line: #CFE1FA;

  --bg: #F5F6F8;
  --card: #FFF;
  --fill: #F8F9FB;
  --fill-2: #F2F4F8;
  --fill-3: #F9FAFC;
  --border: #E8EBF0;
  --border-2: #F0F2F6;
  --border-3: #E0E8F5;
  --border-4: #F1F3F7;

  --t1: #1C1C1E;
  --t2: #6E7278;
  --t3: #AEB3BA;

  --ok: #34C759;
  --warn: #FF9F0A;
  --err: #FF3B30;
  --err-soft: #FFEDEC;
  --err-line: #FFD5D2;

  --ink: #0A1E3C;
  --ink-2: #5B6B82;
  --dark: #0F172A;
  --dark-t: #94A3B8;
  --term: #4ADE80;

  --r-xs: 7px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 11px;
  --r-xl: 12px;
  --r-2xl: 14px;
  --r-3xl: 22px;

  --sh-1: 0 1px 2px rgba(15, 23, 42, .04);
  --sh-2: 0 8px 24px rgba(15, 23, 42, .06);
  --sh-brand: 0 4px 10px rgba(10, 132, 255, .25);
  --sh-brand-lg: 0 10px 28px rgba(10, 132, 255, .35);
  --sh-modal: 0 20px 60px rgba(10, 132, 255, .10);
  --ring: 0 0 0 3px rgba(10, 132, 255, .12);

  --sidebar-w: 218px;
  --sidebar-w-min: 64px;
  --tabbar-h: 42px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--t1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.sprite { display: none; }
svg, .ic { display: block; }
.ic { width: 18px; height: 18px; flex: none; }
button svg:not(.ic) { width: 14px; height: 14px; }
button { font-family: inherit; border: none; cursor: pointer; background: none; color: inherit; }
input, select { font-family: inherit; outline: none; }
a { text-decoration: none; color: var(--brand); }
a.btn { color: inherit; }
::selection { background: rgba(10, 132, 255, .18); }
.num, .mono { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--t2); overflow-wrap: anywhere; }
.t2 { color: var(--t2); }
.t3 { color: var(--t3); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

* { scrollbar-width: thin; scrollbar-color: #D6DAE2 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #D6DAE2; border: 3px solid transparent; background-clip: content-box; border-radius: 10px; }
*::-webkit-scrollbar-thumb:hover { background: #BFC6D2; background-clip: content-box; }

.auth {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(160deg, #F0F5FF, #F5F6F8);
  overflow-y: auto;
}
.auth-card {
  width: 340px;
  max-width: 100%;
  padding: 34px 28px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--r-3xl);
  box-shadow: var(--sh-modal);
  animation: slideUp .4s var(--ease);
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.auth-logo {
  width: 60px;
  height: 60px;
  display: block;
  margin: 0 auto 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--sh-brand-lg);
}
.auth-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-title { text-align: center; font-size: 20px; font-weight: 800; color: var(--t1); }
.auth-err { color: var(--err); font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }

.layout { display: flex; height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-right: 1px solid var(--border);
  overflow: hidden;
  transition: width .25s var(--ease);
}
.sidebar.min { width: var(--sidebar-w-min); }

.side-brand {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
}
.side-brand .lg {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(10, 132, 255, .25);
}
.side-brand .lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-brand .nm { font-size: 15px; font-weight: 800; white-space: nowrap; color: var(--t1); transition: opacity .2s; }
.sidebar.min .side-brand .nm { opacity: 0; width: 0; overflow: hidden; }

.side-nav { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 8px; overflow-y: auto; }

.nav-item, .sp-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  flex-shrink: 0;
  padding: 0 12px;
  margin-bottom: 2px;
  border-radius: var(--r-md);
  color: var(--t2);
  font-size: 14px;
  text-align: left;
  white-space: nowrap;
  position: relative;
  transition: background .15s, color .15s;
}
.nav-item .ic, .sp-item .ic { width: 20px; height: 20px; }
.nav-item:hover, .sp-item:hover { background: var(--fill-2); color: var(--t1); }
.nav-item .nt { transition: opacity .2s; }
.sidebar.min .nav-item .nt { opacity: 0; width: 0; overflow: hidden; }

.sp-strong { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 700; box-shadow: var(--sh-brand); }
.sp-strong:hover { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; }
.sp-strong .ic { color: #fff; }
.sp-danger:hover { background: var(--err-soft); color: var(--err); }

.nav-sec, .sp-sec {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 4px 8px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  color: var(--t3);
  white-space: nowrap;
}
.sp-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: var(--r-xs);
  background: var(--fill-2);
  color: var(--t2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
}
.sidebar.min .sp-sec { display: none; }

.sp-scroll { flex: 1; min-height: 0; overflow-y: auto; }
.sp-list { display: flex; flex-direction: column; gap: 8px; }
.sp-foot { flex-shrink: 0; padding: 8px; border-top: 1px solid var(--border); }

.side-collapse {
  width: 100%;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  margin-top: 4px;
  border-radius: var(--r-md);
  background: var(--fill-2);
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.side-collapse .ic { width: 18px; height: 18px; transform: rotate(180deg); transition: transform .25s var(--ease); }
.side-collapse:hover { background: var(--brand-soft); color: var(--brand); }
.sidebar.min .side-collapse { justify-content: center; padding: 0; }
.sidebar.min .side-collapse .nt { display: none; }
.sidebar.min .side-collapse .ic { transform: none; }

.hist {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border-radius: var(--r-lg);
  text-align: left;
  background: var(--fill-3);
  border: 1px solid var(--border-2);
  transition: background .15s, border-color .15s;
}
.hist:hover { background: #F4F7FC; border-color: var(--border-3); }
.hist-av {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 3px 8px rgba(10, 132, 255, .22);
}
.hist-av svg { width: 15px; height: 15px; }
.hist-av.man { background: var(--fill-2); color: var(--t2); box-shadow: none; }
.hist-body { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.hist-name { max-width: 100%; font-size: 13px; font-weight: 700; color: var(--t1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-tag {
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.hist-tag.man { background: var(--fill-2); color: var(--t2); }
.hist-meta { margin-top: 5px; font-size: 11px; color: var(--t3); }
.hist-chev { color: var(--t3); margin-top: 5px; }
.sidebar.min .hist { justify-content: center; padding: 9px 0; }
.sidebar.min .hist-body, .sidebar.min .hist-chev { display: none; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }

.tabbar {
  height: var(--tabbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}
.tab-title { font-size: 14px; font-weight: 800; color: var(--t1); white-space: nowrap; }
.tab-sub { font-size: 11px; color: var(--t3); white-space: nowrap; }
.tab-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.m-hamb {
  display: none;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--t2);
  transition: background .15s;
}
.m-hamb:hover { background: var(--fill-2); }
.iconbtn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--t2);
  transition: background .15s, color .15s, transform .15s;
}
.iconbtn:hover { background: var(--fill-2); color: var(--brand); }
.iconbtn:active { transform: scale(.94); }
.iconbtn .ic { width: 17px; height: 17px; }
.only-mobile { display: none; }

.content { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  padding: 16px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.stat .sv {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  margin-bottom: 10px;
  color: #fff;
}
.stat .sv .ic { width: 16px; height: 16px; }
.stat .num { font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--t1); font-variant-numeric: tabular-nums; }
.stat .lb { font-size: 12px; color: var(--t2); margin-top: 2px; }

.card, .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  transition: box-shadow .2s var(--ease);
}
.card[data-enter] { animation: slideUp .3s var(--ease) both; }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 0;
}
.card-titles { flex: 1; min-width: 0; }
.card-title { font-size: 14px; font-weight: 700; color: var(--t1); }
.card-tools { display: flex; align-items: center; gap: 8px; }
.card-body { padding: 14px 18px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--border-4); }

.step {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: var(--sh-brand);
}
.step .ic { width: 15px; height: 15px; }

.linkbtn {
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--fill-2);
  color: var(--t2);
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.linkbtn:hover { background: var(--brand-soft); color: var(--brand); }

.filebox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  background: var(--fill-3);
  transition: background .15s, border-color .15s;
}
.filebox:hover { background: #F4F7FC; border-color: var(--border-3); }
.filebox.has-file { background: var(--brand-soft-2); border-color: var(--brand-line); }
.filebox-icon {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--fill-2);
  color: var(--t2);
}
.filebox.has-file .filebox-icon { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: var(--sh-brand); }
.filebox-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.filebox-meta strong { font-size: 13.5px; font-weight: 700; color: var(--t1); overflow-wrap: anywhere; }
.filebox-meta em { font-style: normal; font-size: 11px; color: var(--t3); }

.divider-or { height: 1px; margin: 14px 0; background: var(--border-4); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border-radius: var(--r-xl);
  border: 1.5px solid transparent;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .2s;
}
.btn .ic { width: 17px; height: 17px; }
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  letter-spacing: .5px;
  box-shadow: var(--sh-brand);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-2), var(--brand)); box-shadow: var(--sh-brand-lg); }

.btn-ghost { background: var(--card); border-color: var(--border); color: var(--t1); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft-2); }

.btn-quiet { background: var(--fill-2); border-color: transparent; color: var(--t2); }
.btn-quiet:hover { background: var(--brand-soft); color: var(--brand); }

.btn-danger { background: var(--err-soft); border-color: transparent; color: var(--err); }
.btn-danger:hover { background: #FFE0DE; }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; box-shadow: none; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }

.input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 46px;
  padding: 0 14px;
  background: var(--fill);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap:hover { border-color: var(--border-3); }
.input-wrap:focus-within { border-color: var(--brand); background: var(--card); box-shadow: var(--ring); }
.input { flex: 1; min-width: 0; width: 100%; background: none; border: 0; color: var(--t1); font-size: 15px; padding: 0; }
.input::placeholder { color: var(--t3); }
.input-suffix { color: var(--t3); font-size: 14px; flex: none; }
.input-slim { width: 140px; height: 40px; flex: none; margin-left: auto; border-radius: var(--r-md); }
.input-slim .input { text-align: right; font-size: 15px; font-weight: 800; color: var(--brand); }

.field-group { position: relative; display: block; margin-bottom: 12px; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--t3); pointer-events: none; }
.input-icon .ic { width: 17px; height: 17px; }
.input-plain {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  background: var(--fill);
  border: 1.5px solid var(--border);
  border-radius: var(--r-xl);
  font-size: 15px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-plain:focus { border-color: var(--brand); background: var(--card); box-shadow: var(--ring); }

.rowlist { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 6px 0; position: relative; }
.row + .row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-4); }
.row-k { font-size: 13px; font-weight: 600; color: var(--t2); flex: none; }
.row-v { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--t1); font-variant-numeric: tabular-nums; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px;
  border-radius: var(--r-xl);
  background: var(--fill-3);
  border: 1.5px solid var(--border-2);
  text-align: left;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.mode-opt:hover { background: #F4F7FC; border-color: var(--border-3); }
.mode-opt.is-active {
  background: var(--brand-soft-2);
  border-color: var(--brand);
  box-shadow: var(--ring);
}
.mode-ic {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--fill-2);
  color: var(--t2);
  margin-bottom: 6px;
  transition: background .15s, color .15s, box-shadow .2s;
}
.mode-ic .ic { width: 17px; height: 17px; }
.mode-opt.is-active .mode-ic {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: var(--sh-brand);
}
.mode-t { font-size: 14px; font-weight: 700; color: var(--t1); }
.mode-d { font-size: 11.5px; color: var(--t3); line-height: 1.4; }
.auto-box { margin-top: 14px; }
.name-box { margin-bottom: 6px; }
.name-box .input { width: 100%; }

.seg {
  display: inline-flex;
  gap: 2px;
  margin-left: auto;
  padding: 3px;
  background: var(--fill-2);
  border-radius: var(--r-md);
}
.seg-item {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg-item:hover { color: var(--t1); }
.seg-item.is-active { background: var(--card); color: var(--brand); box-shadow: var(--sh-1); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--t2);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft-2); transform: translateY(-1px); }
.chip:active { transform: scale(.96); }
.chip.is-active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; box-shadow: var(--sh-brand); }

.prog { margin-top: 14px; }
.prog-head { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 12px; color: var(--t2); font-variant-numeric: tabular-nums; }
.prog-track { height: 6px; border-radius: 6px; background: var(--fill-2); overflow: hidden; }
.prog-fill {
  height: 100%;
  width: 0;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  box-shadow: 0 0 10px rgba(10, 132, 255, .45);
  transition: width .25s var(--ease);
}
.prog-fill.is-indet { width: 34% !important; animation: sweep 1.25s var(--ease) infinite; }
@keyframes sweep { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }

.acc-list { display: flex; flex-direction: column; gap: 8px; }
.acc {
  background: var(--fill-3);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: background .15s, border-color .15s, box-shadow .2s;
}
.acc:hover { background: #F4F7FC; border-color: var(--border-3); }
.acc.is-open { background: var(--card); border-color: var(--brand-line); box-shadow: var(--sh-1); }

.acc-head { width: 100%; display: flex; align-items: center; gap: 11px; padding: 11px 13px; text-align: left; }
.acc-chev { color: var(--t3); transition: transform .22s var(--ease), color .2s; }
.acc.is-open .acc-chev { transform: rotate(90deg); color: var(--brand); }
.acc-badge {
  width: 30px;
  height: 30px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--fill-2);
  color: var(--t2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2px;
}
.acc-badge.box { background: #0A84FF; color: #fff; }
.acc-badge.sph { background: #34C759; color: #fff; }
.acc-badge.spr { background: #FF9F0A; color: #fff; }
.acc-main { flex: 1; min-width: 0; line-height: 1.3; }
.acc-name { display: block; font-size: 13.5px; font-weight: 700; color: var(--t1); }
.acc-kind { display: block; font-size: 11px; color: var(--t3); margin-top: 2px; }
.acc-sum { flex: none; text-align: right; font-size: 12.5px; color: var(--t2); font-variant-numeric: tabular-nums; }
.acc-sum.is-changed { color: var(--brand); font-weight: 700; }
.acc-body { padding: 2px 13px 10px; animation: rise .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.acc:not(.is-open) .acc-body { display: none; }

.acc-list.is-compact .acc-chev,
.acc-list.is-compact .acc-badge,
.acc-list.is-compact .acc-main { display: none; }
.acc-list.is-compact .acc-body { display: none !important; }
.acc-list.is-compact .acc-head { padding: 9px 13px; }
.acc-list.is-compact .acc-sum { flex: 1; text-align: left; font-size: 13px; color: var(--t2); }
.acc-list.is-compact .acc-sum.is-changed { color: var(--brand); }

.field {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 76px 22px;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  position: relative;
}
.field + .field::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-4); }
.field-label { font-size: 12px; font-weight: 600; color: var(--t2); }
.field-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  background: var(--fill);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--t1);
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
}
.field-input:hover { border-color: var(--border-3); }
.field-input:focus { border-color: var(--brand); background: var(--card); box-shadow: var(--ring); }
.field-input.is-changed { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }
.field-cm { font-size: 11px; color: var(--t3); text-align: right; font-variant-numeric: tabular-nums; }
.field-reset {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--t3);
  transition: background .15s, color .15s, transform .15s;
}
.field-reset .ic { width: 12px; height: 12px; }
button.field-reset svg { width: 12px; height: 12px; }
.field-reset:hover { background: var(--brand-soft); color: var(--brand); }
.field-reset:active { transform: rotate(-30deg) scale(.9); }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--fill);
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.5;
  overflow-wrap: anywhere;
  animation: rise .2s var(--ease) both;
}
.alert .ic { margin-top: 1px; width: 16px; height: 16px; }
.alert strong { color: var(--t1); font-weight: 700; }
.alert-ok { background: var(--brand-soft-2); border-color: var(--brand-line); color: var(--ink-2); }
.alert-ok .ic { color: var(--brand); }
.alert-ok strong { color: var(--ink); }
.alert-err { background: var(--err-soft); border-color: var(--err-line); color: #B3261E; }
.alert-err .ic { color: var(--err); }
.alert-info .ic { color: var(--brand); }

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
}
.empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2xl);
  background: var(--fill);
  color: var(--t3);
}
.empty-icon svg { width: 24px; height: 24px; }

.kvlist { display: flex; flex-direction: column; }
.kv { display: flex; gap: 14px; padding: 9px 0; font-size: 12.5px; position: relative; }
.kv + .kv::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-4); }
.kv-k { flex: none; width: 58px; color: var(--t2); font-weight: 600; }
.kv-v { color: var(--t1); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.diff { display: flex; flex-direction: column; }
.diff-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  font-size: 12.5px;
  position: relative;
  font-variant-numeric: tabular-nums;
}
.diff-row + .diff-row::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--border-4); }
.diff-key { color: var(--t2); flex: 1; min-width: 0; }
.diff-old { color: var(--t3); text-decoration: line-through; }
.diff-arrow { color: var(--t3); }
.diff-new { color: var(--brand); font-weight: 700; }

.gen-out { margin-top: 12px; }
.gen-out .outbox {
  background: var(--dark);
  border-radius: var(--r-xl);
  padding: 14px;
  margin-top: 12px;
  color: var(--term);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  max-height: 260px;
  overflow-y: auto;
}
.gen-out .outbox .head { color: var(--dark-t); font-size: 11px; margin-bottom: 8px; }

.toast-host {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(86vw, 420px);
  padding: 10px 18px;
  border-radius: var(--r-md);
  background: rgba(28, 28, 30, .92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .18);
  animation: toastIn .3s var(--ease) both;
}
.toast .ic { width: 15px; height: 15px; color: var(--term); }
.toast.err .ic { color: #FF6B64; }
.toast.is-out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-60px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-40px); } }

.skel {
  height: 12px;
  border-radius: var(--r-sm);
  background: linear-gradient(90deg, var(--fill-2), #E4E9F0, var(--fill-2));
  background-size: 200% 100%;
  animation: skel 1.4s linear infinite;
}
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.scrim {
  position: fixed;
  inset: 0;
  z-index: 35;
  background: rgba(15, 23, 42, .4);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

@media (max-width: 768px) {
  body { overflow: auto; height: auto; }
  .layout { height: auto; min-height: 100vh; display: block; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(15, 23, 42, .15);
    z-index: 40;
    transition: transform .3s var(--ease);
  }
  .sidebar.min { width: var(--sidebar-w); }
  .sidebar.is-open { transform: none; }
  .sidebar.min .side-brand .nm, .sidebar.min .nav-item .nt { opacity: 1; width: auto; }
  .sidebar.min .sp-sec { display: flex; }
  .sidebar.min .hist { justify-content: flex-start; padding: 11px 12px; }
  .sidebar.min .hist-body, .sidebar.min .hist-chev { display: flex; }
  .sidebar.min .hist-chev { display: block; }
  .sidebar.min .side-collapse { display: none; }
  .main { height: auto; }
  .only-mobile { display: grid; }
  .tabbar { position: sticky; top: 0; padding: 0 10px; }
  .content { padding: 12px 12px 24px; overflow: visible; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 9px; margin-bottom: 12px; }
  .stat { padding: 12px; border-radius: var(--r-xl); }
  .stat .num { font-size: 20px; }
  .stat .sv { width: 26px; height: 26px; margin-bottom: 7px; }
  .card, .panel { border-radius: var(--r-xl); }
  .card-head { padding: 14px 14px 0; flex-wrap: wrap; }
  .card-body { padding: 12px 14px 14px; }
  .card-tools { width: 100%; padding-top: 10px; border-top: 1px solid var(--border-4); }
  .row { flex-wrap: wrap; }
  .seg { width: 100%; margin-left: 0; }
  .seg-item { flex: 1; }
  .chip { flex: 1 1 0; min-width: 58px; padding: 0 8px; }
  .input-slim { width: 108px; }
  .field { grid-template-columns: 38px minmax(0, 1fr) 66px 22px; gap: 8px; }
  .field-label { font-size: 11.5px; }
  .auth-card { padding: 26px 20px; }
  .empty { padding: 32px 18px; }
}

@media (max-width: 380px) {
  .content { padding: 10px 10px 20px; }
  .stats { grid-template-columns: 1fr; }
  .stack { gap: 12px; }
  .mode-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .auth-card { background: #FFF; }
  .toast { background: #1C1C1E; }
}

/* ---------- 描边透视参数面板 ---------- */
.card-sub {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--t3, #8A8F98);
}

.param-list { display: flex; flex-direction: column; gap: 8px; }

.prow {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  background: var(--bg-in, #1B2027);
  border: 1px solid var(--line, #262C35);
  border-radius: 8px;
  transition: border-color .14s cubic-bezier(.22,.61,.36,1),
              background .14s cubic-bezier(.22,.61,.36,1);
}
.prow.is-changed {
  border-color: #3E9E63;
  background: rgba(52,199,89,.07);
}
.prow-main { flex: 1; min-width: 0; }
.prow-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  font-weight: 550;
  color: var(--t1, #EDEFF2);
}
.prow-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 400;
  color: var(--t3, #8A8F98);
  background: rgba(255,255,255,.05);
  padding: 1px 5px;
  border-radius: 4px;
}
.prow-note {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--t3, #8A8F98);
}
.prow-ctl { flex: 0 0 auto; }

.pnum { display: flex; align-items: center; gap: 6px; }
.pnum .inp { width: 78px; text-align: right; }
.pnum .unit { font-size: 12px; color: var(--t3, #8A8F98); }

/* 开关 */
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 12px;
  background: #333A44;
  transition: background .18s cubic-bezier(.22,.61,.36,1);
  flex: 0 0 auto;
}
.sw-dot {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #EDEFF2;
  transition: transform .18s cubic-bezier(.22,.61,.36,1);
}
.sw input:checked + .sw-track { background: #34C759; }
.sw input:checked + .sw-track .sw-dot { transform: translateX(18px); }
.sw input:focus-visible + .sw-track { outline: 2px solid #5E9EFF; outline-offset: 2px; }
.sw-txt { font-size: 12px; color: var(--t3, #8A8F98); min-width: 16px; }

@media (max-width: 480px) {
  .prow { align-items: flex-start; flex-direction: column; gap: 9px; }
  .prow-ctl { align-self: flex-end; }
}

/* ---------- 内置文件列表 ---------- */
.builtin-list { display: flex; flex-direction: column; gap: 8px; }
.builtin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  height: auto;
  padding: 10px 12px;
}
.builtin-item .ic { flex: 0 0 auto; opacity: .75; }
.builtin-item.is-loading { opacity: .6; }
.bi-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.bi-name {
  font-size: 12.5px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bi-meta { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--t3, #8A8F98); }
.bi-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10.5px;
  font-weight: 550;
  border: 1px solid transparent;
}
.bi-tag.bi-outline { background: rgba(255,159,10,.14); color: #FF9F0A; border-color: rgba(255,159,10,.3); }
.bi-tag.bi-bones { background: rgba(94,158,255,.14); color: #5E9EFF; border-color: rgba(94,158,255,.3); }
