:root {
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #e8edf5;
  background: #0c111b;
  line-height: 1.65;
  font-synthesis: none;
  --muted: #91a0b7;
  --line: #263143;
  --card: #141d2c;
  --accent: #b7d9ed;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #35435a;
  border-radius: 9px;
  padding: 9px 15px;
  background: #1a2739;
  color: #e9eff8;
  transition: background 0.15s;
}
button:hover {
  background: #2c3d55;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: #b8dcec;
  color: #12283c;
  border-color: #b8dcec;
  font-weight: 650;
}
button.primary:hover {
  background: #d2edfa;
}
button.subtle {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}
input,
select,
textarea {
  background: #0f1724;
  color: #eef4fa;
  border: 1px solid #344057;
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
  outline: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #9abdd8;
  box-shadow: 0 0 0 3px #89b6d31c;
}
textarea {
  font-family: Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}
label {
  display: block;
  color: #c1cbdc;
  font-size: 14px;
  margin: 14px 0;
}
label > input,
label > select,
label > textarea {
  display: block;
  margin-top: 7px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.3;
  margin-bottom: 8px;
  letter-spacing: -0.6px;
}
h2 {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.4;
}
h3 {
  font-size: 16px;
}
p {
  font-size: 14px;
}
small,
.muted {
  color: var(--muted);
}
.eyebrow {
  color: #9eb5cd;
  font-size: 10px;
  letter-spacing: 2.5px;
  margin-bottom: 10px;
}
.pill {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #abc6d8;
  border: 1px solid #344b61;
  border-radius: 30px;
  padding: 7px 12px;
}
.brand {
  color: #e8edf5;
  display: flex;
  align-items: center;
  text-decoration: none;
  font-size: 22px;
  gap: 12px;
  font-weight: 600;
}
.brand > span {
  color: #c0e0ef;
  font-size: 40px;
  line-height: 1;
}
.brand small {
  font-size: 9px;
  letter-spacing: 2px;
}
aside {
  position: fixed;
  inset: 0 auto 0 0;
  width: 225px;
  background: #101724;
  border-right: 1px solid var(--line);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
}
.nav-title {
  color: #60748d;
  margin: 45px 12px 12px;
  font-size: 11px;
  letter-spacing: 2px;
}
nav button {
  display: flex;
  gap: 14px;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  margin: 5px 0;
  padding: 12px 14px;
  color: #92a4bd;
}
nav button.active {
  background: #223349;
  color: #c9e5f3;
}
.aside-bottom {
  margin-top: auto;
  font-size: 12px;
  color: #91a4bc;
}
.aside-bottom button {
  display: block;
  width: 100%;
  text-align: left;
  padding-left: 0;
  margin-top: 12px;
}
.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #95cdb1;
  margin-right: 8px;
}
main {
  margin-left: 225px;
  padding: 36px 42px 70px;
  max-width: 1560px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px;
  border: 1px solid #3b536b;
  border-radius: 15px;
  background:
    radial-gradient(ellipse at 90% 90%, #385974 0, transparent 60%),
    linear-gradient(110deg, #1b2c41, #192435);
  overflow: hidden;
}
.hero h2 {
  font-size: 25px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.hero p {
  color: #adc0d5;
  margin: 0;
}
.hero-star {
  font-size: 92px;
  line-height: 1;
  color: #c2e7f5;
  transform: rotate(12deg);
  padding-left: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 23px 0;
}
.stats > div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 22px;
  background: #121b29;
}
.stats small {
  display: block;
  font-size: 12px;
}
.stats strong {
  display: block;
  font-weight: 500;
  font-size: 30px;
  margin-top: 4px;
}
.toolbar {
  display: flex;
  gap: 8px;
  margin: 28px 0 20px;
  flex-wrap: wrap;
}
.toolbar input {
  flex: 1;
  min-width: 180px;
}
.toolbar select {
  width: 145px;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}
.account-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  padding: 22px;
  min-width: 0;
}
.card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.account-card h3 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}
.badge {
  font-size: 10px;
  white-space: nowrap;
  color: #99cfb7;
  background: #1b3634;
  padding: 3px 8px;
  border-radius: 5px;
  height: 24px;
}
.badge.warn {
  background: #3d2f26;
  color: #dbb58d;
}
.uid {
  color: #7f91aa;
  font:
    11px Consolas,
    monospace;
  word-break: break-all;
  margin: 16px 0 10px;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  margin-top: 16px;
}
.card-actions button {
  font-size: 12px;
  padding: 5px 10px;
}
.empty {
  text-align: center;
  padding: 55px 20px;
  color: #8c9eb7;
  border: 1px dashed #2c3c53;
  border-radius: 12px;
}
.empty > span {
  font-size: 46px;
  color: #68829e;
}
.empty h3 {
  color: #b9c8dc;
  margin-top: 10px;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  padding: 26px;
  margin-bottom: 20px;
}
.panel h2 {
  margin-bottom: 10px;
}
.panel ul {
  color: #afbed1;
  line-height: 2;
  font-size: 14px;
  padding-left: 20px;
}
.panel summary {
  cursor: pointer;
  font-weight: 600;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}
