:root {
  --primary: #ad1457;
  --primary-hover: #880e4f;
  --accent: #ec407a;
  --bg-soft: #fce4ec;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(173, 20, 87, 0.12);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 0% 0%, #fff0f5 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #ffe1ec 0%, transparent 60%),
    #fafafa;
}

.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 20px;
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: var(--radius);
  padding: 28px 24px 24px;
  box-shadow: var(--shadow);
}

.logo {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 20px;
}

h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}
.sub {
  margin: 0 0 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
form label span {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

input {
  /* 16px es el mínimo para evitar zoom al enfocar en iOS. */
  font-size: 16px;
  padding: 12px 14px;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  font-family: inherit;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
}
input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(173, 20, 87, 0.15);
}

button {
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  min-height: 48px;
}
button.primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
button.primary:hover { background: var(--primary-hover); }
button.primary:active { transform: translateY(1px); }
button.block { width: 100%; margin-top: 6px; }

.error {
  margin: 14px 0 0;
  padding: 10px 12px;
  background: #fee2e2;
  color: var(--danger);
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin: 0;
}

/* En pantallas muy pequeñas damos un poco más de espacio. */
@media (max-width: 360px) {
  .login-card { padding: 22px 18px; }
  h1 { font-size: 20px; }
}
