:root {
  --auth-navy-950: #071827;
  --auth-navy-900: #0b2239;
  --auth-navy-800: #123451;
  --auth-slate-700: #334a60;
  --auth-slate-600: #53697e;
  --auth-slate-500: #5f7285;
  --auth-slate-400: #63768a;
  --auth-slate-300: #7f8f9f;
  --auth-slate-200: #dce4eb;
  --auth-slate-100: #edf2f6;
  --auth-slate-50: #f6f8fa;
  --auth-paper: #fffdf9;
  --auth-white: #ffffff;
  --auth-gold-600: #8d6215;
  --auth-gold-500: #c28d2c;
  --auth-gold-400: #ddb354;
  --auth-gold-100: #fbf2db;
  --auth-teal-600: #076f65;
  --auth-teal-500: #087f73;
  --auth-teal-100: #dcf6f1;
  --auth-red-700: #a82f35;
  --auth-red-600: #c43d45;
  --auth-red-100: #fce8e9;
  --auth-red-50: #fff5f5;
  --auth-blue-700: #1c5b8f;
  --auth-blue-100: #e3f1fb;
  --auth-warning-700: #8a5a11;
  --auth-warning-100: #fff1cf;
  --auth-radius-sm: 10px;
  --auth-radius-md: 16px;
  --auth-radius-lg: 24px;
  --auth-shadow-card: 0 24px 64px rgba(7, 24, 39, 0.12), 0 3px 12px rgba(7, 24, 39, 0.05);
  --auth-shadow-control: 0 1px 2px rgba(7, 24, 39, 0.04);
  --auth-focus: 0 0 0 3px var(--auth-gold-600);
  --auth-font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Arabic", Arial, sans-serif;
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--auth-navy-950);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.auth-page {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-navy-950);
  background: var(--auth-slate-50);
  font-family: var(--auth-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--auth-blue-700);
}

.auth-svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.auth-svg-sprite symbol,
.auth-svg-sprite path,
.auth-svg-sprite rect,
.auth-svg-sprite circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-sr-only {
  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;
}

.auth-skip-link {
  position: fixed;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 100;
  padding: 10px 14px;
  color: var(--auth-navy-950);
  background: var(--auth-white);
  border: 2px solid var(--auth-gold-600);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.auth-skip-link:focus {
  transform: translateY(0);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(500px, 0.92fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* Story panel */
.auth-story {
  position: sticky;
  inset-block-start: 0;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--auth-white);
  background-color: var(--auth-navy-950);
  background-image:
    linear-gradient(115deg, rgba(7, 24, 39, 0.96) 2%, rgba(11, 34, 57, 0.91) 48%, rgba(8, 35, 53, 0.7) 100%),
    url("../img/catalogue/smart-chantier-catalogue-hero.png");
  background-position: center;
  background-size: cover;
}

@supports (background-image: image-set(url("x.webp") type("image/webp"))) {
  .auth-story {
    background-image:
      linear-gradient(115deg, rgba(7, 24, 39, 0.96) 2%, rgba(11, 34, 57, 0.91) 48%, rgba(8, 35, 53, 0.7) 100%),
      image-set(
        url("img/auth-construction.webp") type("image/webp"),
        url("../img/catalogue/smart-chantier-catalogue-hero.png") type("image/png")
      );
  }
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 84% 16%, rgba(221, 179, 84, 0.21), transparent 24%),
    linear-gradient(180deg, transparent 55%, rgba(3, 17, 29, 0.36));
}

.auth-story::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.13);
}

.auth-story__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 82%, transparent 100%);
}

.auth-story__inner {
  display: flex;
  flex-direction: column;
  width: min(100%, 900px);
  min-height: 100%;
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(34px, 5vw, 76px) clamp(38px, 6vw, 96px) clamp(32px, 4vw, 56px);
}

.auth-story__brand {
  display: inline-flex;
  align-self: flex-start;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
}

.auth-story__brand img {
  display: block;
  width: clamp(220px, 17vw, 280px);
  height: auto;
}

.auth-story__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  max-width: 650px;
  padding-block: clamp(52px, 8vh, 100px) 44px;
}

.auth-story__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-story__eyebrow span {
  width: 34px;
  height: 2px;
  background: var(--auth-gold-400);
}

