 by :root {
  --uauth-primary: #667eea;
  --uauth-primary-dark: #5568d3;
  --uauth-primary-light: rgba(102, 126, 234, 0.1);
  --uauth-auth-btn: #1d8cff;
  --uauth-auth-btn-dark: #0f6fe0;
  --uauth-auth-btn-light: rgba(29, 140, 255, 0.08);
  --uauth-accent-cyan: #22d3ee;
  --uauth-accent-pink: #f472b6;
  --uauth-accent-orange: #fb923c;
  --uauth-accent-violet: #8b5cf6;
  --uauth-glass-surface: rgba(255, 255, 255, 0.62);
  --uauth-glass-surface-strong: rgba(255, 255, 255, 0.74);
  --uauth-glass-border: rgba(255, 255, 255, 0.52);
  --uauth-glass-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --uauth-glass-shadow-soft: 0 18px 42px rgba(15, 23, 42, 0.1);
  --uauth-glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.62);
  --uauth-success: #48bb78;
  --uauth-error: #f56565;
  --uauth-text: #2d3748;
  --uauth-text-light: #718096;
  --uauth-border: #e2e8f0;
  --uauth-bg: #ffffff;
  --uauth-bg-light: #f7fafc;
  --uauth-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  --uauth-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.15);
}

* { box-sizing: border-box; }

.uauth-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.sfc-dashboard-guest-auth {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 24px 16px 40px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.sfc-dashboard-guest-auth::before,
.sfc-dashboard-guest-auth::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.7;
  pointer-events: none;
  z-index: -1;
}

.sfc-dashboard-guest-auth::before {
  top: 18px;
  left: -72px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.3) 0%, rgba(139, 92, 246, 0.18) 38%, rgba(34, 211, 238, 0) 74%);
}

.sfc-dashboard-guest-auth::after {
  right: -84px;
  bottom: 14px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(251, 146, 60, 0.26) 0%, rgba(244, 114, 182, 0.2) 40%, rgba(251, 146, 60, 0) 74%);
}

.sfc-dashboard-guest-auth .uauth-container {
  margin: 0 auto;
}

.uauth-container {
  max-width: 480px;
  margin: 40px auto;
  padding: 20px;
}

.uauth-container [hidden] {
  display: none !important;
}

.uauth-auth-shell {
  display: block;
}

.uauth-auth-main {
  min-width: 0;
}

.uauth-container.is-dashboard-guest {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0;
}

.uauth-container.is-dashboard-guest .uauth-auth-shell {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 440px);
  gap: 24px;
  align-items: stretch;
}

.uauth-auth-aside {
  display: none;
}

.uauth-container.is-dashboard-guest .uauth-auth-aside {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 30px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(circle at 12% 14%, rgba(34, 211, 238, 0.24) 0%, rgba(34, 211, 238, 0) 34%),
    radial-gradient(circle at 88% 12%, rgba(244, 114, 182, 0.22) 0%, rgba(244, 114, 182, 0) 30%),
    radial-gradient(circle at 70% 88%, rgba(251, 146, 60, 0.2) 0%, rgba(251, 146, 60, 0) 30%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.54) 0%, rgba(247, 250, 255, 0.38) 48%, rgba(255, 247, 237, 0.28) 100%);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  box-shadow: var(--uauth-glass-shadow-soft), var(--uauth-glass-highlight);
}

.uauth-auth-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16) 0%, rgba(244, 114, 182, 0.14) 52%, rgba(251, 146, 60, 0.12) 100%);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.uauth-auth-hero {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #111827;
}

.uauth-auth-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
  max-width: 54ch;
}

.uauth-auth-points {
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.uauth-auth-points li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.uauth-auth-points li::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--uauth-accent-cyan) 0%, var(--uauth-accent-violet) 48%, var(--uauth-accent-pink) 100%);
}

.uauth-card-dashboard {
  border-radius: 24px;
  position: relative;
  background:
    radial-gradient(circle at 14% 12%, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0) 32%),
    radial-gradient(circle at 86% 14%, rgba(244, 114, 182, 0.16) 0%, rgba(244, 114, 182, 0) 28%),
    radial-gradient(circle at 74% 88%, rgba(251, 146, 60, 0.16) 0%, rgba(251, 146, 60, 0) 26%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.86) 0%, rgba(250, 245, 255, 0.62) 54%, rgba(255, 247, 237, 0.54) 100%);
  border: 1px solid var(--uauth-glass-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--uauth-glass-shadow), var(--uauth-glass-highlight);
}

