:root {
  color-scheme: dark;
  --bg: #040814;
  --ink: #edfffd;
  --muted: rgba(220, 244, 246, 0.72);
  --cyan: #2ff3ff;
  --green: #3fffbf;
  --gold: #ffd166;
  --pink: #ff4fd8;
  --line: rgba(220, 255, 255, 0.18);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(47, 243, 255, 0.16), transparent 30%),
    radial-gradient(circle at 82% 0%, rgba(255, 79, 216, 0.14), transparent 28%),
    radial-gradient(circle at 72% 86%, rgba(255, 209, 102, 0.12), transparent 28%),
    var(--bg);
}

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

.admin-shell {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.admin-hero h1,
.panel-head h2,
.login-panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.admin-hero h1 {
  margin-top: 8px;
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.96;
}

.admin-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.7;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-link,
.ghost-button,
.form-actions button,
.login-form button {
  border: 1px solid rgba(226, 255, 255, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    rgba(10, 30, 48, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 18px 46px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.home-link,
.ghost-button {
  padding: 12px 16px;
  font-weight: 850;
  white-space: nowrap;
}

.home-link:hover,
.ghost-button:hover,
.form-actions button:hover,
.login-form button:hover {
  border-color: rgba(47, 243, 255, 0.48);
  transform: translateY(-1px);
}

.glass-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 16% 0%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 48%, rgba(47, 243, 255, 0.06)),
    rgba(6, 18, 31, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.23),
    inset 0 -1px 0 rgba(47, 243, 255, 0.08),
    0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

.login-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 440px);
  gap: 28px;
  align-items: end;
  padding: clamp(24px, 4vw, 42px);
}

.login-panel h2 {
  margin-top: 10px;
  font-size: clamp(28px, 4vw, 54px);
}

.login-panel p:not(.eyebrow) {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 12px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.editor-panel,
.list-panel {
  padding: clamp(20px, 3vw, 34px);
}

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

.panel-head h2 {
  margin-top: 8px;
  font-size: clamp(26px, 3vw, 42px);
}

.admin-form,
.filters {
  display: grid;
  gap: 14px;
}

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

label {
  display: grid;
  gap: 8px;
  color: rgba(235, 255, 253, 0.9);
  font-size: 14px;
  font-weight: 850;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(47, 243, 255, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(0, 8, 18, 0.46);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

input,
select {
  min-height: 46px;
  padding: 0 14px;
}

textarea {
  resize: vertical;
  padding: 14px;
  line-height: 1.65;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(47, 243, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(47, 243, 255, 0.12);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.form-actions p {
  margin: 0;
  color: var(--muted);
}

.form-actions button,
.login-form button {
  min-height: 48px;
  padding: 0 20px;
  color: #001318;
  font-weight: 950;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.filters {
  grid-template-columns: 160px 160px minmax(180px, 1fr);
  margin-bottom: 18px;
}

.records {
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 280px);
  overflow: auto;
  padding-right: 4px;
}

.record-card {
  border: 1px solid rgba(226, 255, 255, 0.18);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(5, 14, 25, 0.46);
}

.record-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-card h3 {
  margin: 8px 0 0;
  font-size: 22px;
}

.record-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.record-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.record-meta span {
  border: 1px solid rgba(47, 243, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  color: rgba(235, 255, 253, 0.86);
  background: rgba(47, 243, 255, 0.06);
  font-size: 12px;
  font-weight: 800;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.record-actions button {
  border: 1px solid rgba(226, 255, 255, 0.18);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.record-actions .publish {
  border-color: rgba(63, 255, 191, 0.42);
  color: #001318;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 950;
}

.record-actions .danger {
  border-color: rgba(255, 98, 132, 0.36);
  color: #ffb8c8;
}

.empty-state {
  border: 1px dashed rgba(226, 255, 255, 0.2);
  border-radius: 8px;
  padding: 34px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .admin-shell {
    width: min(100% - 28px, 760px);
    padding-top: 28px;
  }

  .admin-hero,
  .login-panel,
  .admin-workspace,
  .form-grid,
  .filters {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    display: grid;
  }

  .records {
    max-height: none;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}
