@import url("https://use.typekit.net/dfj4eiq.css");
@import url("https://fonts.googleapis.com/css2?family=Niramit:wght@400;500;600;700;800&display=swap");

:root {
  /* Fonts */
  --font-body: "sofia-pro", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: "Niramit", "sofia-pro", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --font-weight-regular: 400;
  --font-weight-bold: 700;

  /* Amplify Utah Brand Colors */
  --amplify-teal: #0092A0;
  --amplify-teal-dark: #007682;
  --amplify-teal-deep: #075D68;
  --amplify-teal-soft: #CDE8EB;

  --amplify-orange: #FF9B00;
  --amplify-orange-dark: #E88C00;
  --amplify-orange-soft: #FFF1D8;

  --amplify-purple: #B44B9B;
  --amplify-purple-dark: #963B80;
  --amplify-purple-soft: #F5E3F1;

  --amplify-blue: #46657C;
  --amplify-blue-dark: #334B5E;
  --amplify-blue-soft: #E5EDF2;

  --amplify-gray: #70838C;
  --amplify-text: rgb(88, 92, 95);
  --amplify-navy: #172433;
  --amplify-cream: #FFF8F3;
  --amplify-white: #FFFFFF;
  --amplify-black: #111111;

  /* Page Theme */
  --page-bg: var(--amplify-cream);
  --page-bg-secondary: #FFF3EA;

  --text-main: var(--amplify-navy);
  --text-body: var(--amplify-text);
  --text-muted: rgba(88, 92, 95, 0.72);
  --text-soft: rgba(88, 92, 95, 0.52);
  --text-inverse: #FFFFFF;

  /* Type Scale */
  --body-font-size: 18px;
  --body-line-height: 27px;
  --body-font-weight: 400;

  --button-font-size: 20px;
  --button-line-height: 30px;
  --button-font-weight: 700;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-4xl: 44px;
  --text-5xl: 58px;

  --line-tight: 1.1;
  --line-sm: 1.25;
  --line-md: 1.5;
  --line-lg: 1.65;

  /* Surfaces */
  --surface-white: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --surface-glass-strong: rgba(255, 255, 255, 0.94);
  --surface-soft: rgba(255, 248, 243, 0.82);
  --surface-teal: var(--amplify-teal-soft);
  --surface-blue: var(--amplify-blue-soft);
  --surface-orange: var(--amplify-orange-soft);
  --surface-purple: var(--amplify-purple-soft);

  /* Cards */
  --card-bg: var(--surface-glass);
  --card-bg-strong: var(--surface-glass-strong);
  --card-border: rgba(70, 101, 124, 0.18);

  /* Borders */
  --border-light: rgba(70, 101, 124, 0.14);
  --border-medium: rgba(70, 101, 124, 0.22);
  --border-strong: rgba(70, 101, 124, 0.34);
  --border-white: rgba(255, 255, 255, 0.42);

  /* Inputs */
  --input-bg: rgba(255, 255, 255, 0.78);
  --input-bg-hover: rgba(255, 255, 255, 0.92);
  --input-bg-focus: #FFFFFF;
  --input-border: rgba(70, 101, 124, 0.18);
  --input-border-hover: rgba(0, 146, 160, 0.42);
  --input-placeholder: rgba(88, 92, 95, 0.5);
  --focus-ring: rgba(0, 146, 160, 0.18);

  /* Buttons */
  --button-bg: var(--amplify-blue);
  --button-bg-hover: var(--amplify-teal);
  --button-text: #FFFFFF;
  --button-radius: 14px;

  /* Status Colors */
  --success: #1F9D66;
  --success-bg: rgba(31, 157, 102, 0.1);
  --success-border: rgba(31, 157, 102, 0.24);

  --warning: #FF9B00;
  --warning-bg: rgba(255, 155, 0, 0.12);
  --warning-border: rgba(255, 155, 0, 0.28);

  --error: #B7352F;
  --error-bg: rgba(255, 69, 58, 0.09);
  --error-border: rgba(255, 69, 58, 0.24);

  --info: #0092A0;
  --info-bg: rgba(0, 146, 160, 0.1);
  --info-border: rgba(0, 146, 160, 0.24);

  /* Shadows */
  --shadow-xs: 0 2px 6px rgba(23, 36, 51, 0.06);
  --shadow-sm: 0 8px 22px rgba(23, 36, 51, 0.08);
  --shadow-md: 0 16px 38px rgba(23, 36, 51, 0.12);
  --shadow-lg: 0 28px 70px rgba(23, 36, 51, 0.14);
  --shadow-xl: 0 34px 90px rgba(23, 36, 51, 0.18);

  --shadow-teal: 0 18px 34px rgba(0, 146, 160, 0.26);
  --shadow-orange: 0 18px 34px rgba(255, 155, 0, 0.3);
  --shadow-blue: 0 14px 28px rgba(70, 101, 124, 0.28);

  /* Radius */
  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-pill: 999px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Motion */
  --transition-fast: 0.16s ease;
  --transition-normal: 0.22s ease;
  --transition-slow: 0.35s ease;
}

