/* ============================================================
   中科融合算力网·个人算力网调度中心 — 全站样式（设计契约单一来源）
   tech-dark / mission-control
   ============================================================ */
:root {
  --bg: #060B16;
  --bg-soft: #0A1322;
  --surface: #0D1728;
  --surface-2: #111E33;
  --border: rgba(148, 190, 255, 0.10);
  --border-strong: rgba(148, 190, 255, 0.18);
  --text: #E8F1FF;
  --text-sub: #8CA3C7;
  --text-faint: #5B6E8F;
  --primary: #00D9FF;
  --primary-strong: #33E2FF;
  --primary-ink: #04121F;
  --primary-dim: rgba(0, 217, 255, 0.12);
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #FF6B6B;
  --violet: #A78BFA;
  --slate: #64748B;
  --sidebar-w: 236px;
  --topbar-h: 60px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-md: 0 8px 28px rgba(2, 8, 20, 0.55);
  --font-body: "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", "SF Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 620px 420px at 8% -6%, rgba(0, 190, 255, 0.07), transparent 62%),
    radial-gradient(ellipse 760px 520px at 100% 108%, rgba(60, 90, 220, 0.07), transparent 60%),
    linear-gradient(rgba(120, 180, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.035) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color .18s; }
a:hover { color: var(--primary-strong); }

::selection { background: rgba(0, 217, 255, 0.25); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(120, 160, 220, 0.18); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(120, 160, 220, 0.32); }

svg.ic { flex: none; vertical-align: -0.18em; }

/* ============ 布局骨架 ============ */
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w);
  background: linear-gradient(180deg, #0A1224 0%, #081020 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; z-index: 90;
}
.app-main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* 侧栏品牌 */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.brand__mark { width: 38px; height: 38px; flex: none; }
.brand__name { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; line-height: 1.3; }
.brand__sub { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.08em; }

/* 侧栏导航 */
.nav { flex: 1; overflow-y: auto; padding: 12px 12px 24px; }
.nav-group { font-size: 11px; color: var(--text-faint); letter-spacing: 0.14em; padding: 16px 12px 6px; font-weight: 600; }
.nav-group:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm); color: var(--text-sub); font-size: 13.5px;
  transition: all .18s var(--ease); position: relative; cursor: pointer;
}
.nav-item:hover { color: var(--text); background: rgba(120, 170, 255, 0.07); }
.nav-item.active { color: var(--primary); background: var(--primary-dim); font-weight: 600; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--primary); box-shadow: 0 0 8px rgba(0, 217, 255, 0.6);
}
.nav-item .ic { opacity: 0.85; }
.nav-item.active .ic { opacity: 1; }

/* 侧栏底部 */
.nav-foot { padding: 14px 18px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); }
.nav-foot .net { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }

/* ============ 顶栏 ============ */
.app-topbar {
  height: var(--topbar-h); position: sticky; top: 0; z-index: 80;
  display: flex; align-items: center; gap: 16px; padding: 0 24px;
  background: rgba(8, 15, 30, 0.82); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { font-size: 17px; font-weight: 700; letter-spacing: 0.02em; }
.topbar-spacer { flex: 1; }
.env-tag {
  font-size: 11px; font-family: var(--font-mono); color: var(--primary);
  border: 1px solid rgba(0, 217, 255, 0.35); background: var(--primary-dim);
  padding: 2px 10px; border-radius: 20px; letter-spacing: 0.05em;
}
.topbar-icon-btn {
  position: relative; width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--text-sub);
  cursor: pointer; transition: all .18s; background: transparent; border: none;
}
.topbar-icon-btn:hover { color: var(--text); background: rgba(120, 170, 255, 0.08); }
.topbar-icon-btn .badge {
  position: absolute; top: 5px; right: 5px; min-width: 15px; height: 15px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 3px; font-family: var(--font-mono);
}
/* 用户芯片与下拉 */
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 6px; border-radius: 24px; cursor: pointer; transition: background .18s; }
.user-chip:hover { background: rgba(120, 170, 255, 0.08); }
.user-chip__meta { line-height: 1.25; }
.user-chip__name { font-size: 13px; font-weight: 600; }
.user-chip__role { font-size: 11px; color: var(--text-faint); }
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px;
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: all .18s var(--ease); z-index: 120;
}
.dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-sub); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.dropdown-item:hover { color: var(--text); background: rgba(120, 170, 255, 0.08); }
.dropdown-item--danger:hover { color: var(--danger); background: rgba(255, 107, 107, 0.09); }
.dropdown-div { height: 1px; background: var(--border); margin: 5px 8px; }