.auth-story__title {
  position: relative;
  display: grid;
  max-width: 700px;
  min-height: 5.1em;
  margin: 0;
  font-size: clamp(2.35rem, 4.4vw, 4.8rem);
  font-weight: 760;
  letter-spacing: -0.052em;
  line-height: 1.01;
  text-wrap: balance;
}

.auth-rotating-headline__item {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-self: start;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 480ms ease,
    transform 480ms cubic-bezier(0.2, 0.72, 0.25, 1),
    visibility 0s linear 480ms;
}

.auth-rotating-headline__item.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.auth-rotating-headline__item.is-leaving {
  opacity: 0;
  visibility: visible;
  transform: translateY(-10px);
}

.auth-rotating-headline__primary,
.auth-rotating-headline__highlight {
  display: block;
}

.auth-rotating-headline__highlight {
  color: var(--auth-gold-400);
}

[dir="rtl"] .auth-story__title,
[dir="rtl"] .auth-card__header h1,
[dir="rtl"] .auth-state h1 {
  letter-spacing: 0;
}

.auth-story__lead {
  max-width: 580px;
  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(1rem, 1.18vw, 1.18rem);
  line-height: 1.75;
  transition: opacity 380ms ease;
}

.auth-story__lead.is-lead-fading {
  opacity: 0;
}

.auth-benefits {
  display: grid;
  gap: 12px;
  max-width: 600px;
  margin: 38px 0 0;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  display: flex;
  min-height: 50px;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.91);
  font-size: 0.94rem;
  font-weight: 650;
}

.auth-benefits__icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  color: var(--auth-gold-400);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.auth-benefits svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-story__proof {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding-block-start: 24px;
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
}

