:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #141414;
  --panel-2: #1f1f1f;
  --line: #2b2b2b;
  --text: #ffffff;
  --muted: #a5a5a5;
  --red: #e50914;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

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

button {
  border: 0;
  border-radius: 6px;
  background: var(--red);
  color: white;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 0 14px;
}

button:disabled {
  cursor: progress;
  opacity: .6;
}

.ghost {
  background: transparent;
  border: 1px solid var(--line);
}

.hidden {
  display: none !important;
}

.brand {
  color: var(--red);
  font-size: 24px;
  font-weight: 950;
  margin: 0 0 24px;
}

.login-view {
  align-items: center;
  background:
    linear-gradient(rgba(0, 0, 0, .65), rgba(0, 0, 0, .92)),
    url("https://images.unsplash.com/photo-1517154421773-0529f29ea451?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 24px;
}

.login-panel {
  background: rgba(0, 0, 0, .78);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 430px;
  padding: 32px;
  width: 100%;
}

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

.sidebar {
  background: #000;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 16px;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-link,
.filter {
  background: transparent;
  color: var(--muted);
  justify-content: flex-start;
  text-align: left;
}

.nav-link.active,
.filter.active {
  background: rgba(229, 9, 20, .16);
  color: white;
}

.content {
  min-width: 0;
  padding: 22px;
}

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

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

#adminEmail,
.muted,
.copy {
  color: var(--muted);
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

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

.metrics article,
.card-form,
.item,
.banner-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  padding: 22px;
}

.metrics span {
  display: block;
  font-size: 38px;
  font-weight: 950;
}

.split {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
}

.card-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.card-form.narrow {
  max-width: 560px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  min-height: 42px;
  padding: 10px;
  width: 100%;
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

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

.checks label {
  align-items: center;
  display: flex;
  gap: 8px;
}

.checks input {
  min-height: auto;
  width: auto;
}

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

.item {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 86px 1fr auto;
  padding: 10px;
}

.item img,
.banner-card img {
  background: var(--panel-2);
  border-radius: 6px;
  height: 56px;
  object-fit: cover;
  width: 86px;
}

.item h3 {
  margin: 0 0 4px;
}

.item p {
  color: var(--muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.mini-actions button {
  min-height: 34px;
}

.danger {
  background: #7a1118;
}

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

.banner-card {
  overflow: hidden;
}

.banner-card img {
  border-radius: 0;
  height: 190px;
  width: 100%;
}

.banner-card .body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.banner-card h3 {
  margin: 0;
}

.toast {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45);
  max-width: 420px;
  padding: 14px 16px;
  position: fixed;
  right: 18px;
}

.error {
  color: #ff8a8a;
  min-height: 20px;
}

@media (max-width: 1000px) {
  .admin-view {
    grid-template-columns: 88px 1fr;
  }

  .sidebar .brand,
  .nav-link {
    font-size: 0;
  }

  .nav-link::first-letter {
    font-size: 16px;
  }

  .metrics,
  .split,
  .banner-grid {
    grid-template-columns: 1fr;
  }
}
