/* Auth pages (login, access denied) */
:root {
  --afh-primary: #0b3d6e;
  --afh-primary-dark: #082a4d;
  --afh-accent: #0ea5e9;
  --afh-accent-soft: rgba(14, 165, 233, 0.15);
  --afh-surface: #ffffff;
  --afh-muted: #64748b;
  --afh-border: #e2e8f0;
  --afh-radius: 0.75rem;
  --afh-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.auth-brand {
  flex: 1;
  display: none;
  position: relative;
  background: linear-gradient(145deg, var(--afh-primary-dark) 0%, var(--afh-primary) 45%, #0c5a8f 100%);
  color: #fff;
  padding: 3rem;
  overflow: hidden;
}

@media (min-width: 992px) {
  .auth-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(14, 165, 233, 0.35) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.auth-brand-content {
  position: relative;
  z-index: 1;
  max-width: 28rem;
}

.auth-brand-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.auth-brand h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.auth-brand p {
  font-size: 1.05rem;
  line-height: 1.6;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.auth-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  opacity: 0.95;
}

.auth-features i {
  color: var(--afh-accent);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--afh-surface);
  border-radius: var(--afh-radius);
  box-shadow: var(--afh-shadow);
  border: 1px solid var(--afh-border);
  padding: 2.25rem 2rem;
}

.auth-card-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-card-header .auth-mobile-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  margin-bottom: 1rem;
}

@media (min-width: 992px) {
  .auth-card-header .auth-mobile-logo {
    display: none;
  }
}

.auth-card-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.auth-card-header p {
  color: var(--afh-muted);
  font-size: 0.9rem;
  margin: 0;
}

.auth-form .form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.35rem;
}

.auth-form .input-group-text {
  background: #f8fafc;
  border-color: var(--afh-border);
  color: var(--afh-muted);
}

.auth-form .form-control {
  border-color: var(--afh-border);
  padding: 0.6rem 0.85rem;
}

.auth-form .form-control:focus {
  border-color: var(--afh-accent);
  box-shadow: 0 0 0 3px var(--afh-accent-soft);
}

.auth-form .btn-primary {
  background: linear-gradient(180deg, var(--afh-primary) 0%, var(--afh-primary-dark) 100%);
  border: none;
  padding: 0.7rem 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-form .btn-primary:hover {
  background: linear-gradient(180deg, #0c4a7a 0%, var(--afh-primary-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(11, 61, 110, 0.35);
}

.auth-form .btn-outline-secondary {
  border-color: var(--afh-border);
  color: var(--afh-muted);
}

.auth-form .form-check-label {
  font-size: 0.875rem;
  color: #475569;
}

.demo-credentials {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--afh-border);
}

.demo-credentials summary {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.demo-credentials summary::-webkit-details-marker {
  display: none;
}

.demo-credentials-chevron {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--afh-muted);
  transition: transform 0.2s ease;
}

.demo-credentials[open] .demo-credentials-chevron {
  transform: rotate(180deg);
}

.demo-credentials-hint {
  font-size: 0.8rem;
  color: var(--afh-muted);
  margin: 0.5rem 0 0.75rem;
}

.demo-credentials-list {
  display: grid;
  gap: 0.5rem;
}

.demo-credential {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--afh-border);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-credential:hover,
.demo-credential.active {
  border-color: var(--afh-accent);
  background: var(--afh-accent-soft);
}

.demo-credential i {
  color: var(--afh-primary);
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.demo-credential-text {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--afh-muted);
  min-width: 0;
  word-break: break-all;
}

.demo-credential-text strong {
  flex-basis: 100%;
  font-size: 0.85rem;
  color: #0f172a;
}

.auth-footer-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--afh-muted);
}

/* Status / empty states (access denied, errors inside app layout) */
.status-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 12rem);
  padding: 2rem 1rem;
}

.status-card {
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: var(--afh-surface);
  border-radius: var(--afh-radius);
  box-shadow: var(--afh-shadow);
  border: 1px solid var(--afh-border);
  padding: 2.5rem 2rem;
}

.status-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.status-icon--danger {
  background: #fef2f2;
  color: #dc2626;
}

.status-icon--warning {
  background: #fffbeb;
  color: #d97706;
}

.status-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.status-card p {
  color: var(--afh-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.status-actions .btn-primary {
  background: linear-gradient(180deg, var(--afh-primary) 0%, var(--afh-primary-dark) 100%);
  border: none;
  font-weight: 600;
}

.status-actions .btn-primary:hover {
  background: linear-gradient(180deg, #0c4a7a 0%, var(--afh-primary-dark) 100%);
}

.status-actions .btn-outline-secondary {
  border-color: var(--afh-border);
  color: #475569;
  font-weight: 500;
}

.dark-mode .status-card {
  background: #343a40;
  border-color: #454d55;
}

.dark-mode .status-card h2 {
  color: #fff;
}

.dark-mode .status-card p {
  color: #adb5bd;
}

.dark-mode .status-icon--danger {
  background: rgba(220, 38, 38, 0.2);
  color: #f87171;
}

/* Registration page and the sign-in / sign-up switch link */
.auth-card--wide {
  max-width: 460px;
}

.auth-switch {
  text-align: center;
  margin: 1.1rem 0 0;
  font-size: 0.875rem;
  color: var(--afh-muted);
}

.auth-switch a {
  color: var(--afh-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover,
.auth-switch a:focus {
  color: var(--afh-accent);
  text-decoration: underline;
}

.auth-footer-note a {
  color: var(--afh-primary);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer-note a:hover,
.auth-footer-note a:focus {
  color: var(--afh-accent);
  text-decoration: underline;
}

.auth-password-hint {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--afh-muted);
}

.dark-mode .auth-switch,
.dark-mode .auth-password-hint {
  color: #adb5bd;
}

.dark-mode .auth-switch a {
  color: #93c5fd;
}