.auth-story__proof span {
  display: flex;
  flex-direction: column;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-story__proof strong {
  margin-block-end: 2px;
  color: var(--auth-white);
  font-size: 0.92rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

/* Form panel */
.auth-panel {
  display: flex;
  min-width: 0;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 0, rgba(221, 179, 84, 0.08), transparent 30%),
    var(--auth-slate-50);
}

.auth-panel__toolbar {
  display: flex;
  width: min(100%, 680px);
  min-height: 72px;
  align-items: center;
  justify-content: flex-end;
  margin-inline: auto;
  padding: 16px clamp(24px, 4vw, 54px) 0;
}

.auth-language {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  color: var(--auth-slate-600);
}

.auth-language__submit {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  color: var(--auth-white);
  background: var(--auth-navy-900);
  border: 1px solid var(--auth-navy-900);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 750;
}

.auth-language__submit:hover {
  background: var(--auth-navy-800);
}

.auth-language__submit:focus-visible {
  outline: 3px solid var(--auth-gold-600);
  outline-offset: 2px;
}

.auth-language__globe {
  position: absolute;
  inset-inline-start: 13px;
  z-index: 1;
  color: var(--auth-slate-500);
  font-size: 1.12rem;
  line-height: 1;
  pointer-events: none;
}

.auth-language select {
  min-width: 132px;
  min-height: 44px;
  padding: 8px 34px 8px 38px;
  color: var(--auth-slate-700);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--auth-slate-300);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 680;
  box-shadow: var(--auth-shadow-control);
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.auth-language select:hover {
  background: var(--auth-white);
  border-color: var(--auth-slate-300);
}

.auth-language select:focus-visible {
  border-color: var(--auth-gold-600);
  box-shadow: var(--auth-focus);
}

[dir="rtl"] .auth-language select {
  padding-inline: 38px 34px;
}

.auth-panel__inner {
  display: flex;
  width: 100%;
  max-width: 680px;
  min-height: calc(100svh - 72px);
  flex: 1;
  flex-direction: column;
  justify-content: center;
  margin-inline: auto;
  padding: 28px clamp(24px, 4vw, 54px) 24px;
}

.auth-card {
  width: 100%;
  max-width: 570px;
  margin-inline: auto;
  padding: clamp(34px, 4.2vw, 52px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(196, 207, 218, 0.82);
  border-radius: var(--auth-radius-lg);
  box-shadow: var(--auth-shadow-card);
  animation: auth-card-in 420ms cubic-bezier(0.2, 0.75, 0.25, 1) both;
  overflow-wrap: anywhere;
}

.auth-card:focus {
  outline: 3px solid var(--auth-gold-600);
  outline-offset: 4px;
}

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

.auth-mobile-brand {
  display: none;
  margin-block-end: 30px;
  text-align: center;
}

.auth-mobile-brand a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
}

.auth-mobile-brand img {
  display: block;
  width: min(228px, 76vw);
  height: auto;
}

.auth-mobile-brand p {
  margin: 4px 0 0;
  color: var(--auth-slate-500);
  font-size: 0.82rem;
}

.auth-card__header {
  margin-block-end: 30px;
}

.auth-card__eyebrow {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 7px;
  margin-block-end: 18px;
  padding: 5px 10px;
  color: var(--auth-blue-700);
  background: var(--auth-blue-100);
  border: 1px solid rgba(28, 91, 143, 0.13);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 780;
  letter-spacing: 0.075em;
  line-height: 1.2;
  text-transform: uppercase;
}

.auth-card__eyebrow svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-card__header h1 {
  max-width: 500px;
  margin: 0;
  color: var(--auth-navy-950);
  font-size: clamp(1.72rem, 2.8vw, 2.18rem);
  font-weight: 790;
  letter-spacing: -0.038em;
  line-height: 1.13;
  text-wrap: balance;
}

.auth-card__header > p {
  max-width: 490px;
  margin: 12px 0 0;
  color: var(--auth-slate-600);
  font-size: 0.91rem;
  line-height: 1.65;
}

.auth-messages {
  display: grid;
  gap: 10px;
  margin-block-end: 20px;
}

.auth-alert {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  margin-block: 0 18px;
  padding: 13px 14px;
  color: var(--auth-blue-700);
  background: var(--auth-blue-100);
  border: 1px solid rgba(28, 91, 143, 0.16);
  border-radius: var(--auth-radius-sm);
  font-size: 0.84rem;
  line-height: 1.5;
}

.auth-messages .auth-alert {
  margin: 0;
}

.auth-alert svg {
  width: 20px;
  height: 20px;
  margin-block-start: 1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-alert a {
  color: inherit;
  font-weight: 750;
}

.auth-alert--error {
  color: var(--auth-red-700);
  background: var(--auth-red-50);
  border-color: rgba(196, 61, 69, 0.26);
  animation: auth-error-in 260ms ease both;
}

.auth-alert--success {
  color: #086c61;
  background: #effbf8;
  border-color: rgba(15, 156, 142, 0.24);
}

.auth-alert--warning {
  color: var(--auth-warning-700);
  background: #fff9ea;
  border-color: rgba(159, 113, 31, 0.24);
}

.auth-form {
  display: grid;
  gap: 20px;
}

.auth-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.auth-field {
  min-width: 0;
}

.auth-field__label-row {
  display: flex;
  min-height: 24px;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-block-end: 7px;
}

.auth-field__label-row label {
  color: var(--auth-slate-700);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.015em;
}

.auth-required {
  color: var(--auth-red-600);
}

.auth-field__label-row a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--auth-gold-600);
  font-size: 0.75rem;
  font-weight: 740;
  text-decoration: none;
}

