:root {
  --bg: #0f1720;
  --panel: rgba(13, 22, 33, 0.82);
  --panel-strong: rgba(18, 30, 45, 0.96);
  --line: rgba(153, 184, 214, 0.18);
  --text: #e7edf5;
  --muted: #97a7ba;
  --accent: #69d2a7;
  --accent-strong: #42b983;
  --warn: #ff8b6b;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(105, 210, 167, 0.18), transparent 36%),
    radial-gradient(circle at top right, rgba(66, 185, 131, 0.1), transparent 24%),
    linear-gradient(160deg, #091018 0%, #111f2f 58%, #0d1622 100%);
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.hero {
  padding: 12px 4px 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
}

.subtitle {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.panel,
.metric {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 24px;
  border-radius: 24px;
}

.stack {
  display: grid;
  gap: 10px;
}

label {
  font-size: 14px;
  color: var(--muted);
}

input {
  width: 100%;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(134, 164, 193, 0.22);
  background: rgba(8, 14, 22, 0.76);
  color: var(--text);
  font-size: 15px;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 58px;
}

.icon-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.icon-btn:hover,
.icon-btn[aria-pressed="true"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.12);
}

button {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #05140e;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  background: linear-gradient(135deg, #8bd3ff, #5bb6ff);
  color: #04131f;
}

.message {
  grid-column: 1 / -1;
  min-height: 24px;
  margin: 0;
  color: var(--muted);
}

.message[data-type="error"] {
  color: var(--warn);
}

.message[data-type="success"] {
  color: var(--accent);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.metric {
  border-radius: 22px;
  padding: 20px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.metric em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.identity {
  background: var(--panel-strong);
}

.grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-top: 22px;
}

.panel {
  border-radius: 24px;
  padding: 24px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 18px;
}

.panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.list-wrap {
  display: grid;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
}

.list-wrap::-webkit-scrollbar {
  width: 10px;
}

.list-wrap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.list-wrap::-webkit-scrollbar-thumb {
  background: rgba(129, 171, 207, 0.28);
  border-radius: 999px;
}

.list-wrap::-webkit-scrollbar-thumb:hover {
  background: rgba(129, 171, 207, 0.42);
}

.log-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(9, 16, 25, 0.72);
  border: 1px solid rgba(149, 178, 205, 0.14);
}

.log-card time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

#logs-panel {
  margin-top: 22px;
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pager-btn {
  min-width: 104px;
  padding: 12px 16px;
  border-radius: 12px;
}

.pager-jump-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pager-jump-input {
  width: 92px;
  padding: 12px 14px;
  border-radius: 12px;
}

.pager-btn-jump {
  min-width: 84px;
}

.pager-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.pager-text {
  color: var(--muted);
  font-size: 14px;
}

.empty {
  margin: 0;
  color: var(--muted);
}

.hidden {
  display: none;
}

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .forms,
  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }

  .shell {
    width: min(100vw - 20px, 1180px);
    padding-top: 24px;
  }

  .pagination {
    align-items: stretch;
  }

  .pager-btn {
    width: 100%;
  }

  .pager-jump-form {
    width: 100%;
  }

  .pager-jump-input {
    width: 100%;
  }
}