/* Night theme controlled by your JS */
html.theme-night {
  --page-bg: #111C28;
  --page-bg-secondary: #173345;

  --text-main: #FFFFFF;
  --text-body: rgba(255, 255, 255, 0.78);
  --text-muted: rgba(255, 255, 255, 0.58);
  --text-soft: rgba(255, 255, 255, 0.42);
  --text-inverse: #111111;

  --surface-glass: rgba(18, 30, 42, 0.82);
  --surface-glass-strong: rgba(22, 38, 52, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.08);

  --card-bg: var(--surface-glass);
  --card-bg-strong: var(--surface-glass-strong);
  --card-border: rgba(205, 232, 235, 0.16);

  --border-light: rgba(255, 255, 255, 0.12);
  --border-medium: rgba(205, 232, 235, 0.18);
  --border-strong: rgba(205, 232, 235, 0.3);

  --input-bg: rgba(255, 255, 255, 0.1);
  --input-bg-hover: rgba(255, 255, 255, 0.14);
  --input-bg-focus: rgba(255, 255, 255, 0.17);
  --input-border: rgba(255, 255, 255, 0.14);
  --input-border-hover: rgba(205, 232, 235, 0.38);
  --input-placeholder: rgba(255, 255, 255, 0.48);
  --focus-ring: rgba(0, 146, 160, 0.3);

  --shadow-xs: 0 2px 6px rgba(0, 0, 0, 0.16);
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 16px 38px rgba(0, 0, 0, 0.28);
  --shadow-lg: 0 32px 90px rgba(0, 0, 0, 0.38);
  --shadow-xl: 0 38px 100px rgba(0, 0, 0, 0.48);
}

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

html {
  min-height: 100%;
  background: var(--page-bg);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  font-weight: var(--body-font-weight);
  color: var(--text-body);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  display: block;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--amplify-blue);
  text-decoration: none;
  transition: color var(--transition-normal);
}

a:hover {
  color: var(--amplify-teal);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-main);
  letter-spacing: -0.035em;
}

p {
  margin: 0;
}

.text-body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 27px;
  font-weight: 400;
  color: var(--text-body);
}

.text-muted {
  color: var(--text-muted);
}

.text-soft {
  color: var(--text-soft);
}

.text-button {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 30px;
  font-weight: 700;
  color: #FFFFFF;
}

/* Buttons */
.btn,
.button,
.login-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px 22px;
  border: none;
  border-radius: var(--button-radius);
  font-family: var(--font-body);
  font-size: var(--button-font-size);
  line-height: var(--button-line-height);
  font-weight: var(--button-font-weight);
  color: var(--button-text);
  background: var(--button-bg);
  box-shadow: var(--shadow-blue);
  cursor: pointer;
  transition:
    transform var(--transition-normal),
    background var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    color var(--transition-normal);
}

.btn:hover,
.button:hover,
.login-button:hover,
.primary-button:hover {
  transform: translateY(-2px);
  color: var(--button-text);
  background: var(--button-bg-hover);
  box-shadow: var(--shadow-teal);
}

.btn:active,
.button:active,
.login-button:active,
.primary-button:active {
  transform: translateY(0) scale(0.985);
}

.btn-orange {
  color: #111111;
  background: var(--amplify-orange);
  box-shadow: var(--shadow-orange);
}

.btn-orange:hover {
  color: #111111;
  background: var(--amplify-orange-dark);
  box-shadow: var(--shadow-orange);
}

.btn-teal {
  color: #FFFFFF;
  background: var(--amplify-teal);
  box-shadow: var(--shadow-teal);
}

