:root {
  --ink: #2f1f2a;
  --ink-soft: #645262;
  --paper: #fff7fb;
  --white: #ffffff;
  --rose: #e85b8f;
  --rose-dark: #be3567;
  --line: #f2c7da;
  --shadow: 0 20px 38px rgba(190, 53, 103, 0.14);
}

* {
  box-sizing: border-box;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 2000;
  transform: translateY(-140%);
  padding: 10px 12px;
  color: #ffffff;
  background: var(--rose-dark);
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 8%, rgba(255, 183, 158, 0.35), transparent 28rem),
    radial-gradient(circle at 90% 2%, rgba(174, 230, 214, 0.34), transparent 28rem),
    linear-gradient(180deg, #fff7fb 0%, #ffffff 45%, #fff7ef 100%);
  font-family: "Nunito", "Segoe UI", sans-serif;
}

.admin-header {
  display: grid;
  grid-template-columns: minmax(120px, 220px) minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 248, 252, 0.92);
}

.brand img {
  width: 100%;
  max-width: 190px;
  height: auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 8px;
  padding: 7px 10px;
  color: var(--rose-dark);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
}

.header-copy h1 {
  font-size: 42px;
  line-height: 1.1;
}

.header-copy p {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-size: 18px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.language-switch select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 24px 6px 8px;
  background: #ffffff;
}

main {
  padding: 24px clamp(16px, 4vw, 56px) 40px;
}

.panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.gate p {
  margin: 8px 0;
  color: var(--ink-soft);
}

.gate-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffafd;
}

button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  padding: 12px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
}

button:hover {
  box-shadow: 0 12px 22px rgba(232, 91, 143, 0.26);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(232, 91, 143, 0.28);
  outline-offset: 3px;
}

.secondary-action {
  color: var(--rose-dark);
  background: #fff3f8;
  border: 1px solid var(--line);
}

.message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--rose-dark);
  font-weight: 700;
}

.hidden {
  display: none;
}

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

.stats h3 {
  font-size: 24px;
}

.stats p {
  margin: 8px 0 0;
  font-size: 28px;
  font-weight: 800;
}

.moderation-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 16px;
  margin-bottom: 12px;
}

.moderation-panel p {
  color: var(--ink-soft);
}

.moderation-panel ul {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, auto) auto auto auto auto;
  gap: 10px;
  margin-bottom: 12px;
}

.results-summary {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

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

tr {
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

tbody tr.needs-review {
  background: rgba(255, 227, 239, 0.34);
}

tbody tr:hover {
  background: rgba(255, 250, 253, 0.88);
}

tr.empty-row td {
  padding: 28px 12px;
  text-align: center;
  color: var(--ink-soft);
  font-weight: 800;
}

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

th {
  color: #553447;
  font-weight: 800;
}

td p {
  margin: 0;
  max-width: 360px;
  color: var(--ink-soft);
}

.story-meta {
  display: block;
  margin-top: 6px;
  color: #806d7a;
  font-size: 12px;
  font-weight: 800;
}

.review-badge {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  background: #f4f0ed;
  color: var(--ink-soft);
}

.review-badge.warning {
  color: #8a2550;
  background: #ffe3ef;
}

.status-badge {
  display: inline-flex;
  padding: 5px 8px;
  color: var(--ink-soft);
  background: #f4f0ed;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge.pending {
  color: #8a2550;
  background: #ffe3ef;
}

.status-badge.published {
  color: #496f35;
  background: #e7f4df;
}

.status-badge.removed {
  color: #6b5c67;
  background: #eee6ec;
}

.review-list {
  margin: 0;
  padding-left: 16px;
  color: var(--ink-soft);
  font-size: 13px;
}

.table-action {
  padding: 8px 10px;
  font-size: 13px;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 190px;
}

.table-action.secondary {
  color: var(--rose-dark);
  background: #fff3f8;
  border: 1px solid var(--line);
}

.table-action.danger {
  background: #5f263f;
}

footer {
  padding: 18px 16px 28px;
  text-align: center;
}

.admin-footer-contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: var(--ink-soft);
}

footer a {
  display: inline-flex;
  margin: 0 8px 8px;
  color: var(--rose-dark);
  text-decoration: none;
  font-weight: 700;
}

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

  .stats {
    grid-template-columns: 1fr;
  }

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

  .gate-row {
    grid-template-columns: 1fr;
  }

  .moderation-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body {
    background: linear-gradient(180deg, #fff7fb 0%, #ffffff 58%, #fff7ef 100%);
  }

  main {
    padding-inline: 12px;
  }

  .admin-header {
    padding-inline: 14px;
  }

  .header-copy h1 {
    font-size: 34px;
  }

  .panel {
    padding: 14px;
  }

  .table-wrap {
    overflow: visible;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tbody tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 24px rgba(190, 53, 103, 0.1);
  }

  td {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(242, 199, 218, 0.72);
  }

  td::before {
    content: attr(data-label);
    color: #553447;
    font-weight: 900;
  }

  td:last-child {
    border-bottom: 0;
  }

  td p {
    max-width: none;
  }

  tr.empty-row {
    display: block;
  }

  tr.empty-row td {
    display: block;
    text-align: left;
  }

  tr.empty-row td::before {
    content: "";
  }

  .table-actions {
    min-width: 0;
  }

  .table-action {
    flex: 1 1 120px;
  }
}
