/* =============================================
   MARCUEFLOR — Login Mayoristas
   ============================================= */

:root {
  --green-dark:   #1e4a1e;
  --green:        #2e6b2e;
  --green-mid:    #4a9b4a;
  --green-sign:   #8db87a;
  --green-light:  #c8e6b8;
  --green-pale:   #eef7e8;
  --text:         #1a2e1a;
  --text-mid:     #4a5e4a;
  --text-light:   #7a927a;
  --white:        #ffffff;
  --error:        #c0392b;
  --transition:   .3s ease;
  --font-serif:   'Cinzel', Georgia, serif;
  --font-body:    'EB Garamond', Georgia, serif;
  --font-sans:    'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { height: 100%; }
body { font-family: var(--font-body); color: var(--text); height: 100%; overflow: hidden; }
a { color: inherit; text-decoration: none; }

/* ---- Layout dos columnas ---- */
.login-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 100vh;
  height: 100dvh;
}

/* =============================================
   LADO IZQUIERDO — branding
   ============================================= */
.login-brand {
  position: relative;
  background: var(--green-dark);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 3rem;
}

/* Decoraciones botánicas */
.brand-deco { position: absolute; inset: 0; pointer-events: none; }

.bl {
  position: absolute;
  background: rgba(141,184,122,.08);
  border-radius: 100% 0 100% 0;
  animation: bl-sway 9s ease-in-out infinite;
}
.bl--1 { width: 160px; height: 260px; top: -30px;  left: -30px;  transform: rotate(-25deg); animation-duration: 10s; }
.bl--2 { width: 100px; height: 170px; bottom: 40px; left: 20px;  transform: rotate(20deg);  animation-duration: 13s; animation-delay: -3s; }
.bl--3 { width: 200px; height: 300px; top: -40px;  right: -40px; transform: rotate(130deg); animation-duration: 11s; animation-delay: -5s; }
.bl--4 { width: 120px; height: 200px; bottom: -20px; right: 30px; transform: rotate(155deg); animation-duration: 14s; animation-delay: -2s; }

@keyframes bl-sway {
  0%,100% { opacity: .6; }
  50%      { opacity: 1; }
}

.bo {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(141,184,122,.1), transparent 70%);
  animation: bo-pulse 12s ease-in-out infinite;
}
.bo--1 { width: 500px; height: 500px; top: -150px; left: -150px; animation-delay: 0s; }
.bo--2 { width: 350px; height: 350px; bottom: -100px; right: -100px; animation-delay: -6s; }
@keyframes bo-pulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}

/* Contenido */
.brand-content {
  position: relative; z-index: 1;
  max-width: 420px;
}

.brand-eyebrow {
  font-family: var(--font-sans); font-size: .65rem; letter-spacing: .25em;
  text-transform: uppercase; color: var(--green-sign);
  margin-bottom: 1.75rem;
}

.brand-logo {
  display: block;
  font-family: var(--font-serif); font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600; color: var(--white);
  letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.brand-rule {
  display: flex; align-items: center; gap: .75rem; margin-bottom: 1.75rem;
}
.brand-rule span {
  display: block; width: 50px; height: 1px; background: rgba(141,184,122,.4);
}
.brand-rule-diamond {
  width: 5px !important; height: 5px !important;
  background: var(--green-sign) !important;
  transform: rotate(45deg);
}

.brand-tagline {
  font-family: var(--font-body); font-size: 1.05rem; font-style: italic;
  color: rgba(255,255,255,.55); line-height: 1.7; margin-bottom: 2rem;
}

.brand-features {
  list-style: none; display: flex; flex-direction: column; gap: .75rem;
}
.brand-features li {
  font-family: var(--font-sans); font-size: .8rem; color: rgba(255,255,255,.6);
  padding-left: 1.4rem; position: relative; letter-spacing: .02em;
}
.brand-features li::before {
  content: '';
  position: absolute; left: 0; top: .55em;
  width: 6px; height: 1px; background: var(--green-sign);
}

/* =============================================
   LADO DERECHO — formulario
   ============================================= */
.login-right {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem;
  background: var(--white);
  overflow-y: auto;
  gap: 1.25rem;
}

/* Tarjeta del formulario */
.login-card {
  width: 100%; max-width: 400px;
}

.login-card__header { margin-bottom: 2.25rem; }

.login-card__title {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600;
  color: var(--green-dark); letter-spacing: .06em; margin-bottom: .5rem;
}

.login-card__sub {
  font-family: var(--font-sans); font-size: .82rem; color: var(--text-light);
}

/* Formulario */
.login-form { display: flex; flex-direction: column; gap: 1.25rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-label {
  font-family: var(--font-sans); font-size: .72rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--text-mid);
}

.form-input-wrap { position: relative; }

.form-input {
  width: 100%; padding: .75rem 1rem;
  font-family: var(--font-sans); font-size: .9rem; color: var(--text);
  background: var(--white); border: 1px solid rgba(30,74,30,.2);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  border-radius: 2px;
  appearance: none;
}
.form-input::placeholder { color: var(--text-light); }
.form-input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(74,155,74,.12);
}
.form-input-wrap .form-input { padding-right: 2.75rem; }

.btn-eye {
  position: absolute; right: .75rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-light);
  padding: .25rem; transition: color var(--transition);
}
.btn-eye:hover { color: var(--green-dark); }

/* Error */
.login-error {
  display: flex; align-items: center; gap: .5rem;
  padding: .65rem 1rem;
  background: #fdf0ef; border: 1px solid rgba(192,57,43,.25);
  color: var(--error); font-family: var(--font-sans); font-size: .8rem;
}

/* Botón submit */
.btn-login {
  width: 100%; padding: .85rem 1.5rem;
  background: var(--green-dark); color: var(--white);
  font-family: var(--font-serif); font-size: .72rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: background var(--transition);
  border-radius: 2px;
}
.btn-login:hover { background: var(--green); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }

.spin {
  animation: spinner .7s linear infinite;
}
@keyframes spinner {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.login-card__note {
  margin-top: 1.75rem;
  font-family: var(--font-sans); font-size: .78rem; color: var(--text-light);
  line-height: 1.6;
}
.login-card__note a { color: var(--green-dark); text-decoration: underline; text-underline-offset: 2px; }

/* Demo banner */
.demo-banner {
  width: 100%; max-width: 400px;
  background: #fffbea; border: 1px solid rgba(200,160,0,.3);
  padding: .65rem 1rem;
  font-family: var(--font-sans); font-size: .78rem; color: #7a6000;
  line-height: 1.5;
}
.demo-banner code { background: rgba(0,0,0,.06); padding: .1rem .35rem; font-size: .75rem; }

/* Volver link */
.back-link {
  font-family: var(--font-sans); font-size: .75rem; color: var(--text-light);
  letter-spacing: .06em; transition: color var(--transition);
}
.back-link:hover { color: var(--green-dark); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  body { overflow: auto; }

  .login-page {
    grid-template-columns: 1fr;
    height: auto; min-height: 100dvh;
  }

  .login-brand {
    min-height: 220px;
    padding: 2.5rem 1.5rem;
  }

  .brand-logo { font-size: 2rem; }
  .brand-tagline { font-size: .9rem; }
  .brand-features { display: none; }

  .login-right {
    padding: 2rem 1.25rem 3rem;
    justify-content: flex-start;
  }

  .login-card, .demo-banner { max-width: 100%; }
}