.btn-teal:hover {
  color: #FFFFFF;
  background: var(--amplify-teal-dark);
}

.btn-purple {
  color: #FFFFFF;
  background: var(--amplify-purple);
}

.btn-purple:hover {
  color: #FFFFFF;
  background: var(--amplify-purple-dark);
}

.btn-ghost {
  color: var(--amplify-blue);
  background: transparent;
  border: 1px solid var(--border-medium);
  box-shadow: none;
}

.btn-ghost:hover {
  color: var(--amplify-teal);
  background: var(--surface-soft);
  box-shadow: none;
}

.btn-small {
  min-height: 42px;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 24px;
}

.btn-full {
  width: 100%;
}

/* Inputs */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
textarea,
select {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
  color: var(--text-main);
  background: var(--input-bg);
  box-shadow: var(--shadow-xs);
  outline: none;
  transition:
    border-color var(--transition-normal),
    background var(--transition-normal),
    box-shadow var(--transition-normal),
    transform var(--transition-normal);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
select {
  height: 50px;
  padding: 0 15px;
}

textarea {
  min-height: 120px;
  padding: 14px 15px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
  font-weight: 400;
}

input:hover,
textarea:hover,
select:hover {
  border-color: var(--input-border-hover);
  background: var(--input-bg-hover);
}

input:focus,
textarea:focus,
select:focus {
  background: var(--input-bg-focus);
  border-color: rgba(0, 146, 160, 0.55);
  box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow-xs);
}

input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

/* Labels */
.input-label,
label {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  color: var(--amplify-blue);
}

html.theme-night .input-label,
html.theme-night label {
  color: rgba(255, 255, 255, 0.76);
}

/* Cards */
.card,
.glass-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  backdrop-filter: saturate(170%) blur(24px);
  -webkit-backdrop-filter: saturate(170%) blur(24px);
}

