:root {
  --brand: #0aa6c5;
  --brand-dark: #078aa3;
  --text: #3e3e3e;
  --muted: #8e8e8e;
  --line: rgba(0,0,0,.12);
  --panel: rgba(255,255,255,.72);
  --shadow: 0 20px 60px rgba(0,0,0,.15);
  --radius: 28px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: #0b0f14;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 1.2fr;
}

/* ---- LADO IZQUIERDO ---- */
.auth__left {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(18px, 3vw, 40px);
  background: radial-gradient(1200px 700px at 20% 15%, rgba(255,255,255,.92), rgba(235,245,248,.80));
  overflow: hidden;
}

.auth__left::before {
  content: "";
  position: absolute;
  width: 350px; height: 350px;
  background: rgba(10,166,197,0.08);
  border-radius: 50%;
  top: -80px; right: -80px;
  animation: floatBubble 6s ease-in-out infinite;
}

.auth__left::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(10,166,197,0.05);
  border-radius: 50%;
  bottom: 40px; left: -60px;
  animation: floatBubble 8s ease-in-out infinite reverse;
}

/* ---- PANEL ---- */
.panel {
  width: min(520px, 100%);
  padding: clamp(18px, 3.2vw, 36px);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.6);
  position: relative;
  z-index: 1;
  animation: slideUp 0.7s ease forwards;
}

/* ---- LOGO ---- */
.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 80px;
  margin-bottom: 20px;
  animation: fadeDown 0.6s ease forwards;
}

.brand__logo {
  width: 500px;
  height: auto;
  display: block;
  object-fit: contain;
  transform: translate(-110px, 5px);
  pointer-events: none;
}

/* ---- TÍTULOS ---- */
h1 {
  font-size: clamp(30px, 4vw, 40px);
  margin: 0;
  color: #3a3a3a;
  animation: fadeLeft 0.6s ease 0.1s both;
}

.subtitle {
  margin: 10px 0 18px;
  color: #6c6c6c;
  line-height: 1.4;
  font-size: 16px;
  animation: fadeLeft 0.6s ease 0.2s both;
}

/* ---- CAMPOS ---- */
.field {
  display: flex;
  flex-direction: column;
  margin-bottom: 2px;
  animation: fadeLeft 0.6s ease both;
}

.field:nth-child(1) { animation-delay: 0.25s; }
.field:nth-child(2) { animation-delay: 0.32s; }
.field:nth-child(3) { animation-delay: 0.39s; }
.field:nth-child(4) { animation-delay: 0.46s; }

.input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.80);
  border: 1.5px solid var(--line);
  margin-bottom: 2px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10,166,197,0.15);
  background: #fff;
}

.input input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 16px;
  color: var(--text);
}

.input input::placeholder { color: #aaa; }

/* Estados de validación */
.input--error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 2px rgba(239,68,68,0.15) !important;
}

.input--ok {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.15) !important;
}

/* Iconos */
.input__icon svg { fill: #aaa; transition: fill 0.3s; }
.input:focus-within .input__icon svg { fill: var(--brand); }

/* ---- ERROR POR CAMPO ---- */
.field-error {
  font-size: 12px;
  color: #ef4444;
  min-height: 16px;
  padding-left: 14px;
  margin-bottom: 2px;
}

/* ---- BARRA DE FORTALEZA ---- */
.strength-bar {
  display: none;
  gap: 3px;
  margin: 8px 4px 3px;
  height: 5px;
}

.strength-bar.visible { display: flex; }

.strength-bar span {
  flex: 1;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 0.3s;
}

/* ---- TEXTO DE FORTALEZA ---- */
.strength-text {
  display: none;
  font-size: 12px;
  font-weight: 600;
  margin: 3px 0 4px 4px;
  transition: color 0.3s;
}

.strength-text.visible { display: block; }

/* ---- REQUISITOS ---- */
.req-list {
  list-style: none;
  padding: 8px 14px;
  margin: 2px 0 14px;
  display: none;
  flex-direction: column;
  gap: 5px;
  background: rgba(255,255,255,0.7);
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
}

.req-list.visible { display: flex; }

.req-list li {
  font-size: 12.5px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s;
}

.req-list li.ok { color: #16a34a; }

.req-list li::before {
  content: '✗';
  font-weight: bold;
  font-size: 13px;
  color: #ef4444;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.req-list li.ok::before {
  content: '✓';
  color: #22c55e;
}

/* ---- BOTÓN ---- */
.btn {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  animation: fadeUp 0.6s ease 0.5s both;
  box-shadow: 0 4px 20px rgba(10,166,197,0.35);
  margin-top: 6px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(10,166,197,0.45);
}

.btn:active { transform: translateY(0); }

/* ---- FOOTER ---- */
.footer {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: #888;
  animation: fadeUp 0.6s ease 0.6s both;
}

.link {
  color: var(--brand);
  font-weight: bold;
  text-decoration: none;
}

.link:hover { text-decoration: underline; }

/* ---- LADO DERECHO ---- */
.auth__right {
  background-image: url("../img/fondo-pagina.png");
  background-size: cover;
  background-position: center;
  animation: zoomFade 1.2s ease forwards;
}

/* ---- OJO ---- */
.input__action {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 5px;
  color: #bbb;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.input__action svg { fill: currentColor; }
.input__action:hover { color: var(--brand); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- ANIMACIONES ---- */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-15px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes zoomFade {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-20px); }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__right { min-height: 40vh; order: -1; }
  .brand__logo { transform: translate(0,0); margin: 0 auto; width: 200px; }
}