:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f9fafb;
  --text: #172033;
  --muted: #667085;
  --line: #d9e0ea;
  --primary: #2563eb;
  --green: #15803d;
  --green-bg: #dcfce7;
  --red: #b42318;
  --red-bg: #fee4e2;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.admin-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.site-link {
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.admin-subtitle,
.muted,
.status-message {
  color: var(--muted);
}

.state-panel,
.dashboard {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.state-panel {
  display: grid;
  gap: 16px;
  max-width: 620px;
  padding: 28px;
}

.dashboard {
  padding: 22px;
}

.hidden {
  display: none !important;
}

.dashboard-topline,
.toolbar,
.comment-card-header,
.comment-card-actions,
.load-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow,
.stat-label,
.meta-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-email {
  margin-top: 4px;
  font-weight: 700;
}

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

.stat-card {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 2rem;
}

.toolbar {
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
}

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

.button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 0 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.button-primary {
  background: var(--primary);
  color: white;
}

.button-neutral {
  background: white;
  border-color: var(--line);
  color: var(--text);
}

.button-approve {
  background: var(--green-bg);
  color: var(--green);
}

.button-reject {
  background: var(--red-bg);
  color: var(--red);
}

.comments-list {
  display: grid;
  gap: 14px;
}

.comment-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
}

.comment-card.is-busy {
  opacity: 0.58;
  pointer-events: none;
}

.comment-card-header {
  align-items: flex-start;
}

.comment-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.comment-title-group input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.comment-author {
  font-size: 1rem;
  font-weight: 800;
  word-break: break-word;
}

.comment-body {
  margin: 12px 0;
  color: #344054;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.meta-item {
  min-width: 0;
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 10px;
}

.meta-value {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 0.86rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}

.load-more-row {
  justify-content: center;
  margin-top: 20px;
}

@media (max-width: 720px) {
  .admin-header,
  .dashboard-topline,
  .toolbar,
  .comment-card-header {
    align-items: stretch;
    flex-direction: column;
  }

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

  .comment-card-actions,
  .toolbar-actions {
    width: 100%;
  }

  .comment-card-actions .button,
  .toolbar-actions .button,
  .dashboard-topline .button {
    flex: 1;
  }
}