.uauth-auth-card-head {
  padding: 26px 28px 12px;
}

.uauth-auth-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--uauth-primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.uauth-auth-card-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #111827;
}

.uauth-auth-card-subtitle {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: #6b7280;
}

.uauth-reset-page {
  max-width: 640px;
}

.uauth-reset-shell {
  justify-content: center;
}

.uauth-reset-card {
  border-radius: 24px;
  position: relative;
  background:
    radial-gradient(circle at 14% 12%, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0) 32%),
    radial-gradient(circle at 86% 14%, rgba(244, 114, 182, 0.14) 0%, rgba(244, 114, 182, 0) 28%),
    radial-gradient(circle at 74% 88%, rgba(251, 146, 60, 0.15) 0%, rgba(251, 146, 60, 0) 26%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.86) 0%, rgba(250, 245, 255, 0.62) 54%, rgba(255, 247, 237, 0.56) 100%);
  border: 1px solid var(--uauth-glass-border);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--uauth-glass-shadow), var(--uauth-glass-highlight);
}

.uauth-card-dashboard::before,
.uauth-reset-card::before,
.uauth-modal-content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.08) 32%, rgba(255, 255, 255, 0) 58%);
}

.uauth-reset-user {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--uauth-primary-dark);
}

.uauth-reset-actions {
  display: grid;
  gap: 10px;
}

.uauth-reset-state[data-state="invalid"] .uauth-reset-actions,
.uauth-reset-state[data-state="success"] .uauth-reset-actions {
  margin-top: 4px;
}

.uauth-auth-secondary-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.uauth-auth-secondary-copy {
  font-size: 13px;
  color: #6b7280;
}

.uauth-auth-secondary-btn,
.uauth-auth-back-link {
  appearance: none;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--uauth-auth-btn);
  border-radius: 10px;
  background: #fff;
  color: var(--uauth-auth-btn);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  box-shadow: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.uauth-auth-secondary-btn:hover,
.uauth-auth-back-link:hover {
  border-color: var(--uauth-auth-btn-dark);
  background: var(--uauth-auth-btn-light);
  color: var(--uauth-auth-btn-dark);
}

.uauth-auth-secondary-btn:active,
.uauth-auth-back-link:active {
  background: rgba(29, 140, 255, 0.12);
}

.uauth-auth-back-link {
  margin-top: 14px;
}

@media (min-width: 768px) {
  .sfc-dashboard-guest-auth {
    padding: 32px 24px 56px;
  }
}

.uauth-card {
  background: var(--uauth-bg);
  border-radius: 20px;
  box-shadow: var(--uauth-shadow);
  overflow: hidden;
  animation: uauthFadeIn 0.5s ease;
}

.uauth-container.is-dashboard-guest .uauth-card.uauth-card-dashboard,
.uauth-reset-page .uauth-card.uauth-reset-card {
  background: linear-gradient(155deg, var(--uauth-glass-surface-strong) 0%, rgba(255, 255, 255, 0.54) 100%);
  border: 1px solid var(--uauth-glass-border);
  box-shadow: var(--uauth-glass-shadow), var(--uauth-glass-highlight);
}

@keyframes uauthFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tabs */
.uauth-tabs {
  display: flex;
  background: var(--uauth-bg-light);
  padding: 8px;
  gap: 8px;
}

.uauth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  min-height: 44px;
  background: transparent;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--uauth-text-light);
  cursor: pointer;
  transition: all 0.3s ease;
}

.uauth-tab svg { transition: transform 0.3s ease; }
.uauth-tab:hover { color: var(--uauth-primary); background: rgba(102, 126, 234, 0.08); }

.uauth-auth-switch {
  margin: 20px 28px 0;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #dbe4f2;
  background: #f8fbff;
}

.uauth-container.is-dashboard-guest .uauth-tab {
  min-height: 42px;
  border-radius: 12px;
  font-size: 14px;
}

