/* Minimal, self-contained, WCAG 2.2 AA-minded styling for the internal preview
   dashboard. No external fonts or assets (SWA serves this alone). Colours meet
   4.5:1 contrast on white; focus is always visible. */

:root {
  --ink: #1a1a1a;
  --muted: #595959;
  --line: #d4d4d4;
  --brand: #0b5c3f; /* EFC green, darkened for AA text contrast */
  --danger: #a4262c;
  --focus: #1668c1;
  --bg-alt: #f5f5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  color: var(--ink);
  line-height: 1.5;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--brand);
}

.topbar h1 {
  font-size: 1.25rem;
  margin: 0;
}

.user {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  padding: 1.5rem;
  max-width: 70rem;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

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

.status.error {
  color: var(--danger);
  font-weight: 600;
}

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

caption {
  text-align: left;
}

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

thead th {
  border-bottom: 2px solid var(--line);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

td a {
  color: var(--brand);
  word-break: break-all;
}

.actions {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn {
  font: inherit;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--brand);
  background: var(--brand);
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-danger {
  border-color: var(--danger);
  background: var(--danger);
}

.btn:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.empty {
  color: var(--muted);
  padding: 1rem 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
