/* Opt in to cross-document view transitions, like the SW shell pages (see sw-sidebar.css):
   navigating between opted-in and non-opted-in pages raises an unhandled InvalidStateError. */
@view-transition { navigation: auto; }

/* Access screens (login, verification, create/reset password) on the SW design system.
   Tokens only. Standalone pages: no sidebar, centered card on the page background. */

body.sw-auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  margin: 0;
  padding: var(--space-6) var(--space-4);
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-leading);
}
body.sw-auth *, body.sw-auth *::before, body.sw-auth *::after { box-sizing: border-box; }
body.sw-auth [hidden] { display: none; }

.sw-auth__card {
  width: min(26rem, 100%);
  overflow: hidden;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-panel);
  background: var(--surface-card);
  box-shadow: var(--shadow-md);
}
.sw-auth__card::before { content: ""; display: block; height: 3px; background: var(--sw-gradient-brand); }
.sw-auth__body { display: grid; gap: var(--space-5); padding: var(--space-8) var(--space-6) var(--space-6); }

.sw-auth__brand { display: grid; justify-items: center; gap: var(--space-2); text-align: center; }
.sw-auth__logo { width: 4.5rem; height: 4.5rem; object-fit: contain; }
.sw-auth__title { margin: var(--space-2) 0 0; font-family: var(--font-heading); font-size: var(--text-xl); font-weight: var(--heading-weight); line-height: 1.25; }
.sw-auth__subtitle { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); }
.sw-auth__copy { margin: 0; color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.6; }

.sw-auth__form { display: grid; gap: var(--space-4); }
.sw-auth__check { display: flex; align-items: center; gap: var(--space-2); min-height: var(--hit-min); font-size: var(--text-sm); cursor: pointer; }
.sw-auth__meta { color: var(--text-secondary); font-size: var(--text-xs); }
.sw-auth__links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--space-2) var(--space-5); font-size: var(--text-sm); }
.sw-auth__links a, .sw-auth__linkbtn { color: var(--text-link); font: inherit; text-decoration: none; background: none; border: 0; padding: var(--space-1) 0; cursor: pointer; border-radius: var(--radius-xs); }
.sw-auth__links a:hover, .sw-auth__linkbtn:hover:not(:disabled) { text-decoration: underline; }
.sw-auth__linkbtn:disabled { color: var(--text-subtle); cursor: not-allowed; }
.sw-auth__links a:focus-visible, .sw-auth__linkbtn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.sw-auth__note { padding: var(--space-3); border: 1px solid var(--border-soft); border-radius: var(--radius-control); background: var(--surface-soft); color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.55; }
.sw-auth__note strong { color: var(--text-primary); }
.sw-auth__section { margin: 0; font-size: var(--text-xs); font-weight: var(--label-weight); letter-spacing: var(--label-tracking); text-transform: uppercase; color: var(--text-subtle); }
.sw-auth__actions { display: grid; gap: var(--space-2); }
.sw-auth__otp input { font-family: var(--font-numeric); font-size: var(--text-xl); letter-spacing: .5em; text-align: center; }
.sw-auth__mark { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto; border-radius: var(--radius-card); background: var(--accent-fill); color: var(--accent-text); }
.sw-auth__mark .sw-icon { width: var(--icon-lg); height: var(--icon-lg); }

.sw-field__control .sw-btn--icon { flex: 0 0 auto; margin-right: calc(var(--space-2) * -1); width: 2rem; min-height: 2rem; color: var(--text-secondary); }

.sw-auth__blocked ol { margin: var(--space-3) 0 0; padding-left: var(--space-5); color: var(--text-secondary); font-size: var(--text-sm); line-height: 1.7; }

/* Language switch on the access screens */
.sw-float-actions { position: fixed; top: var(--space-4); right: var(--space-4); z-index: 10; display: flex; gap: var(--space-1); }