.uauth-container.is-dashboard-guest .uauth-tab.active {
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.18);
}

.uauth-tab.active {
  background: var(--uauth-bg);
  color: var(--uauth-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.uauth-tab.active svg { transform: scale(1.1); }

/* Tab Content */
.uauth-tab-content {
  display: none;
  animation: uauthSlideIn 0.4s ease;
}
.uauth-tab-content.active { display: block; }
.uauth-tab-content[hidden] { display: none !important; }

@keyframes uauthSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.uauth-header {
  padding: 30px 30px 20px;
  text-align: center;
}

.uauth-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--uauth-text);
  margin: 0 0 8px 0;
}

.uauth-subtitle {
  font-size: 14px;
  color: var(--uauth-text-light);
  margin: 0;
}

.uauth-reassurance {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

.uauth-form { padding: 0 30px 30px; }

.uauth-container.is-dashboard-guest .uauth-header {
  text-align: left;
  padding: 24px 28px 14px;
}

.uauth-container.is-dashboard-guest .uauth-form {
  padding: 0 28px 28px;
}

.uauth-form-group { margin-bottom: 20px; }

.uauth-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  align-items: start;
}
.uauth-form-row .uauth-form-group { margin-bottom: 0; }

.uauth-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--uauth-text);
  margin-bottom: 8px;
}

.uauth-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.uauth-required { color: var(--uauth-error); }

.uauth-input-wrapper { position: relative; }

.uauth-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--uauth-text-light);
  pointer-events: none;
  z-index: 1;
}

.uauth-input {
  width: 100%;
  padding: 12px 16px;
  padding-left: 44px;
  font-size: 15px;
  color: var(--uauth-text);
  background: var(--uauth-bg);
  border: 2px solid var(--uauth-border);
  border-radius: 10px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.uauth-container.is-dashboard-guest .uauth-input {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(191, 219, 254, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.uauth-input::placeholder { color: #a0aec0; }

.uauth-input:focus {
  outline: none;
  border-color: var(--uauth-primary);
  box-shadow: 0 0 0 4px var(--uauth-primary-light);
}

.uauth-input.error {
  border-color: var(--uauth-error);
  animation: uauthShake 0.4s ease;
}

.uauth-input[aria-invalid="true"] {
  border-color: var(--uauth-error);
  box-shadow: 0 0 0 4px rgba(245, 101, 101, 0.12);
}

@keyframes uauthShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.uauth-textarea {
  min-height: 70px;
  resize: vertical;
  padding: 12px 16px;
}

button.uauth-toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: none;
  width: 44px;
  height: 44px;
  color: #111827;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 1;
}

.uauth-eye-icon {
  display: block;
}

.uauth-eye-slash {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.uauth-eye-pupil {
  transition: opacity 0.2s ease;
}

.uauth-input-icon-mail {
  left: 16px;
  width: 22px;
  height: 22px;
  color: var(--uauth-primary-dark);
}

.uauth-input-wrapper .uauth-input-icon-mail + .uauth-input {
  padding-left: 52px;
}

button.uauth-toggle-password:hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #ef4444;
}

button.uauth-toggle-password:focus,
button.uauth-toggle-password:active,
button.uauth-toggle-password:focus-visible,
button.uauth-toggle-password[aria-pressed="true"] {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #111827;
  box-shadow: none !important;
}

.uauth-toggle-password[aria-pressed="true"] .uauth-eye-slash {
  opacity: 1;
}

.uauth-toggle-password[aria-pressed="true"] .uauth-eye-pupil {
  opacity: 0.3;
}

.uauth-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--uauth-text);
}

.uauth-checkbox input {
  margin-right: 8px;
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.uauth-link {
  color: var(--uauth-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.uauth-link:hover {
  color: var(--uauth-primary-dark);
  text-decoration: underline;
}

.uauth-form-helpers {
  align-items: center;
  gap: 12px;
}

.uauth-form-helpers .uauth-link {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #d7e5fb;
  background: #fff;
  text-decoration: none;
  color: var(--uauth-auth-btn);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.uauth-form-helpers .uauth-link:hover {
  text-decoration: none;
  border-color: var(--uauth-auth-btn-dark);
  background: var(--uauth-auth-btn-light);
  color: var(--uauth-auth-btn-dark);
}

.uauth-forgot-link .uauth-btn-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.uauth-remember-note {
  display: block;
  margin: 10px 0 0;
}

.uauth-security-note {
  display: block;
  margin: 12px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.74) 0%, rgba(250, 245, 255, 0.54) 52%, rgba(255, 247, 237, 0.42) 100%);
  border: 1px solid rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  color: var(--uauth-text);
}

.uauth-container.is-dashboard-guest #login-tab .uauth-form-group {
  margin-bottom: 16px;
}

.uauth-container.is-dashboard-guest #login-tab .uauth-form-helpers {
  margin-top: 2px;
}

.uauth-container.is-dashboard-guest #login-tab .uauth-remember-note {
  margin-top: 8px;
}

