﻿:root {
  --auth-bg: #10131a;
  --auth-surface: rgba(23, 28, 35, 0.94);
  --auth-surface-soft: rgba(255, 255, 255, 0.05);
  --auth-border: rgba(242, 231, 214, 0.12);
  --auth-text: #f5e9d7;
  --auth-muted: #c1b4a4;
  --auth-accent: var(--brand-orange);
  --auth-accent-soft: rgba(214, 109, 36, 0.16);
  --auth-shadow: 0 26px 56px rgba(0, 0, 0, 0.3);
}

@keyframes authEnter {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.site-dock-auth {
  min-height: 100vh;
  display: block;
  overflow-y: auto;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(242, 231, 214, 0.16), transparent 18%),
    radial-gradient(circle at top right, rgba(47, 158, 163, 0.14), transparent 22%),
    linear-gradient(180deg, #101923 0%, #151d27 100%);
}

.auth-container {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
  padding: clamp(40px, 10vh, 92px) 20px 40px;
  z-index: 2;
}

.auth-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.auth-background::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.03), transparent 28%),
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 22px
    );
  opacity: 0.26;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.16;
}

.blob-1 {
  top: -120px;
  left: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(214, 109, 36, 0.42), rgba(214, 109, 36, 0.02));
}

.blob-2 {
  right: -80px;
  bottom: 6%;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(255, 170, 66, 0.3), rgba(255, 170, 66, 0.02));
}

.blob-3 {
  top: 26%;
  right: 12%;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(47, 158, 163, 0.22), rgba(47, 158, 163, 0.02));
}

.auth-card {
  position: relative;
  display: grid;
  gap: 24px;
  padding: 34px;
  border-radius: 28px;
  border: 1px solid rgba(242, 231, 214, 0.1);
  background:
    radial-gradient(circle at top right, rgba(214, 109, 36, 0.12), transparent 24%),
    radial-gradient(circle at bottom left, rgba(47, 158, 163, 0.06), transparent 22%),
    var(--auth-surface);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: authEnter 0.5s ease-out;
}

.auth-card::before {
  content: "Acesso BoardSports";
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(214, 109, 36, 0.12);
  color: var(--brand-cream);
  font-family: "Courier New", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.auth-header {
  display: grid;
  gap: 14px;
}

.auth-logo {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-rust) 52%, #b85f32 100%);
  box-shadow: 0 14px 24px rgba(198, 88, 32, 0.22);
  overflow: hidden;
}

.auth-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 20px;
}

.auth-header h1 {
  margin: 0;
  font-family: var(--ui-font-display);
  font-size: clamp(2.6rem, 5vw, 3.7rem);
  line-height: 0.9;
  letter-spacing: -0.05em;
  color: #fbf5ee;
}

.auth-header p {
  margin: 0;
  max-width: 34ch;
  color: var(--auth-muted);
  line-height: 1.7;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-stepper {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}

.auth-stepper-item {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(242, 231, 214, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-muted);
  font-weight: 900;
}

.auth-stepper-item.is-active {
  border-color: rgba(214, 109, 36, 0.62);
  background: rgba(214, 109, 36, 0.2);
  color: #fff5e7;
  box-shadow: 0 12px 26px rgba(214, 109, 36, 0.18);
}

.auth-stepper-line {
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(214, 109, 36, 0.56), rgba(242, 231, 214, 0.12));
}

.auth-step-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}

.auth-step-panel[hidden] {
  display: none;
}

.auth-step-copy {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(242, 231, 214, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-step-copy span {
  color: #ffbd63;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-step-copy strong {
  color: #fbf5ee;
  font-size: 1.04rem;
}

.auth-fixed-type-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 109, 36, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(214, 109, 36, 0.12), rgba(47, 158, 163, 0.07)),
    rgba(255, 255, 255, 0.04);
}

.auth-fixed-type-card strong {
  color: #fff5e7;
  font-size: 1.02rem;
}

.auth-fixed-type-card span {
  color: var(--auth-muted);
  line-height: 1.5;
}

