/* =========================================
   Academico.Digital identity: auth pages shared styles.
   Forked from livepasses' auth-shared.css. Colours come only from tokens.css.
   ========================================= */

/* Shell wrapper used by AuthLayout and _Layout */
.auth-shell {
  min-height: 100vh;
  width: 100%;
  background: var(--ad-bg);
  color: var(--ad-ink);
  font-family: var(--ad-font-sans);
  display: flex;
  flex-direction: column;
}

/* Top header (logo + theme toggle), dark in both themes. */
.auth-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  display: flex;
  align-items: center;
  background: var(--ad-hero-bg);
  border-bottom: 1px solid var(--ad-on-hero-line);
}

.auth-header-inner {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-header-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border-radius: var(--ad-radius-xs);
}

.auth-header-brand img {
  display: block;
  height: 28px;
  width: auto;
}

.auth-header-brand:hover {
  opacity: 0.85;
}

.auth-header-brand:focus-visible {
  outline: 2px solid var(--ad-on-hero);
  outline-offset: 4px;
}

.auth-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Theme toggle: a 36×36 rounded square with the sun or moon icon. */
.auth-theme-toggle-float {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 9px;
  border: 1px solid var(--ad-on-hero-line);
  background: transparent;
  color: var(--ad-on-hero-soft);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.auth-theme-toggle-float:hover {
  background: var(--ad-on-hero-hover);
  color: var(--ad-on-hero);
}

.auth-theme-toggle-float:focus-visible {
  outline: 2px solid var(--ad-on-hero);
  outline-offset: 2px;
}

.auth-theme-toggle-float svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

:root[data-theme="dark"] .auth-theme-toggle-icon-sun,
:root:not([data-theme="dark"]) .auth-theme-toggle-icon-moon {
  display: none;
}

/* Split-screen layout */
.auth-page {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  font-family: var(--ad-font-sans);
  color: var(--ad-ink);
  background: var(--ad-bg);
}

@media (max-width: 880px) {
  .auth-page {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .auth-aside:not(.auth-aside--banner) {
    display: none !important;
  }
  /* Login keeps the brand line as a short banner above the form. */
  .auth-aside.auth-aside--banner {
    order: -1;
    padding: 22px;
  }
  .auth-aside--banner .auth-aside-mark {
    display: none;
  }
  .auth-aside--banner .auth-aside-top h2 {
    font-size: 20px;
    margin-top: 8px;
    max-width: 28ch;
  }
  .auth-header {
    height: 56px;
  }
  .auth-header-inner {
    padding: 0 18px;
  }
}

/* ----- Form side ----- */

.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 56px);
  background: var(--ad-bg);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-head h1 {
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 700;
  color: var(--ad-ink);
}

.auth-head p {
  margin-top: 10px;
  margin-bottom: 0;
  color: var(--ad-ink-soft);
  font-size: 15px;
}

.auth-head a {
  color: var(--ad-accent);
  font-weight: 600;
  text-decoration: none;
}

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

.auth-section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ad-ink);
}

/* Secondary buttons and links that look like buttons */

.provider-btn {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 10px;
  border: 1px solid var(--ad-line-strong);
  background: var(--ad-card);
  color: var(--ad-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.provider-btn:hover {
  background: var(--ad-bg-soft);
  border-color: var(--ad-ink);
  transform: translateY(-1px);
}

.provider-btn:focus-visible {
  outline: 2px solid var(--ad-focus);
  outline-offset: 2px;
}

/* Google's "G" on its button: brand colours from tokens.css, through classes (no inline style). */
.google-g { flex: none; }
.google-g-blue { fill: var(--ad-google-blue); }
.google-g-green { fill: var(--ad-google-green); }
.google-g-yellow { fill: var(--ad-google-yellow); }
.google-g-red { fill: var(--ad-google-red); }

/* "o" between the form and the Google button */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--ad-muted);
  font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--ad-line);
}

/* Form fields */

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

:is(.auth-form-side, .manage-content) .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:is(.auth-form-side, .manage-content) .field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ad-ink);
  letter-spacing: -0.005em;
}

:is(.auth-form-side, .manage-content) .field input[type="text"],
:is(.auth-form-side, .manage-content) .field input[type="email"],
:is(.auth-form-side, .manage-content) .field input[type="password"],
:is(.auth-form-side, .manage-content) .field input:not([type]) {
  height: 48px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid var(--ad-line-strong);
  background: var(--ad-input-bg);
  color: var(--ad-ink);
  font: inherit;
  font-size: 15px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  outline: none;
  width: 100%;
}

