/* Konto użytkownika - modal na desktopie, pełny widok na telefonie. */
.auth-layer {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 24px;
}

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

body.auth-open {
  overflow: hidden;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(10, 27, 52, .58);
  backdrop-filter: blur(7px);
  cursor: default;
}

.auth-panel {
  position: relative;
  width: min(100%, 468px);
  max-height: min(760px, calc(100dvh - 48px));
  overflow: hidden auto;
  border: 1px solid rgba(219, 225, 232, .9);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 27, 52, .24);
  animation: auth-enter .28s cubic-bezier(.22, 1, .36, 1) both;
}

@keyframes auth-enter {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.auth-head {
  display: flex;
  align-items: center;
  min-height: 66px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-2);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 800;
}

.auth-brand-wordmark {
  display: block;
  width: 142px;
  height: 28px;
  background: url("/brand/sponty-wordmark-navy.png") center/contain no-repeat;
}

.auth-brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--coral) 20%, var(--violet));
  color: #fff;
  font-size: 14px;
}

.auth-head-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.auth-icon-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--bg);
  color: var(--slate);
  cursor: pointer;
}

.auth-icon-button svg {
  width: 17px;
  height: 17px;
}

.auth-content {
  padding: 30px 34px 32px;
}

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--slate-2);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--coral);
}

.auth-title {
  margin-top: 12px;
  color: var(--navy);
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -.025em;
}

.auth-title--first {
  margin-top: 0;
}

.auth-title:focus {
  outline: none;
}

.auth-subtitle {
  margin-top: 9px;
  color: var(--slate);
  font-size: 13px;
  line-height: 1.65;
}

.auth-stack {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.auth-provider,
.auth-submit,
.auth-secondary {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 6px;
  font: 700 13.5px/1 var(--font-b);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auth-provider > span:last-child,
.auth-secondary > span:last-child {
  min-width: 0;
  line-height: 1.25;
  text-align: center;
}

.auth-provider {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.auth-provider:hover,
.auth-secondary:hover {
  border-color: #cfd7e4;
  box-shadow: var(--shadow-s);
  transform: translateY(-1px);
}

.auth-provider-mark {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--navy);
  font-family: var(--font-d);
  font-size: 13px;
  font-weight: 800;
}

.auth-provider-mark.facebook {
  border-color: #1877f2;
  background: #1877f2;
  color: #fff;
  font-family: Arial, sans-serif;
}

.auth-provider svg {
  width: 19px;
  height: 19px;
  color: var(--teal-dark);
}

.auth-secondary svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--teal-dark);
}

.auth-divider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--slate-2);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--line);
}

.auth-field {
  display: grid;
  gap: 7px;
  margin-top: 18px;
}

.auth-field label,
.auth-legend {
  color: var(--navy);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
}

.auth-input-wrap {
  display: flex;
  min-height: 52px;
  align-items: center;
  overflow: hidden;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-input-wrap:focus-within {
  border-color: var(--focus);
  box-shadow: 0 0 0 2px rgba(136, 173, 216, .18);
}

.auth-prefix {
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 13px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.auth-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px;
  background: transparent;
  color: var(--ink);
  font: 650 15px/1.3 var(--font-b);
}

.auth-input::placeholder {
  color: #9aa6bb;
  font-weight: 500;
}

.auth-code {
  letter-spacing: .42em;
  text-align: center;
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 800;
}

.auth-help {
  color: var(--slate-2);
  font-size: 11px;
  line-height: 1.55;
}

.auth-submit {
  margin-top: 20px;
  border: 0;
  background: var(--coral);
  color: #fff;
  box-shadow: 0 8px 19px rgba(10, 27, 52, .18);
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(10, 27, 52, .24);
}

.auth-secondary {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--navy);
}

.auth-provider:disabled,
.auth-submit:disabled,
.auth-secondary:disabled {
  cursor: not-allowed;
  opacity: .52;
  transform: none;
  box-shadow: none;
}

.auth-provider.is-busy {
  border-color: rgba(49, 95, 135, .38);
  background: var(--teal-soft);
  opacity: 1;
}

.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 17px;
  color: var(--slate);
  font-size: 11px;
  line-height: 1.55;
}

.auth-consent input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--teal);
}

.auth-legal-links {
  margin: 8px 0 17px 27px;
  color: var(--slate-2);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-legal-links--continue {
  display: grid;
  gap: 2px;
  margin: 18px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line-2);
  text-align: center;
}

.auth-legal-links--continue > span {
  display: block;
  white-space: nowrap;
}

.auth-legal-links a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.auth-switch {
  margin-top: 22px;
  color: var(--slate);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--teal-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-status {
  display: none;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 12px;
  border-radius: 6px;
  background: var(--coral-soft);
  color: #a33c30;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
}

.auth-status.show {
  display: flex;
}

.auth-status.info {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.auth-status svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin-top: 1px;
}

.auth-privacy {
  display: flex;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 12px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--slate);
  font-size: 10.5px;
  line-height: 1.55;
}

.auth-privacy svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: var(--teal-dark);
}

.auth-progress {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 750;
}

.auth-spinner {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(49, 95, 135, .22);
  border-top-color: var(--teal-dark);
  border-radius: 50%;
  animation: auth-spin .72s linear infinite;
}

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

.auth-busy-label {
  display: none;
}

.auth-submit.is-busy .auth-default-label {
  display: none;
}

.auth-submit.is-busy .auth-busy-label {
  display: inline;
}

@media (max-width: 720px) {
  .auth-layer {
    display: block;
    padding: 0;
    background: #fff;
  }

  .auth-backdrop {
    display: none;
  }

  .auth-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100dvh;
    max-height: none;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overscroll-behavior-y: contain;
  }

  .auth-head {
    position: relative;
    flex: 0 0 auto;
    z-index: 2;
    min-height: 62px;
    padding: max(12px, env(safe-area-inset-top)) 16px 10px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
  }

  .auth-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    width: min(100%, 480px);
    margin: 0 auto;
    padding: 28px 20px calc(32px + env(safe-area-inset-bottom));
  }

  .auth-title {
    font-size: 25px;
  }

  .auth-legal-links--continue {
    font-size: 10px;
  }
}

@media (max-width: 260px) {
  .auth-legal-links--continue > span {
    overflow-wrap: anywhere;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel {
    animation: none;
  }

  .auth-spinner {
    animation: none;
    border-color: var(--teal-dark);
  }
}
