/* === BEGIN HU:HU-REGISTRO-CUSTODIA styles (NO TOCAR FUERA) === */
:root {
  --registro-bg-image: url("/assets/img/resguardo-bg.png");
  --registro-bg-overlay: rgba(248, 250, 252, 0.85);
  --glass-bg: #ffffff;
  --glass-border: rgba(148, 163, 184, 0.35);
  --accent: #2563eb;
  --accent-soft: #1d4ed8;
  --text-primary: #0f172a;
  --text-muted: rgba(71, 85, 105, 0.9);
  --error: #dc2626;
  font-family: "Inter", "Roboto", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
/* === END HU:HU-REGISTRO-CUSTODIA === */

.registro-body {
  min-height: 100vh;
  margin: 0;
  background: #f8fafc;
  color: var(--text-primary);
  position: relative;
  overflow-x: hidden;
}

.registro-body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(180deg, rgba(10, 16, 35, 0.35), rgba(10, 16, 35, 0.65)),
    var(--registro-bg-image);
  background-size: cover;
  background-position: center;
  opacity: 0.25;
  z-index: -2;
}

.registro-body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--registro-bg-overlay);
  z-index: -1;
}

.registro-hero {
  text-align: center;
  padding: 48px 20px 12px;
}

.registro-hero__copy {
  max-width: 620px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
  text-align: center;
}

.registro-hero__title-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.registro-hero__eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.registro-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 700;
}

.registro-hero p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.registro-panel {
  display: flex;
  justify-content: center;
  padding: 12px 20px 32px;
}

.glass-card {
  width: min(760px, 96vw);
  padding: 32px;
  border-radius: 30px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  box-shadow: 0 32px 90px rgba(10, 13, 32, 0.25);
  backdrop-filter: blur(18px);
  animation: cardIn 360ms ease-out;
}

.registro-form {
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  margin: 0 auto;
}

.registro-success {
  width: min(520px, 100%);
  margin: 0 auto;
}

.registro-field {
  display: grid;
  gap: 6px;
  position: relative;
}

.registro-field label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.registro-field input,
.registro-field select {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 12px 16px;
  background: #fff;
  color: var(--text-primary);
  font-size: 1rem;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.registro-field input:focus,
.registro-field select:focus {
  outline: none;
  border-color: var(--accent-soft);
  background: rgba(255, 255, 255, 0.92);
}

.registro-field.is-invalid input,
.registro-field.is-invalid select {
  border-color: var(--error);
  background: rgba(217, 4, 41, 0.05);
}

.registro-field.is-invalid::after {
  content: attr(data-error);
  margin-top: 4px;
  font-size: 0.78rem;
  color: var(--error);
}

.registro-field.is-valid input,
.registro-field.is-valid select {
  border-color: rgba(46, 125, 50, 0.6);
  background: rgba(46, 125, 50, 0.08);
}

.registro-field.is-valid::after {
  content: "Listo";
  position: absolute;
  right: 14px;
  top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(46, 125, 50, 0.85);
}

.registro-field.is-invalid {
  animation: fieldShake 0.26s ease;
}



.registro-btn {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 1rem;
  color: #090612;
  background: linear-gradient(135deg, var(--accent), var(--accent-soft));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.registro-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(255, 77, 103, 0.4);
}

.registro-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.registro-btn.loading .btn-spinner {
  opacity: 1;
}

.registro-btn.loading .btn-label {
  opacity: 0.7;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(9, 0, 15, 0.3);
  border-top-color: #09000f;
  opacity: 0;
  animation: spin 0.9s linear infinite;
  pointer-events: none;
}

.registro-success {
  display: grid;
  gap: 12px;
  text-align: center;
  padding: 24px 12px;
}

.registro-success .material-icons {
  font-size: 48px;
  color: var(--accent-soft);
}

.registro-success h3 {
  margin: 0;
  font-size: 1.35rem;
}

.registro-success p {
  margin: 0;
  color: var(--text-muted);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fieldShake {
  25% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(2px);
  }
  75% {
    transform: translateX(-1px);
  }
  100% {
    transform: translateX(0);
  }
}

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

@media (max-width: 640px) {
  .glass-card {
    padding: 26px 20px;
    border-radius: 24px;
  }

  .registro-form,
  .registro-success {
    width: 100%;
  }

  .selfie-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .selfie-status {
    align-self: flex-start;
  }

  .registro-btn {
    width: 100%;
  }
}



.selfie-block {
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  gap: 14px;
  background: #fff;
  transition: border 0.2s ease, background 0.2s ease;
}


.selfie-trigger {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 12px 20px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.selfie-trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(67, 80, 207, 0.35);
}

.selfie-trigger.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.selfie-block.is-ready {
  border-color: rgba(46, 125, 50, 0.45);
  background: #f6fff8;
}

.selfie-block.is-error {
  border-color: rgba(217, 4, 41, 0.5);
  background: #fff5f5;
}

.selfie-trigger.is-ready {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.selfie-trigger.is-error {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}
.selfie-block--inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 14px;
}