/* Browser autofill paints its own background: mask it with an inset shadow in the input colour,
   and keep it after focus with a no-op transition. */
:is(.auth-form-side, .manage-content) .field input:-webkit-autofill,
:is(.auth-form-side, .manage-content) .field input:-webkit-autofill:hover,
:is(.auth-form-side, .manage-content) .field input:-webkit-autofill:focus,
:is(.auth-form-side, .manage-content) .field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--ad-input-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--ad-input-bg) inset !important;
  -webkit-text-fill-color: var(--ad-ink) !important;
  caret-color: var(--ad-ink);
  transition: background-color 5000s ease-in-out 0s;
}

/* A value shown but not editable here, such as the email on /manage. */
:is(.auth-form-side, .manage-content) .field input[readonly] {
  background: var(--ad-bg-soft);
  color: var(--ad-ink-soft);
}

:is(.auth-form-side, .manage-content) .field input::placeholder {
  color: var(--ad-muted);
}

:is(.auth-form-side, .manage-content) .field input:focus {
  border-color: var(--ad-accent);
  box-shadow: 0 0 0 4px var(--ad-accent-soft);
}

/* The ring above is a box shadow, which autofill and the invalid state replace: the outline is what
   always shows where the focus is (spec §7). */
:is(.auth-form-side, .manage-content) .field input:focus-visible {
  outline: 2px solid var(--ad-focus);
  outline-offset: 2px;
}

/* Password wrapper with show/hide */

.pw-wrap {
  position: relative;
}

.pw-wrap input {
  padding-right: 84px !important;
}

.pw-reveal {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: var(--ad-ink-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 6px;
}

.pw-reveal:hover {
  background: var(--ad-bg-soft);
  color: var(--ad-ink);
}

.pw-reveal:focus-visible {
  outline: 2px solid var(--ad-focus);
  outline-offset: 1px;
}

/* Field row (e.g. remember-me) */

.field-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-row-inline a {
  font-size: 13px;
  color: var(--ad-accent);
  font-weight: 600;
  text-decoration: none;
}

.field-row-inline a:hover {
  text-decoration: underline;
}

.check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ad-ink);
}

.check-row label {
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--ad-line-strong);
  border-radius: 5px;
  background-color: var(--ad-input-bg);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.check-row input[type="checkbox"]:hover {
  border-color: var(--ad-accent);
}

.check-row input[type="checkbox"]:checked {
  background-color: var(--ad-accent);
  border-color: var(--ad-accent);
}

.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid var(--ad-accent-ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.check-row input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--ad-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--ad-accent-soft);
  border-color: var(--ad-accent);
}

/* Primary submit button */

.auth-submit {
  height: 48px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--ad-accent);
  color: var(--ad-accent-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.auth-submit:hover {
  background: var(--ad-accent-hover);
  color: var(--ad-accent-ink);
  transform: translateY(-1px);
}

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

.auth-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* A link styled as the primary button. */
.auth-submit--link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-foot {
  font-size: 13px;
  color: var(--ad-muted);
  text-align: center;
  line-height: 1.6;
}

.auth-foot a {
  color: var(--ad-ink);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot a:hover {
  color: var(--ad-accent);
}

.auth-foot p {
  margin: 0;
}

/* A short help text under a field, named by the input's aria-describedby. */

:is(.auth-form-side, .manage-content) .field-hint {
  color: var(--ad-muted);
  font-size: 12.5px;
  margin: 2px 0 0;
}

/* Validation messages: one element per field, named by the input's aria-describedby. */

:is(.auth-form-side, .manage-content) .validation-message {
  color: var(--ad-error);
  font-size: 12.5px;
  margin-top: 2px;
}

:is(.auth-form-side, .manage-content) .validation-message:empty {
  display: none;
}

:is(.auth-form-side, .manage-content) input[aria-invalid="true"] {
  border-color: var(--ad-error) !important;
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--ad-error) 18%, transparent) !important;
}

/* Form-level status message */

.auth-alert {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--ad-line);
  background: var(--ad-bg-soft);
  color: var(--ad-ink);
  font-size: 14px;
  line-height: 1.5;
}

.auth-alert--error {
  background: color-mix(in oklab, var(--ad-error) 10%, transparent);
  border-color: color-mix(in oklab, var(--ad-error) 32%, transparent);
}

.auth-alert--warning {
  background: color-mix(in oklab, var(--ad-warning) 10%, transparent);
  border-color: color-mix(in oklab, var(--ad-warning) 32%, transparent);
}

