/* ===== ctl.aropla.com 控制台样式 ===== */
:root {
  --bg: #0e1015;
  --bg-soft: #14171e;
  --panel: #171b24;
  --panel-2: #1d222d;
  --border: #272d3a;
  --border-strong: #343c4d;
  --text: #e7eaf0;
  --muted: #8b93a7;
  --faint: #5c6577;
  --accent: #4f8cff;
  --accent-2: #6ea8ff;
  --accent-soft: rgba(79, 140, 255, 0.35);
  --danger: #ff5c6c;
  --danger-soft: rgba(255, 92, 108, 0.14);
  --ok: #34c98e;
  --warn: #f5a524;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --mono: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
[data-theme="light"] {
  --bg: #f2f4f8;
  --bg-soft: #e9ecf2;
  --panel: #ffffff;
  --panel-2: #f7f8fb;
  --border: #e2e6ee;
  --border-strong: #cdd3e0;
  --text: #1b1f2a;
  --muted: #69717f;
  --faint: #9aa1b0;
  --accent: #2f6bff;
  --accent-2: #1e54e0;
  --accent-soft: rgba(47, 107, 255, 0.28);
  --danger: #e13d4f;
  --danger-soft: rgba(225, 61, 79, 0.1);
  --ok: #14a06c;
  --warn: #c88208;
  --shadow: 0 8px 28px rgba(30, 40, 70, 0.14);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }

/* ===== 顶部栏 ===== */
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.brand .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.brand .sub { color: var(--muted); font-weight: 400; font-size: 12px; }
.topbar .spacer { flex: 1; }
.topbar .user { color: var(--muted); font-size: 13px; }
.topbar .user b { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 9px;
  border: 1px solid var(--border-strong);
  background: var(--panel-2); color: var(--text);
  font-size: 13px; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--accent); background: var(--panel); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--panel-2); }
.btn.sm { padding: 4px 9px; font-size: 12px; border-radius: 7px; }

/* ============================================================
   白天黑夜切换按钮（移植自主站 theme.css，自包含版）
   原始设计：Xiumuzaidiao/Day-night-toggle-button（精简版）
   ============================================================ */
