:root {
  color-scheme: light;
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-text: #111827;
  --color-muted: #64748b;
  --color-border: #dbe2ea;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-danger: #b91c1c;
  --color-danger-hover: #991b1b;
  --shadow-card: 0 1px 3px rgba(15, 23, 42, 0.08), 0 8px 24px rgba(15, 23, 42, 0.05);
}

:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.app-nav {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 0 auto 1.5rem;
  max-width: 1080px;
}

.app-nav--narrow { max-width: 640px; }
.app-nav--wide { max-width: 1280px; }

.app-nav__brand {
  color: var(--color-text);
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.app-nav__links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.app-nav__links a,
.app-nav__links button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  text-decoration: none;
}

.app-nav__links a:hover,
.app-nav__links button:hover {
  background: #e8eef9;
  color: #1e40af;
}

.app-nav__links [aria-current="page"] {
  background: #dbeafe;
  color: #1e40af;
}

.table-scroll {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow-x: auto;
}

.table-scroll table {
  min-width: 640px;
}

.table-scroll--compact table {
  min-width: 520px;
}

.interactive-row:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: -3px;
}

.btn-danger {
  background: #fff;
  border-color: #fecaca !important;
  color: var(--color-danger);
}

.btn-danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5 !important;
  color: var(--color-danger-hover);
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 640px) {
  .app-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .app-nav__links {
    justify-content: flex-start;
    margin-left: -0.65rem;
  }
}
