/*
 * Admin (/admin) — reuses the public tokens/header/buttons from
 * application.css; only tables and forms are specific to it.
 */

.admin main {
  max-width: 1280px;
}

.admin .site-header {
  padding: 16px 24px;
}

.admin .site-header .site-nav a {
  font-size: 13px;
}

.admin-session {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
}

.admin-session a {
  color: white;
  opacity: 0.85;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--blue-600);
  cursor: pointer;
}

.admin-session .link-button {
  color: white;
  opacity: 0.85;
}

.link-button.danger {
  color: #b91c1c;
}

.flash {
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  margin: 0 0 16px;
}

.flash-notice {
  background: #dcfce7;
  color: #166534;
}

.flash-alert {
  background: #fee2e2;
  color: #991b1b;
}

.muted {
  color: var(--muted);
  font-weight: 500;
}

.nowrap {
  white-space: nowrap;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-heading .btn-primary {
  text-decoration: none;
}

.admin-filter {
  margin-bottom: 14px;
}

.admin-filter select,
.admin-form select,
.admin-form input:not([type="checkbox"]):not([type="file"]):not([type="submit"]),
.admin-form textarea,
.admin-signin input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--ink);
  width: 100%;
}

.admin-filter select {
  width: auto;
}

.admin-table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.admin-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.admin-table thead th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--blue-50);
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover {
  background: var(--bg);
}

.admin-table .actions {
  display: flex;
  gap: 12px;
}

.admin-table .changes {
  color: var(--muted);
  max-width: 480px;
}

.admin-form,
.admin-signin {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 760px;
}

.admin-signin {
  max-width: 380px;
  margin: 40px auto;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
  min-width: 0;
}

.admin-field label,
.admin-signin label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-field .hint,
.admin-form > .hint {
  font-size: 12px;
  color: var(--muted);
}

.field-error {
  font-size: 12px;
  color: #b91c1c;
}

.admin-field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 14px;
}

.admin-checks .filter-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.admin-form-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.admin-pagination {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

.admin .stat-grid .stat {
  color: inherit;
}

.brand-logo-card {
  margin: 4px 0;
}
