/* ═══════════════════════════════════════════════
   CREAR CUENTA — Coco Galaxy
   ═══════════════════════════════════════════════ */

/* ── Variables extras para inputs ─────────────── */
:root {
  --input-bg:      #ffffff;
  --input-border:  #e2e8f0;
  --input-text:    #1a1a2e;
  --input-placeholder: #a0aec0;
  --label-color:   #4a5568;
}

[data-theme="dark"] {
  --input-bg:      #1e1e3a;
  --input-border:  rgba(255,255,255,0.1);
  --input-text:    #ffffff;
  --input-placeholder: #6060a0;
  --label-color:   #a0a0c0;
}

/* ── Página ────────────────────────────────────── */
.cc-page {
  min-height: calc(100vh - 62px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 60px;
}

/* ── Tarjeta ───────────────────────────────────── */
.cc-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg, #fff);
  border-radius: 24px;
  box-shadow: 0 8px 40px var(--card-shadow, rgba(0,0,0,0.09));
  padding: 40px 44px;
  border: 1px solid var(--nav-border);
}

/* ── Marca ─────────────────────────────────────── */
.cc-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 28px;
  justify-content: center;
}

.cc-brand span {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nav-text);
}

/* ── Encabezado ────────────────────────────────── */
.cc-header {
  text-align: center;
  margin-bottom: 28px;
}

.cc-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.cc-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ── Alertas ───────────────────────────────────── */
.cc-alerts { margin-bottom: 20px; }

.cc-alert {
  background: rgba(220, 38, 38, 0.08);
  border-left: 3px solid #dc2626;
  color: #dc2626;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

/* ── Campos ────────────────────────────────────── */
.cc-field {
  margin-bottom: 18px;
}

.cc-field > label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--label-color);
  margin-bottom: 7px;
  letter-spacing: 0.2px;
}

.cc-field input[type="text"],
.cc-field input[type="email"],
.cc-field input[type="password"] {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--input-text);
  background: var(--input-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.cc-field input::placeholder {
  color: var(--input-placeholder);
}

.cc-field input:focus {
  outline: none;
  border-color: #ff3d6b;
  box-shadow: 0 0 0 3px rgba(255, 61, 107, 0.12);
}

.cc-hint {
  display: block;
  font-size: 0.76rem;
  color: var(--input-placeholder);
  margin-top: 5px;
}

/* ── Errores de validación ─────────────────────── */
.cc-field-error {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #ff3d6b;
  margin-top: 6px;
  padding: 5px 10px;
  background: rgba(255, 61, 107, 0.08);
  border-left: 3px solid #ff3d6b;
  border-radius: 0 6px 6px 0;
}

.cc-field-error.visible { display: flex; }

.cc-field-error::before {
  content: "⚠";
  font-size: 0.75rem;
  flex-shrink: 0;
}

.cc-field input.cc-invalid,
.cc-genero.cc-invalid label {
  border-color: #ff3d6b !important;
  box-shadow: 0 0 0 3px rgba(255, 61, 107, 0.1);
}

[data-theme="dark"] .cc-field-error {
  background: rgba(255, 61, 107, 0.12);
}

/* ── Email + botón inline ──────────────────────── */
.cc-email-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.cc-email-row input { flex: 1; }

.cc-btn-codigo {
  padding: 11px 16px;
  background: transparent;
  color: #ff3d6b;
  border: 1.5px solid #ff3d6b;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.cc-btn-codigo:hover    { background: #ff3d6b; color: #fff; }
.cc-btn-codigo:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Género — pills ────────────────────────────── */
.cc-genero {
  display: flex;
  gap: 8px;
}

.cc-genero input[type="radio"] { display: none; }

.cc-genero label {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border: 1.5px solid var(--input-border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--label-color);
  background: var(--input-bg);
  transition: all 0.18s;
  user-select: none;
}

.cc-genero label:hover {
  border-color: #ff3d6b;
  color: #ff3d6b;
}

.cc-genero input:checked + label {
  background: #ff3d6b;
  border-color: #ff3d6b;
  color: #fff;
  font-weight: 700;
}

/* ── Botón submit ──────────────────────────────── */
.cc-btn-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px;
  background: #ff3d6b;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 20px rgba(255, 61, 107, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.cc-btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(255, 61, 107, 0.5);
}

.cc-btn-submit:active { transform: scale(0.98); }

/* ── Link login ────────────────────────────────── */
.cc-login-link {
  display: block;
  text-align: center;
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.cc-login-link strong { color: #ff3d6b; }
.cc-login-link:hover strong { text-decoration: underline; }

/* ── Términos ──────────────────────────────────── */
.cc-terminos-field { margin-bottom: 20px; }

.cc-terminos-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cc-terminos-label input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: #ff3d6b;
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.cc-terminos-label a {
  color: #ff3d6b;
  text-decoration: none;
  font-weight: 600;
}

.cc-terminos-label a:hover { text-decoration: underline; }

/* ── Responsive ────────────────────────────────── */
@media (max-width: 520px) {
  .cc-card { padding: 28px 20px; }
  .cc-email-row { flex-wrap: wrap; }
  .cc-email-row input { width: 100%; }
  .cc-btn-codigo { width: 100%; }
}