.section-heading h2 {
  margin-bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 600px;
  overflow: auto;
  background: #0c1421;
  border: 1px solid #263348;
  border-radius: 8px;
  padding: 18px;
  color: #b2ccdf;
  font-size: 12px;
}
dialog {
  background: #141d2c;
  color: #eef4fc;
  border: 1px solid #40516a;
  border-radius: 16px;
  padding: 28px;
  width: min(600px, 94vw);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #060b13c9;
  backdrop-filter: blur(5px);
}
dialog button[type="submit"] {
  margin-top: 16px;
  width: 100%;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
}
.check input {
  width: auto;
  margin: 0;
}
.footnote {
  color: #7d91aa;
  font-size: 11px;
  margin-top: 18px;
  margin-bottom: 0;
}
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 15%, #22394f, transparent 65%);
}
.login-card {
  width: min(430px, 100%);
  padding: 38px 34px;
  border: 1px solid #344861;
  background: #131e2ee8;
  border-radius: 18px;
  box-shadow: 0 30px 90px #0004;
}
.brand-mark {
  font-size: 62px;
  color: #c0e1f1;
  line-height: 1;
  margin-bottom: 24px;
}
.login-card h1 {
  font-size: 25px;
}
.login-card button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
}
.login-card label {
  margin-top: 28px;
}
#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(620px, 90vw);
  z-index: 99;
  background: #d2e7f2;
  color: #152c41;
  border-radius: 10px;
  padding: 12px 20px;
  box-shadow: 0 8px 35px #0007;
  font-size: 14px;
}
#toast.error {
  background: #edc5bb;
  color: #5b251d;
}
[hidden] {
  display: none !important;
}
@media (max-width: 1000px) {
  aside {
    width: 185px;
    padding: 26px 16px;
  }
  main {
    margin-left: 185px;
    padding: 28px 24px;
  }
  .hero h2 {
    font-size: 22px;
  }
  .toolbar button {
    flex-grow: 1;
  }
}
@media (max-width: 700px) {
  aside {
    position: static;
    width: 100%;
    padding: 16px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    font-size: 18px;
  }
  .brand > span {
    font-size: 30px;
  }
  .nav-title,
  .aside-bottom {
    display: none;
  }
  nav {
    display: flex;
    margin-top: 14px;
    gap: 4px;
  }
  nav button {
    padding: 8px;
    font-size: 12px;
    gap: 5px;
    justify-content: center;
    white-space: nowrap;
  }
  main {
    margin: 0;
    padding: 24px 18px 60px;
  }
  header h1 {
    font-size: 26px;
  }
  .hero {
    padding: 22px;
  }
  .hero-star {
    font-size: 60px;
  }
  .hero h2 {
    font-size: 20px;
  }
  .stats {
    gap: 9px;
  }
  .stats > div {
    padding: 14px;
  }
  .stats strong {
    font-size: 25px;
  }
  .stats small {
    font-size: 11px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .panel {
    padding: 20px;
  }
  .toolbar input {
    min-width: 100%;
  }
  dialog {
    padding: 20px;
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
@media (max-width: 450px) {
  .header-actions {
    flex-direction: column;
    gap: 2px;
  }
  .header-actions button {
    padding: 3px 8px;
    font-size: 12px;
  }
}