.card-strong {
  background: var(--card-bg-strong);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.card-flat {
  background: var(--surface-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

/* Alerts */
.alert,
.error-message,
.success-message,
.warning-message,
.info-message {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  font-weight: 400;
}

.error-message {
  border: 1px solid var(--error-border);
  background: var(--error-bg);
  color: var(--error);
}

.success-message {
  border: 1px solid var(--success-border);
  background: var(--success-bg);
  color: var(--success);
}

.warning-message {
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  color: #9B5B00;
}

.info-message {
  border: 1px solid var(--info-border);
  background: var(--info-bg);
  color: var(--info);
}

/* Pills / Badges */
.badge,
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
}

.badge-teal {
  color: var(--amplify-teal-dark);
  background: var(--amplify-teal-soft);
}

.badge-orange {
  color: #8A5100;
  background: var(--amplify-orange-soft);
}

.badge-purple {
  color: var(--amplify-purple);
  background: var(--amplify-purple-soft);
}

.badge-blue {
  color: var(--amplify-blue);
  background: var(--amplify-blue-soft);
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  background: var(--surface-glass);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

th {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 18px;
  font-weight: 700;
  color: var(--amplify-blue);
}

td {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 22px;
  color: var(--text-body);
}

tr:last-child td {
  border-bottom: none;
}

/* Layout Helpers */
.page-shell {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
}

.page-section {
  padding: var(--space-12) 0;
}

.stack {
  display: flex;
  flex-direction: column;
}

.row {
  display: flex;
  align-items: center;
}

.center {
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-5 {
  gap: var(--space-5);
}

.gap-6 {
  gap: var(--space-6);
}

.hidden {
  display: none !important;
}

.full-width {
  width: 100%;
}

.rounded {
  border-radius: var(--radius-lg);
}

.shadow {
  box-shadow: var(--shadow-md);
}

.no-scroll {
  overflow: hidden;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}

/* Brand Background Utility */
.amplify-brand-bg {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 155, 0, 0.9) 0 8%, transparent 20%),
    radial-gradient(circle at 74% 58%, rgba(205, 232, 235, 1) 0 30%, transparent 58%),
    radial-gradient(circle at 15% 78%, rgba(0, 146, 160, 0.2) 0 20%, transparent 42%),
    radial-gradient(circle at 78% 86%, rgba(180, 75, 155, 0.22) 0 14%, transparent 34%),
    linear-gradient(135deg, #FFF8F3 0%, #FFF3EA 40%, #EAF7F8 72%, #CDE8EB 100%);
}

html.theme-night .amplify-brand-bg {
  background:
    radial-gradient(circle at 82% 16%, rgba(255, 155, 0, 0.72) 0 8%, transparent 22%),
    radial-gradient(circle at 72% 60%, rgba(0, 146, 160, 0.38) 0 30%, transparent 60%),
    radial-gradient(circle at 18% 76%, rgba(180, 75, 155, 0.3) 0 18%, transparent 42%),
    linear-gradient(135deg, #111C28 0%, #173345 46%, #075D68 100%);
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softFloat {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(12px, -14px, 0);
  }
}

@keyframes softPulse {
  from {
    opacity: 0.72;
    transform: scale(1);
  }

  to {
    opacity: 1;
    transform: scale(1.04);
  }
}

.animate-fade-up {
  animation: fadeUp 0.45s ease both;
}

.animate-float {
  animation: softFloat 16s ease-in-out infinite alternate;
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --body-font-size: 16px;
    --body-line-height: 24px;
    --button-font-size: 18px;
    --button-line-height: 27px;
  }

  .page-shell {
    width: min(100% - 28px, 1180px);
  }

  .page-section {
    padding: var(--space-8) 0;
  }

  .btn,
  .button,
  .login-button,
  .primary-button {
    min-height: 52px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="search"],
  input[type="number"],
  input[type="tel"],
  input[type="url"],
  input[type="date"],
  input[type="time"],
  select {
    height: 50px;
    font-size: 16px;
    line-height: 24px;
  }

  textarea {
    font-size: 16px;
    line-height: 24px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Logo day/night swap (used by the navbar include) */
.logo-night {
  display: none;
}

html.theme-night .logo-day {
  display: none;
}

html.theme-night .logo-night {
  display: inline-block;
}

/* =====================================================================
   AMPLIFY UTAH — NEWSROOM AUTH SCREENS
   /assets/styles/pub-auth-styles.css
   (served via styles.php?page=pub-auth)

   One stylesheet for the whole public-account flow:
   /signup, /signup/email-sent, /verify, /login, /forgot-password,
   /forgot-password/email-sent, /reset-password.

   Two layouts:
     .pa-split   — brand panel + form (signup, login)
     .pa-center  — single centered card (everything else)

   Built on theme.css tokens. Raw values limited to #FFFFFF / #111111 on
   coloured surfaces and rgba() washes from brand RGB triplets. Hovers
   use --info-bg (never --surface-teal, which breaks night mode).
   ===================================================================== */

.pa-body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-body);
    font-family: var(--font-body);
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---------------------------------------------------------------
   Split layout (signup / login)
   --------------------------------------------------------------- */
.pa-split {
    display: grid;
    grid-template-columns: minmax(340px, 44%) 1fr;
    min-height: 100vh;
}

.pa-brand {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(32px, 5vw, 72px);
    background: linear-gradient(150deg, var(--amplify-navy) 0%, var(--amplify-teal-deep) 62%, var(--amplify-teal-dark) 100%);
    overflow: hidden;
}

.pa-brand::before,
.pa-brand::after {
    content: '';
    position: absolute;
    border-radius: var(--radius-pill);
    filter: blur(70px);
    pointer-events: none;
}

.pa-brand::before { top: -140px; right: -120px; width: 380px; height: 380px; background: rgba(0, 146, 160, 0.4); }
.pa-brand::after  { bottom: -160px; left: -120px; width: 400px; height: 400px; background: rgba(255, 155, 0, 0.16); }

.pa-brand-inner { position: relative; z-index: 1; max-width: 440px; }

.pa-brand-logo-link { display: inline-block; margin-bottom: clamp(28px, 4vw, 44px); }
.pa-brand-logo { height: 46px; width: auto; display: block; }

.pa-brand-tagline {
    margin: 0 0 var(--space-4);
    font-family: var(--font-display);
    font-size: clamp(28px, 3.2vw, 42px);
    font-weight: 800;
    line-height: var(--line-tight);
    color: #FFFFFF;
}

.pa-brand-sub {
    margin: 0 0 clamp(24px, 3.5vw, 40px);
    font-size: var(--text-md);
    line-height: var(--line-lg);
    color: rgba(255, 255, 255, 0.82);
}

.pa-brand-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--space-3);
}

.pa-brand-features li {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-md);
    color: rgba(255, 255, 255, 0.92);
}

.pa-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--amplify-orange);
    font-size: var(--text-md);
}