.auth-field__control input[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

.auth-field__control input[dir="auto"] {
  unicode-bidi: plaintext;
}

.auth-field__label-row a:hover {
  color: var(--auth-navy-800);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-field__control {
  position: relative;
}

.auth-field__icon {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 15px;
  z-index: 1;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: var(--auth-slate-400);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 150ms ease;
}

.auth-field__icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-field__control input:not([type="checkbox"]):not([type="radio"]),
.auth-field__control select,
.auth-field__control textarea,
.auth-form > input:not([type="hidden"]) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 15px;
  padding-inline-start: 46px;
  color: var(--auth-navy-950);
  caret-color: var(--auth-gold-600);
  background: var(--auth-white);
  border: 1px solid var(--auth-slate-300);
  border-radius: var(--auth-radius-sm);
  outline: none;
  box-shadow: var(--auth-shadow-control);
  font-size: 0.92rem;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.auth-field__control input::placeholder,
.auth-field__control textarea::placeholder {
  color: var(--auth-slate-400);
  opacity: 1;
}

.auth-field__control input:hover,
.auth-field__control select:hover,
.auth-field__control textarea:hover {
  border-color: var(--auth-slate-400);
}

.auth-field__control input:focus,
.auth-field__control select:focus,
.auth-field__control textarea:focus {
  background: var(--auth-paper);
  border-color: var(--auth-gold-600);
  box-shadow: var(--auth-focus);
}

.auth-field__control:focus-within .auth-field__icon {
  color: var(--auth-gold-600);
}

.auth-field--password .auth-field__control input {
  padding-inline-end: 52px;
}

.auth-field--error .auth-field__control input,
.auth-field--error .auth-field__control select,
.auth-field--error .auth-field__control textarea,
.auth-field__control input[aria-invalid="true"] {
  background: var(--auth-red-50);
  border-color: var(--auth-red-600);
}

.auth-field__control input:disabled,
.auth-field__control select:disabled,
.auth-field__control textarea:disabled {
  color: var(--auth-slate-500);
  background: var(--auth-slate-100);
  cursor: not-allowed;
  opacity: 0.78;
}

.auth-field__hint {
  margin: 7px 0 0;
  color: var(--auth-slate-500);
  font-size: 0.75rem;
  line-height: 1.45;
}

.auth-field__errors {
  display: grid;
  gap: 4px;
  margin-block-start: 7px;
  color: var(--auth-red-700);
  font-size: 0.76rem;
  font-weight: 620;
  line-height: 1.45;
}

.auth-field__errors p {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0;
}

.auth-field__errors svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  margin-block-start: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.auth-password-toggle {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-end: 4px;
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  color: var(--auth-slate-500);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.auth-password-toggle:hover {
  color: var(--auth-navy-800);
  background: var(--auth-slate-100);
}

.auth-password-toggle:focus-visible {
  color: var(--auth-gold-600);
  outline: 3px solid var(--auth-gold-600);
  outline-offset: 1px;
}

.auth-password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-options {
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-block-start: -4px;
}

.auth-checkbox {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  color: var(--auth-slate-600);
  cursor: pointer;
  font-size: 0.79rem;
  font-weight: 620;
}

.auth-checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--auth-navy-800);
}

.auth-checkbox input:focus-visible {
  outline: 3px solid var(--auth-gold-600);
  outline-offset: 2px;
}

.auth-primary-button,
.auth-secondary-button,
.auth-google-button {
  display: inline-flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: var(--auth-radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 780;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.auth-primary-button {
  color: var(--auth-white);
  background: var(--auth-navy-900);
  border: 1px solid var(--auth-navy-900);
  box-shadow: 0 10px 22px rgba(11, 34, 57, 0.19);
}

.auth-primary-button--teal {
  background: var(--auth-teal-600);
  border-color: var(--auth-teal-600);
  box-shadow: 0 10px 22px rgba(8, 127, 115, 0.19);
}

.auth-primary-button:hover {
  color: var(--auth-white);
  background: var(--auth-navy-800);
  border-color: var(--auth-navy-800);
  box-shadow: 0 13px 28px rgba(11, 34, 57, 0.25);
  transform: translateY(-1px);
}

.auth-primary-button--teal:hover {
  background: var(--auth-teal-500);
  border-color: var(--auth-teal-500);
  box-shadow: 0 13px 28px rgba(8, 127, 115, 0.25);
}

.auth-primary-button:focus-visible,
.auth-secondary-button:focus-visible,
.auth-google-button:focus-visible {
  outline: 3px solid var(--auth-gold-600);
  outline-offset: 3px;
}

.auth-primary-button:active,
.auth-secondary-button:active,
.auth-google-button:active {
  transform: translateY(0);
}

.auth-primary-button svg,
.auth-secondary-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[dir="rtl"] .auth-directional-icon {
  transform: scaleX(-1);
}

.auth-primary-button[aria-busy="true"],
.auth-secondary-button[aria-busy="true"],
.auth-google-button[aria-busy="true"] {
  cursor: progress;
}

.auth-primary-button[aria-busy="true"] > :not(.auth-button__spinner),
.auth-secondary-button[aria-busy="true"] > :not(.auth-button__spinner),
.auth-google-button[aria-busy="true"] > :not(.auth-button__spinner) {
  opacity: 0.2;
}

.auth-button__spinner {
  display: none;
  width: 19px;
  height: 19px;
  color: inherit;
  border: 2px solid currentColor;
  border-block-start-color: transparent;
  border-radius: 50%;
  animation: auth-spin 700ms linear infinite;
}

[aria-busy="true"] .auth-button__spinner {
  display: inline-block;
}

.auth-secondary-button {
  color: var(--auth-navy-800);
  background: var(--auth-white);
  border: 1px solid var(--auth-slate-300);
  box-shadow: var(--auth-shadow-control);
}

.auth-secondary-button:hover {
  color: var(--auth-navy-950);
  background: var(--auth-slate-50);
  border-color: var(--auth-slate-400);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-block: 25px;
  color: var(--auth-slate-400);
  font-size: 0.69rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--auth-slate-200);
}

.auth-google-button {
  color: var(--auth-slate-700);
  background: var(--auth-white);
  border: 1px solid var(--auth-slate-300);
  box-shadow: var(--auth-shadow-control);
}

.auth-google-button:hover {
  color: var(--auth-navy-950);
  background: var(--auth-slate-50);
  border-color: var(--auth-slate-400);
  box-shadow: 0 5px 14px rgba(7, 24, 39, 0.08);
  transform: translateY(-1px);
}

.auth-google-button img {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
}

.auth-switch {
  margin: 28px 0 0;
  padding-block-start: 22px;
  color: var(--auth-slate-600);
  border-block-start: 1px solid var(--auth-slate-200);
  font-size: 0.82rem;
  text-align: center;
}

.auth-switch a,
.auth-back-link {
  min-height: 44px;
  color: var(--auth-gold-600);
  font-weight: 760;
  text-decoration: none;
}

.auth-switch a {
  display: inline-flex;
  align-items: center;
}

.auth-switch a:hover,
.auth-back-link:hover {
  color: var(--auth-navy-800);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-block-start: 18px;
  font-size: 0.8rem;
}

.auth-back-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transform: rotate(180deg);
}

[dir="rtl"] .auth-back-link svg {
  transform: none;
}

.auth-trust-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-block-start: 26px;
  color: var(--auth-slate-500);
  font-size: 0.7rem;
  font-weight: 620;
  text-align: center;
}

