.admin-body {
  background: #eef1ed;
}

.admin-topbar {
  position: static;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 48px);
  background: #171816;
  color: #fff;
}

.admin-nav {
  display: flex;
  gap: 16px;
  font-weight: 800;
}

.login-shell {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
}

.login-card h1 {
  max-width: none;
  margin-bottom: 24px;
  font-size: 2.3rem;
}

.admin-shell {
  padding: clamp(28px, 5vw, 56px);
}

.admin-hero {
  max-width: 940px;
  padding: 0 0 34px;
}

.admin-hero h1 {
  max-width: none;
  color: var(--ink);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.admin-hero p {
  max-width: 760px;
  color: var(--muted);
}

.admin-flash,
.admin-error {
  padding: 12px 14px;
  border-radius: 6px;
  font-weight: 800;
}

.admin-flash {
  width: fit-content;
  background: #dff1e8;
  color: var(--green);
}

.admin-error {
  background: #f8dfdb;
  color: var(--red);
}

.field-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.video-edit-heading {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-badge,
.source-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.card-badge {
  background: #fff2d8;
  color: var(--amber-dark);
}

.source-badge {
  background: #e4f1ef;
  color: var(--teal);
}

.visibility-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.visibility-badge.is-live {
  background: #dff1e8;
  color: var(--green);
}

.visibility-badge.is-hidden {
  background: #f0e9dc;
  color: #845c25;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
}

.status-pill.is-good {
  background: #dff1e8;
  color: var(--green);
}

.status-pill.is-bad {
  background: #f8dfdb;
  color: var(--red);
}

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

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.stats-grid div {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stats-grid strong,
.stats-grid span {
  display: block;
}

.stats-grid strong {
  font-size: 2rem;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 800;
}

.admin-card {
  display: grid;
  gap: 16px;
  align-content: start;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 35px rgba(23, 24, 22, 0.06);
}

.admin-card.wide {
  grid-column: span 3;
}

.admin-card h2,
.admin-list-section h2 {
  max-width: none;
  font-size: 1.45rem;
}

.checks,
.checkline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

.toggle-chip {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f4ee;
  font-weight: 800;
}

.toggle-chip input {
  margin: 0;
}

.toggle-chip-wide {
  grid-column: 1 / -1;
}

.admin-list-section {
  padding: 34px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(23, 24, 22, 0.04);
}

.section-head h2 {
  margin: 0;
  line-height: 1.2;
}

.bulk-delete-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #d3a49d;
  border-radius: 6px;
  background: #fff1ef;
  color: #972f22;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.bulk-delete-btn:hover,
.bulk-delete-btn:focus-visible {
  background: #fce3de;
  border-color: #be6a5f;
}

.bulk-delete-btn:active {
  transform: translateY(1px);
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
}

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

.url-cell {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.status-form select {
  min-width: 160px;
}

th {
  background: #f7f4ee;
  font-size: 0.86rem;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-actions button,
.mini-list button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
  font-weight: 800;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.edit-list form {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.row-actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid #b86f18;
  background: var(--amber);
  color: #17120d;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.row-actions button:hover,
.row-actions button:focus-visible {
  background: #e6a13e;
}

.row-actions button[data-confirm-delete] {
  border-color: #d3a49d;
  background: #fff1ef;
  color: #972f22;
}

.row-actions button[data-confirm-delete]:hover,
.row-actions button[data-confirm-delete]:focus-visible {
  background: #fce3de;
  border-color: #be6a5f;
}

.row-actions button:active {
  transform: translateY(1px);
}

.mini-list strong,
.mini-list span {
  display: block;
}

.mini-list span {
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .admin-grid,
  .admin-list-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-card.wide {
    grid-column: auto;
  }

  .video-controls {
    grid-template-columns: 1fr;
  }

  .toggle-chip-wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .admin-topbar {
    display: grid;
    gap: 14px;
  }

  .section-head {
    padding: 12px;
  }

  .bulk-delete-btn {
    width: 100%;
  }
}