.theme-toggle {
  --ts: 0.55px; /* 等比缩放：宽=180*ts，高=70*ts */
  position: relative;
  display: inline-block;
  width: calc(180 * var(--ts));
  height: calc(70 * var(--ts));
  padding: 0; border: none; background: transparent;
  cursor: pointer; border-radius: 999px; overflow: hidden;
  flex: none; outline: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.theme-toggle:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 2px var(--accent);
}
.theme-toggle .container {
  position: relative; top: auto; left: auto; margin: 0; transform: none;
  width: 100%; height: 100%; font-size: var(--ts);
}
.theme-toggle .components {
  position: absolute; inset: 0; width: 100%; height: 100%;
  background-color: #4685c0; border-radius: 999px;
  box-shadow: inset 0 0 5em 3em rgba(0,0,0,0.22); overflow: hidden;
  transition: 0.7s cubic-bezier(0, 0.5, 1, 1); z-index: 1;
}
.theme-toggle .main-button {
  position: absolute; top: 10em; left: 7.5em; width: 50em; height: 50em;
  background-color: #ffc323; border-radius: 50%;
  box-shadow: 3em 3em 5em rgba(0,0,0,0.4),
              inset -3em -5em 3em -3em rgba(0,0,0,0.45),
              inset 4em 5em 2em -2em #ffe650;
  transition: 1s cubic-bezier(0.56, 1.35, 0.52, 1); z-index: 3;
}
.theme-toggle .moon {
  position: absolute; background-color: #96a0b4;
  box-shadow: inset 0 0 1em 1em rgba(0,0,0,0.30); border-radius: 50%;
  opacity: 0; transition: 0.5s;
}
.theme-toggle .moon:nth-child(1) { top: 6em; left: 22em; width: 11em; height: 11em; }
.theme-toggle .moon:nth-child(2) { top: 18em; left: 6em; width: 18em; height: 18em; }
.theme-toggle .moon:nth-child(3) { top: 28em; left: 28em; width: 11em; height: 11em; }
.theme-toggle .daytime-backgrond {
  position: absolute; border-radius: 50%; background-color: rgba(255,255,255,0.18);
  transition: 1s cubic-bezier(0.56, 1.35, 0.52, 1); z-index: 2;
}
.theme-toggle .daytime-backgrond:nth-child(2) { top: -20em; left: -20em; width: 110em; height: 110em; background-color: rgba(255,255,255,0.20); }
.theme-toggle .daytime-backgrond:nth-child(3) { top: -32em; left: -17em; width: 135em; height: 135em; background-color: rgba(255,255,255,0.10); }
.theme-toggle .daytime-backgrond:nth-child(4) { top: -45em; left: -15em; width: 160em; height: 160em; background-color: rgba(255,255,255,0.05); }
.theme-toggle .cloud {
  position: absolute; inset: 0; transition: transform .7s ease, opacity .7s ease;
}
.theme-toggle .cloud-light {
  position: absolute; right: 0; bottom: 25em; width: 60em; height: 60em;
  opacity: 0.45; z-index: 1; transition: transform .7s ease, opacity .7s ease;
}
.theme-toggle .cloud-son {
  position: absolute; background: #ffffff; border-radius: 50%; z-index: 2;
  transition: right 1s ease, bottom 1s ease;
}
.theme-toggle .cloud-son:nth-child(6n+1) { right: -20em; bottom: 10em; width: 50em; height: 50em; }
.theme-toggle .cloud-son:nth-child(6n+2) { right: -10em; bottom: -25em; width: 60em; height: 60em; }
.theme-toggle .cloud-son:nth-child(6n+3) { right: 20em; bottom: -40em; width: 60em; height: 60em; }
.theme-toggle .cloud-son:nth-child(6n+4) { right: 50em; bottom: -35em; width: 60em; height: 60em; }
.theme-toggle .cloud-son:nth-child(6n+5) { right: 75em; bottom: -60em; width: 75em; height: 75em; }
.theme-toggle .cloud-son:nth-child(6n+6) { right: 110em; bottom: -50em; width: 60em; height: 60em; }
.theme-toggle .stars {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  transform: translateY(-125em); z-index: 2;
  transition: 1s cubic-bezier(0.56, 1.35, 0.52, 1);
}
.theme-toggle .stars .big { --size: 7em; }
.theme-toggle .stars .medium { --size: 5em; }
.theme-toggle .stars .small { --size: 3em; }
.theme-toggle .stars .star { position: absolute; width: calc(2 * var(--size)); height: calc(2 * var(--size)); }
.theme-toggle .stars .star:nth-child(1) { top: 11em; left: 39em; }
.theme-toggle .stars .star:nth-child(2) { top: 39em; left: 91em; }
.theme-toggle .stars .star:nth-child(3) { top: 26em; left: 19em; }
.theme-toggle .stars .star:nth-child(4) { top: 37em; left: 66em; }
.theme-toggle .stars .star:nth-child(5) { top: 21em; left: 75em; }
.theme-toggle .stars .star:nth-child(6) { top: 51em; left: 38em; }
.theme-toggle .stars .star-son { float: left; width: var(--size); height: var(--size); }
.theme-toggle .stars .star-son:nth-child(1) { --pos: left 0; }
.theme-toggle .stars .star-son:nth-child(2) { --pos: right 0; }
.theme-toggle .stars .star-son:nth-child(3) { --pos: 0 bottom; }
.theme-toggle .stars .star-son:nth-child(4) { --pos: right bottom; }
.theme-toggle .stars .star-son {
  background-image: radial-gradient(circle var(--size) at var(--pos),
                    transparent calc(95% - 1px), #fff 95%);
}

/* 浅色（白天） */
html[data-theme="light"] .theme-toggle .cloud-son {
  transform: scale(1); transition: 1s;
  animation-iteration-count: infinite; animation-direction: alternate;
  animation-timing-function: ease-in-out;
}
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+1) { animation-name: naoCloud; animation-duration: 4.5s; }
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+2) { animation-name: naoCloud; animation-duration: 5.1s; }
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+3) { animation-name: naoCloud; animation-duration: 5.9s; }
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+4) { animation-name: naoCloud; animation-duration: 6.3s; }
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+5) { animation-name: naoCloud; animation-duration: 4.7s; }
html[data-theme="light"] .theme-toggle .cloud-son:nth-child(6n+6) { animation-name: naoCloud; animation-duration: 5s; }

