/* Panel de registro: tema claro. Enlaza solo este archivo para aplicar este tema. */
:root {
  color-scheme: light;
  --bg: #f7f9fc;
  --bg-2: #edf4ff;
  --surface: #ffffff;
  --surface-2: #f3f7fd;
  --text: #0f172a;
  --soft: #334155;
  --muted: #64748b;
  --border: rgba(15, 23, 42, .10);
  --border-strong: rgba(15, 23, 42, .16);
  --accent: #0284c7;
  --accent-2: #16a34a;
  --danger: #dc2626;
  --warning: #a16207;
  --shadow: 0 24px 70px rgba(15, 23, 42, .13);
  --shadow-soft: 0 14px 34px rgba(15, 23, 42, .09);
  --input-bg: rgba(15, 23, 42, .045);
  --input-bg-hover: rgba(15, 23, 42, .065);
  --focus-ring: color-mix(in srgb, var(--accent) 24%, transparent);
  --button-text-on-accent: #ffffff;
  --panel-gloss: rgba(255, 255, 255, .72);
  --radius: 28px;
  --radius-inner: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 52%, var(--surface-2)) color-mix(in srgb, var(--surface) 72%, transparent);
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border: 3px solid color-mix(in srgb, var(--surface) 78%, transparent);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent-2) 36%, var(--accent)));
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, white), color-mix(in srgb, var(--accent-2) 48%, var(--accent)));
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vh, 56px) clamp(16px, 4vw, 34px);
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background:
    radial-gradient(circle at 18% -12%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 34rem),
    radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 30rem),
    linear-gradient(180deg, var(--bg), #ffffff 52%, var(--bg-2));
  font: 400 16px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .64), transparent 72%);
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 850;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 80%, white);
  outline-offset: 3px;
}

svg {
  display: block;
}

.register-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 36%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, transparent), color-mix(in srgb, var(--surface-2) 92%, transparent));
  box-shadow: var(--shadow);
  background-clip: padding-box;
  isolation: isolate;
}

.register-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--panel-gloss), transparent 34% 70%, color-mix(in srgb, var(--accent) 8%, transparent));
}

.register-panel > * {
  position: relative;
  z-index: 1;
}

.register-copy {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  text-align: left;
}

.section-kicker,
.register-title,
.lead,
.panel-message,
.context-message,
.signin-copy {
  margin: 0;
}

.section-kicker {
  color: var(--accent);
  font-size: .74rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.register-title {
  color: var(--text);
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: .95;
  letter-spacing: -.065em;
}

.lead {
  max-width: 36rem;
  color: var(--muted);
}

.panel-message,
.context-message {
  display: block;
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-4px);
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.4;
  transition: opacity .52s ease, transform .52s ease, max-height .52s ease, margin .52s ease;
}

.panel-message.is-visible,
.context-message.is-visible {
  max-height: 80px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}

.panel-message {
  margin-bottom: 0;
  padding: 0 2px;
}

.panel-message.is-visible {
  margin-bottom: 14px;
}

.context-message[data-tone="success"],
.panel-message[data-tone="success"] {
  color: var(--accent-2);
}

.context-message[data-tone="danger"],
.panel-message[data-tone="danger"] {
  color: var(--danger);
}

.context-message[data-tone="warning"],
.panel-message[data-tone="warning"] {
  color: var(--warning);
}

.google-button,
.primary-button {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: var(--radius-inner);
  font-weight: 900;
  letter-spacing: -.01em;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.google-button {
  border: 1px solid var(--border-strong);
  background: color-mix(in srgb, var(--surface-2) 60%, transparent);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
}

.google-button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 44%, var(--border-strong));
  background: color-mix(in srgb, var(--surface-2) 84%, transparent);
  text-decoration: none;
}

.google-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 18px 0;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}

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

.register-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
}

.field-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

label {
  color: var(--soft);
  font-size: .92rem;
  font-weight: 850;
}

.field-hint {
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
}

.input-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-inner);
  background: var(--input-bg);
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.input-shell:hover {
  background: var(--input-bg-hover);
}

.input-shell:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border-strong));
  box-shadow: 0 0 0 5px var(--focus-ring);
}

.input-shell.is-valid {
  border-color: color-mix(in srgb, var(--accent-2) 56%, var(--border-strong));
}

.input-shell.is-invalid {
  border-color: color-mix(in srgb, var(--danger) 72%, var(--border-strong));
}

.input-shell svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  color: var(--muted);
}

.input-shell:focus-within svg {
  color: var(--accent);
}

.input-shell input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.input-shell input::placeholder {
  color: color-mix(in srgb, var(--muted) 72%, transparent);
}

.password-action {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 6px 9px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 900;
}

.password-action:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.form-options {
  display: grid;
  gap: 10px;
  margin-top: 2px;
}

.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  line-height: 1.42;
  cursor: pointer;
}

.terms input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin: 0;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: var(--input-bg);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.terms input:hover,
.terms input:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border-strong));
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.terms input:checked {
  border-color: color-mix(in srgb, var(--accent-2) 70%, var(--accent));
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.terms input:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.primary-button {
  margin-top: 2px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent-2) 42%, var(--accent)));
  color: var(--button-text-on-accent);
  box-shadow: 0 18px 42px color-mix(in srgb, var(--accent) 26%, transparent);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px color-mix(in srgb, var(--accent) 34%, transparent);
}

.primary-button:active,
.google-button:active {
  transform: translateY(0);
}

.signin-copy {
  margin-top: 18px;
  color: var(--muted);
  text-align: center;
  font-size: .92rem;
}

@media (max-width: 520px) {
  body {
    padding: 18px 12px;
  }

  .register-panel {
    width: min(100%, 440px);
    padding: 22px 16px;
    border-radius: 24px;
  }

  .field-row {
    display: grid;
    gap: 2px;
  }

  .field-hint {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}
