:root {
  --auth-green: #16A34A;
  --auth-green-dark: #15803d;
  --auth-green-light: #dcfce7;
  --auth-green-glow: rgba(22, 163, 74, 0.45);
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-radius: 20px;
  --auth-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
  --auth-font: 'Inter', system-ui, -apple-system, sans-serif;
  /* Form rhythm */
  --auth-label-size: 0.8125rem;
  --auth-label-weight: 600;
  --auth-label-lh: 1.4;
  --auth-label-gap: 8px;
  --auth-field-gap: 22px;
  --auth-section-gap: 30px;
  --auth-input-h: 44px;
  --auth-input-px: 0.875rem;
  --auth-input-py: 0.5625rem;
  --auth-input-radius: 12px;
  --auth-input-fs: 0.9375rem;
}

*, *::before, *::after { box-sizing: border-box; }

html, body.auth-modern-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.auth-shell__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1.5rem 3rem;
  position: relative;
  z-index: 2;
  animation: authFadeIn 0.6s ease-out;
}

.auth-shell__brand {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: none;
  background: linear-gradient(145deg, #064e3b 0%, #16A34A 45%, #22c55e 100%);
}

@media (min-width: 992px) {
  .auth-shell__form { flex: 0 0 50%; max-width: 50%; padding: 3rem; }
  .auth-shell__brand { display: flex; align-items: center; justify-content: center; }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 2rem 1.75rem;
  animation: authSlideUp 0.55s ease-out 0.1s both;
}

.auth-page--register .auth-card,
.auth-page--hospital-register .auth-card,
.auth-page--laboratory-register .auth-card {
  max-width: 640px;
  padding: 2.25rem 2rem;
}
.auth-card--wide { max-width: 520px; }
.auth-card--xl { max-width: 600px; }

.auth-gps-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  align-items: stretch;
}
.auth-gps-inputs input {
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-input-radius);
  padding: 0 var(--auth-input-px);
  height: var(--auth-input-h);
  font-size: var(--auth-input-fs);
  font-family: inherit;
  background: #f8fafc;
  min-width: 0;
}
.auth-gps-inputs input:focus {
  outline: none;
  border-color: var(--auth-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
  background: #fff;
}
.auth-btn--inline {
  width: auto;
  height: var(--auth-input-h);
  padding: 0 1rem;
  font-size: 0.8125rem;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .auth-gps-inputs { grid-template-columns: 1fr; }
  .auth-btn--inline { width: 100%; }
}

.auth-check a.auth-link { font-size: inherit; }

.auth-mobile-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 992px) { .auth-mobile-brand { display: none; } }

.auth-mobile-brand__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  animation: authFloat 4s ease-in-out infinite;
  padding: 0.35rem;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.6),
    0 8px 24px rgba(255, 255, 255, 0.45),
    0 0 32px rgba(255, 255, 255, 0.3);
}

.auth-mobile-brand__logo img { width: 48px; height: 48px; object-fit: contain; }
.auth-mobile-brand strong { font-size: 1.1rem; }
.auth-mobile-brand span { font-size: 0.8rem; color: var(--auth-muted); }

.auth-mobile-brand--logo-only strong,
.auth-mobile-brand--logo-only span {
  display: none;
}

.auth-heading { margin: 0 0 0.35rem; font-size: 1.65rem; font-weight: 800; letter-spacing: -0.02em; }
.auth-sub { margin: 0 0 1.5rem; color: var(--auth-muted); font-size: 0.95rem; line-height: 1.5; }

