/* Реальні серверні форми: Workshop-оформлення без зміни auth-поведінки. */
@font-face {
  font-family: "Google Sans Button";
  font-style: normal;
  font-weight: 500;
  font-display: optional;
  src: url("google-sans-button.ttf") format("truetype");
}

.auth-page {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  font-size: 14px;
  line-height: 1.5;
  color-scheme: light;
}
.auth-page .auth-nav { flex-shrink: 0; }
.auth-nav nav { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; justify-content: flex-end; }
.auth-page .auth-layout { flex: 1; width: min(1190px, 100%); margin-block: 46px; }
.auth-page .auth-story h2 { font-size: clamp(52px, 5.1vw, 68px); overflow-wrap: normal; }
.auth-stage { min-width: 0; }
.auth-page .auth-card { min-width: 0; width: 100%; }
.auth-page .auth-card h1 { font-family: 'Roboto Condensed', Manrope, Arial, sans-serif; text-wrap: balance; overflow-wrap: anywhere; }
.auth-page .auth-card .intro { font-size: 14px; line-height: 1.65; }
.auth-page .auth-card > .btn { margin-top: 4px; }
.auth-page .auth-footer { flex-shrink: 0; }
.auth-page .kicker, .auth-page .eyebrow { color: var(--muted); font-size: 11px; line-height: 1.6; letter-spacing: .11em; font-weight: 700; text-transform: uppercase; }
.auth-page .auth-tabs { margin-top: -8px; margin-bottom: 24px; }
.auth-page .auth-tabs a { min-height: 44px; }
.auth-page .auth-state-icon { width: 48px; height: 48px; margin-bottom: 20px; }
.auth-page .auth-state-icon .icon { width: 24px; height: 24px; }

.local-notice { margin-bottom: 16px; }
.local-notice strong, .local-notice span { display: block; }
.local-notice strong { margin-bottom: 3px; font-size: 12px; }
.local-notice span { font-size: 12px; }
.local-notice code { font-size: 11px; overflow-wrap: anywhere; }
.messages { display: grid; gap: 10px; margin-bottom: 16px; }
.auth-page .notice.error { background: #f8e7e0; border-color: #d2a69a; color: #8d3026; }

.auth-page .stack-form { display: grid; gap: 18px; margin-top: 22px; }
.auth-page .stack-form .field { display: flex; flex-direction: column; align-items: stretch; gap: 7px; min-width: 0; margin: 0; }
.auth-page .field label { font-size: 13px; font-weight: 650; line-height: 1.5; }
.auth-page .optional { color: var(--muted); font-weight: 400; }
.auth-page .field input:not([type="checkbox"]):not([type="radio"]),
.auth-page .field select, .auth-page .field textarea { width: 100%; min-height: 46px; font-size: 16px; }
.auth-page .field-invalid input { border-color: var(--red); }
.auth-page .help-text { font-size: 12px; line-height: 1.65; color: var(--muted); font-weight: 400; }
.auth-page .help-text ul { margin: 0; padding-left: 18px; }
.auth-page .help-text li + li { margin-top: 4px; }
.field-errors, .form-errors { color: var(--red); font-size: 13px; line-height: 1.6; font-weight: 500; }
.field-errors ul, .form-errors ul { list-style: none; margin: 0; padding: 0; }
.field-errors li + li, .form-errors li + li { margin-top: 6px; }
.form-errors { border: 1px solid #d2a69a; border-left: 3px solid var(--red); padding: 12px 14px; background: #f8e7e0; }
.auth-page .form-links { display: flex; gap: 10px 20px; flex-wrap: wrap; padding-top: 17px; margin-top: 24px; border-top: 1px solid var(--line); }
.form-links a, .google-recovery a { font-size: 12px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.form-links a { display: inline-flex; align-items: center; min-height: 32px; }
.auth-page .google-recovery { margin: 20px 0 0; }

.google-sign-in { margin-top: 24px; }
.google-sign-in form { margin: 0; }
.auth-page .google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 12px;
  border: 1px solid #747775;
  border-radius: 4px;
  color: #1f1f1f;
  background: #fff;
  font-family: "Google Sans Button", Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.google-button img { flex: 0 0 20px; object-fit: contain; }
.auth-page .google-button:hover:not(:disabled) { background: #f8faff; border-color: #5d6260; box-shadow: 0 1px 2px #20212426; }
.auth-page .google-button:disabled { opacity: 1; color: #5f6368; border-color: #c4c7c5; background: #f2f3ef; }
.google-sign-in .help-text { margin-top: 9px; }
.email-fallback { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.email-fallback summary { min-height: 42px; padding-block: 10px; font-size: 13px; font-weight: 650; cursor: pointer; }
.auth-page .email-fallback .stack-form { margin-top: 12px; }

/* Сумісність зі сторінкою обов'язкового підтвердження email. */
.auth-page .button:not(.google-button) { display: inline-flex; justify-content: center; align-items: center; width: 100%; min-height: 46px; padding: 12px 18px; border: 1px solid transparent; border-radius: 0; font-size: 14px; font-weight: 700; line-height: 1.4; text-align: center; }
.auth-page .button.primary { background: var(--orange); color: #20231f; border-color: var(--orange); }
.auth-page .button.primary:hover { background: #de5430; }
.email-address { overflow-wrap: anywhere; }
.auth-page .phone-card .intro { margin-bottom: 20px; }
.qr-code { display: flex; justify-content: center; align-items: center; width: 226px; min-height: 226px; max-width: 100%; padding: 16px; background: #fff; border: 1px solid var(--line); margin: 22px auto; }
.qr-code canvas, .qr-code img { max-width: 100%; height: auto; }
.phone-link { display: block; overflow-wrap: anywhere; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; margin: 16px 0; }
.phone-card .help-text { margin-bottom: 18px; }

@media (max-width: 1060px) {
  .auth-page .auth-story h2 { font-size: 52px; }
  .auth-page .auth-layout { gap: 5%; }
}
@media (max-width: 900px) {
  .auth-page .auth-story { display: none; }
  .auth-page .auth-layout { display: flex; flex-direction: column; align-items: stretch; margin-block: 24px 32px; max-width: 550px; }
}
@media (max-width: 760px) {
  .auth-page .auth-card { padding: 24px; }
  .auth-nav nav { gap: 4px 16px; }
  .auth-nav .quiet-link { font-size: 12px; }
  .auth-page .auth-footer { font-size: 11px; }
}
@media (max-width: 400px) {
  .auth-page .auth-nav { gap: 12px; padding-inline: 16px; }
  .auth-page .portal-brand { font-size: 22px; gap: 8px; }
  .auth-page .portal-brand > span { width: 27px; height: 31px; font-size: 23px; }
  .auth-page .auth-layout { padding-inline: 16px; }
  .auth-page .auth-card { padding: 20px; }
  .auth-page .auth-card h1 { font-size: 31px; }
  .auth-nav nav { flex-direction: column; align-items: flex-end; }
}
