/* ============================================================
   Next Salud — Páginas de autenticación
   ============================================================ */

body.auth-body {
  min-height: 100vh;
  background: var(--stone);
  display: flex;
  align-items: stretch;
  padding: 0;
}

/* ── Layout split ───────────────────────────────────────── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ── Panel izquierdo (marca) ────────────────────────────── */
.auth-brand {
  background: var(--stone);
  padding: 3.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  width: 480px; height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(122,158,126,0.15);
  top: -160px; right: -160px;
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 320px; height: 320px;
  border-radius: 50%;
  border: 1px solid rgba(122,158,126,0.1);
  bottom: -80px; left: -80px;
  pointer-events: none;
}

.auth-brand-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: white;
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}
.auth-brand-logo span { color: var(--sage-mid); }

.auth-brand-content {
  position: relative;
  z-index: 1;
}

.auth-brand-content h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 2.8vw, 2.6rem);
  font-weight: 500;
  color: white;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}
.auth-brand-content h1 em { color: var(--sage-mid); font-style: italic; }

.auth-brand-content p {
  font-size: 1rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.75;
  font-weight: 300;
  max-width: 340px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.auth-feature-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(122,158,126,0.18);
  color: var(--sage-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.auth-feature span {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}

.auth-brand-footer {
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.25);
}

/* ── Panel derecho (formulario) ─────────────────────────── */
.auth-form-panel {
  background: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--stone-mid);
  text-decoration: none;
  font-size: 0.84rem;
  margin-bottom: 2rem;
  transition: color 0.2s;
}
.auth-back:hover { color: var(--sage); }

.auth-card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--stone);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--stone-mid);
  font-weight: 300;
  margin-bottom: 2rem;
}

/* ── Campos con icono ───────────────────────────────────── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .input-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--stone-mid);
  font-size: 0.85rem;
  pointer-events: none;
  z-index: 1;
}

.input-wrap input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1.5px solid rgba(74,69,64,0.15);
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--stone);
  background: white;
  outline: none;
  transition: border-color 0.2s;
}
.input-wrap input:focus { border-color: var(--sage); }
.input-wrap input.has-eye { padding-right: 2.8rem; }

.input-eye {
  position: absolute;
  right: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--stone-mid);
  font-size: 0.85rem;
  padding: 0.25rem;
  transition: color 0.15s;
  display: flex;
  align-items: center;
}
.input-eye:hover { color: var(--sage); }

/* ── Fila de label con enlace ───────────────────────────── */
.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}
.form-label-row label { margin-bottom: 0; }
.form-forgot {
  font-size: 0.8rem;
  color: var(--stone-mid);
  text-decoration: none;
  transition: color 0.2s;
}
.form-forgot:hover { color: var(--sage); }

/* ── Nota de campo opcional ─────────────────────────────── */
.field-hint {
  font-size: 0.78rem;
  color: var(--stone-mid);
  margin-top: 0.4rem;
  line-height: 1.5;
}

/* ── Botón principal de auth ────────────────────────────── */
.btn-auth {
  width: 100%;
  background: var(--sage);
  color: white;
  border: none;
  padding: 0.9rem 1.5rem;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}
.btn-auth:hover { background: #6A8E6E; transform: translateY(-1px); }
.btn-auth:active { transform: translateY(0); }

/* ── Enlace de cambio de flujo ──────────────────────────── */
.auth-switch {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.88rem;
  color: var(--stone-mid);
}
.auth-switch a {
  color: var(--sage);
  text-decoration: none;
  font-weight: 500;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Divisor ────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: rgba(74,69,64,0.3);
  font-size: 0.8rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(74,69,64,0.12);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand  { display: none; }
  .auth-form-panel {
    background: var(--stone);
    align-items: flex-start;
    padding: 2rem 1.5rem 3rem;
  }
  .auth-card h2  { color: white; }
  .auth-subtitle { color: rgba(255,255,255,0.55); }
  .auth-back     { color: rgba(255,255,255,0.5); }
  .auth-back:hover { color: var(--sage-mid); }
  .input-wrap input { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); color: white; }
  .input-wrap input::placeholder { color: rgba(255,255,255,0.3); }
  .input-wrap input:focus { border-color: var(--sage-mid); }
  .input-wrap .input-icon { color: rgba(255,255,255,0.4); }
  .form-label-row label,
  .form-group label { color: rgba(255,255,255,0.7); }
  .form-forgot { color: rgba(255,255,255,0.4); }
  .auth-switch { color: rgba(255,255,255,0.4); }
  .field-hint  { color: rgba(255,255,255,0.35); }
  .alert-error   { background: rgba(192,57,43,0.15); border-color: rgba(192,57,43,0.2); color: #E88; }
  .alert-success { background: rgba(46,125,82,0.15); border-color: rgba(46,125,82,0.2); color: #7D9; }
  .auth-card { max-width: 100%; }
}
