:root {
  color-scheme: dark;
  --bg: #070812;
  --panel: #111321;
  --panel2: #15182a;
  --line: #252a3f;
  --text: #f3f5ff;
  --muted: #7e849c;
  --cyan: #66ead8;
  --violet: #9b7cff;
  --gold: #ffc96b;
  --red: #ff6e83;
}
* {
  box-sizing: border-box;
}
html,
body {
  min-height: 100%;
  margin: 0;
}
body {
  color: var(--text);
  background:
    radial-gradient(circle at 75% -10%, #26204b55, transparent 35%), var(--bg);
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
}
.admin-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 25px 18px;
  border-right: 1px solid var(--line);
  background: #0b0c16e8;
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 5px 35px;
  color: inherit;
  text-decoration: none;
}
.admin-brand > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #66ead855;
  border-radius: 13px;
  color: var(--cyan);
  background: #66ead80d;
  font:
    800 23px "KaiTi",
    serif;
  box-shadow: 0 0 24px #66ead812;
}
.admin-brand strong,
.admin-brand small {
  display: block;
}
.admin-brand strong {
  font-size: 16px;
  letter-spacing: 0.12em;
}
.admin-brand small {
  margin-top: 4px;
  color: #555b72;
  font-size: 7px;
  letter-spacing: 0.18em;
}
.sidebar nav {
  display: grid;
  gap: 7px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 11px;
  color: #858ba2;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.nav-item i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: #171a2a;
  color: #6e758e;
  font-style: normal;
  font-size: 11px;
}
.nav-item:hover,
.nav-item.active {
  color: #eafefb;
  background: linear-gradient(90deg, #66ead818, transparent);
}
.nav-item.active i {
  color: #071510;
  background: var(--cyan);
}
.sidebar-note {
  position: absolute;
  left: 22px;
  bottom: 25px;
  color: #4f556b;
  font-size: 9px;
  line-height: 1.7;
}
.workspace {
  min-width: 0;
  padding: 28px 34px 60px;
}
.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 29px;
}
.eyebrow,
.section-heading p,
.panel-title p {
  margin: 0 0 5px;
  color: #5c6279;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.22em;
}
.admin-topbar h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: 0.04em;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.save-state {
  margin-right: 7px;
  color: #5f667d;
  font-size: 9px;
}
.save-state.dirty {
  color: var(--gold);
}
button,
.ghost-action {
  font: inherit;
}
.ghost-action,
.save-button {
  padding: 9px 13px;
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
}
.ghost-action {
  border: 1px solid var(--line);
  color: #aab0c3;
  background: #11131f;
}
.ghost-action.danger {
  color: #b88991;
}
.save-button {
  border: 1px solid #78f4df66;
  color: #071510;
  background: linear-gradient(135deg, #79f5df, #51cbbc);
  font-weight: 900;
}
.admin-section {
  display: none;
  animation: fade 0.2s ease;
}
.admin-section.active {
  display: block;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
  margin-bottom: 13px;
}
.summary-card {
  position: relative;
  min-height: 126px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #151827, #0d0f1a);
  overflow: hidden;
}
.summary-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--glow, #66ead8);
  opacity: 0.07;
}
.summary-card small,
.summary-card strong,
.summary-card span {
  display: block;
}
.summary-card small {
  color: #747b92;
  font-size: 9px;
}
.summary-card strong {
  margin: 12px 0 6px;
  font-size: 28px;
}
.summary-card span {
  color: #51576c;
  font-size: 8px;
}
.panel {
  margin-bottom: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, #131624, #0e101b);
  box-shadow: 0 18px 55px #0002;
}
.panel-title,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.panel-title {
  margin-bottom: 17px;
}
.panel-title h2,
.section-heading h2 {
  margin: 0;
  font-size: 16px;
}
.section-heading {
  align-items: end;
  margin: 0 1px 17px;
}
.section-heading h2 {
  font-size: 22px;
}
.section-heading > span {
  color: #5e657b;
  font-size: 9px;
}
.tag,
.live-dot {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 7px;
  letter-spacing: 0.12em;
}
.tag {
  background: #fff1;
}
.tag.cyan {
  color: var(--cyan);
  background: #66ead812;
}
.tag.violet {
  color: #b59cff;
  background: #9b7cff15;
}
.tag.gold {
  color: var(--gold);
  background: #ffc96b14;
}
.tag.red {
  color: var(--red);
  background: #ff6e8312;
}
.live-dot {
  color: var(--cyan);
  background: #66ead811;
}
.live-dot::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}
.floor-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.floor-chip {
  padding: 14px;
  border: 1px solid #242a3d;
  border-radius: 12px;
  background: #0b0d17;
}
.floor-chip b,
.floor-chip small {
  display: block;
}
.floor-chip b {
  font-size: 12px;
}
.floor-chip small {
  margin-top: 7px;
  color: #626980;
  font-size: 8px;
  line-height: 1.6;
}
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field {
  display: block;
}
.field span {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #777e95;
  font-size: 9px;
}
.field em {
  color: #4f566c;
  font-style: normal;
}
.field input,
.table-input,
.table-select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #292e43;
  border-radius: 9px;
  outline: none;
  color: #f1f4ff;
  background: #0b0d17;
}
.field input:focus,
.table-input:focus,
.table-select:focus {
  border-color: #66ead877;
  box-shadow: 0 0 0 3px #66ead80d;
}
.skill-config-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.skill-group {
  padding: 14px;
  border: 1px solid #262b40;
  border-radius: 12px;
  background: #0c0e19;
}
.skill-group h3 {
  margin: 0 0 12px;
  font-size: 12px;
}
.skill-group .field + .field {
  margin-top: 9px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}
