/* Client Area sign-in and registration pages (token-driven). */

.auth-shell {
  align-items: start;
  gap: 0;
  max-width: 440px;
  min-height: calc(100vh - 72px);
  padding: 96px 20px 48px;
}

.auth-shell-register {
  max-width: 520px;
}

.auth-panel.auth-panel-simple {
  background: var(--p67-surface-1);
  border: 1px solid var(--p67-border);
  border-radius: var(--p67-radius-lg);
  box-shadow: var(--p67-shadow-lg);
  overflow: visible;
  padding: 28px 28px 24px;
}

.auth-simple-card {
  display: grid;
  gap: 22px;
}

.auth-simple-head {
  display: grid;
  gap: 10px;
  margin: 0;
}

.auth-simple-mark {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 2px;
}

.auth-simple-icon {
  align-items: center;
  background: var(--p67-brand-soft);
  border: 1px solid var(--p67-brand-border);
  border-radius: var(--p67-radius-md);
  color: var(--p67-brand);
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.auth-simple-icon svg,
.auth-simple-icon i {
  height: 18px;
  width: 18px;
}

.auth-simple-mark span {
  display: grid;
  gap: 1px;
}

.auth-simple-mark strong {
  display: block;
  font-size: var(--p67-text-base);
  line-height: 1.2;
}

.auth-simple-mark small {
  color: var(--p67-ink-muted);
  display: block;
  font-size: var(--p67-text-sm);
  font-weight: var(--p67-fw-medium);
  line-height: 1.2;
  margin: 0;
}

.auth-kicker {
  display: none;
}

.auth-simple-head h1 {
  font-family: var(--p67-font-head);
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: var(--p67-fw-bold);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.auth-simple-head p {
  color: var(--p67-ink-muted);
  font-size: var(--p67-text-sm);
  line-height: 1.5;
  margin: 0;
  max-width: 36ch;
}

.auth-form-card.auth-form-card-simple {
  background: transparent;
  border: 0;
  box-shadow: none;
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
}

.auth-form-card-simple .auth-field {
  display: grid;
  gap: 6px;
  margin: 0;
}

.auth-form-card-simple .auth-field > span {
  color: var(--p67-ink-soft);
  font-size: var(--p67-text-sm);
  font-weight: var(--p67-fw-semibold);
  line-height: 1.3;
}

.auth-form-card-simple .form-control {
  background: var(--p67-surface-1);
  border: 1px solid var(--p67-border);
  border-radius: var(--p67-radius-md);
  box-shadow: none;
  color: var(--p67-ink);
  font-size: var(--p67-text-sm);
  min-height: 46px;
  padding: 0.55rem 0.85rem;
}

.auth-form-card-simple .form-control::placeholder {
  color: var(--p67-ink-muted);
}

.auth-form-card-simple .form-control:focus {
  border-color: var(--p67-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p67-brand) 14%, transparent);
}

.auth-field-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form-row,
.auth-consent-stack {
  display: grid;
  gap: 12px;
}

.auth-form-row {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.auth-form-row .checkbox-row.form-check,
.auth-consent-stack .checkbox-row.form-check {
  align-items: flex-start;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  gap: 10px;
  margin: 0;
  min-height: 0;
  padding: 0;
}

.auth-form-row .checkbox-row.form-check input[type="checkbox"],
.auth-consent-stack .checkbox-row.form-check input[type="checkbox"] {
  accent-color: var(--p67-brand);
  background-color: var(--p67-surface-1) !important;
  border: 1px solid var(--p67-border-strong) !important;
  box-shadow: none;
  flex: 0 0 auto;
  height: 1rem;
  margin: 0.15rem 0 0;
  width: 1rem;
}

.auth-form-card-simple .form-check-input:checked,
.auth-form-row .checkbox-row.form-check input[type="checkbox"]:checked,
.auth-consent-stack .checkbox-row.form-check input[type="checkbox"]:checked {
  background-color: var(--p67-brand) !important;
  border-color: var(--p67-brand) !important;
}

.auth-form-card-simple .form-check-input:focus,
.auth-form-row .checkbox-row.form-check input[type="checkbox"]:focus,
.auth-consent-stack .checkbox-row.form-check input[type="checkbox"]:focus {
  border-color: var(--p67-brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--p67-brand) 14%, transparent) !important;
  outline: 0;
}

.auth-form-row .checkbox-row.form-check span,
.auth-consent-stack .checkbox-row.form-check span {
  color: var(--p67-ink-soft);
  font-size: var(--p67-text-sm);
  font-weight: var(--p67-fw-medium);
  line-height: 1.45;
}

.auth-consent-stack .checkbox-row.form-check span a {
  color: var(--p67-brand);
  font-weight: var(--p67-fw-semibold);
  text-decoration: none;
}

.auth-consent-stack .checkbox-row.form-check span a:hover {
  text-decoration: underline;
}

.auth-form-row a {
  color: var(--p67-brand);
  font-size: var(--p67-text-sm);
  font-weight: var(--p67-fw-semibold);
  text-decoration: none;
  white-space: nowrap;
}

.auth-form-row a:hover {
  text-decoration: underline;
}

.auth-primary-action.button,
.auth-primary-action.p67-button {
  align-items: center;
  background: var(--p67-brand);
  border: 0;
  border-radius: var(--p67-radius-md);
  box-shadow: var(--p67-shadow-md);
  color: var(--p67-on-brand);
  display: inline-flex;
  font-size: var(--p67-text-sm);
  font-weight: var(--p67-fw-semibold);
  gap: 8px;
  justify-content: center;
  min-height: 48px;
  transition: filter var(--p67-transition), box-shadow var(--p67-transition), transform var(--p67-transition);
}

.auth-primary-action.button:hover,
.auth-primary-action.p67-button:hover {
  background: var(--p67-brand-strong);
  box-shadow: var(--p67-shadow-lg);
  color: var(--p67-on-brand);
  filter: brightness(1.02);
  transform: translateY(-1px);
}

.auth-primary-action.button svg,
.auth-primary-action.button i {
  height: 18px;
  width: 18px;
}

.auth-switch-card {
  align-items: center;
  background: var(--p67-surface-2);
  border: 1px solid var(--p67-border);
  border-radius: var(--p67-radius-md);
  color: var(--p67-ink-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: var(--p67-text-sm);
  gap: 6px;
  justify-content: center;
  padding: 14px 16px;
}

.auth-switch-card a {
  color: var(--p67-brand);
  font-weight: var(--p67-fw-bold);
  text-decoration: none;
}

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

.auth-form-card-simple .message-error,
.auth-form-card-simple .form-error {
  font-size: var(--p67-text-xs);
}

@media (prefers-reduced-motion: reduce) {
  .auth-primary-action.button:hover,
  .auth-primary-action.p67-button:hover {
    transform: none;
  }
}

@media (max-width: 560px) {
  .auth-shell,
  .auth-shell-register {
    max-width: 100%;
    padding-top: 88px;
  }

  .auth-panel.auth-panel-simple {
    padding: 22px 18px 18px;
  }

  .auth-field-grid {
    grid-template-columns: 1fr;
  }

  .auth-form-row {
    align-items: start;
    grid-template-columns: 1fr;
  }

  .auth-form-row a {
    white-space: normal;
  }
}
