/* Global scale-down — Pico defaults are too large */
html { font-size: 14px; }

/* Nav */
nav.container-fluid {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--pico-muted-border-color);
}

nav.container-fluid ul {
  gap: 1.25rem;
}

.site-title {
  font-size: 1.1rem;
  text-decoration: none;
}

.nav-search input[type="search"] {
  margin-bottom: 0;
  min-width: 220px;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 0.25rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--pico-color-red-500, #e74c3c);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  min-width: 1.2em;
  padding: 0 0.35em;
  line-height: 1.4;
  margin-left: 0.2em;
}

/* Flash messages */
.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--pico-border-radius);
  margin-bottom: 1rem;
  border-left: 4px solid currentColor;
}
.flash-success { background: #d4edda; color: #155724; }
.flash-error   { background: #f8d7da; color: #721c24; }
.flash-info    { background: #d1ecf1; color: #0c5460; }

/* Hero search */
.hero {
  padding-block: 1.5rem;
  text-align: center;
}

.hero h1 { font-size: 1.6rem; }
.hero p  { font-size: 0.9rem; }

.hero form {
  width: 100%;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.search-row input {
  width: 100%;
  margin-bottom: 0;
}

.search-row button {
  margin-bottom: 0;
  white-space: nowrap;
}

/* Detail grid */
.detail-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.5rem;
  align-items: baseline;
}

.detail-grid dt {
  font-weight: 600;
  color: var(--pico-muted-color);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.detail-grid.compact dt,
.detail-grid.compact dd {
  font-size: 0.9rem;
}

/* Required field marker */
.required {
  color: var(--pico-color-red-500, #e74c3c);
}

/* Approval queue */
.queue-entry header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.queue-entry header small {
  color: var(--pico-muted-color);
}

.queue-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.approve-btn { --pico-background-color: #28a745; }
.reject-btn  { --pico-color: #dc3545; --pico-border-color: #dc3545; }

/* Login page */
.login-page {
  display: flex;
  justify-content: center;
  padding-top: 3rem;
}

.login-card {
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.github-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
}

/* User management */
.add-user-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: start;
}
.add-user-row input  { width: 100%; margin-bottom: 0; }
.add-user-row select { margin-bottom: 0; }
.add-user-row button { margin-bottom: 0; white-space: nowrap; }

.role-badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}
.role-administrator { background: #d4edda; color: #155724; }
.role-editor        { background: #d1ecf1; color: #0c5460; }

.status-active  { color: #28a745; font-size: 0.85rem; }
.status-pending { color: var(--pico-muted-color); font-size: 0.85rem; }

.user-actions { white-space: nowrap; }
.small-btn { padding: 0.2em 0.6em; font-size: 0.8rem; }
.remove-btn { --pico-color: #dc3545; --pico-border-color: #dc3545; }
.muted { color: var(--pico-muted-color); font-size: 0.85rem; }

/* Footer */
footer {
  margin-top: 3rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--pico-muted-border-color);
  text-align: center;
}