th,
td {
  padding: 10px;
  border-bottom: 1px solid #202438;
  text-align: left;
}
th {
  color: #60677e;
  font-size: 8px;
  letter-spacing: 0.07em;
}
td {
  color: #bec4d5;
  font-size: 10px;
}
tr:last-child td {
  border-bottom: 0;
}
.table-input,
.table-select {
  height: 34px;
  min-width: 85px;
  font-size: 10px;
}
.enemy-name {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
}
.enemy-name i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--red);
  background: #ff6e8310;
  font-style: normal;
}
.floor-table {
  min-width: 950px;
}
.shop-table {
  min-width: 850px;
}
.shop-toggle {
  width: 17px;
  height: 17px;
  accent-color: var(--cyan);
}
.product-code {
  color: #60677c;
  font-size: 8px;
}
.disabled-row {
  opacity: 0.42;
}
.toast {
  position: fixed;
  right: 27px;
  bottom: 27px;
  z-index: 20;
  padding: 12px 17px;
  border: 1px solid #66ead844;
  border-radius: 10px;
  color: #dffff9;
  background: #101c1bef;
  box-shadow: 0 13px 40px #0008;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: 0.2s;
}
.toast.show {
  opacity: 1;
  transform: none;
}
@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 76px 1fr;
  }
  .sidebar {
    padding: 22px 10px;
  }
  .admin-brand {
    justify-content: center;
    margin: 0 0 30px;
  }
  .admin-brand div,
  .nav-item:not(.active) {
    font-size: 0;
  }
  .nav-item {
    justify-content: center;
    padding: 10px;
  }
  .nav-item i {
    font-size: 11px;
  }
  .sidebar-note {
    display: none;
  }
  .workspace {
    padding: 22px 18px 50px;
  }
  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }
  .floor-overview {
    grid-template-columns: 1fr 1fr;
  }
  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .save-state {
    display: none;
  }
}
@media (max-width: 680px) {
  .admin-shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    padding: 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .admin-brand {
    margin: 0 12px 0 0;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
  }
  .nav-item,
  .nav-item:not(.active) {
    width: auto;
    white-space: nowrap;
    font-size: 0;
  }
  .workspace {
    padding: 18px 10px 40px;
  }
  .admin-topbar {
    align-items: flex-start;
  }
  .admin-topbar h1 {
    font-size: 20px;
  }
  .top-actions .ghost-action:first-of-type {
    display: none;
  }
  .summary-grid,
  .two-column,
  .floor-overview,
  .field-grid,
  .skill-config-grid {
    grid-template-columns: 1fr;
  }
  .section-heading > span {
    display: none;
  }
}