.uauth-container.is-dashboard-guest #login-tab .uauth-security-note {
  margin: 10px 0 16px;
}

.uauth-caps-lock {
  color: #b45309;
  font-weight: 600;
}

.uauth-login-challenge {
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(102, 126, 234, 0.16);
  background: rgba(102, 126, 234, 0.04);
}

.uauth-security-challenge-text {
  margin-bottom: 10px;
}

/* File Upload */
.uauth-file-upload { position: relative; }

.uauth-file-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.uauth-file-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--uauth-bg-light);
  border: 2px dashed var(--uauth-border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.uauth-file-label:hover {
  border-color: var(--uauth-primary);
  background: var(--uauth-primary-light);
}

.uauth-file-label.is-error {
  border-color: var(--uauth-error);
  background: rgba(245, 101, 101, 0.06);
}

.uauth-file-label svg {
  color: var(--uauth-primary);
  flex-shrink: 0;
}

.uauth-file-label span {
  font-size: 14px;
  color: var(--uauth-text-light);
}

.uauth-file-preview {
  position: relative;
  margin-top: 12px;
  display: inline-block;
}

.uauth-file-preview img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid var(--uauth-border);
}

.uauth-remove-file {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 40px;
  height: 40px;
  background: var(--uauth-error);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.uauth-remove-file:hover { transform: scale(1.15) rotate(90deg); }

/* Button */
.uauth-btn {
  padding: 14px 24px;
  min-height: 44px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}

.uauth-btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.uauth-btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.uauth-btn-label {
  display: inline-block;
}

.uauth-btn-primary,
.uauth-btn-outline,
.uauth-btn-ghost {
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--uauth-auth-btn);
  border-radius: 10px;
  background: #fff;
  color: var(--uauth-auth-btn);
  box-shadow: none;
}

.uauth-btn-primary:hover:not(:disabled),
.uauth-btn-outline:hover:not(:disabled),
.uauth-btn-ghost:hover:not(:disabled) {
  background: var(--uauth-auth-btn-light);
  color: var(--uauth-auth-btn-dark);
  border-color: var(--uauth-auth-btn-dark);
}

.uauth-btn-primary:active:not(:disabled),
.uauth-btn-outline:active:not(:disabled),
.uauth-btn-ghost:active:not(:disabled) {
  background: rgba(29, 140, 255, 0.12);
  color: var(--uauth-auth-btn-dark);
}

.uauth-btn-block { width: 100%; display: inline-flex; }

#uauth-login-form .uauth-btn-primary .uauth-btn-loader,
#uauth-register-form .uauth-btn-primary .uauth-btn-loader,
#uauth-forgot-form .uauth-btn-primary .uauth-btn-loader,
#uauth-reset-form .uauth-btn-primary .uauth-btn-loader {
  color: var(--uauth-auth-btn);
}

.uauth-btn:disabled {
  border-color: rgba(29, 140, 255, 0.35);
  color: rgba(29, 140, 255, 0.65);
  background: #fff;
}

