/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  color: #222;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem;
}

.topbar {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar a,
.topbar .link-button {
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}

.notice {
  color: #14532d;
}

.alert {
  color: #7f1d1d;
}

.admin-layout {
  display: flex;
  gap: 1rem;
  padding: 1rem;
}

.admin-sidebar {
  min-width: 220px;
  background: #e2e8f0;
  padding: 1rem;
  border-radius: 8px;
}

.admin-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.admin-sidebar .active {
  font-weight: bold;
}

.admin-content {
  flex: 1;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
}

/* Sortable table headers (WAI-ARIA sortable table pattern — see W3C APG) */
.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;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-users-table th,
.admin-users-table td {
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.6rem;
  vertical-align: middle;
}

.admin-sort-form {
  margin: 0;
  padding: 0;
  height: 100%;
}

.admin-sort-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 100%;
  min-height: 2.5rem;
  margin: 0;
  padding: 0.35rem 0.5rem;
  font: inherit;
  text-align: left;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 4px;
}

.admin-sort-button:hover,
.admin-sort-button:focus {
  background: #e2e8f0;
  outline: none;
}

.admin-sort-button:focus {
  box-shadow: 0 0 0 2px #0f172a;
}

.admin-sort-icons {
  flex-shrink: 0;
  line-height: 1;
}

/* Kaminari pagination (https://github.com/kaminari/kaminari) */
nav.pagination {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

nav.pagination a,
nav.pagination span {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #fff;
  text-decoration: none;
  color: #0f172a;
}

nav.pagination a:hover {
  background: #e2e8f0;
}

nav.pagination span.current {
  font-weight: bold;
  background: #0f172a;
  color: #fff;
  border-color: #0f172a;
}

nav.pagination span.page.gap {
  border: 0;
  background: transparent;
}