/* 深色（黑夜） */
html[data-theme="dark"] .theme-toggle .components { background-color: #191e32; }
html[data-theme="dark"] .theme-toggle .main-button {
  transform: translateX(110em); background-color: #c3c8d2;
  box-shadow: 3em 3em 5em rgba(0,0,0,0.5),
              inset -3em -5em 3em -3em rgba(0,0,0,0.5),
              inset 4em 5em 2em -2em #ffffd2;
}
html[data-theme="dark"] .theme-toggle .moon { opacity: 1; }
html[data-theme="dark"] .theme-toggle .daytime-backgrond:nth-child(2) { transform: translateX(110em); }
html[data-theme="dark"] .theme-toggle .daytime-backgrond:nth-child(3) { transform: translateX(80em); }
html[data-theme="dark"] .theme-toggle .daytime-backgrond:nth-child(4) { transform: translateX(50em); }
html[data-theme="dark"] .theme-toggle .cloud,
html[data-theme="dark"] .theme-toggle .cloud-light { transform: translateY(80em); }
html[data-theme="dark"] .theme-toggle .stars { transform: translateY(0); opacity: 1; }
html[data-theme="dark"] .theme-toggle .stars .star {
  transform: scale(1); transition: 1s;
  animation-iteration-count: infinite; animation-direction: alternate;
  animation-timing-function: linear;
}
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(1) { animation-name: naoStar; animation-duration: 3.5s; }
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(2) { animation-name: naoStar; animation-duration: 4.1s; }
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(3) { animation-name: naoStar; animation-duration: 4.9s; }
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(4) { animation-name: naoStar; animation-duration: 5.3s; }
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(5) { animation-name: naoStar; animation-duration: 3s; }
html[data-theme="dark"] .theme-toggle .stars .star:nth-child(6) { animation-name: naoStar; animation-duration: 2.2s; }

@keyframes naoStar {
  0%, 20% { transform: scale(0); }
  20%, 100% { transform: scale(1); }
}
@keyframes naoCloud {
  0% { transform: translate(2em, -2em); }
  50% { transform: translate(-2em, 2em); }
  100% { transform: translate(2em, -2em); }
}

/* hover 动效 */
.theme-toggle .main-button:hover { transform: translateX(10em); }
.theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(2) { transform: translateX(10em); }
.theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(3) { transform: translateX(7em); }
.theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(4) { transform: translateX(4em); }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(1) { right: -24em; bottom: 10em; }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(2) { right: -12em; bottom: -27em; }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(3) { right: 17em; bottom: -43em; }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(4) { right: 46em; bottom: -39em; }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(5) { right: 70em; bottom: -65em; }
.theme-toggle .main-button:hover ~ .cloud .cloud-son:nth-child(6) { right: 109em; bottom: -54em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(1) { right: -23em; bottom: 10em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(2) { right: -11em; bottom: -26em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(3) { right: 18em; bottom: -42em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(4) { right: 47em; bottom: -38em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(5) { right: 74em; bottom: -64em; }
.theme-toggle .main-button:hover ~ .cloud-light .cloud-son:nth-child(6) { right: 110em; bottom: -55em; }
html[data-theme="dark"] .theme-toggle .main-button:hover { transform: translateX(100em); }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(2) { transform: translateX(100em); }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(3) { transform: translateX(73em); }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .daytime-backgrond:nth-child(4) { transform: translateX(46em); }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(1) { top: 10em; left: 36em; }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(2) { top: 40em; left: 87em; }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(3) { top: 26em; left: 16em; }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(4) { top: 38em; left: 63em; }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(5) { top: 20.5em; left: 72em; }
html[data-theme="dark"] .theme-toggle .main-button:hover ~ .stars .star:nth-child(6) { top: 51.5em; left: 35em; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle .cloud-son, .theme-toggle .stars .star { animation: none !important; }
}

/* ===== 登录 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--accent)14, transparent 60%),
    var(--bg);
}
.login-card {
  width: 360px; max-width: 100%;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 28px;
  box-shadow: var(--shadow);
}
.login-card .logo { text-align: center; margin-bottom: 8px; }
.login-card .logo .dot {
  display: inline-block; width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px var(--accent)40;
}
.login-card h1 { text-align: center; font-size: 19px; margin: 14px 0 2px; }
.login-card .desc { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent)22; }
.login-card .submit { width: 100%; margin-top: 6px; padding: 11px; font-size: 14px; justify-content: center; }
.login-card .login-links {
  display: flex; justify-content: center; align-items: center; gap: 10px;
  margin-top: 16px;
}
.login-card .forgot {
  padding: 4px 8px;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px;
}
.login-card .forgot:hover { color: var(--accent); }
.login-card .link-sep { color: var(--faint); }
.login-err {
  margin-top: 14px; padding: 9px 12px; border-radius: 8px;
  background: var(--danger-soft); color: var(--danger);
  font-size: 12.5px; text-align: center;
}
.login-note { margin-top: 18px; text-align: center; color: var(--faint); font-size: 11.5px; }

/* ===== 主布局 ===== */
.main { max-width: 1280px; margin: 0 auto; padding: 20px 22px 60px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px;
}
.stat .k { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat .v { font-size: 24px; font-weight: 700; letter-spacing: -.5px; }
.stat .v.accent { color: var(--accent); }

/* ===== 筛选栏 ===== */
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px;
}
.filters input, .filters select {
  padding: 8px 11px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 13px; outline: none;
}
.filters input:focus, .filters select:focus { border-color: var(--accent); }
.filters input.q { flex: 1; min-width: 180px; }
.filters .sep { width: 1px; height: 26px; background: var(--border); }
.filters label { font-size: 12px; color: var(--muted); }

/* ===== 表格 ===== */
.table-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar .count { color: var(--muted); font-size: 13px; }
.toolbar .spacer { flex: 1; }
.tbl-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 10px 12px; font-weight: 600; font-size: 12px;
  color: var(--muted); border-bottom: 1px solid var(--border);
  background: var(--panel-2); white-space: nowrap;
}
tbody td {
  padding: 9px 12px; border-bottom: 1px solid var(--border);
  vertical-align: top; white-space: nowrap;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--panel-2); }
td.mono { font-family: var(--mono); font-size: 12px; }
td.ip { font-family: var(--mono); color: var(--accent); cursor: pointer; }
td.path { max-width: 280px; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 12px; }
td.ua { max-width: 240px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.cell-tools { display: flex; gap: 5px; }
.check { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

.badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11.5px; font-weight: 600; font-family: var(--mono);
}
.badge.s2 { background: var(--ok)22; color: var(--ok); }
.badge.s3 { background: var(--accent)22; color: var(--accent); }
.badge.s4 { background: var(--warn)22; color: var(--warn); }
.badge.s5 { background: var(--danger); color: #fff; }
.badge.method { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border-strong); }
.badge.admin { background: var(--accent)22; color: var(--accent); }
.badge.user { background: var(--panel-2); color: var(--muted); border: 1px solid var(--border-strong); }
.badge.on { background: var(--ok)22; color: var(--ok); }
.badge.off { background: var(--danger-soft); color: var(--danger); }
.badge.locked { background: var(--warn)22; color: var(--warn); }

.empty { padding: 44px; text-align: center; color: var(--muted); }

/* ===== 分页 ===== */
.pager {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-top: 1px solid var(--border);
}
.pager .info { color: var(--muted); font-size: 12.5px; }
.pager .spacer { flex: 1; }

/* ===== 批量操作条 ===== */
.bulkbar {
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--danger);
  background: var(--danger-soft);
}
.bulkbar.show { display: flex; }
.bulkbar .txt { color: var(--danger); font-size: 13px; font-weight: 600; }
.bulkbar .spacer { flex: 1; }

/* ===== 弹窗 ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
}
[data-theme="light"] .overlay { background: rgba(20, 26, 40, 0.32); }
.modal {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 620px; max-width: 100%; max-height: 88vh;
  display: flex; flex-direction: column;
}
.modal.small { width: 400px; }
.modal.wide { width: 760px; }
.modal-head {
  display: flex; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-size: 15px; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
}
.modal-foot .hint { color: var(--faint); font-size: 12px; }
.close-x { cursor: pointer; color: var(--muted); font-size: 22px; line-height: 1; border: none; background: none; }
.close-x:hover { color: var(--text); }

.dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px 14px; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; word-break: break-all; font-family: var(--mono); font-size: 12px; }
.dl dd.plain { font-family: inherit; white-space: pre-wrap; }

/* ===== 提示 ===== */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 18px; box-shadow: var(--shadow); z-index: 100;
  font-size: 13px; animation: fadein .2s ease;
}
.toast.err { border-color: var(--danger); color: var(--danger); }
.toast.ok { border-color: var(--ok); color: var(--ok); }
@keyframes fadein { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.spin {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--border-strong); border-top-color: var(--accent);
  animation: rot .7s linear infinite; vertical-align: -2px;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* ===== 顶栏菜单 (tabs) ===== */
.tabs { display: flex; align-items: center; gap: 4px; }
.tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: 9px;
  color: var(--muted); font-size: 13.5px; text-decoration: none;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.tab:hover { color: var(--text); background: var(--panel-2); }
.tab.active {
  color: var(--accent); background: var(--accent-soft);
  border-color: var(--accent);
}

/* ===== 页面切换动画（与主站一致：平面推出推入 + 模糊叠加） ===== */
.page {
  transition: transform .22s cubic-bezier(.22, 1, .36, 1), filter .22s ease, opacity .22s ease;
  will-change: transform, filter;
}
.page-leaving { transform: translateX(-2.5%); filter: blur(6px); opacity: .35; }
.page-entering { transform: translateX(2.5%); filter: blur(6px); opacity: .35; }

/* ===== 账户管理页 ===== */
.acct-add {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px; border: 1px dashed var(--border-strong); border-radius: 12px;
  background: var(--panel);
}
.acct-add input, .acct-add select {
  padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 13px; outline: none;
}
.acct-add input:focus, .acct-add select:focus { border-color: var(--accent); }
.acct-add input[type="text"] { flex: 1; min-width: 160px; }
.acct-add input[type="password"] { width: 160px; }
.acct-row-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.hint { color: var(--faint); font-size: 12px; }

/* ===== 总览/欢迎 ===== */
.welcome {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px; margin-bottom: 18px;
}
.welcome-badge {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px var(--accent)40;
}
.welcome-badge .dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; }
.welcome h2 { margin: 0 0 4px; font-size: 20px; }
.welcome h2 span { color: var(--accent); }
.welcome p { margin: 0; color: var(--muted); font-size: 13px; }

/* ===== 安全中心 ===== */
.sec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sec-body { padding: 18px 20px; }
.sec-body .field input { width: 100%; padding: 10px 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--bg-soft);
  color: var(--text); font-size: 14px; outline: none; }
.sec-body .field input:focus { border-color: var(--accent); }
.sec-body .field input[readonly] { color: var(--muted); cursor: default; }

/* ============================================================
   移动端适配
   ============================================================ */
@media (max-width: 720px) {
  .main { padding: 14px 12px 50px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; }
  .theme-toggle { --ts: 0.45px; }
  .topbar .user { display: none; }
  .brand .sub { display: none; }
  .tabs { order: 3; width: 100%; gap: 6px; }
  .tab { flex: 1; justify-content: center; padding: 8px 10px; font-size: 13px; }

  /* 统计卡片：2 列，最后一个占满一行 */
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stats .stat:last-child { grid-column: span 2; }
  .stat { padding: 13px 14px; }
  .stat .v { font-size: 20px; }

  /* 欢迎卡片 */
  .welcome { padding: 16px; gap: 12px; }
  .welcome-badge { width: 40px; height: 40px; }
  .welcome h2 { font-size: 17px; }

  /* 筛选栏：输入框/按钮全宽堆叠 */
  .filters { gap: 8px; padding: 10px; }
  .filters .sep { display: none; }
  .filters input.q { flex: 1 1 100%; }
  .filters input[type="text"], .filters input[type="date"] { flex: 1 1 100%; }
  .filters select { flex: 1 1 48%; }
  .filters button { flex: 1; }

  /* 访客表格：隐藏 方法/字节/UA 列 */
  #page-visitorsmgr th:nth-child(4), #page-visitorsmgr td:nth-child(4),
  #page-visitorsmgr th:nth-child(7), #page-visitorsmgr td:nth-child(7),
  #page-visitorsmgr th:nth-child(8), #page-visitorsmgr td:nth-child(8) { display: none; }
  td.path { max-width: 140px; }
  td.ip { font-size: 11px; }
  td.mono { font-size: 11px; }
  .cell-tools { flex-direction: column; gap: 3px; }

  /* 账户表格：隐藏 失败/锁定/创建时间 列 */
  #page-accountmgr th:nth-child(4), #page-accountmgr td:nth-child(4),
  #page-accountmgr th:nth-child(5), #page-accountmgr td:nth-child(5),
  #page-accountmgr th:nth-child(7), #page-accountmgr td:nth-child(7) { display: none; }

  /* 设备表格：隐藏 最后活跃 列 */
  #page-security th:nth-child(4), #page-security td:nth-child(4) { display: none; }

  /* IP 统计弹窗：隐藏 最近访问 列 */
  #ipOverlay th:nth-child(3), #ipOverlay td:nth-child(3) { display: none; }

  /* 账户新增表单：全宽堆叠 */
  .acct-add { padding: 12px; }
  .acct-add input[type="text"], .acct-add input[type="password"] { width: 100%; flex: 1 1 100%; }
  .acct-add select, .acct-add button { flex: 1; }

  .sec-grid { grid-template-columns: 1fr; }

  /* 登录页 */
  .login-wrap { padding: 16px; }
  .login-card { padding: 24px 20px; }

  /* 弹窗全宽 */
  .overlay { padding: 12px; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; }
  .modal-body { padding: 14px; }
  .dl { grid-template-columns: 76px 1fr; }

  /* 顶栏按钮更紧凑 */
  .topbar .btn { padding: 7px 10px; font-size: 12px; }
}