.uauth-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.uauth-btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.uauth-feedback-zone {
  margin-top: 16px;
  min-height: 78px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.uauth-forgot-state-body {
  padding: 0 30px 30px;
  display: grid;
  gap: 14px;
}

.uauth-reset-state-body {
  padding: 0 30px 30px;
  display: grid;
  gap: 14px;
}

.uauth-forgot-state-email,
.uauth-forgot-state-timer,
.uauth-forgot-state-help {
  margin: 0;
  overflow-wrap: anywhere;
}

.uauth-forgot-state-email {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.48);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  color: #334155;
  font-size: 14px;
  line-height: 1.6;
}

.uauth-forgot-state-timer {
  font-size: 14px;
  font-weight: 700;
  color: #b45309;
}

.uauth-forgot-state-help {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

.uauth-forgot-state-actions {
  display: grid;
  gap: 10px;
}

/* Messages */
.uauth-message {
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  animation: uauthSlideDown 0.3s ease;
  line-height: 1.5;
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.uauth-assist-panel {
  display: grid;
  gap: 8px;
  align-items: start;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(239, 246, 255, 0.52) 44%, rgba(250, 245, 255, 0.42) 100%);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  color: #334155;
}

.uauth-assist-panel[hidden] {
  display: none !important;
}

.uauth-assist-panel.is-locked {
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(145deg, rgba(255, 241, 242, 0.76) 0%, rgba(254, 226, 226, 0.52) 54%, rgba(255, 237, 213, 0.42) 100%);
}

.uauth-assist-panel.is-challenge {
  border-color: rgba(255, 255, 255, 0.5);
  background: linear-gradient(145deg, rgba(239, 246, 255, 0.76) 0%, rgba(224, 242, 254, 0.5) 46%, rgba(250, 245, 255, 0.4) 100%);
}

.uauth-assist-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.uauth-assist-text {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
}

.uauth-assist-action {
  appearance: none;
  min-height: 44px;
  width: fit-content;
  max-width: 100%;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(29, 140, 255, 0.44);
  background: #fff;
  color: var(--uauth-auth-btn);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.uauth-assist-action:hover {
  border-color: var(--uauth-auth-btn-dark);
  background: var(--uauth-auth-btn-light);
  color: var(--uauth-auth-btn-dark);
}

@keyframes uauthSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.uauth-message.success {
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.76) 0%, rgba(204, 251, 241, 0.52) 50%, rgba(220, 252, 231, 0.44) 100%);
  color: #2f855a;
  border: 1px solid rgba(255, 255, 255, 0.52);
}
.uauth-message.success strong { color: var(--uauth-success); }

.uauth-message.error {
  background: linear-gradient(145deg, rgba(255, 241, 242, 0.78) 0%, rgba(254, 226, 226, 0.52) 52%, rgba(255, 237, 213, 0.4) 100%);
  color: #c53030;
  border: 1px solid rgba(255, 255, 255, 0.52);
}
.uauth-message.error strong { color: var(--uauth-error); }

.uauth-error {
  display: block;
  color: var(--uauth-error);
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
  font-weight: 500;
}

.uauth-error:empty {
  display: none;
  min-height: 0;
  margin-top: 0;
}

.uauth-hint {
  display: block;
  font-size: 12px;
  color: var(--uauth-text-light);
  margin-top: 6px;
}

.uauth-form-summary {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(145deg, rgba(255, 241, 242, 0.78) 0%, rgba(254, 226, 226, 0.52) 52%, rgba(255, 237, 213, 0.42) 100%);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  color: #9f1239;
}

.uauth-form-summary-title {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}

.uauth-form-summary-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 13px;
  line-height: 1.55;
}

.uauth-password-policy {
  margin-top: 10px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72) 0%, rgba(239, 246, 255, 0.5) 42%, rgba(250, 245, 255, 0.42) 100%);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
}

.uauth-password-policy-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.uauth-password-policy-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.uauth-password-policy-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--uauth-primary-dark);
}

.uauth-password-policy-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.uauth-password-policy-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #64748b;
  transition: color 0.2s ease;
}

.uauth-password-policy-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.72);
  position: relative;
}

.uauth-password-policy-icon::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  opacity: 0.55;
}

.uauth-password-policy-item.is-met {
  color: #166534;
}

.uauth-password-policy-item.is-met .uauth-password-policy-icon {
  border-color: rgba(22, 101, 52, 0.24);
  background: rgba(34, 197, 94, 0.12);
}