.pa-brand-foot {
    margin: clamp(28px, 4vw, 48px) 0 0;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.66);
}

.pa-brand-foot a {
    color: #FFFFFF;
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pa-brand-foot a:hover { color: var(--amplify-orange); }

.pa-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(24px, 4vw, 56px) clamp(16px, 3vw, 40px);
}

/* ---------------------------------------------------------------
   Centered layout (email-sent / verify / forgot / reset)
   --------------------------------------------------------------- */
.pa-center {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: clamp(24px, 5vw, 56px) clamp(16px, 3vw, 32px);
}

.pa-blob {
    position: fixed;
    z-index: 0;
    border-radius: var(--radius-pill);
    filter: blur(90px);
    pointer-events: none;
}

.pa-blob-1 { top: -190px; left: -150px;     width: 540px; height: 540px; background: rgba(0, 146, 160, 0.16); }
.pa-blob-2 { bottom: -230px; right: -170px; width: 560px; height: 560px; background: rgba(255, 155, 0, 0.11); }

html.theme-night .pa-blob-1 { background: rgba(0, 146, 160, 0.12); }
html.theme-night .pa-blob-2 { background: rgba(255, 155, 0, 0.08); }

/* ---------------------------------------------------------------
   Card
   --------------------------------------------------------------- */
.pa-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 470px;
    padding: clamp(26px, 4vw, 40px) clamp(22px, 3.5vw, 38px) clamp(24px, 3.5vw, 34px);
    border-radius: var(--radius-xl);
    background: var(--card-bg-strong);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.pa-card-wide { max-width: 560px; text-align: left; }

.pa-accent {
    position: absolute;
    top: 0;
    left: clamp(22px, 3.5vw, 38px);
    right: clamp(22px, 3.5vw, 38px);
    height: 5px;
    border-radius: 0 0 var(--radius-pill) var(--radius-pill);
    background: linear-gradient(90deg, var(--amplify-teal), var(--amplify-orange));
}

.pa-logo-wrap { margin-bottom: var(--space-5); }
.pa-logo { height: 40px; width: auto; }
.pa-logo-night { display: none; }
html.theme-night .pa-logo-day   { display: none; }
html.theme-night .pa-logo-night { display: inline-block; }

.pa-head { margin-bottom: var(--space-5); }

.pa-title {
    margin: 0 0 var(--space-2);
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: var(--line-tight);
    color: var(--text-main);
}

.pa-title-center { text-align: center; margin-bottom: var(--space-3); }

.pa-sub {
    margin: 0;
    font-size: var(--text-md);
    color: var(--text-soft);
}

.pa-body-text {
    margin: 0 0 var(--space-3);
    font-size: var(--text-md);
    line-height: var(--line-lg);
    color: var(--text-soft);
}

.pa-body-small { font-size: var(--text-sm); }

.pa-link {
    color: var(--amplify-teal-dark);
    font-weight: var(--font-weight-bold);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.pa-link:hover { color: var(--amplify-orange-dark); }
html.theme-night .pa-link { color: var(--amplify-teal-soft); }
html.theme-night .pa-link:hover { color: var(--amplify-orange); }
.pa-link-small { font-size: var(--text-sm); }

/* ---------------------------------------------------------------
   Alerts
   --------------------------------------------------------------- */
.pa-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    font-size: var(--text-sm);
    line-height: var(--line-sm);
    text-align: left;
}

.pa-alert i { margin-top: 2px; flex: 0 0 auto; }
.pa-alert a.pa-link { color: inherit; }

.pa-alert-warn {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: var(--amplify-orange-dark);
}

.pa-alert-ok {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: var(--success);
}

/* ---------------------------------------------------------------
   Form
   --------------------------------------------------------------- */
.pa-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.pa-field { margin-bottom: var(--space-4); text-align: left; }
.pa-field-left { text-align: left; }

.pa-field label,
.pa-label-row label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
    color: var(--text-main);
}

.pa-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--space-3);
}

.pa-input-wrap { position: relative; }

.pa-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
    pointer-events: none;
}