.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}
.auth-alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.auth-alert--success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.auth-alert--info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.auth-success-card {
  text-align: center;
  padding: 0.5rem 0 1rem;
}
.auth-success-card__icon {
  color: #16a34a;
  margin: 0 auto 1rem;
  width: 64px;
  height: 64px;
}
.auth-success-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  text-align: left;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}
.auth-success-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.95rem;
}
.auth-success-list li:last-child { border-bottom: 0; }
.auth-success-list span { color: #6b7280; }
.auth-success-note {
  color: #6b7280;
  font-size: 0.9rem;
  margin: 0 0 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  min-width: 0;
}

/* Uniform labels — block layout so long text wraps naturally */
.auth-field:not(.auth-check) > .auth-label,
.auth-field:not(.auth-check) > span:first-child {
  display: block;
  width: 100%;
  font-size: var(--auth-label-size);
  font-weight: var(--auth-label-weight);
  letter-spacing: 0.01em;
  color: #1e293b;
  line-height: var(--auth-label-lh);
  margin: 0 0 var(--auth-label-gap);
  padding: 0;
  transition: color 0.2s ease;
  text-wrap: pretty;
}

.auth-field:not(.auth-check):focus-within > .auth-label,
.auth-field:not(.auth-check):focus-within > span:first-child {
  color: var(--auth-green-dark);
}

.auth-field--required:not(.auth-check) > .auth-label::after,
.auth-field--required:not(.auth-check) > span:first-child::after {
  content: ' *';
  color: #e11d48;
  font-weight: 700;
  white-space: nowrap;
}

.auth-label__opt,
.auth-field-hint--inline {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 0.12rem 0.4rem;
  border-radius: 5px;
  line-height: 1.2;
  vertical-align: middle;
  margin-left: 0.25rem;
}

.auth-field-hint {
  font-size: 0.75rem;
  color: var(--auth-muted);
  line-height: 1.45;
  margin: 6px 0 0;
}

.auth-field .ts-wrapper {
  width: 100%;
  min-height: var(--auth-input-h);
}

.auth-input-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--auth-input-h);
  height: var(--auth-input-h);
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-input-radius);
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  overflow: hidden;
}
.auth-input-wrap:focus-within {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
  background: #fff;
}
.auth-input-wrap__icon {
  padding: 0 0.75rem 0 0.875rem;
  color: var(--auth-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 100%;
}
.auth-input-wrap input,
.auth-input-wrap select,
.auth-input-wrap textarea {
  flex: 1;
  border: none;
  background: transparent;
  height: 100%;
  padding: 0 var(--auth-input-px);
  font-size: var(--auth-input-fs);
  font-family: inherit;
  color: var(--auth-text);
  outline: none;
  min-width: 0;
  line-height: 1.35;
}
.auth-input-wrap:has(.auth-input-wrap__icon) input,
.auth-input-wrap:has(.auth-input-wrap__icon) select,
.auth-input-wrap--phone input {
  padding-left: 0;
}
.auth-input-wrap--phone .auth-input-wrap__prefix {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--auth-muted);
  border-right: 1px solid var(--auth-border);
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-input-wrap__toggle {
  border: none;
  background: none;
  height: 100%;
  padding: 0 0.75rem;
  cursor: pointer;
  color: var(--auth-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.auth-input-wrap__toggle:hover { color: var(--auth-green); }

.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.auth-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.88rem; color: var(--auth-muted); cursor: pointer; }
.auth-field.auth-check {
  flex-direction: row;
  align-items: flex-start;
  gap: 0.6rem;
}
.auth-field.auth-check > span {
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  margin-bottom: 0;
  letter-spacing: normal;
  line-height: 1.45;
}
.auth-check input { accent-color: var(--auth-green); width: 16px; height: 16px; margin-top: 0.15rem; flex-shrink: 0; }
.auth-link { color: var(--auth-green); font-weight: 600; text-decoration: none; font-size: 0.88rem; }
.auth-link:hover { text-decoration: underline; }

.auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
}
.auth-btn--primary {
  background: linear-gradient(135deg, var(--auth-green) 0%, #22c55e 100%);
  color: #fff;
  box-shadow: 0 8px 24px var(--auth-green-glow);
}
.auth-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px var(--auth-green-glow); }
.auth-btn--primary:active { transform: translateY(0); }
.auth-btn--primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.auth-btn--ghost {
  background: #fff;
  color: var(--auth-text);
  border: 1.5px solid var(--auth-border);
}
.auth-btn--ghost:hover { border-color: var(--auth-green); color: var(--auth-green); }
.auth-btn[hidden] {
  display: none !important;
}
.auth-btn--biometric {
  background: linear-gradient(135deg, #0f766e, var(--auth-green));
  color: #fff;
  margin-bottom: 0.75rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--auth-muted);
  font-size: 0.82rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--auth-border); }

.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 0.9rem; color: var(--auth-muted); }
.auth-footer a { color: var(--auth-green); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.auth-icon-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--auth-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
  box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.08);
}

.auth-otp {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin: 1rem 0 1.25rem;
}
.auth-otp input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.35rem;
  font-weight: 700;
  border: 1.5px solid var(--auth-border);
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  font-family: inherit;
}
.auth-otp input:focus {
  outline: none;
  border-color: var(--auth-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
  transform: scale(1.05);
  background: #fff;
}
.auth-otp-timer { text-align: center; font-size: 0.88rem; color: var(--auth-muted); margin-bottom: 1rem; }

.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  column-gap: 1rem;
  row-gap: var(--auth-field-gap);
}
@media (min-width: 520px) {
  .auth-form-grid--2 { grid-template-columns: 1fr 1fr; }
}
.auth-form-grid .auth-field--full { grid-column: 1 / -1; }
.auth-form-grid--2 > .auth-field:not(.auth-field--full) {
  align-self: start;
}