.uauth-password-policy-item.is-met .uauth-password-policy-icon::before {
  inset: 3px;
  background: #16a34a;
  opacity: 1;
}

.uauth-password-policy-item.is-unmet .uauth-password-policy-icon::before {
  background: #94a3b8;
}

.uauth-password-match.is-match {
  color: #166534;
  font-weight: 600;
}

.uauth-password-match.is-mismatch {
  color: #b45309;
  font-weight: 600;
}

.uauth-reset-success-note {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.78) 0%, rgba(204, 251, 241, 0.54) 48%, rgba(220, 252, 231, 0.46) 100%);
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
  color: #166534;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.uauth-reset-user {
  overflow-wrap: anywhere;
}

/* Modal */
.uauth-modal {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 18%, rgba(34, 211, 238, 0.18) 0%, rgba(34, 211, 238, 0) 34%),
    radial-gradient(circle at 82% 12%, rgba(244, 114, 182, 0.14) 0%, rgba(244, 114, 182, 0) 28%),
    radial-gradient(circle at 70% 88%, rgba(251, 146, 60, 0.16) 0%, rgba(251, 146, 60, 0) 26%),
    rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  z-index: 1000000;
  animation: uauthFadeIn 0.3s ease;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.uauth-modal.active { display: flex; }

.uauth-modal-content {
  background:
    radial-gradient(circle at 14% 10%, rgba(34, 211, 238, 0.16) 0%, rgba(34, 211, 238, 0) 30%),
    radial-gradient(circle at 84% 12%, rgba(244, 114, 182, 0.16) 0%, rgba(244, 114, 182, 0) 28%),
    radial-gradient(circle at 78% 86%, rgba(251, 146, 60, 0.18) 0%, rgba(251, 146, 60, 0) 28%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.84) 0%, rgba(251, 245, 255, 0.7) 56%, rgba(255, 243, 235, 0.68) 100%);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 20px;
  max-width: 420px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: uauthScaleIn 0.3s ease;
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.22), var(--uauth-glass-highlight);
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

@keyframes uauthScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.uauth-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: auto;
  height: auto;
  padding: 8px;
  appearance: none;
  background: none !important;
  border: 0 !important;
  border-radius: 0;
  color: #111827;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
  z-index: 1;
  line-height: 1;
  box-shadow: none !important;
  outline: none;
}

.uauth-modal-close-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.uauth-modal-close:hover {
  background: none !important;
  color: #ef4444;
  transform: scale(1.03);
  box-shadow: none !important;
}

.uauth-modal-close:active {
  background: none !important;
  color: #111827;
  transform: scale(0.96);
  box-shadow: none !important;
}

.uauth-modal-header {
  padding: 34px 24px 18px;
  text-align: center;
}

.uauth-modal-state-icon {
  display: block;
  margin: 0 auto 16px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  background: linear-gradient(145deg, rgba(238, 244, 255, 0.78) 0%, rgba(250, 245, 255, 0.58) 52%, rgba(255, 247, 237, 0.5) 100%);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  color: #5b6ee1;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

.uauth-modal-state-icon-success {
  color: #16a34a;
  background: linear-gradient(145deg, rgba(240, 253, 244, 0.82) 0%, rgba(204, 251, 241, 0.56) 46%, rgba(224, 255, 240, 0.5) 100%);
}

.uauth-success-icon-box,
.uauth-success-icon-check {
  stroke-dashoffset: 0;
}

.uauth-forgot-state-success.is-active .uauth-modal-state-icon-success {
  animation: uauthSuccessIconPop 0.55s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
  transform-origin: center;
}

.uauth-forgot-state-success.is-active .uauth-success-icon-box {
  stroke-dasharray: 56;
  stroke-dashoffset: 56;
  animation: uauthSuccessStroke 0.55s ease forwards 0.08s;
}

.uauth-forgot-state-success.is-active .uauth-success-icon-check {
  stroke-dasharray: 12;
  stroke-dashoffset: 12;
  animation: uauthSuccessStroke 0.3s ease forwards 0.48s;
}

.uauth-modal-state-icon-warning {
  color: #d97706;
  background: linear-gradient(145deg, rgba(255, 251, 235, 0.84) 0%, rgba(254, 215, 170, 0.58) 52%, rgba(251, 207, 232, 0.42) 100%);
}

@keyframes uauthSuccessIconPop {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }
  60% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes uauthSuccessStroke {
  to {
    stroke-dashoffset: 0;
  }
}

.uauth-modal-header h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--uauth-text);
  margin: 0 0 8px 0;
}

