/* Aiden login — converted from ux.dev.stackgen.com/aiden-2 Tailwind markup */

:root {
  --font-primary: "IBM Plex Sans", Roboto, ui-sans-serif, system-ui, sans-serif;
  --aiden-purple: #21003a;
  --aiden-accent: #a337ef;
  --aiden-accent-muted: #b06fed;
  --aiden-text-muted: #b5bbc3;
  --aiden-text-subtle: #999fa7;
  --aiden-text-divider: #7e848c;
  --aiden-border: #e6eaee;
  --aiden-btn-border: #d4d4d4;
  --aiden-btn-text: #0a0a0a;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

.aiden-login-body [hidden] {
  display: none !important;
}

.aiden-login-body {
  font-family: var(--font-primary);
}

.aiden-layout {
  display: flex;
  width: 100%;
  height: 100dvh;
  min-height: 600px;
  min-width: 1024px;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  background-color: var(--aiden-purple);
  padding: 0.5rem;
}

.aiden-sidebar {
  position: relative;
  display: flex;
  height: 100%;
  width: 480px;
  min-width: 480px;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-color: var(--aiden-purple);
}

.aiden-sidebar-inner {
  margin-left: auto;
  margin-right: auto;
  display: flex;
  width: 100%;
  max-width: 380px;
  flex-direction: column;
  gap: 100px;
}

.aiden-sidebar-copy {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.aiden-sidebar-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.aiden-sidebar-logo {
  display: block;
  width: auto;
  height: 2.75rem;
  max-width: 100%;
  flex-shrink: 0;
  object-fit: contain;
}

.aiden-sidebar-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.1px;
  color: #fff;
}

.aiden-feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aiden-feature-item {
  display: flex;
  gap: 0.75rem;
}

.aiden-feature-icon {
  color: var(--aiden-accent);
  width: 1.25rem;
  height: 1.25rem;
}

.aiden-feature-copy {
  min-width: 0;
}

.aiden-feature-title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: normal;
  letter-spacing: -0.075px;
  color: #fff;
}

.aiden-trusted {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.aiden-trusted-divider {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.aiden-trusted-divider img,
.aiden-trusted-divider svg,
.aiden-trusted-divider .aiden-divider-line {
  display: block;
  width: 100%;
  min-width: 0;
  height: 1px;
  min-height: 1px;
  object-fit: cover;
}

.aiden-trusted-divider span {
  max-width: 100%;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: -0.06px;
  color: var(--aiden-accent-muted);
}

.aiden-trusted-logos {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  gap: 1.5rem;
}

.aiden-trusted-logo {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
}

.aiden-panel {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  flex: 1 1 0%;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--aiden-border);
  background-color: #fff;
}

.aiden-panel-center {
  display: flex;
  flex: 1 1 0%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.aiden-panel-content {
  display: flex;
  width: 100%;
  max-width: 392px;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.aiden-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.aiden-brand-logo {
  display: block;
  width: auto;
  height: 2.5rem;
  max-width: 100%;
  flex-shrink: 0;
  object-fit: contain;
}

.aiden-brand-name {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--foreground);
}

.aiden-heading {
  width: 100%;
  text-align: center;
}

.aiden-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 100%;
  letter-spacing: -0.5%;
  color: #000;
  margin: 0;
  margin-bottom: 0.75rem;
}

.aiden-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 100%;
  letter-spacing: -0.5%;
  color: var(--aiden-text-subtle);
  margin: 0;
  margin-top: 0.75rem;
}

.aiden-providers {
  display: flex;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  gap: 1.35rem;
}

.aiden-email-entry {
  position: relative;
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.75rem;
}

.aiden-email-label {
  display: none;
}

.aiden-email-input {
  width: 100%;
  height: 2.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d8dde4;
  background: #fff;
  padding: 0 1rem;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 400;
  color: #111827;
}

.aiden-email-input::placeholder {
  color: #8a8f98;
  font-family: inherit;
  font-weight: 400;
}

.aiden-email-input:focus-visible {
  outline: none;
  border-color: #a337ef;
  box-shadow: 0 0 0 3px rgba(163, 55, 239, 0.16);
}

.aiden-email-continue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.5rem;
  border: 1px solid var(--aiden-accent);
  border-radius: 0.5rem;
  background: var(--aiden-accent);
  color: #fff;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 500;
  cursor: pointer;
  position: relative;
}