.auth-form--register .auth-field:not(.auth-field--full) {
  align-self: start;
}

@media (max-width: 519px) {
  .auth-page--register .auth-card,
  .auth-page--hospital-register .auth-card,
  .auth-page--laboratory-register .auth-card {
    padding: 1.5rem 1.25rem;
  }
  .auth-form--register.auth-form-grid {
    row-gap: 20px;
  }
  .auth-section-label {
    margin-top: 24px;
  }
}

@media (min-width: 520px) {
  .auth-form--register.auth-form-grid--2 > .auth-field:not(.auth-field--full) .auth-input-wrap,
  .auth-form--register.auth-form-grid--2 > .auth-field:not(.auth-field--full) .ts-wrapper {
    width: 100%;
  }
}

.auth-section-label {
  grid-column: 1 / -1;
  margin: var(--auth-section-gap) 0 0;
  padding: 0 0 10px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--auth-green-dark);
  border-bottom: 1px solid #e2e8f0;
  line-height: 1.3;
}
.auth-section-label:first-child {
  margin-top: 0;
}


.auth-logo-upload {
  border: 2px dashed var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #f8fafc;
  position: relative;
}
.auth-logo-upload:hover, .auth-logo-upload.is-dragover { border-color: var(--auth-green); background: var(--auth-green-light); }
.auth-logo-upload input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.auth-logo-upload__icon { font-size: 2rem; margin-bottom: 0.5rem; }
.auth-logo-upload__preview { max-width: 120px; max-height: 120px; border-radius: 12px; margin: 0.75rem auto 0; display: none; object-fit: contain; }
.auth-logo-upload.has-preview .auth-logo-upload__preview { display: block; }

/* Branding panel */
.auth-brand-inner { position: relative; z-index: 2; text-align: center; padding: 3rem; max-width: 420px; }
.auth-brand-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}
.auth-brand-logo {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  background: #ffffff;
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: authFloat 5s ease-in-out infinite;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.45),
    0 10px 36px rgba(255, 255, 255, 0.55),
    0 20px 56px rgba(255, 255, 255, 0.35),
    0 0 80px rgba(255, 255, 255, 0.25);
  position: relative;
  z-index: 2;
  padding: 0.5rem;
}
.auth-brand-logo img { width: 88px; height: 88px; object-fit: contain; }
.auth-brand-logo-glow {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.2) 45%, transparent 72%);
  animation: authPulse 3s ease-in-out infinite;
  z-index: 1;
}
.auth-brand-title { color: #fff; font-size: 2rem; font-weight: 800; margin: 0 0 0.35rem; letter-spacing: -0.02em; }
.auth-brand-tagline { color: rgba(255,255,255,0.85); font-size: 1rem; margin: 0 0 2rem; }

.auth-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  animation: authParticle 8s linear infinite;
}
.auth-shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  animation: authFloat 8s ease-in-out infinite;
}
.auth-shape--1 { width: 300px; height: 300px; top: -80px; right: -80px; }
.auth-shape--2 { width: 200px; height: 200px; bottom: 10%; left: -60px; animation-delay: -2s; }
.auth-shape--3 { width: 150px; height: 150px; bottom: -40px; right: 20%; animation-delay: -4s; }

.auth-features {
  display: none;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--auth-border);
  background: #fafafa;
  width: 100%;
}
@media (min-width: 992px) { .auth-features { display: grid; } }
.auth-feature { text-align: center; font-size: 0.78rem; color: var(--auth-muted); }
.auth-feature strong { display: block; color: var(--auth-text); font-size: 0.82rem; margin-bottom: 0.15rem; }
.auth-feature span { font-size: 1.1rem; display: block; margin-bottom: 0.25rem; }

.auth-lang-float {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
}

.auth-ts .ts-wrapper.single .ts-control,
.auth-ts .ts-wrapper.multi .ts-control {
  border-radius: var(--auth-input-radius) !important;
  border: 1.5px solid var(--auth-border) !important;
  padding: 0 var(--auth-input-px) !important;
  min-height: var(--auth-input-h) !important;
  height: var(--auth-input-h) !important;
  font-size: var(--auth-input-fs) !important;
  background: #f8fafc !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
}
.auth-ts .ts-wrapper.focus .ts-control {
  border-color: var(--auth-green) !important;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12) !important;
  background: #fff !important;
}
.auth-ts .ts-control input {
  font-size: var(--auth-input-fs) !important;
}
.auth-ts .ts-dropdown {
  border-radius: 12px !important;
  border: 1px solid var(--auth-border) !important;
  box-shadow: var(--auth-shadow) !important;
  margin-top: 4px !important;
}
.auth-ts .ts-dropdown .option {
  padding: 0.55rem 0.85rem !important;
}
.auth-ts .ts-dropdown .active {
  background: var(--auth-green-light) !important;
  color: var(--auth-green-dark) !important;
}

