:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f8fafd;
  --ink: #162033;
  --ink-2: #516078;
  --ink-3: #8b97ab;
  --line: #e4eaf3;
  --line-2: #eef2f8;
  --primary: #2f6ff5;
  --primary-2: #1d5be0;
  --primary-soft: #eaf1ff;
  --cyan: #12b8c8;
  --green: #16a56a;
  --green-soft: #e9f8f1;
  --amber: #e39a19;
  --amber-soft: #fff7e7;
  --red: #e04747;
  --red-soft: #fff0f0;
  --violet: #7b61ff;
  --sidebar: #0b1424;
  --sidebar-2: #0f1a2d;
  --sidebar-ink: #9fb0c9;
  --shadow: 0 10px 30px rgba(17, 34, 64, .06);
  --shadow-lg: 0 24px 70px rgba(13, 27, 51, .18);
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}
a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }

/* Boot */
.boot {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--sidebar); color: #fff; z-index: 90; gap: 16px;
}
.boot-logo, .brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 800; letter-spacing: -.5px;
  color: #fff; background: linear-gradient(135deg, #3d7bff, #16b8c9);
  box-shadow: 0 8px 22px rgba(47, 111, 245, .35);
}
.boot-logo { width: 58px; height: 58px; font-size: 20px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 12px; object-fit: cover;
  box-shadow: 0 8px 22px rgba(47, 111, 245, .35); flex: 0 0 auto;
}
.brand-logo.small { width: 36px; height: 36px; border-radius: 10px; }
img.boot-logo { border-radius: 16px; object-fit: cover; }
.boot-text { color: #9fb0c9; font-size: 13px; letter-spacing: .4px; }

/* Login */
.login-page {
  min-height: 100%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1000px 600px at 15% 0%, #17315c 0%, #0b1424 55%, #080f1b 100%);
  position: relative; overflow: hidden; padding: 24px;
}
.login-glow { position: absolute; border-radius: 999px; filter: blur(70px); opacity: .5; pointer-events: none; }
.login-glow-a { width: 520px; height: 520px; background: #1f5eff; left: -160px; top: -120px; }
.login-glow-b { width: 420px; height: 420px; background: #0db6c9; right: -120px; bottom: -140px; opacity: .35; }
.login-card {
  position: relative; width: 420px; max-width: 100%; background: rgba(255, 255, 255, .98);
  border-radius: 20px; padding: 34px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.4);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.login-card .brand {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 10px;
}
.login-card .brand > div { text-align: center; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.2px; }
.brand-sub { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.login-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.4px; text-align: center; }
.login-card > p { margin: 0 0 26px; font-size: 13px; text-align: center; }
.login-foot { margin-top: 22px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink-3); font-size: 12px; }
.login-card .field { flex-direction: row; align-items: center; gap: 12px; }
.login-card .field > span {
  flex: 0 0 46px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  text-align: right;
}
.login-card .field input { flex: 1 1 0; width: auto; min-width: 0; }
.login-card .captcha-row { flex: 1 1 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.login-card .captcha-row input { flex: 1 1 0; width: auto; min-width: 0; }
.login-card .captcha-img {
  flex: 0 0 112px; width: 112px; height: 38px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; object-fit: cover;
}

/* App shell */
.app { display: flex; min-height: 100%; }
.sidebar {
  width: 238px; flex: 0 0 238px; background: var(--sidebar); color: var(--sidebar-ink);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; }
.brand-mark.small { width: 36px; height: 36px; border-radius: 10px; font-size: 13px; }
.side-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.side-brand-text strong { color: #fff; font-size: 15px; letter-spacing: .1px; }
.side-brand-text span { font-size: 11px; color: #6f829e; margin-top: 3px; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px;
  color: var(--sidebar-ink); font-size: 13.5px; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.05); color: #e6eefb; }
.nav a.active { background: linear-gradient(90deg, rgba(47,111,245,.22), rgba(47,111,245,.08)); color: #fff; box-shadow: inset 2px 0 0 #4d86ff; }
.nav-ico { width: 18px; height: 18px; display: inline-flex; opacity: .9; }
.nav-ico svg { width: 18px; height: 18px; }
.side-foot { margin-top: auto; padding: 16px 20px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.side-health { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8fa2bd; }
.side-version { font-size: 11px; color: #53657f; margin-top: 7px; font-family: var(--mono); }
.main-wrap { flex: 1; min-width: 0; margin-left: 238px; display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  height: 72px; flex: 0 0 72px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; background: rgba(255,255,255,.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.page-head { flex: 1; min-width: 0; }
.page-head h1 { margin: 0; font-size: 20px; letter-spacing: -.35px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 8px; position: relative; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; color: var(--ink-2); transition: .15s;
}
.icon-btn:hover { border-color: #cdd8e9; background: var(--panel-2); color: var(--ink); }
.icon-btn svg { width: 17px; height: 17px; }
.menu-btn { display: none; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 5px 9px 5px 5px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; user-select: none;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #2f6ff5, #12b8c8);
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700;
}
.user-name { font-size: 13px; font-weight: 600; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron svg { width: 13px; height: 13px; color: var(--ink-3); }
.user-menu {
  position: absolute; right: 0; top: 48px; width: 160px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50;
}
.user-menu button {
  width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent;
  border-radius: 7px; color: var(--ink-2); font-size: 13px;
}
.user-menu button:hover { background: var(--panel-2); color: var(--ink); }
.danger-text { color: var(--red) !important; }

.content { padding: 24px 28px 40px; width: 100%; max-width: 1500px; margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 600; transition: .15s;
  white-space: nowrap;
}
.btn:hover { border-color: #c9d5e7; color: var(--ink); background: var(--panel-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(47,111,245,.2); }
.btn-primary:hover { background: var(--primary-2); border-color: var(--primary-2); color: #fff; }
.btn-danger { background: #fff; border-color: #f2c9c9; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); border-color: #eab0b0; color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-3); }
.btn-ghost:hover { background: var(--panel-2); color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; height: 42px; }
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn .spin { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { margin: 0; font-size: 15px; letter-spacing: -.15px; }
.card-head p { margin: 4px 0 0; color: var(--ink-3); font-size: 12px; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.stat { padding: 20px; position: relative; overflow: hidden; }
.stat::after {
  content: ""; position: absolute; right: -28px; top: -32px; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,111,245,.1), transparent 70%);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink-3); font-size: 12px; }
.stat-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.stat-ico svg { width: 19px; height: 19px; }
.stat-ico.green { background: var(--green-soft); color: var(--green); }
.stat-ico.amber { background: var(--amber-soft); color: var(--amber); }
.stat-ico.red { background: var(--red-soft); color: var(--red); }
.stat-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; margin: 12px 0 2px; }
.stat-value small { font-size: 13px; color: var(--ink-3); font-weight: 500; letter-spacing: 0; }
.stat-sub { color: var(--ink-3); font-size: 12px; }
.stat-sub strong { color: var(--green); font-weight: 600; }

/* Table */
.table-wrap { overflow: auto; }
table { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 13px; }
th:first-child, td:first-child { min-width: 170px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--ink-3); font-weight: 600; padding: 13px 16px; background: var(--panel-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
th:last-child, td:last-child { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 14px rgba(17, 34, 64, .04); }
th:last-child { background: var(--panel-2); }
tbody tr:hover td:last-child { background: #fbfcfe; }
@media (max-width: 1300px) {
  /* On small screens the table scrolls horizontally; a sticky action column
     would cover the data columns instead of helping. */
  th:last-child, td:last-child { position: static; box-shadow: none; }
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.cell-main { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.cell-sub { color: var(--ink-3); font-size: 12px; margin-top: 3px; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.empty { padding: 54px 20px; text-align: center; color: var(--ink-3); }
.empty-ico { width: 54px; height: 54px; border-radius: 16px; background: var(--panel-2); display: grid; place-items: center; margin: 0 auto 12px; color: #a8b5c8; }
.empty-ico svg { width: 26px; height: 26px; }
.empty h3 { margin: 0 0 6px; color: var(--ink-2); font-size: 14px; }
.empty p { margin: 0 0 16px; font-size: 12.5px; }

/* Status */
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 23px; padding: 0 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.pill-green { background: var(--green-soft); color: #0f8b58; }
.pill-blue { background: var(--primary-soft); color: #245fd1; }
.pill-amber { background: var(--amber-soft); color: #a86c08; }
.pill-red { background: var(--red-soft); color: #c43b3b; }
.pill-gray { background: #f1f4f9; color: #6e7c92; }
.pill-violet { background: #f1eeff; color: #6448dc; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.dot-green { background: var(--green); box-shadow: 0 0 0 3px rgba(22,165,106,.12); }
.dot-red { background: var(--red); box-shadow: 0 0 0 3px rgba(224,71,71,.12); }
.dot-amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(227,154,25,.14); }
.dot-gray { background: #aab6c8; }

/* Chips / meta */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink-2); font-size: 11.5px; }
.chip.blue { background: var(--primary-soft); border-color: #dbe7ff; color: #2a61cf; }
.chip.mono { font-family: var(--mono); font-size: 11px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--ink-3); }
.kv strong { font-weight: 600; text-align: right; }

/* Chart */
.chart-wrap { position: relative; height: 260px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.chart-legend { display: flex; gap: 18px; align-items: center; font-size: 12px; color: var(--ink-3); }
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-swatch { width: 10px; height: 3px; border-radius: 2px; background: var(--primary); }
.legend-swatch.tx { background: var(--cyan); }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 13px; }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; min-width: 240px;
}
.search svg { width: 16px; height: 16px; color: var(--ink-3); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); }
.select, .input {
  height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 0 11px;
  color: var(--ink); outline: none; min-width: 120px;
}
.select:focus, .input:focus, textarea:focus { border-color: #a9c2f8; box-shadow: 0 0 0 3px rgba(47,111,245,.1); }
textarea.input { height: auto; min-height: 80px; padding: 10px 11px; resize: vertical; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }
.field input, .field select, .field textarea {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; padding: 0 11px;
  background: #fff; color: var(--ink); outline: none; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #a9c2f8; box-shadow: 0 0 0 3px rgba(47,111,245,.1); }
.field textarea { height: auto; min-height: 76px; padding: 10px 11px; resize: vertical; }
.code-row { display: flex; align-items: center; gap: 8px; }
.code-row input { flex: 1 1 0; min-width: 0; }
.code-row .btn { flex: 0 0 auto; white-space: nowrap; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.check-card { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 12.5px; }
.check-card:hover { border-color: #cdd9eb; background: var(--panel-2); }
.check-card input { margin-top: 2px; accent-color: var(--primary); }
.form-error { background: var(--red-soft); color: #c43b3b; border: 1px solid #f5d1d1; border-radius: 8px; padding: 9px 11px; font-size: 12.5px; margin-bottom: 13px; }
.form-section { border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 16px; }
.form-section h3 { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.repeater { display: flex; flex-direction: column; gap: 8px; }
.repeater-row { display: grid; grid-template-columns: 1fr 1fr 1fr 32px; gap: 8px; align-items: center; }
.repeater-row.peer { grid-template-columns: 1.3fr .7fr 1fr .6fr .6fr 32px; }
.repeater-row .input { min-width: 0; }
.repeater-del { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-3); }
.repeater-del:hover { color: var(--red); border-color: #f0c5c5; background: var(--red-soft); }

/* Modal */
.modal-mask {
  position: fixed; inset: 0; background: rgba(8, 15, 27, .46); backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 5vh 20px; overflow: auto;
}
.modal {
  width: 580px; max-width: 100%; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  animation: modal-in .18s ease-out; overflow: hidden;
}
.modal.wide { width: 760px; }
@keyframes modal-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { padding: 20px 22px 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.modal-head h2 { margin: 0; font-size: 17px; letter-spacing: -.2px; }
.modal-head p { margin: 5px 0 0; font-size: 12.5px; color: var(--ink-3); }
.modal-close { border: 0; background: transparent; color: var(--ink-3); width: 30px; height: 30px; border-radius: 8px; font-size: 20px; line-height: 1; }
.modal-close:hover { background: var(--panel-2); color: var(--ink); }
.modal-body { padding: 6px 22px 20px; max-height: 68vh; overflow: auto; }
.modal-foot { padding: 14px 22px; background: var(--panel-2); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.confirm-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; margin: 6px 0 4px; }
.code-box {
  background: #0d1728; color: #cfe1ff; border-radius: 10px; padding: 14px; font-family: var(--mono);
  font-size: 11.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-all; position: relative;
}
.copy-row { display: flex; gap: 8px; margin-top: 10px; }

/* Toast */
.toast-root { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 9px; }
.toast {
  min-width: 260px; max-width: 420px; background: #101b2e; color: #eaf1fb; border-radius: 10px;
  padding: 12px 14px; font-size: 13px; box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08);
  animation: toast-in .2s ease-out;
}
.toast.error { background: #3b1418; border-color: #6b242b; }
.toast.success { background: #0d2a1f; border-color: #1d5d43; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Misc */
.banner {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px;
  background: var(--amber-soft); border: 1px solid #f5e0b5; color: #8b5c07; font-size: 12.5px;
  margin-bottom: 16px; line-height: 1.6;
}
.banner.blue { background: var(--primary-soft); border-color: #d9e5ff; color: #245fd1; }
.banner strong { font-weight: 700; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 12px; }
.section-title h2 { font-size: 16px; margin: 0; letter-spacing: -.2px; }
.section-title p { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.list-item { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.list-item:last-child { border-bottom: 0; }
.list-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--ink-2); flex: 0 0 auto; }
.list-ico svg { width: 17px; height: 17px; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-time { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.event-row { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.event-row:last-child { border-bottom: 0; }
.event-sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex: 0 0 auto; }
.event-body { flex: 1; min-width: 0; }
.event-msg { font-size: 12.8px; color: var(--ink-2); line-height: 1.55; }
.event-meta { font-size: 11px; color: var(--ink-3); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.sev-info { background: #9db0ca; }
.sev-warning { background: var(--amber); }
.sev-critical { background: var(--red); box-shadow: 0 0 0 3px rgba(224,71,71,.12); }
.progress { height: 6px; background: #edf1f7; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2f6ff5, #12b8c8); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.help { color: var(--ink-3); font-size: 12px; line-height: 1.65; }
.help code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-family: var(--mono); font-size: 11px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 99px; background: #d8e0ec; transition: .2s; flex: 0 0 auto; }
.switch-track.on { background: var(--primary); }
.switch-track::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch-track.on::after { left: 19px; }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .main-wrap { margin-left: 0; }
  .menu-btn { display: inline-grid; }
  .content { padding: 18px 16px 32px; }
  .topbar { padding: 0 16px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .user-name { display: none; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
  .page-head p { display: none; }
  .toolbar .search { min-width: 100%; }
  .modal-mask { padding: 10px; align-items: flex-start; }
  .modal { max-height: calc(100vh - 20px); }
  .repeater-row, .repeater-row.peer { grid-template-columns: 1fr 1fr; }
}

/* ------------------------------------------------------------------ */
/* 兔兔盾 console additions                                            */
/* ------------------------------------------------------------------ */

.login-register { margin-top: 18px; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; }
.login-register button { border: 0; background: transparent; color: var(--primary); font-weight: 600; padding: 0; }
.login-register button:hover { color: var(--primary-2); }
.nav-section { padding: 18px 12px 8px; font-size: 10.5px; letter-spacing: .8px; color: #52657f; text-transform: uppercase; }
.nav { overflow-y: auto; }
.nav-badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font-size: 10px; display: inline-grid; place-items: center; }
.nav a { position: relative; }
.console-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(120deg, #0f1f3b 0%, #173b6b 55%, #0e6170 100%); color: #fff; margin-bottom: 16px;
  box-shadow: 0 16px 40px rgba(15, 31, 59, .18); overflow: hidden;
}
.console-hero h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.3px; }
.console-hero p { margin: 0; color: #b5c8e2; font-size: 12.5px; }
.console-hero .hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.console-hero .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.console-hero .btn:hover { background: rgba(255,255,255,.18); }
.console-hero .btn-primary { background: #fff; border-color: #fff; color: #14325d; }

.instance-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.instance-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; position: relative;
  box-shadow: var(--shadow); transition: .18s; cursor: pointer; min-width: 0;
}
.instance-card:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(17, 34, 64, .1); border-color: #cdd9eb; }
.card-badge { position: absolute; right: 14px; top: 14px; }
.card-header { display: flex; align-items: center; gap: 11px; padding-right: 76px; }
.instance-avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #eaf1ff, #e7fbfd); color: var(--primary); display: grid; place-items: center; flex: 0 0 auto; }
.instance-avatar svg { width: 21px; height: 21px; }
.instance-title { min-width: 0; }
.instance-name { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.instance-game { margin-top: 3px; color: var(--ink-3); font-size: 11.5px; }
.instance-package { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 11.5px; }
.package-name { padding: 3px 8px; border-radius: 6px; background: var(--primary-soft); color: #2a61cf; font-weight: 600; }
.expire { color: var(--ink-3); font-size: 11px; }
.instance-node { margin-top: 10px; color: var(--ink-2); font-size: 11.5px; display: flex; align-items: center; gap: 7px; }
.instance-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line-2); }
.instance-stats .stat { padding: 0; text-align: center; overflow: visible; }
.instance-stats .stat::after { display: none; }
.instance-stats .stat-val { display: block; font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.instance-stats .stat span:last-child { color: var(--ink-3); font-size: 10.5px; }
.renew-hint { margin-top: 11px; padding: 7px 9px; border-radius: 7px; background: var(--amber-soft); color: #9a6408; font-size: 11px; }
.instance-card-actions { display: flex; gap: 5px; margin-top: 14px; flex-wrap: wrap; }
.instance-card-actions .btn { flex: 1; min-width: 54px; }
.instance-add-card {
  min-height: 280px; border: 1.5px dashed #cbd8ea; border-radius: 16px; background: #fbfcff; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; transition: .18s;
}
.instance-add-card:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.instance-add-card .add-icon { width: 42px; height: 42px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 4px; }
.instance-add-card strong { color: var(--ink-2); font-size: 13.5px; }
.instance-add-card span:last-child { font-size: 11.5px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.plan-card { border: 1.5px solid var(--line); border-radius: 11px; padding: 12px; cursor: pointer; position: relative; transition: .15s; background: #fff; }
.plan-card:hover { border-color: #b9c9e4; }
.plan-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(47,111,245,.1); background: #fbfdff; }
.plan-card.disabled { opacity: .55; cursor: not-allowed; background: #f7f9fc; }
.plan-card.disabled:hover { border-color: var(--line); }
.plan-card input { position: absolute; opacity: 0; pointer-events: none; }
.plan-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.plan-card-head strong { font-size: 13px; }
.plan-price { font-size: 23px; font-weight: 800; letter-spacing: -.8px; margin: 7px 0; }
.plan-price small { font-size: 11px; color: var(--ink-3); font-weight: 400; letter-spacing: 0; }
.plan-quotas { display: flex; flex-wrap: wrap; gap: 5px; }
.plan-quotas span { font-size: 10.5px; color: var(--ink-2); background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 5px; }
.plan-desc { color: var(--ink-3); font-size: 10.5px; margin-top: 7px; line-height: 1.5; }
.pkg-preview { margin-top: 14px; border: 1px solid var(--line); background: var(--panel-2); border-radius: 11px; padding: 14px; }
.pkg-preview-title { font-weight: 700; font-size: 13px; }
.pkg-preview-desc { color: var(--ink-3); font-size: 11.5px; margin-top: 3px; }
.pkg-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.pkg-preview-item { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 9px; }
.pkg-preview-item span { display: block; color: var(--ink-3); font-size: 10.5px; }
.pkg-preview-item strong { display: block; font-size: 12.5px; margin-top: 2px; }
.pkg-preview-item .amount { color: var(--primary); font-size: 15px; }

.ws-head { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 0; box-shadow: var(--shadow); margin-bottom: 16px; }
.ws-title-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.ws-title-row h2 { margin: 0; font-size: 21px; letter-spacing: -.4px; }
.ws-sub { color: var(--ink-3); font-size: 12px; }
.ws-actions { position: absolute; right: 28px; margin-top: 4px; display: flex; gap: 7px; align-items: center; }
.ws-head { position: relative; }
.ws-tabs { display: flex; gap: 2px; margin-top: 16px; overflow-x: auto; border-top: 1px solid var(--line-2); padding-top: 2px; }
.ws-tab { padding: 11px 13px; color: var(--ink-3); font-size: 12.5px; border-bottom: 2px solid transparent; white-space: nowrap; }
.ws-tab:hover { color: var(--ink); }
.ws-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.ws-body { min-height: 240px; }
.segmented { display: inline-flex; padding: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; gap: 2px; }
.segmented button { border: 0; background: transparent; color: var(--ink-3); padding: 7px 14px; border-radius: 7px; font-size: 12.5px; }
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(17,34,64,.08); font-weight: 600; }
.secret-row { display: flex; align-items: center; gap: 8px; }
.secret-row code { flex: 1; background: #0d1728; color: #cfe1ff; border-radius: 8px; padding: 9px 10px; font-family: var(--mono); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; }
.key-cell { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; color: var(--ink-2); }
.download-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-card { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.download-card .list-ico { width: 46px; height: 46px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.download-card h3 { margin: 2px 0 0; font-size: 16px; }
.download-card p { margin: 0; color: var(--ink-3); font-size: 12.5px; line-height: 1.7; min-height: 42px; }
.download-card .btn { align-self: flex-start; margin-top: 6px; }
.order-pay-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.order-pay-box .kv strong.amount { font-size: 18px; color: var(--primary); }
.ticket-thread { display: flex; flex-direction: column; gap: 9px; }
.ticket-msg { background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.ticket-msg.admin { background: var(--primary-soft); border-color: #dbe7ff; }
.ticket-msg strong { font-size: 12px; }
.ticket-msg p { margin: 6px 0; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.ticket-msg span { color: var(--ink-3); font-size: 10.5px; }
.list-item.unread { background: #fbfdff; }
.list-item.unread .list-title::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); margin-right: 6px; vertical-align: 1px; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--panel-2); }
@media (max-width: 1200px) {
  .instance-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-actions { position: static; margin: 0 0 4px; }
}
@media (max-width: 900px) {
  .instance-cards { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .pkg-preview-grid { grid-template-columns: repeat(2, 1fr); }
  .download-grid { grid-template-columns: 1fr; }
  .console-hero { flex-direction: column; align-items: flex-start; }
  .ws-tabs { scrollbar-width: thin; }
}