.auth-alert--success {
  background: color-mix(in oklab, var(--ad-success) 10%, transparent);
  border-color: color-mix(in oklab, var(--ad-success) 32%, transparent);
}

.auth-alert--info {
  background: color-mix(in oklab, var(--ad-info) 10%, transparent);
  border-color: color-mix(in oklab, var(--ad-info) 32%, transparent);
}

/* ----- Brand panel (dark in both themes) ----- */

.auth-aside {
  position: relative;
  background:
    radial-gradient(
      120% 60% at 80% 0%,
      color-mix(in oklab, var(--ad-hero-accent) 30%, transparent) 0%,
      transparent 60%
    ),
    linear-gradient(180deg, var(--ad-hero-bg) 0%, var(--ad-hero-bg-end) 100%);
  color: var(--ad-on-hero);
  overflow: hidden;
  display: grid;
  align-content: center;
  padding: clamp(48px, 6vw, 80px);
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--ad-hero-grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--ad-hero-grid) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, var(--ad-on-hero) 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, var(--ad-on-hero) 30%, transparent 80%);
}

.auth-aside-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.auth-aside-mark {
  width: 56px;
  height: 56px;
  margin-bottom: 28px;
}

.auth-aside .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ad-on-hero-soft);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}

.auth-aside .eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--ad-on-hero-soft);
}

.auth-aside-top h2 {
  color: var(--ad-on-hero);
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 16px 0 0;
  max-width: 18ch;
  text-wrap: balance;
  font-weight: 700;
}

/* Numbered list (lockout) */

.next-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.next-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: flex-start;
}

.next-steps .step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ad-accent-soft);
  color: var(--ad-accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
}

.next-steps h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ad-ink);
}

.next-steps p {
  margin: 0;
  font-size: 13px;
  color: var(--ad-muted);
}

/* Skip link (a11y) */
.skip-to-main {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ad-accent);
  color: var(--ad-accent-ink);
  padding: 8px 16px;
  border-radius: var(--ad-radius-xs);
  font-size: 14px;
  font-weight: 600;
  z-index: 100;
  text-decoration: none;
}

.skip-to-main:focus-visible {
  left: 16px;
  top: 16px;
}

/* Single-column variant for status-only pages */
.auth-page--centered {
  grid-template-columns: 1fr;
}

.auth-page--centered .auth-form-side {
  width: 100%;
  margin-inline: auto;
  max-width: 560px;
}

/* Icon block with semantic variants */
.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin: 0 auto;
}

.auth-icon svg {
  width: 28px;
  height: 28px;
}

.auth-icon--success {
  background: var(--ad-accent-soft);
  color: var(--ad-accent);
}

.auth-icon--error {
  background: color-mix(in oklab, var(--ad-error) 12%, transparent);
  color: var(--ad-error);
}

.auth-icon--warning {
  background: color-mix(in oklab, var(--ad-warning) 14%, transparent);
  color: var(--ad-warning);
}

.auth-icon--info {
  background: color-mix(in oklab, var(--ad-info) 12%, transparent);
  color: var(--ad-info);
}

/* Card width variants */
.auth-card--narrow {
  max-width: 380px;
}

.auth-card--wide {
  max-width: 540px;
}

/* Inline action row */
.auth-action-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-action-row > * {
  flex: 1;
  min-width: 0;
}

/* Monospaced code input (recovery codes, from 3b) */
.code-input {
  text-align: center;
  font-size: 24px;
  letter-spacing: 8px;
  font-family: var(--ad-font-mono);
}

/* Help block */
.auth-note {
  background: var(--ad-bg-soft);
  border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-sm);
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ad-ink-soft);
  line-height: 1.6;
}

.auth-note p {
  margin: 0;
}

.auth-note strong {
  color: var(--ad-ink);
  display: block;
  margin-bottom: 4px;
  font-size: 13.5px;
}

.auth-note ul,
.auth-note ol {
  margin: 6px 0 0;
  padding-left: 18px;
}

.auth-note li + li {
  margin-top: 4px;
}

.auth-note--warning {
  background: color-mix(in oklab, var(--ad-warning) 8%, transparent);
  border-color: color-mix(in oklab, var(--ad-warning) 24%, var(--ad-line));
}

.auth-note--error {
  background: color-mix(in oklab, var(--ad-error) 8%, transparent);
  border-color: color-mix(in oklab, var(--ad-error) 24%, var(--ad-line));
  color: var(--ad-ink);
}

