/* src/ui/auth-ui.css */
:root {
  --auth-card-bg: rgba(255, 255, 255, 0.88);
  --auth-card-border: #d7e4f5;
  --auth-input-bg: #f9fcff;
  --auth-input-border: #c8d9ee;
  --auth-input-border-active: #4f8fdf;
  --auth-primary: #1e6fd9;
  --auth-primary-hover: #1659af;
  --auth-secondary-bg: #f1f7ff;
  --auth-secondary-border: #c8d9ee;
  --auth-text: #14233b;
  --auth-muted: #6f829b;
  --auth-info: #1e6fd9;
  --auth-danger: #d14343;
}
* {
  box-sizing: border-box;
}
.auth-shell {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-shell-footer {
  width: min(450px, 100%);
}
.auth-shell-footer .auth-legal {
  color: #000000;
  font-size: 14px;
}
.auth-language-selector {
  position: fixed;
  top: 24px;
  right: 32px;
  z-index: 10;
  height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #b9cce4;
  border-radius: 10px;
  background: #ffffff;
  color: var(--auth-text);
  box-shadow: 0 2px 8px rgba(15, 61, 120, 0.08);
}
.auth-language-selector:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 2px rgba(30, 111, 217, 0.18);
}
.auth-language-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}
.auth-language-selector select {
  max-width: 180px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.auth-card {
  width: min(450px, 100%);
  min-height: 580px;
  padding: 48px;
  border-radius: 22px;
  border: 1px solid #b9cce4;
  background: var(--auth-card-bg);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 55px rgba(15, 61, 120, 0.12);
}
.auth-card-content-height {
  min-height: auto;
  padding-top: 32px;
  padding-bottom: 32px;
}
.auth-card-dense {
  padding-top: 24px;
  padding-bottom: 24px;
}
.auth-brand-mark {
  margin: 0 0 18px;
  color: var(--auth-primary);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  text-align: center;
}
.auth-title-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.auth-title-wrap-compact {
  margin-top: 4px;
}
.auth-title {
  margin: 0;
  font-size: 30px;
  line-height: 36px;
  font-weight: 600;
  text-align: center;
}
.auth-title-compact {
  font-size: 24px;
}
.auth-subtitle {
  margin: 0;
  color: var(--auth-text);
  opacity: 0.9;
  font-size: 15px;
  line-height: 1.45;
  text-align: center;
}
.auth-verification-status.auth-text-error {
  margin-top: 6px;
}
.auth-providers {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.auth-providers-sign-up {
  grid-template-columns: 1fr;
}
.auth-provider-btn {
  width: 100%;
  min-width: 80px;
  height: 38px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid var(--auth-card-border);
  background: #ffffff;
  color: var(--auth-primary);
  text-decoration: none;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(14, 45, 88, 0.08);
  transition: border-color 0.25s ease, background 0.25s ease;
}
.auth-provider-btn:hover {
  border-color: var(--auth-primary);
  background: #eef5ff;
}
.auth-provider-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.auth-provider-btn-apple {
  color: #1d2b40;
}
.auth-provider-icon {
  width: 22px;
  height: 22px;
}
.auth-divider {
  width: 100%;
  margin: 14px 0 4px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--auth-muted);
  font-size: 14px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--auth-card-border);
}
.auth-divider > span {
  line-height: 1;
  transform: translateY(-1px);
}
.auth-group {
  width: 100%;
  margin-top: 8px;
}
.auth-divider + .auth-group {
  margin-top: 2px;
}
.auth-label {
  margin-bottom: 8px;
  display: block;
  color: var(--auth-text);
  font-size: 15px;
  font-weight: 600;
}
.auth-consent-link {
  color: var(--auth-primary);
  text-decoration: underline;
}
.auth-input,
.auth-code-input {
  border-radius: 8px;
  border: 1px solid var(--auth-input-border);
  background: var(--auth-input-bg);
  color: var(--auth-text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.auth-input {
  width: 100%;
  height: 36px;
  padding: 8px 12px;
  font-size: 16px;
}
.auth-password-wrap {
  position: relative;
}
.auth-password-wrap .auth-input {
  padding-right: 66px;
}
.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: var(--auth-primary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}
.auth-input:focus,
.auth-code-input:focus {
  border-color: var(--auth-input-border-active);
  box-shadow: 0 0 0 3px rgba(79, 143, 223, 0.2);
}
.auth-code-inputs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.auth-code-input {
  width: 36px;
  height: 36px;
  text-align: center;
  font-size: 18px;
}
.auth-message {
  width: 100%;
  min-height: 18px;
  margin-top: 8px;
  color: var(--auth-info);
  font-size: 13px;
  word-break: break-word;
  text-align: left;
}
.auth-text-error {
  color: var(--auth-danger);
}
.auth-button-wrap {
  width: 100%;
  margin-top: 18px;
  display: flex;
  justify-content: center;
}
.auth-button-stack {
  width: 100%;
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.auth-button {
  width: 100%;
  min-width: 80px;
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition:
    opacity 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.auth-button:disabled,
.auth-helper-link:disabled {
  opacity: 0.55;
  cursor: default;
}
.auth-button-primary {
  border: 0;
  background: var(--auth-primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(30, 111, 217, 0.28);
}
.auth-button-primary:hover:not(:disabled) {
  background: var(--auth-primary-hover);
}
.auth-button-secondary {
  margin-top: 10px;
  border: 1px solid var(--auth-secondary-border);
  background: var(--auth-secondary-bg);
  color: #375476;
}
.auth-button-secondary:hover:not(:disabled) {
  background: #e5f0ff;
}
.auth-helper-link {
  margin: 12px auto 0;
  display: block;
  border: 0;
  background: transparent;
  color: var(--auth-primary);
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
}
.auth-resend-prompt {
  margin-top: 12px;
  color: var(--auth-text);
  font-size: 13px;
  text-align: center;
}
.auth-resend-prompt + .auth-helper-link {
  margin-top: 4px;
}
.auth-helper-link:disabled {
  cursor: not-allowed;
}
.auth-helper-link:hover:not(:disabled) {
  color: #1659af;
}
.auth-helper-anchor {
  margin-top: 8px;
  display: block;
  color: var(--auth-primary);
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
}
.auth-helper-anchor:hover {
  color: #1659af;
}
.auth-switch {
  width: 100%;
  margin-top: 24px;
  color: #000000;
  font-size: 14px;
  text-align: center;
}
.auth-legal {
  margin: 24px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.auth-switch-link {
  margin-left: 4px;
  color: var(--auth-primary);
  text-decoration: none;
}
.auth-switch-link:hover {
  text-decoration: underline;
}
@media (max-width: 520px) {
  .auth-language-selector {
    top: 12px;
    right: 12px;
    height: 40px;
  }
  .auth-shell {
    padding-top: 72px;
  }
  .auth-card {
    min-height: auto;
    padding: 32px 24px;
  }
  .auth-title-wrap {
    margin: 0;
  }
  .auth-code-inputs {
    gap: 6px;
  }
  .auth-providers {
    grid-template-columns: 1fr;
  }
  .auth-code-input {
    width: 32px;
  }
  .auth-button {
    width: 100%;
  }
}
