:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #7c8698;
  --muted-2: #9aa3b2;
  --line: #e9edf5;
  --line-2: #f1f4f9;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-soft: #eef2ff;
  --nav: #0e1526;
  --nav-2: #141d33;
  --nav-muted: #8893a8;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --blue: #3b82f6;
  --blue-soft: #eff6ff;
  --cyan: #06b6d4;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px -18px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 18px 50px -20px rgba(15, 23, 42, 0.3);
  --sidebar-w: 238px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 13.5px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 13px; }
button { cursor: pointer; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd6e3; border-radius: 9px; }
::-webkit-scrollbar-track { background: transparent; }
.hidden { display: none !important; }

/* ---------- 登录 ---------- */
.login-page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px 88px;
  background:
    radial-gradient(900px 600px at 12% 0%, rgba(124, 128, 245, .4), transparent 62%),
    radial-gradient(760px 560px at 92% 100%, rgba(56, 189, 248, .26), transparent 62%),
    linear-gradient(150deg, #16213f 0%, #1e2b52 52%, #2a3a6b 100%);
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 42%, #000 6%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 6%, transparent 72%);
  pointer-events: none;
}
.login-main {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  max-width: 420px;
}
.login-logo { width: 300px; height: 112px; }
.login-logo img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 18px 40px rgba(99, 102, 241, .45)); }
.login-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  z-index: 1;
  text-align: center;
  font-size: 11.5px;
  color: #7d89a6;
  letter-spacing: .3px;
}
.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 44px 40px 34px;
  background: #fff;
  border: 1px solid #eef1f8;
  border-radius: 18px;
  box-shadow: 0 44px 100px -46px rgba(0, 0, 0, .72), 0 2px 6px rgba(8, 13, 26, .1);
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 34px;
  right: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .55), transparent);
}
.login-head { margin-bottom: 14px; }
.login-card h2 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.2px; color: #131a33; white-space: nowrap; }
.login-secure {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 0 24px;
  padding: 10px 12px;
  border-radius: 9px;
  background: #fff8ea;
  border: 1px solid #ffe6bd;
  color: #a9711a;
  font-size: 12px;
  line-height: 1.65;
}
.login-secure svg { flex-shrink: 0; width: 14px; height: 14px; margin-top: 2px; color: #d99b2b; }
.login-card .field { margin-bottom: 18px; }
.login-card .field label { display: block; font-size: 12px; color: #5b6478; font-weight: 600; margin-bottom: 7px; }
.login-input { position: relative; }
.login-input input {
  width: 100%;
  height: 48px;
  border: 1px solid #e2e7f1;
  background: #f8f9fc;
  border-radius: 10px;
  padding: 0 14px 0 42px;
  outline: none;
  transition: .18s;
  font-size: 13.5px;
  color: #1f2748;
  caret-color: #5b5bf0;
}
.login-input input::placeholder { color: #a9b5cd; }
.login-input input:focus { border-color: #6366f1; background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .12); }
.login-input input:-webkit-autofill,
.login-input input:-webkit-autofill:hover,
.login-input input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1f2748;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 9999s ease-out 0s;
}
.login-input svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #98a3b8; }
.login-btn { width: 100%; height: 48px; margin-top: 8px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; font-weight: 600; font-size: 15px; letter-spacing: 1px; box-shadow: 0 14px 30px -16px rgba(79, 70, 229, .85); transition: .2s; }
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 18px 34px -16px rgba(79, 70, 229, .95); }
.login-btn:disabled { opacity: .65; cursor: default; transform: none; }
.login-hint { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #8a90a6; }
.login-hint b { color: #46506b; font-weight: 600; }
.link-btn { border: 0; background: none; color: #5b5bf0; font-size: 12px; font-weight: 600; padding: 0; }
.login-error { display: none; margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; background: #fef2f2; border: 1px solid #fecaca; color: #b42318; font-size: 12.5px; }
.login-error.show { display: block; }

/* ---------- 布局 ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d1424 0%, #111a2e 100%);
  color: #cdd5e4; display: flex; flex-direction: column; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 24px 12px; }
.brand .logo { width: 48px; height: 48px; display: grid; place-items: center; background: none; font-weight: 800; font-size: 17px; color: #fff; filter: drop-shadow(0 6px 14px rgba(139,92,246,.45)); }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .logo.lockup { display: block; width: 129px; height: 44px; flex: none; filter: none; }
.brand .logo.lockup img { width: 100%; height: 100%; object-fit: contain; }
.brand strong { display: block; font-size: 14.5px; color: #fff; letter-spacing: .3px; }
.brand span { font-size: 10.5px; color: #7b879e; letter-spacing: 1.6px; }
.nav { flex: 1; padding: 6px 12px; overflow-y: auto; }
.nav-group { padding: 16px 12px 7px; font-size: 11.5px; color: #5f6c85; letter-spacing: 1.6px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; color: #aeb9cd; font-size: 14px; margin-bottom: 2px; transition: .16s; position: relative; }
.nav-item svg { width: 17px; height: 17px; flex: none; opacity: .82; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.active { background: linear-gradient(90deg, rgba(99,102,241,.24), rgba(99,102,241,.08)); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #818cf8; }
.nav-item.active svg { opacity: 1; color: #a5b4fc; }
.nav-badge { margin-left: auto; min-width: 19px; height: 19px; border-radius: 10px; background: #ef4444; color: #fff; font-size: 10.5px; display: grid; place-items: center; padding: 0 5px; font-weight: 600; }
.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.06); }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.user-mini .meta { flex: 1; min-width: 0; }
.user-mini .meta b { display: block; font-size: 12.5px; color: #e7ebf3; font-weight: 600; }
.user-mini .meta span { font-size: 10.5px; color: #7b879e; }
.icon-btn { width: 30px; height: 30px; border: 0; border-radius: 8px; background: rgba(255,255,255,.06); color: #aeb9cd; display: grid; place-items: center; transition: .16s; }
.icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.icon-btn svg { width: 15px; height: 15px; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 68px; background: rgba(255,255,255,.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 16px; position: sticky; top: 0; z-index: 30; }
.page-heading { flex: 1; min-width: 0; }
.page-heading h1 { font-size: 17px; margin: 0; letter-spacing: -.2px; font-weight: 650; }
.page-heading p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-date { font-size: 11.5px; color: var(--muted); }
.content { padding: 24px 28px 44px; flex: 1; }
.page { animation: fadeUp .26s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* ---------- 通用组件 ---------- */
.btn { border: 1px solid var(--line); background: #fff; color: var(--ink-2); height: 34px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 500; transition: .16s; white-space: nowrap; }
.btn:hover { border-color: #cfd6e5; background: #fbfcfe; }
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: linear-gradient(135deg, #4f46e5, #6366f1); border-color: transparent; color: #fff; box-shadow: 0 8px 18px -10px rgba(79,70,229,.8); }
.btn-primary:hover { background: linear-gradient(135deg, #4338ca, #4f46e5); border-color: transparent; }
.btn-success { background: #ecfdf5; border-color: #bbf7d0; color: #047857; }
.btn-success:hover { background: #d1fae5; }
.btn-warn { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.btn-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 11.5px; border-radius: 7px; }
.btn-xs { height: 25px; padding: 0 8px; font-size: 11px; border-radius: 6px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.toollink { color: var(--brand); font-size: 12px; cursor: pointer; }
.toollink:hover { text-decoration: underline; }
.toollink.danger { color: var(--red); }
.toollink.muted { color: var(--muted); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 10px; padding: 17px 20px 0; }
.card-head h3 { font-size: 14px; margin: 0; font-weight: 650; letter-spacing: -.1px; }
.card-head .sub { font-size: 11.5px; color: var(--muted); }
.card-head .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 20px 20px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); }
.grid-bottom { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.mb16 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--line-2); margin: 14px 0; }

.kpi { padding: 17px 18px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.kpi-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.kpi-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.kpi-ico svg { width: 16px; height: 16px; }
.kpi-value { font-size: 25px; font-weight: 700; letter-spacing: -.8px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-value small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
.kpi-sub { margin-top: 8px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi-sub b { font-weight: 600; color: var(--ink-2); }
.trend-up { color: #059669; }
.trend-down { color: #dc2626; }
.kpi.hero { background: linear-gradient(135deg, #312e81 0%, #4338ca 55%, #4f46e5 100%); border: 0; color: #fff; box-shadow: 0 16px 36px -18px rgba(67,56,202,.8); }
.kpi.hero .kpi-label, .kpi.hero .kpi-sub { color: rgba(255,255,255,.7); }
.kpi.hero .kpi-ico { background: rgba(255,255,255,.16); color: #fff; }
.kpi.hero .kpi-value { color: #fff; }
.kpi.hero .kpi-sub b { color: #fff; }
.kpi.hero::after { content: ""; position: absolute; width: 130px; height: 130px; right: -40px; top: -52px; border-radius: 50%; background: rgba(255,255,255,.1); }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.field-inline { display: flex; align-items: center; gap: 7px; }
.field-inline label { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.input, .select { height: 34px; border: 1px solid #dfe4ee; border-radius: 8px; padding: 0 10px; background: #fff; color: var(--ink-2); outline: none; transition: .16s; }
.input:focus, .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79,70,229,.09); }
.input::placeholder { color: #aab2c0; }
.input-search { padding-left: 32px; width: 210px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%239aa3b2' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center / 14px; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%237c8698' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 13px; padding-right: 27px; }
textarea.input { height: auto; padding: 10px; min-height: 100px; resize: vertical; line-height: 1.7; width: 100%; }
.input, .select { min-width: 0; }
.input:disabled, .select:disabled { background: #f6f7fb; color: var(--muted); cursor: not-allowed; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
table.data.data-wide { min-width: 1660px; }
table.data.data-wide td { white-space: nowrap; }
.tag-list { display: flex; flex-wrap: wrap; gap: 4px; }
.action-list { display: flex; flex-direction: column; gap: 6px; }
.action-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 10px; background: #fafbfd; text-align: left; cursor: pointer; font-family: inherit; }
.action-row:hover { background: #f4f6ff; border-color: #e3e7f5; }
.action-row .action-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: #eef2ff; color: var(--brand); flex: none; }
.action-row .action-ico svg { width: 17px; height: 17px; }
.action-row b { display: block; font-size: 13px; color: var(--ink); font-weight: 600; }
.action-row .desc { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.action-row.danger .action-ico { background: #fff1f2; color: #e11d48; }
.action-row.danger b { color: #be123c; }
table.data th { text-align: left; font-weight: 500; color: var(--muted); font-size: 11px; letter-spacing: .3px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--ink-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: #fafbff; }
table.data .strong { font-weight: 600; color: var(--ink); }
table.data .mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.cell-main { display: flex; align-items: center; gap: 9px; }
.cell-title { font-weight: 600; color: var(--ink); font-size: 12.5px; }
.cell-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; background: var(--brand-soft); color: var(--brand); flex: none; }
.avatar-sm.green { background: #ecfdf5; color: #047857; }
.avatar-sm.amber { background: #fffbeb; color: #b45309; }
.avatar-sm.blue { background: #eff6ff; color: #1d4ed8; }
.avatar-sm.rose { background: #fff1f2; color: #be123c; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 8px; border-radius: 6px; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.tag i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tag.green { background: var(--green-soft); color: #047857; }
.tag.amber { background: var(--amber-soft); color: #b45309; }
.tag.red { background: var(--red-soft); color: #b91c1c; }
.tag.blue { background: var(--blue-soft); color: #1d4ed8; }
.tag.gray { background: #f1f4f9; color: #64748b; }
.tag.purple { background: #f5f3ff; color: #6d28d9; }
.tag.cyan { background: #ecfeff; color: #0e7490; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; }
.chip b { font-size: 15px; font-weight: 650; font-variant-numeric: tabular-nums; }
.chip span { font-size: 10.5px; color: var(--muted); }
.chip-row { display: flex; gap: 9px; flex-wrap: wrap; }
.quality { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; }
.quality.A { background: #ecfdf5; color: #047857; }
.quality.B { background: #eff6ff; color: #1d4ed8; }
.quality.C { background: #fff7ed; color: #c2410c; }
.progress { width: 90px; }
.progress-bar { height: 5px; border-radius: 5px; background: #eef1f7; overflow: hidden; }
.progress-bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #818cf8, #4f46e5); }
.progress-bar span.warn { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.progress-bar span.bad { background: linear-gradient(90deg, #f87171, #ef4444); }
.progress-meta { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 13px 18px; border-top: 1px solid var(--line-2); gap: 10px; }
.pager .info { font-size: 11.5px; color: var(--muted); }
.pager .pages { display: flex; gap: 5px; }
.page-btn { min-width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 11.5px; padding: 0 7px; }
.page-btn:hover { border-color: #c7d2fe; color: var(--brand); }
.page-btn.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.page-btn[disabled] { opacity: .45; cursor: default; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 12.5px; }
.empty svg { width: 42px; height: 42px; color: #cbd5e1; margin-bottom: 10px; }
.loading { padding: 40px; text-align: center; color: var(--muted); font-size: 12px; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid #dbe1ec; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px; margin-right: 7px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 开关 */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5dbe7; border-radius: 20px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(15,23,42,.2); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }

/* tabs */
.tabs { display: inline-flex; background: #eef1f7; border-radius: 9px; padding: 3px; gap: 2px; }
.tab { border: 0; background: transparent; color: var(--muted); height: 29px; padding: 0 14px; border-radius: 7px; font-size: 12px; font-weight: 500; }
.tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15,23,42,.1); }
.seg-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); padding: 0 20px; }
.seg-tab { border: 0; background: none; padding: 13px 0; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; }
.seg-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* drawer & modal */
.overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(2px); z-index: 100; opacity: 0; animation: fadeIn .18s forwards; }
@keyframes fadeIn { to { opacity: 1; } }
.modal { position: fixed; z-index: 101; top: 50%; left: 50%; transform: translate(-50%, -48%); background: #fff; border-radius: 16px; width: calc(100vw - 40px); max-width: 520px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: modalIn .2s ease forwards; }
.modal.wide { max-width: 760px; }
@keyframes modalIn { to { transform: translate(-50%, -50%); } }
.modal-head { padding: 19px 22px 0; display: flex; align-items: flex-start; gap: 10px; }
.modal-head h3 { margin: 0; font-size: 16px; letter-spacing: -.2px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 11.5px; }
.modal-head .close { margin-left: auto; width: 28px; height: 28px; border: 0; background: #f1f4f9; border-radius: 8px; color: var(--muted); display: grid; place-items: center; }
.modal-head .close:hover { background: #e8ecf3; color: var(--ink); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 13px 22px 19px; display: flex; justify-content: flex-end; gap: 9px; }
.drawer { position: fixed; z-index: 101; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: drawerIn .24s cubic-bezier(.2,.8,.2,1); }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 21px 24px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 11px; }
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-head p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.drawer-head .close { margin-left: auto; width: 30px; height: 30px; border: 0; background: #f1f4f9; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.drawer-body { padding: 20px 24px 30px; overflow-y: auto; flex: 1; }
.drawer-section { margin-bottom: 22px; }
.drawer-section h4 { font-size: 12.5px; margin: 0 0 11px; display: flex; align-items: center; gap: 7px; }
.drawer-section h4::before { content: ""; width: 3px; height: 13px; border-radius: 3px; background: var(--brand); }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 18px; font-size: 12px; }
.info-grid .lbl { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.info-grid .val { color: var(--ink-2); font-weight: 500; word-break: break-all; }
.info-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 22px; }
.info-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; }
.module-tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 16px; }
.module-tab { text-align: left; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-family: inherit; transition: all .15s ease; }
.module-tab:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(99, 102, 241, .08); }
.module-tab.active { border-color: var(--brand); background: linear-gradient(135deg, #eef2ff 0%, #fff 100%); box-shadow: 0 2px 10px rgba(99, 102, 241, .12); }
.module-tab-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.module-tab.active .module-tab-label { color: var(--brand); }
.module-tab-hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.module-tab.active .module-tab-hint { color: var(--ink-2); }
.sub-tabs { display: flex; gap: 4px; margin-bottom: 12px; background: #f4f6fa; padding: 3px; border-radius: 8px; width: fit-content; }
.sub-tabs button { border: 0; background: none; padding: 6px 14px; border-radius: 6px; font-size: 12px; color: var(--muted); font-family: inherit; cursor: pointer; }
.sub-tabs button.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.detail-tabs { display: flex; gap: 2px; margin-top: 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.detail-tabs button { position: relative; padding: 10px 16px; border: 0; background: none; color: var(--muted); font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap; }
.detail-tabs button:hover { color: var(--ink-2); }
.detail-tabs button.active { color: var(--brand); font-weight: 600; }
.detail-tabs button.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.range-tabs { display: flex; flex-wrap: wrap; gap: 4px; background: #f4f6fa; padding: 3px; border-radius: 8px; }
.range-tabs button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; font-size: 11.5px; color: var(--muted); font-family: inherit; cursor: pointer; }
.range-tabs button.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.monitor-stack { display: flex; flex-direction: column; gap: 16px; }
.rt-strip { display: flex; flex-wrap: wrap; gap: 10px 26px; padding: 12px 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; color: var(--muted); }
.rt-strip b { color: var(--ink); font-size: 15px; margin: 0 3px; font-variant-numeric: tabular-nums; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.note-text { font-size: 11.5px; color: var(--muted); }
.timeline { position: relative; padding-left: 4px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 18px 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ''; position: absolute; left: 1px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px #eef2ff; }
.timeline-item .t { font-size: 13px; color: var(--ink); }
.timeline-item .m { font-size: 11px; color: var(--muted); margin-top: 3px; }
.wallet-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.wallet-mini div { background: #f8f9fc; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 12px; }
.wallet-mini span { font-size: 10.5px; color: var(--muted); display: block; margin-bottom: 5px; }
.wallet-mini b { font-size: 15px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }

/* form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-item label { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }
.form-item label .req { color: var(--red); }
.form-item .input, .form-item .select { width: 100%; }
.form-hint { font-size: 10.5px; color: var(--muted); margin-top: 5px; line-height: 1.6; }
.form-error { display: none; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--red-soft); color: #b42318; font-size: 12px; }
.form-error.show { display: block; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.checkline input { width: 15px; height: 15px; accent-color: var(--brand); }

/* 账单调度三列配置 */
.schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.schedule-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 10px; background: #fff; }
.schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.schedule-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.schedule-enable { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); cursor: pointer; user-select: none; }
.schedule-enable input { width: 14px; height: 14px; margin: 0; accent-color: var(--brand); }
.schedule-item .input { width: 100%; }

/* toast */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; background: #0f172a; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 12.5px; box-shadow: 0 12px 30px -10px rgba(15,23,42,.55); animation: toastIn .22s ease; }
.toast.success { background: #065f46; }
.toast.error { background: #991b1b; }
.toast svg { width: 15px; height: 15px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* charts */
.chart-box { position: relative; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.monitor-stack { display: grid; gap: 16px; }
.legend { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.legend-item i { width: 8px; height: 8px; border-radius: 2px; }
.chart-tip { position: absolute; pointer-events: none; background: #0f172a; color: #fff; font-size: 11px; padding: 6px 9px; border-radius: 7px; transform: translate(-50%, -120%); white-space: nowrap; display: none; z-index: 5; }
.chart-guide { position: absolute; top: 18px; bottom: 28px; width: 0; border-left: 1px dashed rgba(79,70,229,.45); pointer-events: none; display: none; z-index: 4; }
.bw-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bw-controls .input { width: 142px; }
.bw-legend { display: flex; gap: 14px; margin-top: 8px; }
.bw-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; text-align: center; }
.bw-state-label { font-size: 13px; color: var(--muted); }
.bw-state-sub { font-size: 11.5px; color: var(--muted); }
.funds-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; margin-right: 8px; vertical-align: -7px; color: #fff; background: linear-gradient(135deg,#4f46e5,#7c3aed); box-shadow: 0 6px 14px -6px rgba(79,70,229,.7); }
.funds-badge svg { width: 14px; height: 14px; }
.funds-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fund-tile { position: relative; overflow: hidden; padding: 15px 16px; border-radius: 13px; border: 1px solid var(--line); background: #fff; transition: transform .16s, box-shadow .16s; }
.fund-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -16px rgba(15,23,42,.4); }
.fund-tile::after { content: ""; position: absolute; right: -30px; top: -36px; width: 96px; height: 96px; border-radius: 50%; opacity: .7; }
.fund-tile.indigo { background: linear-gradient(155deg,#eef2ff,#fff 72%); border-color: #e0e7ff; }
.fund-tile.indigo::after { background: radial-gradient(circle,#c7d2fe,transparent 70%); }
.fund-tile.cyan { background: linear-gradient(155deg,#ecfeff,#fff 72%); border-color: #cffafe; }
.fund-tile.cyan::after { background: radial-gradient(circle,#a5f3fc,transparent 70%); }
.fund-tile.violet { background: linear-gradient(155deg,#f5f3ff,#fff 72%); border-color: #ede9fe; }
.fund-tile.violet::after { background: radial-gradient(circle,#ddd6fe,transparent 70%); }
.fund-tile.rose { background: linear-gradient(155deg,#fff1f2,#fff 72%); border-color: #ffe4e6; }
.fund-tile.rose::after { background: radial-gradient(circle,#fecdd3,transparent 70%); }
.fund-tile.solid { background: linear-gradient(135deg,#312e81 0%,#4338ca 55%,#6366f1 100%); border-color: transparent; box-shadow: 0 14px 30px -18px rgba(67,56,202,.85); }
.fund-tile.solid::after { background: radial-gradient(circle,rgba(255,255,255,.22),transparent 70%); opacity: 1; }
.fund-tile-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; }
.fund-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #fff; box-shadow: 0 3px 8px -4px rgba(15,23,42,.25); }
.fund-ico svg { width: 14px; height: 14px; }
.fund-tile.indigo .fund-ico { color: #4338ca; }
.fund-tile.cyan .fund-ico { color: #0e7490; }
.fund-tile.violet .fund-ico { color: #7c3aed; }
.fund-tile.rose .fund-ico { color: #e11d48; }
.fund-label { font-size: 11.5px; color: var(--muted); }
.fund-value { position: relative; z-index: 1; margin-top: 13px; font-size: 24px; font-weight: 700; letter-spacing: -.7px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.fund-sub { position: relative; z-index: 1; margin-top: 6px; font-size: 11px; color: var(--muted); }
.fund-tile.solid .fund-ico { background: rgba(255,255,255,.18); color: #fff; box-shadow: none; }
.fund-tile.solid .fund-label, .fund-tile.solid .fund-sub { color: rgba(255,255,255,.72); }
.fund-tile.solid .fund-value { color: #fff; }
.funds-foot { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; padding: 10px 0; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line-2); }
.funds-foot span { display: flex; align-items: baseline; gap: 8px; padding: 2px 14px; border-left: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.funds-foot span:first-child { border-left: 0; padding-left: 16px; }
.funds-foot b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.funds-foot-note { margin-top: 8px; font-size: 11px; color: var(--muted); }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-wrap svg { flex: none; }
.donut-center { text-align: center; }
.donut-center b { display: block; font-size: 19px; letter-spacing: -.5px; }
.donut-center span { font-size: 10px; color: var(--muted); }
.donut-legend { flex: 1; min-width: 0; }
.donut-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 11.5px; }
.donut-row i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.donut-row .name { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-row b { font-variant-numeric: tabular-nums; font-weight: 600; }
.donut-row span { color: var(--muted); font-size: 10.5px; width: 42px; text-align: right; }

/* dashboard specifics */
.quick-list { display: flex; flex-direction: column; }
.quick-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.quick-item:last-child { border-bottom: 0; }
.quick-item .ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.quick-item .txt { flex: 1; min-width: 0; }
.quick-item .txt b { display: block; font-size: 12.5px; font-weight: 550; }
.quick-item .txt span { font-size: 10.5px; color: var(--muted); }
.quick-item .amt { text-align: right; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quick-item .amt span { display: block; font-size: 10px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* upstream cards */
.up-card { padding: 19px; }
.up-head { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
.up-logo { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.up-head .meta { flex: 1; min-width: 0; }
.up-head .meta b { display: block; font-size: 13.5px; margin-bottom: 3px; }
.up-head .meta span { font-size: 10.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-switches { display: flex; gap: 14px; padding: 10px 12px; background: #f8f9fc; border-radius: 9px; margin-bottom: 14px; }
.up-switch { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.up-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.up-stat span { font-size: 10.5px; color: var(--muted); display: block; margin-bottom: 3px; }
.up-stat b { font-size: 15px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.up-foot { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line); }
.rate-pill { margin-left: auto; font-size: 10.5px; color: var(--brand); background: var(--brand-soft); padding: 4px 8px; border-radius: 6px; font-weight: 600; }
.pt-alias { font-size: 11px; color: var(--muted); }
.pt-alias b { color: var(--ink-2); font-weight: 600; }

/* paitong api */
.pt-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.pt-stats.reconcile { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 10px; }
.pt-stats.reconcile .pt-stat { background: #f5f7ff; border-color: #e4e8ff; }
.pt-stats.reconcile .pt-stat b { color: var(--brand); }
@media (max-width: 1180px) { .pt-stats, .pt-stats.reconcile { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pt-stat { padding: 12px 14px; background: #f8f9fc; border: 1px solid var(--line); border-radius: 10px; }
.pt-stat span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }
.pt-stat b { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.pt-stat b small { font-size: 10.5px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.pt-stat .pt-time { font-size: 13px; letter-spacing: 0; }
.pt-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.pt-tip { font-size: 11px; color: var(--muted); margin-left: 4px; }
.pt-tasks { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 15px; padding-top: 13px; border-top: 1px dashed var(--line); min-height: 22px; }
.pt-task { font-size: 11px; color: var(--brand); background: var(--brand-soft); padding: 4px 9px; border-radius: 6px; font-weight: 600; }
.pt-empty { font-size: 11px; color: var(--muted); }

/* banners */
.banner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.banner-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.banner-img { height: 112px; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); position: relative; overflow: hidden; }
.banner-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner-img .tag { position: absolute; left: 10px; top: 10px; backdrop-filter: blur(4px); }
.banner-info { padding: 13px 14px; }
.banner-info b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.banner-info span { font-size: 10.5px; color: var(--muted); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner-foot { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--line-2); }
.banner-foot .time { font-size: 10px; color: var(--muted); flex: 1; }
.image-preview { margin-top: 8px; border: 1px dashed #d8deea; border-radius: 9px; height: 110px; display: grid; place-items: center; overflow: hidden; background: #f8f9fc; color: var(--muted); font-size: 11px; }
.image-preview img { width: 100%; height: 100%; object-fit: contain; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* login responsive */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main, .grid-bottom { grid-template-columns: 1fr; }
  .banner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: .25s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .content { padding: 18px; }
  .topbar { padding: 0 18px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .funds-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .funds-foot { grid-template-columns: 1fr; }
  .funds-foot span { border-left: 0; border-top: 1px solid var(--line); padding: 6px 16px; }
  .funds-foot span:first-child { border-top: 0; }
}
@media (max-width: 640px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .banner-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .schedule-grid { grid-template-columns: 1fr; }
  .toast-root { width: calc(100vw - 24px); }
  .toast { width: 100%; justify-content: center; }
}

/* 节点详情 */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; transition: color .15s; }
.back-link:hover { color: var(--brand); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.detail-name { display: flex; align-items: center; gap: 9px; font-size: 22px; font-weight: 700; letter-spacing: -.4px; }
.detail-desc { margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.detail-actions { display: flex; gap: 9px; }
.detail-user { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.detail-user .avatar-lg { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 700; }
.detail-user .name { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 7px; }
.detail-user .sub { margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.muted { color: var(--muted); font-weight: 400; }
@media (max-width: 700px) {
  .detail-actions { width: 100%; }
  .detail-actions .btn { flex: 1; }
}

/* 拨号信息（网络配置） */
.net-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.net-tabs button { border: 0; background: none; font-family: inherit; font-size: 12.5px; padding: 0 4px 10px; color: var(--muted); position: relative; cursor: pointer; }
.net-tabs button.active { color: var(--brand); font-weight: 600; }
.net-tabs button.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }
.net-nodeid { font-size: 12px; color: var(--muted); margin-bottom: 12px; word-break: break-all; }
.net-alert { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 10px 12px; font-size: 12px; margin-bottom: 12px; }
.net-nodeid .mono { color: var(--ink-2); }
.net-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.net-stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 10px 8px; text-align: center; }
.net-stat span { display: block; font-size: 10.5px; color: var(--muted); margin-bottom: 4px; white-space: nowrap; }
.net-stat b { font-size: 17px; color: var(--ink); font-variant-numeric: tabular-nums; }
.net-stat b.ok { color: #059669; }
.net-stat b.bad { color: #e11d48; }
.net-nic { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; margin-bottom: 8px; }
.net-nic-main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; flex-wrap: wrap; font-size: 12.5px; }
.net-nic-label { color: var(--muted); font-size: 11px; }
.net-nic-meta { color: var(--muted); font-size: 11.5px; }
.net-table { margin-top: 14px; }
.net-table table.data { font-size: 11.5px; }
.net-table table.data th, .net-table table.data td { padding: 9px 10px; vertical-align: top; }
.net-actions { display: flex; gap: 8px; margin-top: 18px; position: sticky; bottom: -30px; padding: 12px 0 4px; background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0)); }
.net-actions .btn { flex: 1; justify-content: center; }

/* 调整线路 */
.line-edit-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.line-edit-head .form-item { min-width: 200px; flex: 1; }
.line-edit-tools { display: flex; align-items: center; gap: 10px; }
.line-count { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.line-batch { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.line-batch-rule { margin-bottom: 8px; }
.line-batch-rule-title { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.line-batch-rule-desc { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.6; }
.line-batch textarea.input { min-height: 132px; background: #f5f6f8; border-color: #e6e9ef; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.9; }
.line-batch-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.line-batch-warn { color: #e11d48; font-size: 12px; }
.line-batch-btns { display: flex; gap: 8px; }
.line-edit-table table, .line-edit-table { font-size: 12px; }
.line-edit-table th, .line-edit-table td { padding: 8px 8px; vertical-align: middle; }
.line-edit-table .input { height: 30px; width: 100%; min-width: 90px; }
.line-del { width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: #e11d48; display: grid; place-items: center; cursor: pointer; transition: .16s; }
.line-del:hover { background: #fff1f2; border-color: #fecdd3; }
.line-del svg { width: 14px; height: 14px; }
.line-add { display: grid; grid-template-columns: 56px 1fr 1.2fr 1fr 1.4fr auto; align-items: center; gap: 8px; margin-top: 12px; padding: 10px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fbfcfe; }
.line-add .input { height: 32px; }
.line-add-ppp { font-size: 12px; color: var(--muted); }
@media (max-width: 760px) {
  .line-add { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .net-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .net-actions { flex-direction: column; }
}

/* 上游平台：切换式排版，避免整页长滚动 */
.up-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.up-tab { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; max-width: 420px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; font-family: inherit; text-align: left; transition: .16s; }
.up-tab:hover { border-color: #d5dbea; background: #fbfcff; }
.up-tab.active { border-color: var(--brand); background: #f7f8ff; box-shadow: 0 0 0 3px rgba(79,70,229,.08); }
.up-tab-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; }
.up-tab-ico svg { width: 16px; height: 16px; }
.up-tab-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.up-tab-main b { font-size: 13px; color: var(--ink); font-weight: 600; white-space: nowrap; }
.up-tab-main small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.up-tab-state { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; margin-left: auto; flex: none; }
.up-tab-state.on { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.up-panel[hidden] { display: none !important; }
@media (max-width: 760px) {
  .up-tab { flex-basis: 100%; max-width: none; }
}



/* ---------- 拨号线路：按网卡分块 ---------- */
.nic-block {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 14px 10px;
  margin-bottom: 14px;
  background: #fff;
}
.nic-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.nic-block-title { font-size: 15px; font-weight: 600; }
.nic-block-meta { color: var(--muted); font-weight: 400; }
.nic-block .line-add { margin-top: 8px; }
.nic-block-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

/* 图片灯箱 */
.img-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.86); display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 9999; cursor: zoom-out; }
.img-lightbox img { max-width: 92vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.img-lightbox-tip { margin-top: 14px; color: rgba(255,255,255,.75); font-size: 13px; }
