:root {
  color-scheme: dark;
  --bg: #0b1018;
  --bg-soft: #111927;
  --panel: rgba(18, 26, 39, 0.86);
  --panel-strong: rgba(22, 32, 48, 0.96);
  --line: rgba(153, 216, 255, 0.18);
  --text: #edf6ff;
  --muted: #9fb1c7;
  --accent: #8fe8ff;
  --accent-2: #ffd98f;
  --danger: #ff8fbd;
  --shadow: 0 24px 90px rgba(0, 0, 0, 0.36);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(143, 232, 255, 0.16), transparent 30rem),
    radial-gradient(circle at 86% 4%, rgba(255, 217, 143, 0.14), transparent 24rem),
    linear-gradient(135deg, #070a10 0%, var(--bg) 48%, #121624 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid rgba(143, 232, 255, 0.32);
  border-radius: 999px;
  padding: 0.72rem 1.1rem;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), #d8f7ff);
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(143, 232, 255, 0.14);
}

button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

button:hover {
  transform: translateY(-1px);
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.86rem 0.95rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

input:focus {
  border-color: rgba(143, 232, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(143, 232, 255, 0.12);
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-shell {
  width: min(1160px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.hero-panel,
.panel,
.summary-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  padding: clamp(28px, 5vw, 56px);
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 40%;
  height: 280px;
  background: radial-gradient(circle, rgba(143, 232, 255, 0.18), transparent 68%);
  pointer-events: none;
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.92rem;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent-2);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.6rem, 9vw, 5.6rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.3rem, 3vw, 2rem);
}

.lead,
.muted {
  color: var(--muted);
}

.lead {
  max-width: 680px;
  font-size: 1.06rem;
  line-height: 1.8;
}

.panel {
  margin-top: 18px;
  padding: clamp(20px, 3.5vw, 32px);
}

.auth-panel,
.toolbar,
.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.auth-form {
  width: min(460px, 100%);
  display: grid;
  gap: 14px;
}

.auth-actions,
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.notice {
  min-height: 1.3em;
  color: var(--accent-2);
}

.dashboard {
  margin-top: 18px;
}

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

.summary-card {
  padding: 20px;
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: #dbe8f7;
}

.role-pill,
.stat-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.62rem;
  color: var(--accent-2);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
}

.detail-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: var(--panel-strong);
}

.detail-card.full {
  grid-column: 1 / -1;
}

pre {
  max-height: 360px;
  overflow: auto;
  border: 1px solid rgba(143, 232, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
  color: #d7f6ff;
  background: rgba(0, 0, 0, 0.2);
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 820px) {
  .auth-panel,
  .toolbar,
  .panel-heading {
    display: grid;
  }

  .summary-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    width: min(100% - 18px, 1160px);
    padding-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
