/* Página 1 · ingreso y creación de cuenta
   Dirección: agua quieta / compacta (07).
   Mobile-first: una sola columna y el formulario en la primera pantalla. */

.auth-page {
  color-scheme: light;

  --bg: #e6f1f2;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(255, 255, 255, 0.45);
  --surface-3: rgba(255, 255, 255, 0.3);

  --ink: #203034;
  --ink-2: #465b60;
  --ink-3: #52676c;

  --line: rgba(46, 90, 95, 0.22);
  --line-strong: rgba(46, 90, 95, 0.34);

  --teal: #4f7f83;
  --teal-deep: #2e5a5f;

  --accent: #2e5a5f;
  --accent-hover: #244a4e;
  --accent-ink: #ffffff;
  --accent-soft: rgba(79, 127, 131, 0.14);
  --accent-soft-2: rgba(79, 127, 131, 0.22);

  --warm: #4f7f83;
  --warm-soft: rgba(79, 127, 131, 0.12);
  --warm-ink: #2e5a5f;

  --shadow-1: 0 1px 2px rgba(46, 90, 95, 0.05), 0 8px 24px rgba(46, 90, 95, 0.06);
  --shadow-2: 0 2px 6px rgba(46, 90, 95, 0.06), 0 24px 60px rgba(46, 90, 95, 0.12);

  min-height: 100svh;
  overflow-x: hidden;
  background:
    radial-gradient(760px 520px at 8% -10%, rgba(255, 255, 255, 0.92), transparent 62%),
    radial-gradient(900px 620px at 100% 8%, rgba(176, 210, 213, 0.4), transparent 66%),
    linear-gradient(165deg, #f8fcfc 0%, #e6f1f2 45%, #d2e4e6 100%);
}

/* La base trae un degradado cálido; acá manda el agua. */
.auth-page::before {
  display: none;
}

.water {
  position: fixed;
  inset: -30%;
  z-index: 0;
  pointer-events: none;
  filter: blur(50px);
  opacity: 0.9;
}

.water::before,
.water::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}

.water::before {
  width: 64vw;
  height: 64vw;
  left: -10%;
  top: -20%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.96), transparent 66%);
  animation: drift 20s ease-in-out infinite;
}

.water::after {
  width: 48vw;
  height: 48vw;
  right: 2%;
  bottom: 0;
  background: radial-gradient(circle, rgba(123, 170, 174, 0.55), transparent 66%);
  animation: drift 24s -8s ease-in-out infinite reverse;
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 520px;
  min-height: 100svh;
  margin: 0 auto;
  padding:
    max(12px, env(safe-area-inset-top))
    clamp(14px, 4vw, 20px)
    max(16px, env(safe-area-inset-bottom));
}

.appbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.auth-page .brand {
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.24em;
}

.auth-page .brand-bars {
  gap: 2px;
  height: 13px;
}

.auth-page .brand-bars i {
  width: 2px;
}

.auth-page .brand-bars i:nth-child(1) {
  height: 7px;
}

.auth-page .brand-bars i:nth-child(2) {
  height: 13px;
}

.auth-page .brand-bars i:nth-child(3) {
  height: 9px;
}

.card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow:
    0 28px 70px rgba(46, 90, 95, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.card .eyebrow {
  margin: 0 0 8px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.headline {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(26px, 7.5vw, 32px);
  font-weight: 300;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.headline em {
  color: var(--teal-deep);
  font-style: normal;
}

.lede {
  max-width: 40ch;
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.5;
}

.lede strong {
  color: var(--ink);
  font-weight: 650;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 16px 0 12px;
  padding: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(79, 127, 131, 0.1);
  font-size: 12px;
}

.tabs[hidden] {
  display: none;
}

.tab {
  position: static;
  padding: 8px 6px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected='true'] {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(46, 90, 95, 0.08);
}

.tab[aria-selected='true']::after {
  display: none;
}

[data-register-only][hidden],
[hidden] {
  display: none !important;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 9px;
}

.field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 0;
}

.field-label {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.field-hint {
  color: var(--ink-3);
  font-size: 10.5px;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 16px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.input:hover {
  border-color: rgba(46, 90, 95, 0.4);
}

.input:focus {
  border-color: rgba(46, 90, 95, 0.5);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 0 0 3px rgba(79, 127, 131, 0.12);
}

.input::placeholder {
  color: var(--ink-3);
  opacity: 0.95;
}

.input-wrap .input {
  padding-right: 68px;
}

.input-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  padding: 8px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-deep);
  font-size: 10.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.input-toggle:hover {
  background: transparent;
  color: var(--accent-hover);
}

.submit {
  min-height: 46px;
  margin-top: 4px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--teal-deep);
  font-size: 13px;
}

.submit[aria-busy='true'] .spinner {
  display: inline-block;
}

.spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(79, 127, 131, 0.18);
  border-radius: 10px;
  background: rgba(79, 127, 131, 0.1);
  color: var(--teal-deep);
  font-size: 11.5px;
  line-height: 1.45;
}

.notice::before {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  background: var(--teal);
  color: #ffffff;
  font-size: 10px;
}

.notice[hidden] {
  display: none;
}

.success {
  padding: 2px 0 0;
}

.success-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--teal-deep);
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
}

.success h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.success p {
  margin: 7px 0 18px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.55;
}

.success .btn {
  min-height: 44px;
  font-size: 13px;
}

.success .link-button {
  display: inline-block;
  margin: 14px 0 0;
}

.fineprint {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.55;
}

.dev {
  width: 100%;
  max-width: 440px;
  margin: 16px auto 0;
  text-align: center;
}

.dev summary {
  display: inline-block;
  color: var(--ink-2);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.dev summary::marker {
  color: var(--teal);
}

.server-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 10.5px;
}

.server-line code {
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.foot {
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(4%, 3%, 0) scale(1.06);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(79, 127, 131, 0.3);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(79, 127, 131, 0.02);
  }
}

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

@media (min-width: 600px) {
  .input {
    font-size: 14px;
  }
}

@media (min-width: 720px) {
  .shell {
    max-width: 420px;
    min-height: calc(100svh - 80px);
    margin-top: 40px;
    padding-top: 0;
    justify-content: center;
  }

  .card {
    padding: 22px;
  }

  .headline {
    font-size: 34px;
  }
}

@media (max-width: 380px) {
  .shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .card {
    padding: 16px;
  }

  .headline {
    font-size: 26px;
  }

  .tabs,
  .tab {
    font-size: 11.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .water::before,
  .water::after {
    animation: none;
  }
}

/* --- Entrar con Google --- */

.google-block {
  margin: 0 0 6px;
}

.google-btn {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

/* El botón de Google viene con ancho en línea; que nunca pase del contenido. */
.google-btn > div,
.google-btn [role='button'] {
  max-width: 100% !important;
}

.google-hint {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.45;
  text-align: center;
}

.google-block .notice {
  margin-top: 10px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