.auth-trust-note svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--auth-teal-600);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.auth-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 14px;
  width: 100%;
  max-width: 570px;
  margin: 20px auto 0;
  color: var(--auth-slate-500);
  font-size: 0.68rem;
  text-align: center;
}

.auth-footer__links {
  display: inline-flex;
  gap: 12px;
}

.auth-footer a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--auth-slate-600);
  font-weight: 650;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--auth-gold-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Trial and state components */
.auth-trial {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  margin: -8px 0 24px;
  padding: 14px;
  color: var(--auth-navy-800);
  background: linear-gradient(135deg, #fff9ea, var(--auth-gold-100));
  border: 1px solid rgba(194, 141, 44, 0.26);
  border-radius: 13px;
}

.auth-trial__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--auth-gold-600);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(194, 141, 44, 0.2);
  border-radius: 11px;
}

.auth-trial__icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.auth-trial strong {
  display: block;
  margin-block-end: 2px;
  font-size: 0.84rem;
  font-weight: 790;
}

.auth-trial p {
  margin: 0;
  color: var(--auth-slate-600);
  font-size: 0.76rem;
  line-height: 1.5;
}

.auth-state {
  text-align: center;
}

.auth-state__icon {
  display: grid;
  width: 68px;
  height: 68px;
  margin: 0 auto 22px;
  place-items: center;
  color: var(--auth-teal-600);
  background: var(--auth-teal-100);
  border: 1px solid rgba(15, 156, 142, 0.2);
  border-radius: 20px;
}

.auth-state__icon--error {
  color: var(--auth-red-700);
  background: var(--auth-red-100);
  border-color: rgba(196, 61, 69, 0.2);
}

.auth-state__icon--warning {
  color: var(--auth-warning-700);
  background: var(--auth-warning-100);
  border-color: rgba(159, 113, 31, 0.2);
}

