/* reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* body */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f6fa;
  padding: 40px 16px;
}

/* tarjeta central */
.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(15,31,46,0.09);
  padding: 48px 52px;
  width: 100%;
  animation: fadeUp 0.5s ease both;
}

/* logo */
.logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.logo-wrap img {
  height: 80px;
  width: auto;
}

/* encabezado */
.card h2 {
  font-size: 28px;
  font-weight: 700;
  color: #0f1f2e;
  margin-bottom: 4px;
  text-align: center;
}

.subtitle {
  font-size: 14px;
  color: #8a9bb0;
  margin-bottom: 32px;
  text-align: center;
}

/* inputs */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #3a4f63;
  margin-bottom: 7px;
}

.input-wrap { position: relative; }

.input-wrap i {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  color: #b0bec8;
  pointer-events: none;
  transition: color 0.2s;
}

.input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid #e2eaf0;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #0f1f2e;
  background: #f8fbfd;
  outline: none;
  transition: all 0.2s;
}

.input-wrap input:focus {
  border-color: #2c5f7f;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(44,95,127,0.08);
}

/* toggle contraseña */
.toggle-pw {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  left: unset;
  pointer-events: all;
  cursor: pointer;
  font-size: 13px;
  color: #b0bec8;
  transition: color 0.2s;
}

.toggle-pw:hover { color: #2c5f7f; }

/* boton submit */
.btn-submit {
  width: 100%;
  padding: 14px;
  background: #2c5f7f;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.01em;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(44,95,127,0.25);
}

.btn-submit:active { transform: translateY(0); }

/* links de navegacion (registro / login) */
.register-link,
.login-link {
  text-align: center;
  font-size: 13px;
  color: #8a9bb0;
  margin-top: 16px;
}

.register-link a,
.login-link a {
  color: #2c5f7f;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.register-link a:hover,
.login-link a:hover { opacity: 0.7; }

/* mensajes de feedback */
.error-msg {
  background: #fff0ee;
  border: 1px solid #fcd5cf;
  color: #c0392b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: none;
}

.success-msg {
  background: #e6f7f5;
  border: 1px solid #a7e3dc;
  color: #0d6b62;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
  display: none;
}

/* animacion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* responsive */
@media (max-width: 540px) {
  .card { padding: 36px 24px; margin: 16px; }
  .form-row { grid-template-columns: 1fr; }
}