/* Login / admin pages — server-rendered, reuses global.css + tokens.css. */

.auth-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-4);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  padding: var(--space-8) var(--space-6);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-7);
}

.auth-brand__logo {
  height: 52px;
  width: auto;
  margin-bottom: var(--space-3);
}

.auth-brand__tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--fs-pair-caption);
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: var(--color-accent);
}

.auth-brand__tagline::before,
.auth-brand__tagline::after {
  content: "";
  flex: none;
  width: 14px;
  height: 1px;
  background: var(--color-border);
}

.auth-field {
  margin-bottom: var(--space-5);
}

.auth-field label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--fs-nested);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.auth-field input {
  width: 100%;
  padding: var(--space-4) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font: inherit;
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s, outline-color 0.2s;
}

.auth-field input:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 2.75rem;
}

.auth-password__toggle {
  position: absolute;
  top: 50%;
  right: var(--space-3);
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
}

.auth-password__toggle:hover {
  color: var(--color-text);
}

.auth-password__toggle svg {
  width: 20px;
  height: 20px;
}

.auth-password__toggle svg.is-hidden {
  display: none;
}

.auth-submit {
  width: 100%;
  padding: var(--space-4);
  border: none;
  border-radius: 10px;
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.auth-submit:hover {
  background: var(--color-accent-vivid);
}

.auth-submit:active {
  transform: scale(0.98);
}

.auth-submit:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.auth-error {
  margin: 0 0 var(--space-5);
  padding: var(--space-3);
  border-radius: 6px;
  background: #fbe9e7;
  color: #a33a2c;
  font-size: var(--fs-nested);
}

.auth-note {
  margin-top: var(--space-5);
  text-align: center;
  font-size: var(--fs-nested);
  color: var(--color-text-muted);
}

/* ---- Expired-account interstitial ---- */

.expired-shell {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-4);
  text-align: center;
}

.expired-card {
  max-width: 420px;
}

.expired-card h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-unit-title);
  color: var(--color-text);
  margin: 0 0 var(--space-4);
}

.expired-card p {
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
  margin: 0 0 var(--space-3);
}

/* ---- Admin console ---- */

.admin-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: var(--space-7) var(--space-4);
}

.admin-shell__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.admin-shell__header h1 {
  font-family: var(--font-serif);
  font-size: var(--fs-unit-title);
  margin: 0;
}

.admin-btn {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: 6px;
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-size: var(--fs-nested);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-btn--ghost {
  background: transparent;
  color: var(--color-accent);
}

.admin-btn--danger {
  background: transparent;
  border-color: #a33a2c;
  color: #a33a2c;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
  font-size: var(--fs-nested);
}

.admin-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  background: var(--color-bg);
}

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

.admin-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-pair-caption);
  font-weight: 600;
}

.admin-status--active {
  background: var(--color-accent-tint);
  color: var(--color-accent);
}

.admin-status--expired {
  background: #fbe9e7;
  color: #a33a2c;
}

.admin-row-actions {
  display: flex;
  gap: var(--space-3);
}

.admin-row-actions a,
.admin-row-actions button {
  font-size: var(--fs-nested);
  color: var(--color-accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-decoration: underline;
}

.admin-row-actions .is-danger {
  color: #a33a2c;
}

.admin-form-card {
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: var(--space-6);
}

.admin-form-hint {
  margin: -var(--space-3) 0 var(--space-5);
  font-size: var(--fs-pair-caption);
  color: var(--color-text-faint);
}
