* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 10% -10%, #efe7ff 0%, rgba(239,231,255,0) 60%),
              radial-gradient(900px 500px at 90% 10%, #e7f0ff 0%, rgba(231,240,255,0) 55%),
              #0b1020;
  color: #e9ecf5;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 28px 18px 48px; }
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px; border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(8px);
}
.brand { display: flex; gap: 14px; align-items: center; }
.logo {
  width: 42px; height: 42px; border-radius: 12px;
  background: linear-gradient(135deg, #b86bff, #5a8bff);
  display: grid; place-items: center; font-weight: 800;
}
.h1 { font-size: 18px; font-weight: 800; }
.sub { font-size: 12px; opacity: 0.8; margin-top: 2px; }

.card {
  margin-top: 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
}
.card-hd { padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.card-hd.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title { font-weight: 800; }

.form { padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.span2 { grid-column: span 2; }
.lab { font-size: 12px; opacity: 0.85; margin-bottom: 6px; }
input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #f1f4ff;
  outline: none;
}
input::placeholder { color: rgba(241,244,255,0.55); }
input:focus { border-color: rgba(184,107,255,0.7); box-shadow: 0 0 0 3px rgba(184,107,255,0.18); }

textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(0,0,0,0.25);
  color: #f1f4ff;
  outline: none;
  resize: vertical;
}
textarea::placeholder { color: rgba(241,244,255,0.55); }
textarea:focus { border-color: rgba(184,107,255,0.7); box-shadow: 0 0 0 3px rgba(184,107,255,0.18); }

.actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.hint { font-size: 12px; opacity: 0.75; }

.btn {
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}
.btn:hover { background: rgba(255,255,255,0.10); }
.btn.primary { border-color: rgba(184,107,255,0.5); background: linear-gradient(135deg, rgba(184,107,255,0.85), rgba(90,139,255,0.85)); }
.btn.secondary { opacity: 0.95; }
.btn.danger { border-color: rgba(255,90,120,0.55); background: rgba(255,90,120,0.16); }
.btn.danger:hover { background: rgba(255,90,120,0.22); }

.search { display: flex; gap: 10px; align-items: center; }
.search input { max-width: 320px; }

.table { width: 100%; }
.thead, .trow {
  display: grid;
  gap: 10px;
  padding: 12px 16px;
  align-items: center;
}

/* 账号列表：ID / 名字 / token / 创建 / 操作 */
.table.accounts .thead,
.table.accounts .trow {
  grid-template-columns: 70px 1fr 1.8fr 1.2fr 110px;
}

/* 虚拟长链：ID / 名字 / 到期 / 长链 / 创建 / 操作 */
.table.vtokens .thead,
.table.vtokens .trow {
  grid-template-columns: 70px 1fr 1.1fr 2fr 1.2fr 110px;
}
.thead { font-size: 12px; opacity: 0.85; border-bottom: 1px solid rgba(255,255,255,0.08); }
.trow { border-bottom: 1px solid rgba(255,255,255,0.06); }
.trow:last-child { border-bottom: none; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.small { font-size: 12px; opacity: 0.85; }
.empty { padding: 18px 16px; opacity: 0.8; }
.foot { margin-top: 14px; font-size: 12px; opacity: 0.75; }

/* modal */
.clickableToken { cursor: pointer; user-select: text; text-decoration: underline; text-decoration-color: rgba(184,107,255,0.7); word-break: break-all; }

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.modal {
  width: 980px;
  max-width: 100%;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  overflow: hidden;
}
.modal-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.modal-title { font-weight: 900; }
.result { margin-top: 14px; }

@media (max-width: 920px) {
  .grid { grid-template-columns: 1fr; }
  .span2 { grid-column: span 1; }
  .thead { display: none; }
  .trow {
    grid-template-columns: 1fr;
    padding: 14px 16px;
    gap: 6px;
  }
}

