.reasoned-auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--reasoned-bg);
  color: var(--reasoned-text);
}

.reasoned-auth-wrap {
  width: 100%;
  max-width: 680px;
}

.reasoned-auth-wrap--narrow {
  max-width: 520px;
}

.reasoned-auth-brand {
  margin-bottom: 24px;
  text-align: center;
}

.reasoned-auth-card {
  background: var(--reasoned-surface-elevated);
  border: 1px solid var(--reasoned-border);
  border-radius: var(--reasoned-radius-card);
  box-shadow: var(--reasoned-shadow-card);
  padding: 28px;
}

.reasoned-auth-card [hidden] {
  display: none !important;
}

.reasoned-auth-title {
  margin: 0 0 8px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--reasoned-text);
}

.reasoned-auth-copy {
  margin: 0;
  color: var(--reasoned-text-secondary);
  font-size: 14px;
  line-height: 1.6;
}

.reasoned-auth-grid {
  display: grid;
  gap: 16px;
}

.reasoned-auth-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.reasoned-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reasoned-field__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--reasoned-text-secondary);
}

.reasoned-field__control,
.reasoned-field__shell {
  box-sizing: border-box;
  min-height: 46px;
  border-radius: var(--reasoned-radius-control);
  border: 1px solid var(--reasoned-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--reasoned-text);
}

.reasoned-field__control {
  width: 100%;
  padding: 0 12px;
  font: inherit;
  outline: none;
}

/* Chromium (Chrome/Brave/Opera): native <select> popups follow color-scheme.
   Without dark scheme + option colors, OS light popup + white text = invisible. */
select.reasoned-field__control,
.reasoned-field__control:is(select) {
  color-scheme: dark;
  background-color: var(--reasoned-surface, #12121a);
  color: var(--reasoned-text, #f0f0f5);
}

select.reasoned-field__control option,
.reasoned-field__control:is(select) option {
  background-color: var(--reasoned-surface, #12121a);
  color: var(--reasoned-text, #f0f0f5);
}

.reasoned-field__shell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.reasoned-field__shell input {
  width: 100%;
  min-height: 44px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--reasoned-text);
  font: inherit;
}

.reasoned-field__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--reasoned-text-secondary);
}

.reasoned-auth-submit {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--reasoned-primary);
  border-radius: var(--reasoned-radius-control);
  background: var(--reasoned-primary);
  color: #04130d;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.reasoned-auth-submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.reasoned-auth-switch {
  text-align: center;
  color: var(--reasoned-text-secondary);
  font-size: 14px;
}

.reasoned-auth-switch a {
  color: var(--reasoned-text);
  text-decoration: none;
}

.reasoned-auth-switch a:hover {
  text-decoration: underline;
}

.reasoned-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reasoned-segmented__button {
  min-height: 42px;
  border-radius: var(--reasoned-radius-control);
  border: 1px solid var(--reasoned-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--reasoned-text-secondary);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reasoned-segmented__button.is-active {
  background: var(--reasoned-primary);
  border-color: var(--reasoned-primary);
  color: #04130d;
}

.reasoned-account-actions {
  display: flex;
  gap: 10px;
}

.reasoned-account-icon-button {
  min-height: 40px;
  min-width: 40px;
  border-radius: 10px;
  border: 1px solid var(--reasoned-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--reasoned-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.reasoned-account-icon-button:hover,
.reasoned-account-icon-button:focus-visible {
  background: var(--reasoned-primary-soft);
  border-color: var(--reasoned-border-strong);
  color: var(--reasoned-primary);
}

.reasoned-account-icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .reasoned-auth-grid--2 {
    grid-template-columns: 1fr;
  }
}

/* Shared signup phone picker guard: keep the dial prefix from overlapping the input before site JS hydrates. */
.su-phone-group {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin-top: 6px;
}
.su-country-picker {
  display: grid;
  grid-template-columns: 44px 0;
  gap: 0;
  min-width: 0;
}
.su-country-trigger {
  width: 44px;
  height: 44px;
  padding: 0;
  text-align: center;
  white-space: nowrap;
}
#su-phone-country {
  width: 0 !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.su-phone-input-wrap {
  position: relative;
  --su-phone-prefix-pad: 54px;
}
.su-phone-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt, var(--reasoned-text, #f4f6f8));
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
  white-space: nowrap;
}
.su-phone-prefix:empty {
  display: none;
}
.su-phone-input-wrap #su-phone {
  padding-left: var(--su-phone-prefix-pad, 54px);
}
.su-phone-prefix:empty + #su-phone {
  padding-left: 14px;
}
@media (max-width: 420px) {
  .su-phone-group {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
  }
}