.pa-field input[type="text"],
.pa-field input[type="email"],
.pa-field input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    min-height: 52px;
    padding: 12px 46px 12px 44px;
    border-radius: var(--radius-md);
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: var(--text-md);
    transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.pa-grid-2 .pa-field input { padding-left: 16px; }

.pa-field input::placeholder { color: var(--input-placeholder); }

.pa-field input:hover { background: var(--input-bg-hover); border-color: var(--input-border-hover); }

.pa-field input:focus {
    outline: none;
    border-color: var(--amplify-teal);
    box-shadow: 0 0 0 3px rgba(0, 146, 160, 0.18);
}

.pa-pw-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast), background var(--transition-fast);
}

.pa-pw-toggle:hover { color: var(--amplify-teal); background: var(--info-bg); }

/* ---------------------------------------------------------------
   Password strength + rules
   --------------------------------------------------------------- */
.pa-strength {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.pa-strength-track {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-pill);
    background: var(--border-light);
    overflow: hidden;
}

.pa-strength-fill {
    height: 100%;
    width: 0;
    border-radius: var(--radius-pill);
    transition: width var(--transition-normal), background var(--transition-normal);
}

.pa-strength-label {
    flex: 0 0 auto;
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
}

.pa-strength-fill.is-lvl0,  .pa-strength-label.is-lvl0 { background: var(--error); }
.pa-strength-fill.is-lvl1,  .pa-strength-label.is-lvl1 { background: var(--amplify-orange-dark); }
.pa-strength-fill.is-lvl2,  .pa-strength-label.is-lvl2 { background: var(--amplify-orange); }
.pa-strength-fill.is-lvl3,  .pa-strength-label.is-lvl3 { background: var(--success); }
.pa-strength-fill.is-lvl4,  .pa-strength-label.is-lvl4 { background: var(--amplify-teal); }

.pa-strength-label.is-lvl0 { background: none; color: var(--error); }
.pa-strength-label.is-lvl1 { background: none; color: var(--amplify-orange-dark); }
.pa-strength-label.is-lvl2 { background: none; color: var(--amplify-orange-dark); }
.pa-strength-label.is-lvl3 { background: none; color: var(--success); }
.pa-strength-label.is-lvl4 { background: none; color: var(--amplify-teal-dark); }
html.theme-night .pa-strength-label.is-lvl4 { color: var(--amplify-teal-soft); }

.pa-rules {
    list-style: none;
    margin: var(--space-2) 0 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.pa-rule {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-xs);
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.pa-rule i { font-size: 0.85em; }
.pa-rule.is-pass { color: var(--success); }

.pa-field-error {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-weight-bold);
    color: var(--error);
}

/* ---------------------------------------------------------------
   Agree checkbox
   --------------------------------------------------------------- */
.pa-agree {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: var(--space-2) 0 var(--space-5);
    font-size: var(--text-sm);
    line-height: var(--line-sm);
    color: var(--text-soft);
    text-align: left;
    cursor: pointer;
}

.pa-agree input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--amplify-teal);
    cursor: pointer;
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.pa-btn-primary,
.pa-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 54px;
    padding: 12px 26px;
    border-radius: var(--button-radius);
    font-family: var(--font-body);
    font-size: var(--button-font-size);
    line-height: var(--button-line-height);
    font-weight: var(--button-font-weight);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition-normal), background var(--transition-normal),
                box-shadow var(--transition-normal), border-color var(--transition-normal),
                color var(--transition-normal);
}

.pa-btn-primary {
    border: none;
    color: #FFFFFF !important;
    background: var(--amplify-teal);
    box-shadow: var(--shadow-teal);
}

.pa-btn-primary:hover { transform: translateY(-2px); background: var(--amplify-teal-dark); }
.pa-btn-primary:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }
.pa-btn-primary:focus-visible,
.pa-btn-ghost:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

.pa-btn-block { width: 100%; }

.pa-btn-ghost {
    color: var(--amplify-blue);
    background: transparent;
    border: 1px solid var(--border-medium);
}

.pa-btn-ghost:hover {
    color: var(--amplify-teal);
    background: var(--info-bg);
    border-color: var(--info-border);
    transform: translateY(-2px);
}

.pa-btn-ghost:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
html.theme-night .pa-btn-ghost { color: var(--text-body); }
html.theme-night .pa-btn-ghost:hover { color: var(--amplify-teal-soft); }

/* ---------------------------------------------------------------
   Hero icons (centered screens)
   --------------------------------------------------------------- */
