:root {
  --bg: #08111f;
  --panel: #101a2d;
  --panel-2: #142039;
  --line: #21314f;
  --text: #eef6ff;
  --body: #9bb0c9;
  --muted: #62748e;
  --blue: #0ea5e9;
  --blue-2: #075ea8;
  --cyan: #3dd7ff;
  --green: #20c997;
  --amber: #fbbf24;
  --red: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(70% 45% at 28% 8%, rgba(14, 165, 233, 0.17), transparent 62%),
    radial-gradient(50% 50% at 80% 70%, rgba(61, 215, 255, 0.08), transparent 65%),
    linear-gradient(180deg, #07101d 0%, #08111f 100%);
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 264px;
  flex: 0 0 264px;
  border-right: 1px solid var(--line);
  background: rgba(9, 17, 31, 0.86);
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
}

.brand img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
}

.brand strong {
  display: block;
  font-size: 22px;
}

.brand span {
  color: var(--body);
  font-size: 13px;
}

.nav-title {
  color: var(--muted);
  font-size: 12px;
  margin: 14px 12px 6px;
}

.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--body);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 8px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover,
.nav-item.active {
  color: var(--text);
  background: rgba(14, 165, 233, 0.13);
}

.main {
  flex: 1;
  padding: 24px 34px;
  min-width: 0;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  min-height: 42px;
  margin-bottom: 22px;
}

.credits {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--body);
}

.credits b {
  color: var(--amber);
}

.ghost,
.primary,
.danger {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--text);
  background: var(--panel);
}

.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  font-weight: 700;
}

.danger {
  color: var(--red);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-bottom: 24px;
}

.hero-panel,
.card,
.tool-panel {
  border: 1px solid var(--line);
  background: rgba(16, 26, 45, 0.88);
  border-radius: 8px;
}

.hero-panel {
  padding: 28px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.lead {
  color: var(--body);
  font-size: 17px;
  max-width: 760px;
  line-height: 1.7;
}

.metric-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.metric {
  min-width: 150px;
  padding: 14px;
  border-radius: 8px;
  background: rgba(8, 17, 31, 0.7);
  border: 1px solid var(--line);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric b {
  font-size: 24px;
}

.status-panel {
  padding: 20px;
}

.status-line {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 11px 0;
  color: var(--body);
}

.status-line:last-child {
  border-bottom: 0;
}

.ok {
  color: var(--green);
}

.warn {
  color: var(--amber);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.card {
  padding: 18px;
  min-height: 176px;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.card p {
  color: var(--body);
  line-height: 1.55;
  flex: 1;
}

.cost {
  color: var(--amber);
  font-size: 13px;
}

.tool-panel {
  padding: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  display: block;
  color: var(--body);
  font-size: 14px;
  margin-bottom: 7px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  background: #08111f;
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}

textarea {
  min-height: 118px;
  resize: vertical;
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.notice {
  border: 1px solid rgba(251, 191, 36, 0.32);
  background: rgba(251, 191, 36, 0.09);
  color: #ffe2a3;
  border-radius: 8px;
  padding: 13px 14px;
  margin: 16px 0;
}

.assets {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.asset {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  overflow: hidden;
}

.asset img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  background: #fff;
}

.asset div {
  padding: 9px;
  color: var(--body);
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.modal.show {
  display: flex;
}

.modal-card {
  width: min(440px, calc(100vw - 28px));
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  border: 1px solid var(--line);
  color: var(--body);
  background: #08111f;
  border-radius: 8px;
  padding: 9px;
}

.tab.active {
  color: var(--text);
  background: rgba(14, 165, 233, 0.14);
}

table {
  width: 100%;
  border-collapse: collapse;
  color: var(--body);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
}

th {
  color: var(--text);
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 28px 0 8px;
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .assets {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: static;
  }

  .hero,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .grid,
  .assets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 18px;
  }
}
