/* Login — Estilo Oficial Salud / Materna */
:root {
  --color-principal: #630b32;
  --color-secundario: #9d224a;
  --color-boton-enfasis: #630b32;
  --color-boton-hover: rgba(99, 11, 50, 0.07);
  --color-focus-ring: rgba(99, 11, 50, 0.2);
  --sagyc-panel-border: rgba(99, 11, 50, 0.12);
  --login-radius: 20px;
  --login-radius-sm: 12px;
  --login-ease: cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Mismo fondo difuso y tint que Salud */
.sagyc-backdrop {
  position: fixed;
  inset: -64px;
  z-index: -2;
  pointer-events: none;
  background-image: var(--sagyc-bg-image, url('../fondo/F13.jpg'));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(48px) saturate(1.45) brightness(1.05);
  transform: scale(1.1);
}

.sagyc-backdrop-tint {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 248, 250, 0.12) 50%, rgba(240, 245, 255, 0.15) 100%),
    radial-gradient(ellipse at 15% 8%, rgba(99, 11, 50, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 88% 92%, rgba(157, 34, 74, 0.05) 0%, transparent 45%);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
}

body.login-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f7f3f5;
  color: #2d3436;
  padding: 20px;
  position: relative;
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
}

.login-card {
  background: #ffffff;
  border-radius: var(--login-radius);
  border: 1px solid var(--sagyc-panel-border);
  box-shadow: 0 1px 2px rgba(30, 20, 28, 0.04), 0 16px 48px rgba(30, 20, 28, 0.12);
  padding: 2.5rem 2.25rem;
  width: 100%;
  position: relative;
  overflow: hidden;
  animation: login-card-in 0.35s var(--login-ease) both;
}

@keyframes login-card-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Línea institucional superior guinda / rosa */
.login-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #630b32, #9d224a);
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.brand-logo {
  width: 90px;
  height: 90px;
  background: #ffffff;
  border: 1px solid rgba(99, 11, 50, 0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 12px rgba(99, 11, 50, 0.08);
  padding: 10px;
}

.brand-logo img {
  max-width: 100%;
  height: auto;
}

.brand-name {
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-principal);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.brand-subtitle {
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

/* Formularios flotantes estilo Salud */
.form-floating {
  position: relative;
  margin-bottom: 1rem;
}

.form-floating > .form-control {
  height: 52px;
  background: #ffffff;
  border: 1px solid rgba(99, 11, 50, 0.14);
  border-radius: var(--login-radius-sm);
  padding-left: 2.85rem;
  font-size: 0.95rem;
  color: #2d3436;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-floating > label {
  padding-left: 2.85rem;
  color: #6b7280;
  font-size: 0.88rem;
}

.form-floating > .form-control:focus {
  background: #fff;
  border-color: var(--color-principal);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
  outline: none;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8c8c;
  z-index: 10;
  font-size: 1rem;
  transition: color 0.15s ease;
}

.form-floating:focus-within .input-icon {
  color: var(--color-principal);
}

/* Botón institucional Salud */
.btn-submit {
  background: var(--color-principal);
  color: #fff;
  border: 1px solid rgba(99, 11, 50, 0.85);
  border-radius: var(--login-radius-sm);
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.98rem;
  width: 100%;
  cursor: pointer;
  transition: transform 0.15s var(--login-ease), box-shadow 0.15s ease, filter 0.15s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(99, 11, 50, 0.25);
}

.btn-submit:hover {
  background: var(--color-secundario);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99, 11, 50, 0.32);
  color: #fff;
}

.demo-credentials {
  background: rgba(99, 11, 50, 0.03);
  border: 1px dashed rgba(99, 11, 50, 0.2);
  border-radius: var(--login-radius-sm);
  padding: 0.9rem;
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: #4b5563;
}

.demo-credentials code {
  color: var(--color-principal);
  font-weight: 600;
  background-color: rgba(99, 11, 50, 0.08);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(99, 11, 50, 0.08);
  font-size: 0.78rem;
  color: #9ca3af;
}