.aiden-email-continue.is-loading {
  color: transparent;
  pointer-events: none;
}

.aiden-email-continue.is-loading::after {
  content: "";
  width: 1rem;
  height: 1rem;
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 9999px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #ffffff;
  transform: translate(-50%, -50%);
  animation: aiden-btn-spin-center 0.7s linear infinite;
}

@keyframes aiden-btn-spin-center {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

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

.aiden-email-continue:hover {
  background: #8e2fd0;
}

.aiden-email-continue:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(163, 55, 239, 0.4);
}

.aiden-email-continue:disabled {
  pointer-events: none;
  opacity: 0.6;
}

.aiden-email-separator {
  width: 100%;
  height: 1px;
  background: #d1d5db;
  margin: 0.2rem 0 0;
}

.aiden-email-error {
  margin-top: 0;
  font-size: 0.8rem;
  color: #b42318;
}

.aiden-email-error:empty {
  display: none;
}

.aiden-otp-step {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 1rem;
}

.aiden-otp-copy {
  margin: 0;
  color: #434954;
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: left;
}

.aiden-otp-copy strong {
  color: #101828;
  font-weight: 600;
  word-break: break-word;
}

.aiden-otp-form {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 0.875rem;
}

.aiden-otp-label {
  color: #1f2937;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.aiden-otp-inputs {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.aiden-otp-input {
  width: 100%;
  min-width: 0;
  height: 3rem;
  border: 1px solid #d0d5dd;
  border-radius: 0.5rem;
  background: #fff;
  text-align: center;
  font-family: var(--font-primary);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  color: #111827;
}

.aiden-otp-input:focus-visible {
  outline: none;
  border-color: #a337ef;
  box-shadow: 0 0 0 3px rgba(163, 55, 239, 0.16);
}

.aiden-otp-input:disabled {
  background: #f9fafb;
  color: #9ca3af;
}

.aiden-otp-help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.aiden-otp-help-text {
  color: #868d99;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
  white-space: nowrap;
}

.aiden-otp-help-action {
  border: 0;
  background: transparent;
  color: #4b5563;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  position: relative;
  white-space: nowrap;
}

.aiden-otp-help-action:hover {
  color: #111827;
}

.aiden-otp-help-action:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.aiden-otp-help-action:disabled {
  opacity: 0.6;
  cursor: default;
}

.aiden-otp-help-action.is-loading {
  color: transparent;
  pointer-events: none;
}

.aiden-otp-help-action.is-loading::after {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 9999px;
  border: 2px solid rgba(75, 85, 99, 0.35);
  border-top-color: #4b5563;
  animation: aiden-btn-spin 0.7s linear infinite;
}

.aiden-otp-help-action.is-success {
  color: #0f7a3a;
}

.aiden-otp-help-action.is-success::before {
  content: "";
  width: 0.36rem;
  height: 0.64rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-0.03rem);
}

.aiden-otp-error {
  margin-top: -0.25rem;
  font-size: 0.8rem;
  color: #b42318;
  line-height: 1.35;
}

.aiden-otp-error:empty {
  display: none;
}

.aiden-otp-back {
  width: 100%;
  border: 0;
  background: transparent;
  color: #434954;
  font-family: var(--font-primary);
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: center;
  cursor: pointer;
  padding: 0.125rem 0;
}

.aiden-otp-back:hover {
  color: #111827;
}

.aiden-otp-back:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.aiden-providers-primary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.aiden-provider-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.aiden-provider-btn {
  display: inline-flex;
  width: 100%;
  min-height: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--aiden-btn-border);
  background-color: #fff;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: var(--aiden-btn-text);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: background-color 0.15s ease;
  box-sizing: border-box;
}

.aiden-provider-btn:hover {
  background-color: #f9fafb;
}

.aiden-provider-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px rgba(163, 55, 239, 0.4);
}

.aiden-provider-btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.aiden-provider-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  object-fit: contain;
}

.aiden-provider-icon--google {
  display: block;
}

.aiden-provider-label {
  color: var(--aiden-btn-text) !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.25rem !important;
  padding: 0 !important;
}

