@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

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

:root {
  --verde:        #2d6a4f;
  --verde-oscuro: #1c7c3a;
  --verde-claro:  #52b788;
  --verde-bg:     #edfaf3;
  --verde-borde:  #a8e6c3;
  --fondo:        #f4f7f5;
  --blanco:       #ffffff;
  --texto:        #1a2e1a;
  --texto-suave:  #5a7a5a;
  --borde:        #dde8e2;
  --radio:        16px;
}

body {
  background: var(--fondo);
  font-family: 'DM Sans', Arial, Helvetica, sans-serif;
  color: var(--texto);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  display: block;
}

/* ── App wrapper: ocupa toda la pantalla en móvil ── */
.app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  box-shadow: none;
  border-radius: 0;
  padding: 0;
}

/* ── En pantallas grandes, centrar como tarjeta ── */
@media (min-width: 520px) {
  body {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    background:
      linear-gradient(rgba(200,220,210,0.4), rgba(0,0,0,0.25)),
      url("fondo.png") no-repeat center center,
      linear-gradient(200deg, #e8f5ee, #d4edd9);
    background-size: 600px auto;
  }

  .app {
    border-radius: 24px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.22);
    min-height: auto;
    overflow: hidden;
  }
}

/* ── Header ── */
header {
  background: linear-gradient(145deg, #1a3d2b 0%, #2d6a4f 60%, #3d8b65 100%);
  padding: 2.2rem 1.4rem 1.8rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Ccircle cx='30' cy='30' r='20' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

header::after {
  content: '⛳';
  position: absolute;
  font-size: 6rem;
  opacity: 0.05;
  right: -0.5rem;
  top: -0.5rem;
  line-height: 1;
}

header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.45rem;
  color: #ffffff;
  letter-spacing: -0.01em;
  margin-bottom: 0.3rem;
  position: relative;
}

header p {
  color: rgba(255,255,255,0.68);
  font-size: 0.84rem;
  position: relative;
}

/* ── Info section ── */
.info {
  background: var(--blanco);
  margin: 1rem 0.5rem 0;
  border-radius: var(--radio);
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--borde);
}

.info h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--verde);
  margin-bottom: 0.4rem;
}

.info p {
  font-size: 0.84rem;
  color: var(--texto-suave);
  line-height: 1.55;
}

/* ── Login card ── */
.login {
  background: var(--blanco);
  margin: 0.75rem 0.5rem;
  border-radius: var(--radio);
  padding: 1.4rem 1.2rem;
  border: 1px solid var(--borde);
}

.login h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 1rem;
}

/* ── Form ── */
form {
  display: flex;
  flex-direction: column;
}

/* ── Inputs ── */
input,
select {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: 1.5px solid var(--borde);
  border-radius: 9px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--texto);
  background: #fafcfb;
  margin-bottom: 0.7rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

input:focus,
select:focus {
  border-color: var(--verde-claro);
  background: var(--blanco);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

input::placeholder {
  color: #b4c8bc;
}

/* ── Botón principal ── */
button[type="submit"],
button#btnEntrar,
button#btnRecuperar,
button#btnCambiar {
  width: 100%;
  padding: 0.82rem;
  background: linear-gradient(135deg, var(--verde) 0%, var(--verde-claro) 100%);
  color: white;
  border: none;
  border-radius: 9px;
  font-size: 0.97rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(45,106,79,0.28);
  letter-spacing: 0.01em;
}

button[type="submit"]:hover,
button#btnEntrar:hover {
  opacity: 0.91;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(45,106,79,0.36);
}

button[type="submit"]:disabled,
button#btnEntrar:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ── Separador ── */
.separador {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 1rem 0 0.8rem;
  color: #aec4b6;
  font-size: 0.82rem;
}

.separador::before,
.separador::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--borde);
}

.separador span {
  white-space: nowrap;
  font-size: 0.80rem;
  color: #aec4b6;
}

/* ── Botón Crear cuenta ── */
.btn-registro {
  display: block;
  width: 100%;
  padding: 0.78rem;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  color: var(--verde);
  background: transparent;
  border: 2px solid var(--verde);
  border-radius: 9px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.15s;
}

.btn-registro:hover {
  background: var(--verde-bg);
  transform: translateY(-1px);
}

/* ── Footer ── */
footer {
  margin-top: auto;
  text-align: center;
  padding: 1.2rem 1rem;
  font-size: 0.78rem;
  color: #aec4b6;
}