/* Consent view scopes */
.scope-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.scope-chip {
  padding: 4px 12px;
  background: var(--ad-card);
  border: 1px solid var(--ad-line-strong);
  border-radius: 16px;
  font-size: 13px;
  color: var(--ad-ink);
}

/* A destructive action as the primary button: turning the 2FA off. */
.auth-submit--danger {
  background: var(--ad-error);
  color: var(--ad-bg);
}

.auth-submit--danger:hover {
  background: color-mix(in oklab, var(--ad-error) 88%, var(--ad-ink));
  color: var(--ad-bg);
}

/* Recovery codes are letters and a dash, not digits: smaller, less spaced. */
.code-input--recovery {
  font-size: 18px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* ----- /manage: side menu and content ----- */

.manage-page {
  flex: 1;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 40px);
  color: var(--ad-ink);
  background: var(--ad-bg);
}

.manage-nav {
  position: sticky;
  top: 96px;
}

.manage-nav-title {
  margin: 0 0 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ad-muted);
}

.manage-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manage-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--ad-radius-xs);
  color: var(--ad-ink-soft);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
}

.manage-nav a:hover {
  background: var(--ad-bg-soft);
  color: var(--ad-ink);
}

.manage-nav a[aria-current="page"] {
  background: var(--ad-accent-soft);
  color: var(--ad-accent);
}

.manage-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.manage-head h1 {
  font-size: clamp(26px, 3vw, 32px);
  letter-spacing: -0.025em;
  margin: 0;
  font-weight: 700;
}

.manage-head p {
  margin: 10px 0 0;
  color: var(--ad-ink-soft);
  font-size: 15px;
}

.manage-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--ad-line);
  border-radius: var(--ad-radius-md);
  background: var(--ad-card);
  box-shadow: var(--ad-shadow-sm);
}

.manage-section .auth-section-title {
  margin: 0;
  font-size: 17px;
}

.manage-section .next-steps {
  margin: 0;
}

.manage-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ad-ink-soft);
}

.manage-text--muted {
  color: var(--ad-muted);
  font-size: 13px;
}

/* The TOTP QR: dark modules on a light frame in both themes, as scanners expect. */
.qr-frame {
  width: 196px;
  margin: 12px 0;
  padding: 10px;
  border-radius: var(--ad-radius-sm);
  border: 1px solid var(--ad-line);
  background: var(--ad-qr-paper);
  color: var(--ad-qr-ink);
}

.qr-frame svg {
  display: block;
  width: 100%;
  height: auto;
}

.shared-key {
  display: inline-block;
  padding: 8px 12px;
  border-radius: var(--ad-radius-xs);
  background: var(--ad-bg-sunken);
  color: var(--ad-ink);
  font-family: var(--ad-font-mono);
  font-size: 14px;
  word-spacing: 0.3em;
  overflow-wrap: anywhere;
}

.recovery-code-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.recovery-code {
  display: block;
  padding: 8px 12px;
  border-radius: var(--ad-radius-xs);
  background: var(--ad-bg-sunken);
  color: var(--ad-ink);
  font-family: var(--ad-font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-align: center;
}

@media (max-width: 880px) {
  .manage-page {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 16px calc(36px + env(safe-area-inset-bottom));
  }
  .manage-nav {
    position: static;
  }
  .manage-nav-title {
    display: none;
  }
  .manage-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .manage-nav a {
    padding: 8px 12px;
    border: 1px solid var(--ad-line);
    font-size: 14px;
  }
  .manage-section {
    padding: 18px;
  }
}

/* Mobile form ergonomics. Last in the file so it wins over the base rules;
   16px inputs stop iOS Safari from zooming on focus. */
@media (max-width: 880px) {
  .auth-form-side {
    align-items: flex-start;
    padding: 28px 22px calc(36px + env(safe-area-inset-bottom));
  }
  .auth-card {
    gap: 20px;
    max-width: none;
  }
  .auth-head h1 {
    font-size: 26px;
  }
  :is(.auth-form-side, .manage-content) .field input[type="text"],
  :is(.auth-form-side, .manage-content) .field input[type="email"],
  :is(.auth-form-side, .manage-content) .field input[type="password"],
  :is(.auth-form-side, .manage-content) .field input:not([type]),
  .provider-btn,
  .auth-submit {
    height: 50px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .provider-btn,
  .auth-submit {
    transition: none;
  }
  .provider-btn:hover,
  .auth-submit:hover {
    transform: none;
  }
}