@keyframes authFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes authSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes authFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes authPulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes authParticle {
  0% { transform: translateY(100vh) scale(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-20vh) scale(1); opacity: 0; }
}

.auth-loading { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: authSpin 0.7s linear infinite; }
@keyframes authSpin { to { transform: rotate(360deg); } }

/* Unified registration hub */
.auth-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}
.auth-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 88px;
  padding: 0.75rem 0.45rem;
  border: 2px solid var(--auth-border);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  font: inherit;
  color: inherit;
}
.auth-type-card:hover:not(:disabled),
.auth-type-card.is-active {
  border-color: var(--auth-green);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}
.auth-type-card.is-active {
  transform: translateY(-1px);
}
.auth-type-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.auth-type-card__icon {
  font-size: 1.65rem;
  line-height: 1;
}
.auth-type-card__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--auth-text);
}
.auth-reg-panel[hidden] {
  display: none !important;
}

.auth-label[hidden],
.auth-footer [hidden],
[data-lr-label-radiology][hidden],
[data-lr-label-laboratory][hidden] {
  display: none !important;
}
@media (max-width: 480px) {
  .auth-type-grid {
    grid-template-columns: 1fr;
  }
  .auth-type-card {
    flex-direction: row;
    min-height: auto;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
}

/* Registration type dropdown */
.auth-reg-type-select {
  width: 100%;
  height: var(--auth-input-h);
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-input-radius);
  padding: 0 var(--auth-input-px);
  font-size: var(--auth-input-fs);
  font-family: inherit;
  background: #fff;
  color: var(--auth-text);
}
.auth-reg-type-select:focus {
  outline: none;
  border-color: var(--auth-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

/* Hospital website slug */
.auth-input-wrap--slug {
  display: flex;
  align-items: stretch;
}
.auth-input-wrap--slug input {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  flex: 1;
  min-width: 0;
}
.auth-input-wrap__prefix--text {
  display: inline-flex;
  align-items: center;
  padding: 0 0.65rem;
  font-size: 0.75rem;
  color: var(--auth-muted);
  background: #f1f5f9;
  border: 1.5px solid var(--auth-border);
  border-right: none;
  border-radius: var(--auth-input-radius) 0 0 var(--auth-input-radius);
  white-space: nowrap;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.auth-website-preview {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  min-height: 1.25rem;
}
.auth-website-preview--ok { color: #15803d; }
.auth-website-preview--bad { color: #b91c1c; }
.auth-website-preview--checking { color: var(--auth-muted); }
.auth-website-preview a { color: inherit; font-weight: 600; }

/* Mobile-native login stability */
html.auth-mobile-stable,
html.auth-mobile-stable body.auth-modern-body {
  height: 100%;
  overflow: hidden;
}

@media (max-width: 991px) {
  html.auth-mobile-stable body.auth-modern-body {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  html.auth-mobile-stable .auth-shell {
    min-height: 100dvh;
    height: 100dvh;
    overflow: hidden;
  }

  html.auth-mobile-stable .auth-shell__form {
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(0.75rem, env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: none;
  }

  html.auth-mobile-stable .auth-mobile-brand {
    margin-bottom: 1rem;
  }

  html.auth-mobile-stable .auth-mobile-brand__logo {
    animation: none;
    width: 56px;
    height: 56px;
  }

  html.auth-mobile-stable .auth-card {
    animation: none;
    padding: 1.5rem 1.25rem;
    max-width: 100%;
  }

  html.auth-mobile-stable body.auth-page--login-mobile .auth-card {
    max-height: none;
  }

  html.auth-mobile-stable body.auth-page--login-mobile .auth-sub {
    margin-bottom: 1.1rem;
  }

  html.auth-mobile-stable body.auth-page--register .auth-card {
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
  }

  html.auth-mobile-stable .auth-heading {
    font-size: 1.45rem;
  }
}

/* PWA install prompt (auth shell) */
.dee-pwa-install {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.65rem 0.85rem;
  background: #0f172a;
  color: #f8fafc;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
  font-size: 0.875rem;
}

.dee-pwa-install[hidden] {
  display: none !important;
}

.dee-pwa-install__text {
  flex: 1;
  line-height: 1.35;
}

.dee-pwa-install__btn {
  border: 0;
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.dee-pwa-install__dismiss {
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}

html.dee-pwa-standalone .dee-pwa-install {
  display: none !important;
}