.pa-hero-icon { position: relative; display: inline-block; margin-bottom: var(--space-4); }

.pa-hero-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: var(--radius-pill);
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--amplify-teal);
    font-size: var(--text-3xl);
}

.pa-hero-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.pa-hero-warn    { color: var(--amplify-orange-dark); background: var(--warning-bg); border-color: var(--warning-border); }
.pa-hero-error   { color: var(--error); background: var(--error-bg); border-color: var(--error-border); }

.pa-spark {
    position: absolute;
    color: var(--amplify-orange);
    animation: paTwinkle 2.2s ease-in-out infinite;
}

.pa-spark-1 { top: -6px;  right: -10px; font-size: var(--text-sm); }
.pa-spark-2 { bottom: 2px; left: -14px; font-size: var(--text-xs); animation-delay: 0.6s; }
.pa-spark-3 { top: 40%;   right: -20px; font-size: 7px; color: var(--amplify-teal); animation-delay: 1.1s; }

@keyframes paTwinkle {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50%      { opacity: 1;    transform: scale(1.12); }
}

/* Animated checkmark (verify success) */
.pa-checkmark { width: 52px; height: 52px; display: block; }

.pa-check-circle {
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    animation: paStroke 0.7s ease-out forwards;
}

.pa-check-path {
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: paStroke 0.5s 0.55s ease-out forwards;
}

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

/* ---------------------------------------------------------------
   Email chip / tips / badges / cooldown
   --------------------------------------------------------------- */
.pa-email-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    max-width: 100%;
    margin: 0 0 var(--space-3);
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    color: var(--amplify-teal-dark);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
}

.pa-email-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.theme-night .pa-email-chip { color: var(--amplify-teal-soft); }

.pa-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin: var(--space-4) 0;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    border: 1px solid var(--border-light);
    text-align: left;
}

.pa-tip i { margin-top: 2px; color: var(--amplify-teal); flex: 0 0 auto; }
.pa-tip p { margin: 0; font-size: var(--text-sm); line-height: var(--line-sm); color: var(--text-soft); }

.pa-status-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin: 0 0 var(--space-3);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-bold);
}

.pa-status-success { background: var(--success-bg); border: 1px solid var(--success-border); color: var(--success); }
.pa-status-error   { background: var(--error-bg);   border: 1px solid var(--error-border);   color: var(--error); }

.pa-cooldown {
    margin: 0 0 var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

/* ---------------------------------------------------------------
   Redirect progress (verify success)
   --------------------------------------------------------------- */
.pa-redirect-row { margin: var(--space-4) 0; }

.pa-redirect-track {
    height: 6px;
    margin-bottom: var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--border-light);
    overflow: hidden;
}

.pa-redirect-fill {
    height: 100%;
    width: 0;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--amplify-teal), var(--amplify-orange));
}

.pa-redirect-label { font-size: var(--text-xs); color: var(--text-muted); }

/* ---------------------------------------------------------------
   Actions / footers
   --------------------------------------------------------------- */
.pa-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.pa-foot {
    margin: var(--space-5) 0 0;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}

.pa-foot-left { text-align: left; line-height: var(--line-sm); }
.pa-foot i { font-size: 0.85em; }

/* ---------------------------------------------------------------
   Buttons inside forms (icon/spinner swap)
   --------------------------------------------------------------- */
.pa-btn-icon,
.pa-btn-spinner { font-size: 0.85em; }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 900px) {
    .pa-split { grid-template-columns: 1fr; }
    .pa-brand { display: none; }
    .pa-form-panel { min-height: 100vh; }
}

@media (max-width: 560px) {
    .pa-grid-2 { grid-template-columns: 1fr; gap: 0; }
    .pa-card { padding: 24px 18px 22px; }
    .pa-actions { flex-direction: column; align-items: stretch; }
    .pa-actions .pa-btn-primary,
    .pa-actions .pa-btn-ghost { width: 100%; box-sizing: border-box; }
}

/* ---------------------------------------------------------------
   Reduced motion
   --------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .pa-spark,
    .pa-check-circle,
    .pa-check-path { animation: none; }
    .pa-check-circle,
    .pa-check-path { stroke-dashoffset: 0; }
    .pa-btn-primary:hover,
    .pa-btn-ghost:hover { transform: none; }
}

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