.auth-state__icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-state h1 {
  margin: 0;
  color: var(--auth-navy-950);
  font-size: clamp(1.65rem, 3vw, 2rem);
  font-weight: 790;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.auth-state > p {
  max-width: 450px;
  margin: 14px auto 26px;
  color: var(--auth-slate-600);
  font-size: 0.9rem;
  line-height: 1.7;
}

.auth-state .auth-primary-button,
.auth-state .auth-secondary-button {
  margin-block-start: 8px;
}

/* Turnstile */
.auth-turnstile {
  min-width: 0;
  min-height: 111px;
  padding: 12px;
  overflow: hidden;
  background: var(--auth-slate-50);
  border: 1px solid var(--auth-slate-300);
  border-radius: 12px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.auth-turnstile__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 9px;
  color: var(--auth-slate-600);
  font-size: 0.7rem;
  font-weight: 720;
}

.auth-turnstile__heading > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-turnstile__heading svg {
  width: 15px;
  height: 15px;
  color: var(--auth-teal-600);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
}

.auth-turnstile__state {
  color: var(--auth-slate-500);
  font-weight: 650;
}

.auth-turnstile .cf-turnstile,
.auth-turnstile .cf-turnstile > div,
.auth-turnstile iframe {
  max-width: 100% !important;
}

.auth-turnstile .cf-turnstile {
  min-height: 65px;
}

.auth-turnstile__message {
  margin: 7px 0 0;
  color: var(--auth-slate-500);
  font-size: 0.69rem;
  line-height: 1.4;
}

.auth-turnstile[data-state="success"] {
  background: #f3fcfa;
  border-color: rgba(15, 156, 142, 0.3);
}

.auth-turnstile[data-state="success"] .auth-turnstile__state,
.auth-turnstile[data-state="success"] .auth-turnstile__message {
  color: var(--auth-teal-600);
}

.auth-turnstile[data-state="error"],
.auth-turnstile[data-state="expired"],
.auth-turnstile[data-state="unsupported"],
.auth-turnstile--error {
  background: var(--auth-red-50);
  border-color: rgba(196, 61, 69, 0.34);
}

.auth-turnstile[data-state="error"] .auth-turnstile__state,
.auth-turnstile[data-state="error"] .auth-turnstile__message,
.auth-turnstile[data-state="expired"] .auth-turnstile__state,
.auth-turnstile[data-state="expired"] .auth-turnstile__message,
.auth-turnstile[data-state="unsupported"] .auth-turnstile__state,
.auth-turnstile[data-state="unsupported"] .auth-turnstile__message,
.auth-turnstile--error .auth-turnstile__message {
  color: var(--auth-red-700);
}

/* Password strength */
.auth-password-strength {
  margin-block-start: -4px;
  padding: 13px 14px;
  background: var(--auth-slate-50);
  border: 1px solid var(--auth-slate-200);
  border-radius: 12px;
}

.auth-password-strength__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--auth-slate-600);
  font-size: 0.72rem;
  font-weight: 700;
}

.auth-password-strength__top strong {
  color: var(--auth-slate-500);
  font-size: 0.7rem;
}

.auth-password-strength__meter {
  height: 5px;
  margin-block: 9px 12px;
  overflow: hidden;
  background: var(--auth-slate-200);
  border-radius: 999px;
}

.auth-password-strength__meter span {
  display: block;
  width: var(--auth-strength, 0%);
  height: 100%;
  background: var(--auth-strength-color, var(--auth-slate-300));
  border-radius: inherit;
  transition: width 180ms ease, background-color 180ms ease;
}

.auth-password-strength > p {
  margin: 0 0 7px;
  color: var(--auth-slate-500);
  font-size: 0.69rem;
}

.auth-password-strength ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 12px;
  margin: 0;
  padding: 0;
  color: var(--auth-slate-500);
  list-style: none;
  font-size: 0.68rem;
}

.auth-password-strength li {
  display: flex;
  align-items: flex-start;
  gap: 5px;
}

.auth-password-strength li.is-met {
  color: var(--auth-teal-600);
}

