:root {
  color-scheme: dark;
  --bg: #050713;
  --panel: rgba(255, 255, 255, 0.045);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f7fb;
  --muted: #aeb4c8;
  --blue: #176dff;
  --violet: #9a39ff;
  --green: #18c783;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 76% 8%, rgba(154, 57, 255, 0.26), transparent 32rem),
    radial-gradient(circle at 28% 12%, rgba(23, 109, 255, 0.2), transparent 30rem),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  cursor: pointer;
}

.admin-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100svh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(3, 5, 16, 0.72);
}

.brand {
  font-size: 1.55rem;
  font-weight: 950;
}

.sidebar p,
.panel-heading p,
.status {
  color: var(--muted);
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.sidebar nav a,
.sidebar button,
.header-actions a,
.header-actions button,
.settings-row button,
.login-card button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: white;
  font-weight: 760;
}

.sidebar button {
  margin-top: auto;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 9, 24, 0.82);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.login-card {
  display: grid;
  gap: 16px;
  width: min(100%, 480px);
  padding: 32px;
}

.eyebrow {
  margin: 0;
  color: #b376ff;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.98;
}

h2 {
  margin-bottom: 8px;
}

label {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 760;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: white;
  outline: none;
}

input {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 126px;
  padding: 12px 14px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: rgba(39, 215, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(39, 215, 255, 0.08);
}

.login-card button,
.header-actions button,
.settings-row button[data-export],
[data-save] {
  border: 0;
  background: linear-gradient(135deg, var(--blue), var(--violet));
}

.dashboard {
  display: grid;
  gap: 22px;
  padding: 34px;
}

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

.header-actions,
.settings-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel {
  padding: 24px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

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

.field-grid label.wide {
  grid-column: 1 / -1;
}

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

.media-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.media-card img,
.media-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  background: #02040b;
}

.media-card small {
  color: var(--muted);
  word-break: break-all;
}

.status {
  margin: 8px 0 0;
}

@media (max-width: 980px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .field-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .panel-heading {
    display: grid;
  }
}