.uauth-modal-header p {
  font-size: 14px;
  color: var(--uauth-text-light);
  margin: 0;
  overflow-wrap: anywhere;
}

.uauth-modal-header-success p,
.uauth-modal-header-warning p {
  max-width: 30ch;
  margin: 0 auto;
}

.uauth-forgot-state {
  min-height: 392px;
}

/* Welcome Screen */
.uauth-welcome-header {
  padding: 50px 30px;
  text-align: center;
  background: linear-gradient(135deg, var(--uauth-primary) 0%, #764ba2 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.uauth-welcome-header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: uauthPulse 15s ease-in-out infinite;
}

@keyframes uauthPulse {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10%, -10%) scale(1.1); }
}

.uauth-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
  animation: uauthBounceIn 0.6s ease;
}

@keyframes uauthBounceIn {
  0% { opacity: 0; transform: scale(0.3); }
  50% { opacity: 1; transform: scale(1.05); }
  70% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

.uauth-welcome-header h2 {
  font-size: 26px;
  margin: 0 0 8px 0;
  position: relative;
  z-index: 1;
}

.uauth-user-name {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 4px 0;
  opacity: 0.95;
  position: relative;
  z-index: 1;
}

.uauth-user-email {
  font-size: 14px;
  margin: 0;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.uauth-welcome-actions {
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Scrollbar Styling */
.uauth-modal-content::-webkit-scrollbar { width: 8px; }
.uauth-modal-content::-webkit-scrollbar-track {
  background: var(--uauth-bg-light);
  border-radius: 10px;
}
.uauth-modal-content::-webkit-scrollbar-thumb {
  background: var(--uauth-border);
  border-radius: 10px;
}
.uauth-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--uauth-text-light);
}

/* Responsive */
@media (max-width: 576px) {
  .sfc-dashboard-guest-auth::before,
  .sfc-dashboard-guest-auth::after {
    filter: blur(52px);
    opacity: 0.55;
  }
  .uauth-container { margin: 20px auto; padding: 15px; }
  .uauth-card { border-radius: 16px; }
  .uauth-tabs { padding: 6px; gap: 6px; }
  .uauth-tab { padding: 10px 16px; font-size: 14px; gap: 6px; }
  .uauth-tab svg { width: 16px; height: 16px; }
  .uauth-header { padding: 25px 20px 15px; }
  .uauth-title { font-size: 22px; }
  .uauth-subtitle { font-size: 13px; }
  .uauth-form { padding: 0 20px 25px; }
  .uauth-form-row { grid-template-columns: 1fr; gap: 0; }
  .uauth-form-row .uauth-form-group { margin-bottom: 20px; }
  .uauth-form-row .uauth-form-group:last-child { margin-bottom: 0; }
  .uauth-input { padding: 11px 14px; padding-left: 42px; font-size: 14px; }
  .uauth-input-icon { left: 12px; }
  .uauth-input-icon-mail { left: 14px; width: 20px; height: 20px; }
  .uauth-input-wrapper .uauth-input-icon-mail + .uauth-input { padding-left: 50px; }
  .uauth-toggle-password { right: 12px; }
  .uauth-file-preview img { width: 80px; height: 80px; }
  .uauth-btn { padding: 12px 20px; font-size: 15px; }
  .uauth-modal {
    padding: 16px;
    align-items: center;
  }
  .uauth-modal-content {
    max-width: 420px;
    max-height: min(88dvh, 760px);
    border-radius: 20px;
    padding-bottom: 0;
    backdrop-filter: blur(18px) saturate(145%);
    -webkit-backdrop-filter: blur(18px) saturate(145%);
  }
  .uauth-modal-close {
    top: 15px; right: 15px;
    padding: 6px;
  }
  .uauth-modal-header { padding: 35px 25px 15px; }
  .uauth-modal-header h3 { font-size: 20px; }
  .uauth-modal-state-icon {
    width: 52px;
    height: 52px;
  }
  .uauth-forgot-state { min-height: auto; }
  .uauth-forgot-state-body { padding: 0 20px 24px; }
  .uauth-reset-state-body { padding: 0 20px 24px; }
  .uauth-password-policy-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .uauth-password-policy {
    padding: 12px;
  }
  .uauth-form-summary {
    margin-bottom: 16px;
    padding: 12px 14px;
  }
  .uauth-welcome-header { padding: 40px 25px; }
  .uauth-avatar { width: 80px; height: 80px; }
  .uauth-welcome-header h2 { font-size: 24px; }
  .uauth-user-name { font-size: 16px; }
  .uauth-welcome-actions { padding: 25px; }

  .uauth-container.is-dashboard-guest {
    padding: 0;
  }

  .uauth-container.is-dashboard-guest .uauth-auth-card-head {
    padding: 22px 20px 10px;
  }

  .uauth-container.is-dashboard-guest .uauth-auth-aside,
  .uauth-card-dashboard,
  .uauth-reset-card {
    backdrop-filter: blur(14px) saturate(138%);
    -webkit-backdrop-filter: blur(14px) saturate(138%);
  }

  .uauth-container.is-dashboard-guest .uauth-auth-card-title {
    font-size: 24px;
  }

  .uauth-container.is-dashboard-guest .uauth-auth-switch {
    margin: 18px 20px 0;
  }

  .uauth-container.is-dashboard-guest .uauth-header {
    padding: 22px 20px 12px;
  }

  .uauth-container.is-dashboard-guest .uauth-form {
    padding: 0 20px 22px;
  }

  .uauth-auth-card-subtitle {
    max-width: 34ch;
  }

  .uauth-auth-secondary-panel {
    margin-top: 16px;
  }

  .uauth-form-helpers .uauth-link {
    justify-self: start;
    width: fit-content;
  }

  .uauth-feedback-zone {
    min-height: 0;
  }
}

@media (max-width: 400px) {
  .uauth-container { padding: 10px; margin: 10px auto; }
  .uauth-header { padding: 20px 15px 10px; }
  .uauth-form { padding: 0 15px 20px; }
  .uauth-input { font-size: 14px; }
  .uauth-welcome-actions { padding: 20px; }
}

@media (max-width: 920px) {
  .uauth-container.is-dashboard-guest .uauth-auth-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .uauth-container.is-dashboard-guest .uauth-auth-main {
    order: 1;
  }

  .uauth-container.is-dashboard-guest .uauth-auth-aside {
    order: 2;
    padding: 22px 20px;
  }

  .uauth-auth-hero {
    font-size: clamp(24px, 5vw, 34px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .uauth-input.error,
  .uauth-btn-primary:hover:not(:disabled),
  .uauth-toggle-password:hover,
  .uauth-modal-close:hover,
  .uauth-remove-file:hover {
    transform: none !important;
  }
}

/* Focus Visible */
.uauth-btn:focus-visible,
.uauth-input:focus-visible,
.uauth-tab:focus-visible {
  outline: 3px solid var(--uauth-primary);
  outline-offset: 2px;
}

.uauth-toggle-password:focus-visible,
.uauth-remove-file:focus-visible,
.uauth-link:focus-visible,
.uauth-checkbox input:focus-visible,
.uauth-assist-action:focus-visible,
.uauth-auth-secondary-btn:focus-visible,
.uauth-auth-back-link:focus-visible {
  outline: 3px solid var(--uauth-primary);
  outline-offset: 2px;
}

#uauth-login-form .uauth-btn-primary:focus-visible,
#uauth-register-form .uauth-btn-primary:focus-visible,
.uauth-auth-secondary-btn:focus-visible,
.uauth-auth-back-link:focus-visible {
  outline: 3px solid rgba(29, 140, 255, 0.28);
  outline-offset: 2px;
}

.uauth-modal-close:focus-visible {
  outline: none;
  background: none !important;
  color: #111827;
  box-shadow: none !important;
}

/* Print */
@media print {
  .uauth-modal { display: none !important; }
}
