/* ============================================================================
   LOGIN-NUEVO.CSS  —  "Clinical Premium"
   Tipografía: Syne (display) + DM Sans (body)
   ============================================================================ */

:root {
  --login-font-display: 'Syne', 'Arial Black', sans-serif;
  --login-font-body: 'DM Sans', 'Source Sans Pro', Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--login-font-body);
}

body.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  box-sizing: border-box;

  /* Fondo: mesh gradient + micro-grid */
  background-color: #e8f4ee;
  background-image:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(0,155,89,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 75%, rgba(0,112,64,0.10) 0%, transparent 60%),
    linear-gradient(rgba(0,155,89,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,155,89,0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}

/* ============================================================================
   CARD
   ============================================================================ */

.login-card {
  background: white;
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(0,155,89,0.1),
    0 24px 64px rgba(0, 80, 40, 0.14),
    0 4px 16px rgba(0,0,0,0.06);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: loginEntry 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes loginEntry {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Header: logo sobre blanco con borde verde ---- */

.login-card-top {
  background: white;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  border-bottom: 2px solid var(--brand-primary);
  position: relative;
}

/* Línea de acento verde en el borde superior */
.login-card::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-primary) 0%, #00c875 100%);
}

.login-card-logo {
  max-height: 56px;
  max-width: 200px;
  object-fit: contain;
  mix-blend-mode: multiply; /* elimina fondo blanco del PNG sobre fondo blanco */
}

/* ---- Body del formulario ---- */

.login-card-body {
  padding: 2rem 2rem 1.5rem;
}

.login-title {
  font-family: var(--login-font-body);
  font-size: 1.55rem;
  font-weight: 600;
  color: #0d2318;
  margin: 0 0 0.3rem 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-subtitle {
  font-size: 0.85rem;
  color: #6a9078;
  margin: 0 0 1.75rem 0;
  line-height: 1.5;
  font-weight: 400;
}

/* ============================================================================
   CAMPOS
   ============================================================================ */

.login-field {
  margin-bottom: 1.2rem;
}

.login-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2a4035;
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.login-field input {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  font-family: var(--login-font-body);
  border: 1.5px solid #d0e5d8;
  border-radius: 10px;
  color: #0d2318;
  background: #f7fdf9;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.login-field input:focus {
  outline: none;
  border-color: var(--brand-primary);
  background: white;
  box-shadow: 0 0 0 3.5px rgba(0,155,89,0.12);
}

.login-field input::placeholder {
  color: #a0bcac;
  font-size: 0.9rem;
}

.login-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.76rem;
  color: #8aaa96;
  line-height: 1.55;
  font-style: italic;
}

/* ============================================================================
   BOTÓN INGRESAR
   ============================================================================ */

.btn-login {
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  font-family: var(--login-font-body);
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: linear-gradient(120deg, var(--brand-primary) 0%, #007843 100%);
  color: white;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(0,155,89,0.3);
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,155,89,0.38);
}

.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,155,89,0.2);
}

/* ============================================================================
   FOOTER DE CARD
   ============================================================================ */

.login-card-footer {
  text-align: center;
  padding: 0.9rem 2rem 1.1rem;
  font-size: 0.72rem;
  color: #a0bcac;
  border-top: 1px solid #eef6f1;
  letter-spacing: 0.01em;
}

/* ============================================================================
   MODAL ADULTO / RECIÉN NACIDO
   ============================================================================ */

.modal-content {
  border-radius: 16px;
  border: none;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}

.modal-header {
  background: var(--brand-primary);
  color: white;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
  font-family: var(--login-font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  letter-spacing: -0.01em;
}

.modal-header .close {
  color: white;
  opacity: 0.75;
  text-shadow: none;
  font-size: 1.4rem;
}

.modal-header .close:hover { opacity: 1; }

.modal-body {
  padding: 1.6rem 1.5rem;
}

.modal-body p {
  color: #2a4035;
  margin-bottom: 1.2rem;
  line-height: 1.55;
  font-size: 0.9rem;
}

.modal-footer {
  border-top: 1px solid #eef6f1;
  padding: 0.9rem 1.5rem;
}

.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  border-radius: 8px !important;
  font-family: var(--login-font-body) !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  padding: 0.55rem 1.4rem !important;
  letter-spacing: 0.02em !important;
}

.btn-primary:hover {
  background-color: #007843 !important;
  border-color: #007843 !important;
}

.form-check {
  padding-left: 0;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-check-input {
  position: static;
  margin: 0;
  accent-color: var(--brand-primary);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.form-check-label {
  cursor: pointer;
  font-weight: 400;
  color: #2a4035;
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 480px) {
  body.login-page {
    padding: 1rem;
    align-items: flex-start;
    padding-top: 1.5rem;
  }

  .login-card { border-radius: 16px; }

  .login-card-top { padding: 1.5rem 1.5rem 1.25rem; }
  .login-card-logo { max-height: 48px; }

  .login-card-body { padding: 1.5rem 1.5rem 1.25rem; }
  .login-title { font-size: 1.45rem; }

  .login-field input { font-size: 16px; } /* Previene zoom iOS */
  .btn-login { padding: 0.85rem; }
}
