:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #121722;
  --panel-2: #171f2f;
  --text: #e8edf7;
  --muted: #93a1b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff7a1a;
  --accent-2: #4f8cff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 122, 26, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 20%, rgba(79, 140, 255, 0.18), transparent 34rem),
    var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.shell,
.admin {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.hero,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

.hero {
  max-width: 720px;
  padding: 42px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(255, 122, 26, 0.35);
  border-radius: 999px;
  color: #ffd1b0;
  background: rgba(255, 122, 26, 0.12);
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(32px, 6vw, 64px);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: 18px;
}

p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.actions,
.form-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  color: #10131a;
  background: linear-gradient(135deg, var(--accent), #ffc061);
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.button.ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.button.small {
  min-height: 36px;
}

.button.full {
  width: 100%;
  margin-top: 12px;
}

.admin {
  padding: 30px 0 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 10px 0 0;
  font-size: 30px;
}

.panel {
  margin-bottom: 16px;
  padding: 18px;
  background: rgba(18, 23, 34, 0.88);
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
}

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

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

.panel-head h2 {
  margin-bottom: 6px;
}

label {
  display: block;
  margin: 10px 0 6px;
  color: var(--muted);
  font-size: 13px;
}

label input {
  margin-top: 6px;
}

input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.form-row input {
  flex: 1 1 260px;
}

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

.summary div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.summary strong {
  display: block;
  font-size: 26px;
}

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

.table-wrap {
  overflow: auto;
}

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

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
}

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

code {
  color: #ffd1b0;
}

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

.event {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.event div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.event p {
  margin: 8px 0 4px;
}

.event span,
.event small {
  color: var(--muted);
}

.is-ok {
  color: #7dd3fc;
}

.is-error {
  color: #fca5a5;
}

@media (max-width: 760px) {
  .grid,
  .grid.three,
  .summary {
    grid-template-columns: 1fr;
  }

  .panel-head {
    display: block;
  }
}