/* 通知面板 */
.notice-panel { width: 320px; max-height: 380px; overflow-y: auto; }
.notice-head { padding: 9px 11px 7px; font-size: 13px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.notice-list { padding: 0 4px 4px; }
.notice-item { padding: 9px 8px; border-radius: var(--radius-sm); display: flex; gap: 9px; align-items: flex-start; transition: background .15s; }
.notice-item:hover { background: rgba(120, 170, 255, 0.06); }
.notice-item .lvl { margin-top: 3px; }
.notice-item__t { font-size: 12.5px; line-height: 1.45; }
.notice-item__m { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 2px; }

/* ============ 内容区 ============ */
.app-content { flex: 1; padding: 22px 24px 40px; max-width: 1560px; width: 100%; margin: 0 auto; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head__title { font-size: 20px; font-weight: 700; letter-spacing: 0.01em; }
.page-head__desc { font-size: 12.5px; color: var(--text-sub); margin-top: 3px; }
.page-head__actions { display: flex; gap: 10px; align-items: center; }

/* 网格 */
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-73 { display: grid; gap: 16px; grid-template-columns: 7fr 3fr; }
.grid-46 { display: grid; gap: 16px; grid-template-columns: 4fr 6fr; }

/* 卡片 */
.card {
  background: linear-gradient(180deg, rgba(17, 30, 51, 0.55), rgba(13, 23, 40, 0.9));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; transition: border-color .25s;
}
.card--hover:hover { border-color: rgba(0, 217, 255, 0.28); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; letter-spacing: 0.01em; }
.card-title .ic { color: var(--primary); }
.card-sub { font-size: 12px; color: var(--text-faint); }

/* 统计卡 */
.stat-card { position: relative; overflow: hidden; }
.stat-card::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 110px; height: 110px;
  border-radius: 50%; background: radial-gradient(circle, rgba(0, 217, 255, 0.08), transparent 70%);
}
.stat-card__label { font-size: 12.5px; color: var(--text-sub); display: flex; align-items: center; gap: 7px; }
.stat-card__label .ic { color: var(--primary); }
.stat-card__value { font-family: var(--font-mono); font-size: 27px; font-weight: 700; margin-top: 7px; letter-spacing: 0.01em; }
.stat-card__value small { font-size: 13px; font-weight: 500; color: var(--text-sub); margin-left: 3px; letter-spacing: 0; }
.stat-card__foot { font-size: 11.5px; color: var(--text-faint); margin-top: 5px; display: flex; align-items: center; gap: 5px; font-family: var(--font-mono); }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 13px; font-weight: 600; font-family: var(--font-body); cursor: pointer;
  transition: all .18s var(--ease); user-select: none; white-space: nowrap; background: transparent; color: var(--text);
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: linear-gradient(135deg, #22DDFF 0%, #0091FF 100%); color: var(--primary-ink);
  box-shadow: 0 2px 10px rgba(0, 180, 255, 0.25);
}
.btn--primary:hover { filter: brightness(1.1); box-shadow: 0 4px 16px rgba(0, 190, 255, 0.38); }
.btn--ghost { border-color: var(--border-strong); color: var(--text-sub); background: rgba(148, 190, 255, 0.04); }
.btn--ghost:hover { color: var(--text); border-color: rgba(148, 190, 255, 0.34); background: rgba(148, 190, 255, 0.09); }
.btn--danger { border-color: rgba(255, 107, 107, 0.4); color: var(--danger); background: rgba(255, 107, 107, 0.07); }
.btn--danger:hover { background: rgba(255, 107, 107, 0.16); }
.btn--danger--solid { background: linear-gradient(135deg, #FF7A7A, #E5484D); color: #FFF; box-shadow: 0 2px 10px rgba(229, 72, 77, 0.3); }
.btn--danger--solid:hover { filter: brightness(1.08); }
.btn--sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn--lg { height: 42px; font-size: 14px; padding: 0 26px; }
.btn--block { width: 100%; }
.btn.is-disabled, .btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.btn--link { padding: 0 4px; height: auto; color: var(--primary); font-size: 12.5px; font-weight: 500; }
.btn--link:hover { text-decoration: underline; }
.btn--link--danger { color: var(--danger); }
.btn--link--sub { color: var(--text-sub); }
.btn--link--sub:hover { color: var(--text); }
.btn .spinner { width: 14px; height: 14px; border: 2px solid rgba(4, 18, 31, 0.35); border-top-color: var(--primary-ink); border-radius: 50%; animation: spin .7s linear infinite; }

/* ============ 表格 ============ */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); background: rgba(10, 18, 34, 0.55); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.table th {
  text-align: left; font-size: 11.5px; color: var(--text-sub); font-weight: 600; letter-spacing: 0.08em;
  padding: 11px 14px; background: rgba(17, 30, 51, 0.6); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(148, 190, 255, 0.06); vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: rgba(120, 170, 255, 0.045); }
.table tbody tr:last-child td { border-bottom: none; }
.table .cell-main { font-weight: 600; color: var(--text); }
.table .cell-sub { font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 1px; }
.table .num { font-family: var(--font-mono); }
.table .cell-actions { white-space: nowrap; }
.table .cell-actions .btn--link { margin-right: 4px; }

/* 状态标签 */
.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 20px;
  font-size: 11.5px; font-weight: 500; white-space: nowrap; line-height: 1.6;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.tag--run { color: var(--primary); background: var(--primary-dim); }
.tag--run::before { box-shadow: 0 0 6px rgba(0, 217, 255, 0.8); animation: pulse 1.6s ease-in-out infinite; }
.tag--idle { color: var(--success); background: rgba(52, 211, 153, 0.12); }
.tag--off { color: var(--slate); background: rgba(100, 116, 139, 0.14); }
.tag--maintain { color: var(--warning); background: rgba(251, 191, 36, 0.12); }
.tag--ok { color: var(--success); background: rgba(52, 211, 153, 0.12); }
.tag--warn { color: var(--warning); background: rgba(251, 191, 36, 0.12); }
.tag--err { color: var(--danger); background: rgba(255, 107, 107, 0.12); }
.tag--info { color: var(--primary); background: var(--primary-dim); }
.tag--violet { color: var(--violet); background: rgba(167, 139, 250, 0.13); }
.tag--slate { color: var(--text-sub); background: rgba(140, 163, 199, 0.1); }
.tag--plain::before { display: none; }

/* 进度条 */
.progress { width: 100%; height: 7px; border-radius: 4px; background: rgba(120, 160, 220, 0.12); overflow: hidden; min-width: 72px; }
.progress__bar { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #0BA5CC, #00D9FF); transition: width .6s var(--ease); }
.progress__bar--green { background: linear-gradient(90deg, #149A6E, #34D399); }
.progress__bar--amber { background: linear-gradient(90deg, #C79115, #FBBF24); }
.progress__bar--red { background: linear-gradient(90deg, #D95454, #FF8585); }
.progress-row { display: flex; align-items: center; gap: 8px; }
.progress-row .num { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-sub); min-width: 34px; text-align: right; }

/* 分页 */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px 0; flex-wrap: wrap; }
.pager__info { font-size: 12px; color: var(--text-faint); font-family: var(--font-mono); }
.pager__btns { display: flex; gap: 5px; }
.pager-btn {
  min-width: 29px; height: 29px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--border);
  background: transparent; color: var(--text-sub); font-size: 12.5px; font-family: var(--font-mono);
  cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; justify-content: center;
}
.pager-btn:hover:not(.is-disabled):not(.active) { color: var(--text); border-color: var(--border-strong); }
.pager-btn.active { color: var(--primary); border-color: rgba(0, 217, 255, 0.45); background: var(--primary-dim); font-weight: 700; }
.pager-btn.is-disabled { opacity: 0.35; cursor: not-allowed; }

/* ============ 工具条 / 搜索 ============ */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar__spacer { flex: 1; }
.search-box { position: relative; }
.search-box .ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); pointer-events: none; }
.search-box .input { padding-left: 32px; width: 240px; }

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-sub); font-weight: 500; }
.field > label .req { color: var(--danger); margin-left: 3px; }
.field__hint { font-size: 11.5px; color: var(--text-faint); }
.field__err { font-size: 11.5px; color: var(--danger); display: none; }
.field.has-err .field__err { display: block; }
.field.has-err .input, .field.has-err .select, .field.has-err .textarea { border-color: rgba(255, 107, 107, 0.55); }

.input, .select, .textarea {
  width: 100%; background: rgba(6, 12, 24, 0.7); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); color: var(--text); font-size: 13px; font-family: var(--font-body);
  padding: 8px 12px; height: 36px; transition: all .18s; outline: none;
}
.textarea { height: auto; min-height: 76px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { border-color: rgba(0, 217, 255, 0.5); box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1); background: rgba(6, 12, 24, 0.95); }
.input::placeholder, .textarea::placeholder { color: var(--text-faint); }
.select { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238CA3C7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select option { background: #101B30; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .field--full { grid-column: 1 / -1; }

/* 单选 / 复选 */
.radio-group { display: flex; gap: 18px; flex-wrap: wrap; }
.radio, .checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 13px; color: var(--text-sub); transition: color .15s; }
.radio:hover, .checkbox:hover { color: var(--text); }
.radio input, .checkbox input { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.radio--card { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 9px 13px; transition: all .15s; }
.radio--card:hover { border-color: rgba(0, 217, 255, 0.35); }
.radio--card:has(input:checked) { border-color: rgba(0, 217, 255, 0.55); background: var(--primary-dim); color: var(--text); }

/* 开关 */
.switch { position: relative; width: 38px; height: 21px; display: inline-block; cursor: pointer; flex: none; }
.switch input { display: none; }
.switch__track { position: absolute; inset: 0; border-radius: 12px; background: rgba(120, 160, 220, 0.2); transition: background .2s; }
.switch__track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 15px; height: 15px; border-radius: 50%; background: #9FB4D8; transition: all .2s var(--ease); }
.switch input:checked + .switch__track { background: rgba(0, 217, 255, 0.5); }
.switch input:checked + .switch__track::after { left: 20px; background: #fff; box-shadow: 0 0 8px rgba(0, 217, 255, 0.8); }

/* ============ 弹窗 / 抽屉 / 轻提示 ============ */
.modal-mask, .drawer-mask {
  position: fixed; inset: 0; background: rgba(3, 7, 16, 0.66); backdrop-filter: blur(3px);
  z-index: 200; opacity: 0; transition: opacity .22s; display: flex;
}
.modal-mask { align-items: flex-start; justify-content: center; padding: 7vh 20px 20px; overflow-y: auto; }
.modal-mask.is-open, .drawer-mask.is-open { opacity: 1; }
.modal {
  width: 100%; background: #0E1A2E; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6); transform: translateY(-14px) scale(0.985); transition: transform .24s var(--ease);
  display: flex; flex-direction: column; max-height: 84vh;
}
.modal-mask.is-open .modal { transform: translateY(0) scale(1); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 13px; border-bottom: 1px solid var(--border); }
.modal__title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.modal__body { padding: 18px 20px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px 18px; border-top: 1px solid var(--border); }
.modal__close { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-sub); cursor: pointer; transition: all .15s; background: transparent; border: none; }
.modal__close:hover { color: var(--text); background: rgba(255, 107, 107, 0.12); }

.drawer-mask { justify-content: flex-end; align-items: stretch; }
.drawer {
  width: 460px; max-width: 92vw; background: #0E1A2E; border-left: 1px solid var(--border-strong);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.55); display: flex; flex-direction: column;
  transform: translateX(60px); opacity: 0.6; transition: all .26s var(--ease);
}
.drawer-mask.is-open .drawer { transform: translateX(0); opacity: 1; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.drawer__title { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.drawer__body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.drawer__foot { padding: 14px 20px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

#toast-root { position: fixed; top: 18px; right: 18px; z-index: 400; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 9px; min-width: 230px; max-width: 380px;
  background: #10203A; border: 1px solid var(--border-strong); border-left: 3px solid var(--success);
  border-radius: var(--radius-sm); padding: 11px 15px; font-size: 13px; box-shadow: var(--shadow-md);
  animation: toastIn .3s var(--ease); pointer-events: auto;
}
.toast--error { border-left-color: var(--danger); }
.toast--warning { border-left-color: var(--warning); }
.toast--info { border-left-color: var(--primary); }
.toast .ic { flex: none; }
.toast--success .ic { color: var(--success); }
.toast--error .ic { color: var(--danger); }
.toast--warning .ic { color: var(--warning); }
.toast--info .ic { color: var(--primary); }
.toast.is-out { animation: toastOut .25s var(--ease) forwards; }

/* ============ 杂项组件 ============ */
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--text-faint); }
.kv dd { color: var(--text); word-break: break-all; }
.kv dd .num { font-family: var(--font-mono); }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--primary-ink);
  background: linear-gradient(135deg, #22DDFF, #5B8DEF);
}
.avatar--lg { width: 44px; height: 44px; font-size: 17px; }
.avatar--violet { background: linear-gradient(135deg, #C4B5FD, #7C5CE0); }
.avatar--green { background: linear-gradient(135deg, #6EE7B7, #10B981); }
.avatar--amber { background: linear-gradient(135deg, #FDE68A, #F59E0B); }

.empty { text-align: center; padding: 44px 20px; color: var(--text-faint); }
.empty .ic { opacity: 0.5; margin-bottom: 10px; }
.empty__t { font-size: 13px; }

.skeleton { position: relative; overflow: hidden; background: rgba(120, 160, 220, 0.09); border-radius: 7px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(200, 225, 255, 0.07), transparent);
  animation: shimmer 1.4s infinite;
}

.timeline { display: flex; flex-direction: column; gap: 2px; }
.timeline-item { display: flex; gap: 11px; padding: 8px 2px; animation: slideIn .35s var(--ease); }
.timeline-item__dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--primary); box-shadow: 0 0 8px rgba(0, 217, 255, 0.7); }
.timeline-item__dot--green { background: var(--success); box-shadow: 0 0 8px rgba(52, 211, 153, 0.6); }
.timeline-item__dot--amber { background: var(--warning); box-shadow: 0 0 8px rgba(251, 191, 36, 0.6); }
.timeline-item__dot--red { background: var(--danger); box-shadow: 0 0 8px rgba(255, 107, 107, 0.6); }
.timeline-item__t { font-size: 12.5px; line-height: 1.5; }
.timeline-item__t b { color: var(--primary); font-weight: 600; }
.timeline-item__m { font-size: 11px; color: var(--text-faint); font-family: var(--font-mono); margin-top: 1px; }

.alert-banner {
  display: flex; gap: 9px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.55; border: 1px solid;
}
.alert-banner .ic { flex: none; margin-top: 2px; }
.alert-banner--warn { color: #FBD98A; background: rgba(251, 191, 36, 0.08); border-color: rgba(251, 191, 36, 0.25); }
.alert-banner--warn .ic { color: var(--warning); }
.alert-banner--err { color: #FFA5A5; background: rgba(255, 107, 107, 0.08); border-color: rgba(255, 107, 107, 0.28); }
.alert-banner--err .ic { color: var(--danger); }
.alert-banner--info { color: #9FDCEF; background: var(--primary-dim); border-color: rgba(0, 217, 255, 0.25); }
.alert-banner--info .ic { color: var(--primary); }

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.5s ease-in-out infinite; box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }

/* 图表容器 */
.chart-box { width: 100%; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); }
.chart-legend__item { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend__swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.chart-svg text { font-family: var(--font-mono); font-size: 10px; fill: var(--text-faint); }
.chart-line-anim { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: draw 1.4s var(--ease) forwards; }

/* ============ 登录页 ============ */
.login-page { display: flex; min-height: 100vh; }
.login-hero {
  flex: 1.15; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 52px 56px; background:
    radial-gradient(ellipse 700px 500px at 20% 15%, rgba(0, 190, 255, 0.09), transparent 60%),
    radial-gradient(ellipse 600px 600px at 85% 90%, rgba(60, 90, 220, 0.1), transparent 55%),
    linear-gradient(rgba(120, 180, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.04) 1px, transparent 1px);
  background-size: auto, auto, 56px 56px, 56px 56px;
  border-right: 1px solid var(--border);
}
.login-hero__brand { display: flex; align-items: center; gap: 13px; }
.login-hero__mark { width: 46px; height: 46px; }
.login-hero__name { font-size: 19px; font-weight: 700; line-height: 1.35; }
.login-hero__sub { font-size: 12px; color: var(--text-sub); font-family: var(--font-mono); letter-spacing: 0.1em; }
.login-hero__title { font-size: 30px; font-weight: 700; line-height: 1.4; letter-spacing: 0.01em; }
.login-hero__title em { font-style: normal; color: var(--primary); text-shadow: 0 0 24px rgba(0, 217, 255, 0.4); }
.login-hero__desc { color: var(--text-sub); font-size: 13.5px; margin-top: 14px; max-width: 430px; line-height: 1.85; }
.login-hero__stats { display: flex; gap: 44px; }
.login-hero__stat .v { font-family: var(--font-mono); font-size: 24px; font-weight: 700; color: var(--text); }
.login-hero__stat .v small { font-size: 12px; color: var(--text-sub); font-weight: 400; margin-left: 2px; }
.login-hero__stat .l { font-size: 12px; color: var(--text-faint); margin-top: 3px; }
.login-hero__net { position: absolute; inset: 0; opacity: 0.55; pointer-events: none; }
.login-hero__foot { position: relative; font-size: 11.5px; color: var(--text-faint); font-family: var(--font-mono); letter-spacing: 0.05em; }

.login-panel { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.login-card { width: 400px; max-width: 100%; }
.login-card__title { font-size: 22px; font-weight: 700; }
.login-card__sub { font-size: 13px; color: var(--text-sub); margin: 6px 0 26px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-canvas { width: 108px; height: 36px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); cursor: pointer; flex: none; background: rgba(6, 12, 24, 0.7); }
.login-aux { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 20px; }
.demo-tip {
  margin-top: 22px; padding: 11px 14px; border-radius: var(--radius-sm); font-size: 12px;
  color: #9FDCEF; background: var(--primary-dim); border: 1px dashed rgba(0, 217, 255, 0.3);
  display: flex; align-items: center; gap: 9px; justify-content: space-between; flex-wrap: wrap;
}
.demo-tip code { font-family: var(--font-mono); color: var(--primary); font-size: 12px; }

/* ============ 动画 ============ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.reveal { animation: fadeUp .5s var(--ease) both; }
.reveal-1 { animation-delay: .05s; } .reveal-2 { animation-delay: .12s; } .reveal-3 { animation-delay: .19s; }
.reveal-4 { animation-delay: .26s; } .reveal-5 { animation-delay: .33s; } .reveal-6 { animation-delay: .40s; }
@keyframes typing { from { opacity: 0; } to { opacity: 1; } }
.typing-chunk { animation: typing .12s linear both; }
@keyframes blink { 50% { opacity: 0; } }
.cursor-blink::after { content: "▍"; color: var(--primary); animation: blink 1s step-end infinite; }

/* ============ 聚合平台 · API 接入信息 / 代码块 ============ */
.kv-item { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(8,15,30,.45); }
.kv-item__l { font-size: 12px; color: var(--text-faint); margin-bottom: 7px; letter-spacing: .04em; }
.kv-item__v { font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.code-block {
  margin: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(6,11,22,.72); font-family: var(--font-mono); font-size: 12.5px; line-height: 1.75;
  color: var(--text-sub); overflow: auto; max-height: 420px; white-space: pre;
}
.code-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 8px 10px; }
.code-foot > span { font-size: 12px; color: var(--text-faint); }

/* ============ 响应式 ============ */
@media (max-width: 1280px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-73, .grid-46 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 66px; }
  .brand__name, .brand__sub, .nav-group, .nav-item span, .nav-foot { display: none; }
  .brand { justify-content: center; padding: 16px 8px; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
  .login-hero { display: none; }
  .login-panel { flex: 1; }
}
@media (max-width: 768px) {
  .cols-2, .cols-3, .cols-4, .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; }
  .app-content { padding: 16px 14px 32px; }
  .app-topbar { padding: 0 14px; }
  .search-box .input { width: 158px; }
  .login-page { flex-direction: column; }
  .login-hero { display: flex; flex: none; padding: 34px 26px; min-height: 0; gap: 24px; }
  .login-hero__title { font-size: 22px; }
  .login-hero__stats { gap: 26px; }
}
