/* src/ui/auth-ui.css */
:root {
  --auth-card-bg: #ffffff;
  --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;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}
.auth-card {
  width: min(448px, calc(100% - 32px));
  padding: 28px;
  border-radius: 16px;
  border: 1px solid var(--auth-card-border);
  background: var(--auth-card-bg);
  box-shadow: 0 12px 40px rgba(15, 61, 120, 0.12);
}
.auth-title-wrap {
  margin: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.auth-title-wrap-compact {
  margin-top: 4px;
}
.auth-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.2;
  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: 14px;
  line-height: 1.45;
  text-align: center;
}
.auth-providers {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.auth-provider-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--auth-card-border);
  background: #ffffff;
  color: var(--auth-primary);
  text-decoration: none;
  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-apple {
  color: #1d2b40;
}
.auth-provider-icon {
  width: 24px;
  height: 24px;
}
.auth-group {
  width: 100%;
  margin-top: 12px;
}
.auth-consent {
  width: 100%;
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
}
.auth-consent-checkbox {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--auth-primary);
}
.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: 40px;
  padding: 10px 16px;
  font-size: 14px;
}
.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: 40px;
  text-align: center;
  font-size: 18px;
}
.auth-message {
  min-height: 18px;
  margin-top: 8px;
  color: var(--auth-info);
  font-size: 13px;
  word-break: break-word;
  text-align: center;
}
.auth-text-error {
  color: var(--auth-danger);
}
.auth-button-wrap {
  width: 100%;
  margin-top: 12px;
  display: flex;
  justify-content: center;
}
.auth-button {
  width: 208px;
  border-radius: 8px;
  font-size: 14px;
  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 {
  height: 42px;
  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 {
  height: 40px;
  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);
  font-size: 13px;
  text-align: center;
  text-decoration: underline;
}
.auth-helper-link:hover:not(:disabled) {
  color: #1659af;
}
.auth-switch {
  width: 100%;
  margin-top: 14px;
  color: var(--auth-muted);
  font-size: 13px;
  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-card {
    width: calc(100% - 24px);
    padding: 22px 18px;
  }
  .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%;
  }
}