.dex-btn {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

a.aiden-provider-btn:has(> .aiden-provider-icon),
a.aiden-provider-btn:has(> svg) {
  background-color: #fff !important;
}

.aiden-providers-divider {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.aiden-providers-divider img,
.aiden-providers-divider svg,
.aiden-providers-divider .aiden-divider-line {
  display: block;
  width: 100%;
  min-width: 0;
  height: 1px;
  min-height: 1px;
  object-fit: cover;
}

.aiden-providers-divider span {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 15px;
  letter-spacing: -0.06px;
  color: var(--aiden-text-divider);
}

.aiden-legal {
  margin: 0;
  padding-bottom: 55px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.06px;
  color: var(--aiden-text-subtle);
}

.aiden-legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.aiden-legal a:hover {
  color: var(--aiden-text-divider);
}

.theme-body {
  background-color: #0a0c0f;
  color: #fff;
  min-height: 100vh;
  font-family: var(--font-primary);
}

.theme-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.theme-navbar {
  align-self: flex-start;
  padding: 0 0.5rem;
}

.theme-navbar__logo {
  height: 2rem;
}

.dex-container {
  color: #c8d1d9;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 1rem;
}

.theme-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.theme-heading {
  font-size: 1rem;
  color: #abb9cc;
  font-weight: 400;
  margin-bottom: 1.5rem;
}

.theme-form-row {
  display: block;
  margin: 1rem auto;
}

.theme-form-row a {
  text-decoration: none;
}

.theme-btn-provider {
  background-color: #1e242d;
  color: #c8d1d9;
  display: flex;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.375rem;
  min-width: 19.5rem;
  justify-content: center;
  align-items: center;
}

#tos_container {
  font-size: 0.875rem;
  text-align: center;
  margin-top: 1rem;
}

#tos_container .tos_statement {
  color: #8390a3;
}

#tos_container .tos_links {
  color: #3fa9f5;
  text-decoration: underline;
}

/* Mobile / tablet — stacked marketing + login (matches stackgen-vibe-ux sign-in). */
@media (max-width: 1023px) {
  .aiden-login-body {
    overflow-x: hidden;
  }

  .aiden-layout {
    min-width: 0;
    min-height: 100dvh;
    height: auto;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }

  .aiden-panel {
    order: -1;
  }

  .aiden-sidebar {
    width: 100%;
    min-width: 0;
    height: auto;
    flex: none;
    order: 1;
    padding: 1.5rem;
    padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
  }

  .aiden-sidebar-inner {
    max-width: none;
    gap: 3rem;
  }

  .aiden-sidebar-copy {
    gap: 1.5rem;
  }

  .aiden-sidebar-title {
    font-size: 1.375rem;
  }

  .aiden-trusted-logos {
    justify-content: center;
  }

  .aiden-panel {
    width: 100%;
    height: auto;
    min-height: auto;
    flex: none;
    margin-bottom: 0.5rem;
  }

  .aiden-panel-center {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .aiden-title {
    font-size: 1.5rem;
  }

  .aiden-subtitle {
    font-size: 1.125rem;
  }

  .aiden-provider-btn {
    min-height: 2.75rem;
    height: 2.75rem;
  }

  .aiden-otp-copy {
    font-size: 0.875rem;
  }

  .aiden-otp-input {
    height: 2.75rem;
  }

  .aiden-otp-back {
    font-size: 0.875rem;
  }

  .aiden-legal {
    padding-bottom: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (max-width: 479px) {
  .aiden-layout {
    padding: 0.25rem;
    padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
  }

  .aiden-sidebar {
    padding: 1.25rem 1rem;
    padding-top: calc(1.25rem + env(safe-area-inset-top, 0px));
  }

  .aiden-sidebar-inner {
    gap: 2rem;
  }

  .aiden-sidebar-logo {
    height: 2.25rem;
  }

  .aiden-panel-center {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .aiden-otp-inputs {
    gap: 0.4rem;
  }

  .aiden-otp-input {
    height: 2.5rem;
    font-size: 1.1rem;
  }

  .aiden-otp-help-row {
    flex-wrap: wrap;
  }

  .aiden-otp-help-text,
  .aiden-otp-help-action {
    white-space: normal;
  }

  .aiden-trusted {
    gap: 1rem;
  }

  .aiden-trusted-divider {
    gap: 0.5rem;
  }

  .aiden-trusted-divider span {
    font-size: 0.625rem;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    max-width: 9rem;
  }

  .aiden-trusted-logos {
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.25rem;
  }

  .aiden-trusted-logos::-webkit-scrollbar {
    display: none;
  }

  .aiden-trusted-logo svg {
    display: block;
    max-height: 0.875rem;
    width: auto;
    height: auto;
  }
}
