.fc-auth {
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(16px, 5vw, 48px);
  background: #f2f5f5;
}

.fc-auth-panel {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 460px;
  min-width: 0;
  padding: clamp(22px, 6vw, 42px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 14px 42px rgba(20, 34, 38, .07), 0 2px 6px rgba(20, 34, 38, .04);
}

.fc-auth-brand {
  gap: 10px;
  font-size: 1rem;
  margin-bottom: 6px;
}

.fc-auth-heading h1 {
  margin: 0;
  font-size: clamp(1.65rem, 5.6vw, 2rem);
  line-height: 1.14;
  letter-spacing: -.035em;
}

.fc-auth-heading p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: .9375rem;
  line-height: 1.55;
}

.fc-auth .fc-form { gap: 14px; min-width: 0; }
.fc-auth .fc-field { gap: 6px; }
.fc-auth .fc-label { color: var(--text); font-size: .875rem; }
.fc-auth .fc-input {
  min-height: 50px;
  border-color: #85999e;
  border-radius: 10px;
  font-size: 1rem;
}

.fc-auth .fc-check {
  gap: 10px;
  width: fit-content;
  min-height: 44px;
  color: var(--text-2);
}

.fc-auth .fc-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--p);
}

.fc-auth .fc-btn {
  min-height: 50px;
  border-radius: 10px;
  text-align: center;
  white-space: normal;
}

.fc-auth .fc-btn:focus-visible,
.fc-auth .fc-input:focus-visible,
.fc-auth .fc-check input:focus-visible,
.fc-auth-toggle:focus-visible,
.fc-auth-back:focus-visible {
  outline: 2px solid var(--p);
  outline-offset: 2px;
}

.fc-auth-password { position: relative; }
.fc-auth-password:has(.fc-auth-toggle:not([hidden])) .fc-input { padding-inline-end: 96px; }
.fc-auth-toggle {
  position: absolute;
  inset: 3px 4px 3px auto;
  min-width: 80px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: var(--surface);
  color: var(--p);
  font-size: .875rem;
  font-weight: 650;
}

.fc-auth-toggle:hover,
.fc-auth-back:hover { background: var(--p-soft); }

.fc-auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--p);
  font-size: .875rem;
  font-weight: 650;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fc-auth .fc-alert { margin: 0; }
.fc-auth .validation-summary-valid { display: none; }
.fc-auth .validation-summary-errors ul { margin: 0; padding-inline-start: 1.2em; }
.fc-auth .input-validation-error { border-color: var(--neg); }

.fc-auth-setup {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
}

.fc-auth-setup img { display: block; max-width: 100%; height: auto; }
.fc-auth-setup p { display: grid; gap: 4px; min-width: 0; margin: 0; text-align: center; }
.fc-auth-setup span { color: var(--text-2); font-size: .8125rem; }
.fc-auth-setup code { overflow-wrap: anywhere; }

.fc-recovery-codes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fc-recovery-codes li {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  text-align: center;
  overflow-wrap: anywhere;
}

@media (forced-colors: active) {
  .fc-auth .fc-btn-primary { border-color: ButtonText; }
}