.auth-password-strength__criterion-marker {
  width: 16px;
  flex: 0 0 16px;
  color: var(--auth-slate-600);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.auth-password-strength li.is-met .auth-password-strength__criterion-marker {
  color: var(--auth-teal-600);
}

.auth-field__match {
  min-height: 18px;
  margin: 6px 0 0;
  color: var(--auth-slate-600);
  font-size: 0.74rem;
  font-weight: 650;
}

.auth-field__match:empty {
  display: none;
}

.auth-field__match.is-valid {
  color: var(--auth-teal-600);
}

.auth-field__match.is-error {
  color: var(--auth-red-700);
}

.auth-honeypot {
  position: absolute !important;
  inset-inline-start: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-error-in {
  0% {
    opacity: 0;
    transform: translateX(-5px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1180px) {
  .auth-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(480px, 1.05fr);
  }

  .auth-story__inner {
    padding-inline: clamp(34px, 4.5vw, 62px);
  }

  .auth-story__title {
    font-size: clamp(2.35rem, 4.7vw, 3.5rem);
  }

  .auth-story__proof span:nth-child(3) {
    display: none;
  }

  .auth-panel__toolbar,
  .auth-panel__inner {
    padding-inline: 32px;
  }
}

@media (min-width: 941px) and (max-height: 860px) {
  .auth-story__inner {
    padding-block: 24px;
  }

  .auth-story__brand img {
    width: 205px;
  }

  .auth-story__content {
    padding-block: 26px 18px;
  }

  .auth-story__eyebrow {
    margin-block-end: 14px;
  }

  .auth-story__title {
    min-height: 5em;
    font-size: clamp(2rem, 3.4vw, 3rem);
  }

  .auth-story__lead {
    margin-block-start: 14px;
    font-size: 0.93rem;
    line-height: 1.55;
  }

  .auth-benefits {
    gap: 5px;
    margin-block-start: 16px;
  }

  .auth-benefits li {
    min-height: 44px;
  }

  .auth-story__proof {
    padding-block-start: 14px;
  }
}

@media (max-width: 940px) {
  html {
    background: var(--auth-slate-50);
  }

  .auth-layout {
    display: block;
  }

  .auth-story {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    min-height: 100svh;
    background:
      radial-gradient(circle at 0 0, rgba(194, 141, 44, 0.1), transparent 28%),
      radial-gradient(circle at 100% 100%, rgba(15, 156, 142, 0.06), transparent 30%),
      var(--auth-slate-50);
  }

  .auth-panel__toolbar {
    min-height: 62px;
    padding-block-start: max(10px, env(safe-area-inset-top));
  }

  .auth-panel__inner {
    min-height: calc(100svh - 62px);
    justify-content: flex-start;
    padding-block-start: 18px;
    padding-block-end: max(24px, env(safe-area-inset-bottom));
  }

  .auth-card {
    max-width: 590px;
  }

  .auth-mobile-brand {
    display: block;
  }
}

@media (max-width: 620px) {
  .auth-panel__toolbar {
    padding-inline: 16px;
  }

  .auth-panel__inner {
    padding: 12px 16px max(22px, env(safe-area-inset-bottom));
  }

  .auth-card {
    padding: 30px 24px;
    border-radius: 20px;
  }

  .auth-mobile-brand {
    margin-block-end: 24px;
  }

  .auth-card__header {
    margin-block-end: 25px;
  }

  .auth-card__header h1 {
    font-size: 1.65rem;
  }

  .auth-card__header > p {
    font-size: 0.86rem;
  }

  .auth-form__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .auth-password-strength ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px) {
  .auth-panel__toolbar {
    min-height: 56px;
  }

  .auth-language select {
    min-width: 122px;
  }

  .auth-panel__inner {
    padding-inline: 10px;
  }

  .auth-card {
    padding: 27px 19px;
    border-radius: 17px;
  }

  .auth-mobile-brand img {
    width: min(205px, 72vw);
  }

  .auth-card__eyebrow {
    font-size: 0.64rem;
  }

  .auth-field__label-row {
    gap: 8px;
  }

  .auth-field__label-row a {
    font-size: 0.69rem;
  }

  .auth-primary-button,
  .auth-secondary-button,
  .auth-google-button {
    padding-inline: 12px;
    font-size: 0.84rem;
  }

  .auth-trial {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 12px;
  }

  .auth-trial__icon {
    width: 36px;
    height: 36px;
  }

  .auth-turnstile {
    padding-inline: 8px;
  }
}

@media (min-width: 1600px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1.16fr) minmax(600px, 0.84fr);
  }

  .auth-panel__toolbar,
  .auth-panel__inner {
    max-width: 760px;
  }

  .auth-card,
  .auth-footer {
    max-width: 600px;
  }

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

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

@media (forced-colors: active) {
  .auth-card,
  .auth-field__control input,
  .auth-primary-button,
  .auth-secondary-button,
  .auth-google-button,
  .auth-turnstile {
    border: 1px solid CanvasText;
  }

  .auth-field__control input:focus,
  .auth-primary-button:focus-visible,
  .auth-secondary-button:focus-visible,
  .auth-google-button:focus-visible {
    outline: 3px solid Highlight;
  }
}
