.auth-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1.5rem;
}

.auth-top {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.brand--center {
  flex-direction: column;
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.auth-form input {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  box-sizing: border-box;
}

.auth-captcha {
  margin-top: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2, rgba(99, 102, 241, 0.06));
}

.auth-captcha label {
  margin-top: 0 !important;
}

.auth-captcha__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.35rem 0 0.5rem;
}

.auth-captcha__question {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  color: var(--accent, #6366f1);
}

.auth-captcha__refresh {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}

.auth-captcha__refresh:hover {
  background: rgba(99, 102, 241, 0.12);
}

.btn--block {
  width: 100%;
  margin-top: 1rem;
}

.auth-error {
  color: #fecaca;
  font-size: 0.875rem;
  margin-top: 1rem;
  text-align: center;
}

.auth-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 1.25rem;
  text-align: center;
  line-height: 1.5;
}

.auth-hint--download {
  margin-top: 0.65rem;
}

.auth-hint--download a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-hint--download a:hover {
  text-decoration: underline;
}

.header-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.header-nav a {
  text-decoration: none;
}

.admin-panel {
  margin-bottom: 1rem;
}

.admin-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.admin-form input,
.admin-form select {
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  min-width: 140px;
}

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

.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.user-table th,
.user-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--border);
}

.user-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.btn--sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.75rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.role-select {
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem;
}
