/* =========================
   COLEMEX - Login Cliente
   BLANCO: formulario | OSCURO: logo
   ========================= */

:root{
  --gold:#C8A24A;
  --gold-soft: rgba(200,162,74,.14);

  --bg-overlay: rgba(0,0,0,.42);

  /* Blanco institucional */
  --left-bg:#F7F8FA;
  --left-text:#141414;
  --left-muted: rgba(20,20,20,.70);

  /* Oscuro institucional */
  --right-top: rgba(20,25,30,.92);
  --right-bottom: rgba(52,59,68,.92);

  --radius: 18px;
  --shadow: 0 18px 45px rgba(0,0,0,.25);

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 44px;
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
  margin: 0;
}

body{
  font-family: 'Merriweather', serif;
  background: url("../assets/mazo-libro.png") center/cover no-repeat fixed;
  position: relative;
}

/* Overlay general */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: -1;
}

/* =========================
   CONTENEDOR SPLIT
   ========================= */
.login-container{
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

/* =========================
   IZQUIERDA → FORMULARIO (BLANCO)
   ========================= */
.login-formulario{
  background: var(--left-bg);
  color: var(--left-text);

  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: clamp(24px, 4vw, 56px);
}

/* Título */
.login-formulario h2{
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 2.6vw, 30px);
  color: var(--gold);
  margin: 0 0 8px;
  text-align: center;
  letter-spacing: .6px;
}

/* Subtexto */
.subtexto{
  text-align: center;
  color: var(--left-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

/* Error */
.mensaje-error{
  background: rgba(220,53,69,.12);
  border: 1px solid rgba(220,53,69,.35);
  color: #8b0000;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Formulario */
form{
  width: min(420px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

/* Inputs */
input{
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.20);
  background: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

input::placeholder{
  color: rgba(0,0,0,.45);
}

input:focus{
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-soft);
}

/* Botón */
button{
  margin-top: 8px;
  background: var(--gold);
  color: #111;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  letter-spacing: .4px;

  padding: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;

  box-shadow: 0 10px 18px rgba(0,0,0,.18);
  transition: transform .15s ease, filter .2s ease;
}

button:hover{
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* Links */
.acciones{
  margin-top: 12px;
  font-size: 13px;
  text-align: center;
}

.acciones a{
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 2px solid rgba(200,162,74,.55);
}

.acciones a:hover{
  border-bottom-color: rgba(200,162,74,.95);
}

/* =========================
   DERECHA → LOGO (OSCURO)
   ========================= */
.login-logo{
  position: relative;
  background: linear-gradient(180deg, var(--right-top), var(--right-bottom));
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 4vw, 56px);
}

/* Watermark */
.login-logo::before{
  content:"";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(200,162,74,.18), transparent 55%),
    radial-gradient(circle at 30% 80%, rgba(0,0,0,.45), transparent 55%);
  pointer-events: none;
}

/* Logo */
.login-logo img{
  width: min(420px, 85%);
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 14px 22px rgba(0,0,0,.45));
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 900px){
  .login-container{
    grid-template-columns: 1fr;
  }

  .login-logo{
    order: -1;
    padding: 26px 16px;
  }

  .login-logo img{
    width: min(300px, 80%);
  }

  .login-formulario{
    padding: 26px 16px;
  }
}

@media (max-width: 480px){
  form{
    width: 100%;
  }

  button{
    width: 100%;
  }
}
