/* Scoped auth styles — only under .auth-shell so the rest of the app is untouched. */

.auth-shell {
  --auth-cyan: #00adf6;
  --auth-surface: #f7f7fb;
  --auth-orange: #f38525;
  --auth-orange-hover: #e07820;
  --auth-muted: #717171;
  --auth-ink: #111827;
  --auth-border: #d1d5db;
  --auth-danger: #ef4444;
  --auth-strength: #70b760;
  --auth-focus: #f38525;

  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-family: inherit;
  overflow-x: hidden;
}

.auth-shell__band-top,
.auth-shell__band-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  z-index: 0;
  pointer-events: none;
}

.auth-shell__band-top {
  top: 0;
  background: var(--auth-cyan);
}

.auth-shell__band-bottom {
  bottom: 0;
  background: var(--auth-surface);
}

.auth-shell__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-shell__left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  padding: 2rem 1rem 0;
}

.auth-shell__left-inner {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-shell__logo {
  height: 4rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.auth-shell__headline {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
}

.auth-shell__tagline {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: #fff;
}

.auth-shell__support {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
}

.auth-shell__illustration {
  display: none;
  width: 100%;
  max-width: 48rem;
  margin: 0.5rem auto 0;
}

.auth-shell__illustration img {
  width: 100%;
  height: auto;
  display: block;
}

.auth-shell__right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  flex: 1;
}

.auth-shell__card {
  background: #fff;
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem;
  box-shadow:
    0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -4px rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: auto;
}

.auth-shell__footer {
  display: none;
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #000;
  white-space: nowrap;
  z-index: 2;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.auth-form__intro {
  margin-bottom: 0.25rem;
}

.auth-form__eyebrow {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--auth-muted);
}

.auth-form__title {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--auth-ink);
  line-height: 1.25;
}

.auth-form__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.auth-field__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
}

.auth-field__required {
  color: var(--auth-danger);
  margin-right: 0.25rem;
}

.auth-field__input {
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 0.375rem;
  padding: 0.5rem 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: var(--auth-ink);
  background: #fff;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.auth-field__input::placeholder {
  color: #9ca3af;
}

.auth-field__input:focus {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 1px var(--auth-focus);
}

.auth-field__input:focus-visible {
  border-color: var(--auth-focus);
  box-shadow: 0 0 0 2px rgba(243, 133, 37, 0.35);
}

.auth-field__password {
  position: relative;
}

.auth-field__password .auth-field__input {
  padding-right: 2.5rem;
}

.auth-field__toggle {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  padding: 0;
  border-radius: 0 0.375rem 0.375rem 0;
  z-index: 1;
}

.auth-field__toggle i {
  font-size: 16px;
  line-height: 1;
}

.auth-field__toggle:hover {
  color: #374151;
}

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

.auth-field__hint {
  font-size: 0.75rem;
  color: var(--auth-danger);
  margin: 0;
}

.auth-strength {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-strength__bars {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-strength__track {
  display: flex;
  width: 8rem;
  gap: 0.25rem;
}

.auth-strength__bar {
  height: 0.25rem;
  flex: 1;
  border-radius: 999px;
  opacity: 0.2;
  transition: opacity 0.2s ease;
}

.auth-strength__bar.is-active {
  opacity: 1;
}

.auth-strength__bar--1 {
  background: #ef4444;
}
.auth-strength__bar--2 {
  background: #eab308;
}
.auth-strength__bar--3 {
  background: #86efac;
}
.auth-strength__bar--4 {
  background: #22c55e;
}

.auth-strength__label {
  font-size: 0.75rem;
  font-weight: 500;
}

.auth-strength__label--weak {
  color: #ef4444;
}
.auth-strength__label--medium {
  color: #eab308;
}
.auth-strength__label--strong {
  color: #22c55e;
}

.auth-strength__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--auth-strength);
}

.auth-strength__list li {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  opacity: 0.5;
}

.auth-strength__list li.is-met {
  opacity: 1;
}

.auth-error {
  border-radius: 0.5rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  border: 0;
  border-radius: 0.375rem;
  padding: 0.65rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: var(--auth-orange);
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.auth-submit:hover:not(:disabled) {
  background: var(--auth-orange-hover);
}

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

.auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.auth-switch {
  text-align: center;
  padding-top: 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #000;
}

.auth-switch__btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-switch__btn:hover {
  color: var(--auth-orange);
}

.auth-switch__btn:focus-visible {
  outline: 2px solid var(--auth-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.auth-loader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5fc;
}

.auth-loader__spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(243, 133, 37, 0.25);
  border-top-color: var(--auth-orange);
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

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

@media (min-width: 640px) {
  .auth-shell__left {
    padding: 2rem 2rem 0;
  }

  .auth-shell__logo {
    height: 5rem;
  }

  .auth-shell__headline {
    font-size: 1.875rem;
  }

  .auth-shell__tagline {
    font-size: 1.125rem;
  }

  .auth-shell__support {
    font-size: 0.875rem;
  }

  .auth-shell__illustration {
    display: block;
  }

  .auth-shell__card {
    padding: 1.5rem;
    gap: 1.25rem;
  }

  .auth-form__title {
    font-size: 1.75rem;
  }

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

  .auth-field__label {
    font-size: 0.875rem;
  }

  .auth-field__input {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }

  .auth-submit {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .auth-switch {
    font-size: 0.875rem;
    padding-top: 1.5rem;
  }
}

@media (min-width: 768px) {
  .auth-shell__content {
    flex-direction: row;
  }

  .auth-shell__left,
  .auth-shell__right {
    width: 50%;
    flex: 0 0 50%;
  }

  .auth-shell__left {
    padding: 4rem 3rem;
  }

  .auth-shell__logo {
    height: 6rem;
  }

  .auth-shell__right {
    padding: 3rem 1.5rem;
  }

  .auth-shell__card {
    padding: 2rem;
    min-height: 75%;
  }

  .auth-shell__footer {
    display: block;
    left: auto;
    right: 18rem;
    transform: none;
  }

  .auth-form__title {
    font-size: 1.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field__input,
  .auth-submit,
  .auth-strength__bar {
    transition: none;
  }

  .auth-loader__spinner {
    animation: none;
    border-top-color: var(--auth-orange);
    opacity: 0.85;
  }
}