.auth-step-actions {
  display: grid;
  grid-template-columns: minmax(112px, 0.42fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.auth-secondary-button {
  min-height: 56px;
  padding: 0 18px;
  border: 1px solid rgba(242, 231, 214, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--auth-text);
  font-weight: 800;
  box-shadow: none;
}

.auth-secondary-button:hover {
  border-color: rgba(242, 231, 214, 0.28);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  color: #dde3ec;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  background: var(--auth-surface-soft);
  color: var(--auth-text);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.form-group textarea {
  resize: vertical;
  min-height: 112px;
}

.form-group input::placeholder,
.form-group select::placeholder,
.form-group textarea::placeholder {
  color: rgba(243, 241, 237, 0.42);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(214, 109, 36, 0.34);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.form-group small {
  color: var(--auth-muted);
  font-size: 0.78rem;
}

.auth-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -4px;
}

.auth-help-text {
  margin: -6px 0 0;
  color: var(--auth-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.auth-link-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffbd63;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: none;
}

.auth-link-button:hover {
  color: #ffd490;
  transform: none;
}

.btn-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 16px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 24px rgba(198, 88, 32, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 24px 44px rgba(214, 109, 36, 0.28);
}

.btn-icon {
  font-size: 0.94rem;
  opacity: 0.8;
}

.auth-message {
  display: none;
  padding: 14px 16px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.auth-message.show {
  display: block;
}

.auth-message.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.24);
  color: #fecaca;
}

.auth-message.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.24);
  color: #bbf7d0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(243, 241, 237, 0.42);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-footer p {
  color: var(--auth-muted);
  font-size: 0.94rem;
}

.auth-link {
  color: #ffbd63;
  font-weight: 700;
}

.auth-link:hover {
  color: #ffd490;
}

.reset-card {
  gap: 18px;
}

.reset-copy p {
  color: var(--auth-muted);
  line-height: 1.6;
}

.reset-state {
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #ededed;
  font-size: 14px;
  line-height: 1.6;
}

.reset-state.success {
  background: rgba(35, 116, 74, 0.18);
  color: #dcfce7;
}

.reset-state.error {
  background: rgba(153, 27, 27, 0.18);
  color: #fee2e2;
}

.reset-form[hidden] {
  display: none;
}

.reset-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.reset-secondary {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #ededed;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 768px) {
  .auth-container {
    width: min(100%, 100vw - 20px);
    padding-top: 18px;
  }

  .auth-card {
    gap: 18px;
    padding: 22px;
    border-radius: 22px;
  }

  .auth-card::before {
    padding: 6px 10px;
    font-size: 10px;
  }

  .auth-header {
    gap: 10px;
  }

  .auth-logo {
    width: 62px;
    height: 62px;
    border-radius: 17px;
  }

  .auth-logo-image {
    border-radius: 17px;
  }

  .auth-header p {
    line-height: 1.45;
  }

  .auth-form {
    gap: 12px;
  }

  .form-group {
    gap: 6px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .auth-inline-actions {
    justify-content: flex-start;
    margin-top: -2px;
  }

  .auth-link-button {
    padding: 6px 0;
    text-align: left;
  }

  .auth-help-text {
    margin: -8px 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .btn-primary {
    min-height: 48px;
    margin-top: 0;
    border-radius: 14px;
  }

  .auth-footer {
    justify-content: flex-start;
    gap: 8px;
  }

  .auth-footer p {
    margin: 0;
  }
}

@media (max-width: 560px) {
  .auth-container {
    width: min(100%, calc(100vw - 16px));
    padding-left: 8px;
    padding-right: 8px;
  }

  .auth-card {
    padding: 18px 16px;
  }

  .auth-header h1 {
    font-size: clamp(1.9rem, 10vw, 2.45rem);
  }

  .auth-step-actions {
    grid-template-columns: 1fr;
  }

  .auth-footer {
    align-items: center;
    flex-direction: row;
  }
}
