/*
 * 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.
 */

* {
  box-sizing: border-box;
}

html {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2937;
  background: #f8fafc;
}

body {
  margin: 0;
  padding: 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  min-height: 100vh;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 16px 24px;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-brand {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav__user {
  color: #6b7280;
  font-size: 14px;
}

.page-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.page-title {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 28px;
  line-height: 1.2;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.card__title {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
}

.flash {
  padding: 14px 16px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.flash--notice {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.flash--alert {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.form-input,
.form-select {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font-size: 14px;
  color: #111827;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.button,
.button:visited {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #2563eb;
  background: #2563eb;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  text-decoration: none;
}

.button--secondary,
.button--secondary:visited {
  background: #ffffff;
  color: #111827;
  border-color: #d1d5db;
}

.button--secondary:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.button--danger,
.button--danger:visited {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.button--danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.inline-form {
  display: inline;
}

.data-list {
  margin: 0;
  padding-left: 18px;
}

.data-list li {
  margin-bottom: 8px;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.data-table th,
.data-table td {
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.data-table th {
  background: #f9fafb;
  font-weight: 700;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.status-badge--active {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.status-badge--disabled {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fdba74;
}

.status-badge--archived {
  background: #f3f4f6;
  color: #374151;
  border-color: #d1d5db;
}

.status-badge--admin {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.status-badge--user {
  background: #f9fafb;
  color: #374151;
  border-color: #d1d5db;
}

.status-badge--suspended,
.status-badge--alert {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}

.status-badge--notice {
  background: #ecfeff;
  color: #155e75;
  border-color: #a5f3fc;
}

.qr-preview {
  display: inline-block;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}

.actions-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.muted {
  color: #6b7280;
}

.section-spacer {
  margin-top: 24px;
}

.error-box {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: 10px;
  color: #991b1b;
}

.error-box h2,
.error-box h3 {
  margin-top: 0;
}

.split-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .split-grid {
    grid-template-columns: 1fr 1fr;
  }
}