:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --border: #d8dee9;
  --text: #172033;
  --muted: #667085;
  --primary: #155eef;
  --primary-strong: #0b47c2;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --warn: #b54708;
  --warn-bg: #fffaeb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
textarea {
  font: inherit;
}

.topbar {
  min-height: 72px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 20px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--muted);
  text-transform: uppercase;
}

.subtle {
  color: var(--muted);
}

.session {
  display: flex;
  align-items: center;
  gap: 10px;
}

.session-status {
  color: var(--muted);
  white-space: nowrap;
}

.notification-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
  user-select: none;
  white-space: nowrap;
}

.notification-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.notification-switch {
  width: 42px;
  height: 24px;
  padding: 2px;
  border-radius: 999px;
  background: #aeb8c7;
  transition: background 150ms ease;
}

.notification-switch-thumb {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.3);
  transition: transform 150ms ease;
}

.notification-control input:checked + .notification-switch {
  background: var(--ok);
}

.notification-control input:checked + .notification-switch .notification-switch-thumb {
  transform: translateX(18px);
}

.notification-control input:focus-visible + .notification-switch {
  outline: 3px solid rgba(21, 94, 239, 0.28);
  outline-offset: 2px;
}

.notification-control.blocked {
  color: var(--danger);
}

.notification-control[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.55;
}

.button,
.icon-button,
.filter,
.mode-tab {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 38px;
  cursor: pointer;
  font-weight: 700;
}

.button:hover,
.icon-button:hover,
.filter:hover,
.mode-tab:hover {
  border-color: #aeb8c7;
}

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

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

.button.primary:hover {
  background: var(--primary-strong);
}

.button.approve {
  border-color: var(--ok);
  background: var(--ok);
  color: white;
}

.button.reject {
  border-color: var(--danger);
  background: var(--danger);
  color: white;
}

.button.edit {
  border-color: var(--warn);
  background: var(--warn);
  color: white;
}

.layout {
  height: calc(100vh - 73px);
}

.login-panel {
  width: min(560px, calc(100vw - 32px));
  margin: 72px auto;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.login-panel p {
  color: var(--muted);
  margin: 8px 0 18px;
}

.dashboard {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
}

.queue-pane {
  border-right: 1px solid var(--border);
  background: var(--surface);
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.toolbar {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.mode-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.mode-tab.active {
  color: white;
  border-color: var(--primary);
  background: var(--primary);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter.active {
  background: var(--surface-2);
  border-color: #aeb8c7;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.queue-summary {
  padding: 10px 14px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.queue-list {
  overflow: auto;
  min-height: 0;
}

.queue-item {
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 14px;
  cursor: pointer;
}

.queue-item:hover,
.queue-item.active {
  background: #f8fafc;
}

.queue-item-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 800;
}

.queue-badges,
.detail-badges {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.queue-item-body {
  margin-top: 6px;
  color: var(--muted);
}

.badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.reported-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f5cd77;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.detail-pane {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 22px;
}

.empty-detail,
.detail {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.empty-detail {
  color: var(--muted);
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-header h2 {
  margin-top: 8px;
}

.status-pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  background: var(--warn-bg);
  color: var(--warn);
  white-space: nowrap;
}

.image-wrap {
  margin-bottom: 18px;
}

.image-wrap img {
  display: block;
  max-width: min(720px, 100%);
  max-height: 420px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--surface-2);
}

.identity-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.identity-images figure {
  margin: 0;
}

.identity-images img {
  display: block;
  width: 100%;
  max-height: 520px;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
}

.identity-images figcaption {
  margin-top: 7px;
  color: var(--muted);
  font-weight: 700;
}

.content-block {
  margin-top: 18px;
}

.report-block {
  border: 1px solid #f5cd77;
  border-radius: 8px;
  background: var(--danger-bg);
  padding: 14px;
}

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

.report-card {
  border: 1px solid #f5cd77;
  border-radius: 8px;
  background: var(--surface);
  padding: 12px;
}

.report-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.report-meta {
  color: var(--muted);
  font-size: 12px;
}

.report-comment {
  margin-top: 8px;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.report-comment-muted {
  color: var(--muted);
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fbfcfe;
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.decision-panel {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

label {
  font-weight: 800;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  resize: vertical;
  min-height: 82px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: white;
}

.decision-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--text);
  color: white;
  box-shadow: 0 12px 36px rgba(16, 24, 40, 0.22);
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout {
    height: auto;
  }

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

  .queue-pane {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    max-height: 48vh;
  }

  .identity-images {
    grid-template-columns: 1fr;
  }
}
