/* Inicio de sesión - RAMCODES INGENIERIA */
:root {
  --lg-green-dark: #06532c;
  --lg-green: #059233;
  --lg-green-light: #7ac143;
  --lg-blue: #2b5994;
  --lg-ink: #14261c;
  --lg-muted: #64736a;
  --lg-line: #dbe5de;
  --lg-bg: #f3f7f4;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color: var(--lg-ink);
  background: var(--lg-bg);
  -webkit-font-smoothing: antialiased;
}

.lg { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }

/* ---- Panel de imagen ---- */
.lg-hero {
  position: relative; overflow: hidden; color: #fff;
  background: #06532c url('../construction.jpg') center/cover no-repeat;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 52px;
}
.lg-hero::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(160deg, rgba(4,52,28,.93) 0%, rgba(6,83,44,.82) 45%, rgba(5,146,51,.55) 100%);
}
/* capas del terreno: estratos de suelo, guiño al laboratorio */
.lg-strata { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; pointer-events: none; }
.lg-strata svg { width: 100%; height: 100%; display: block; }
.lg-hero > * { position: relative; z-index: 1; }

.lg-brand { display: flex; align-items: center; gap: 14px; }
.lg-brand-mark {
  width: 46px; height: 46px; border-radius: 12px; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.lg-brand-mark img { width: 34px; height: 34px; object-fit: contain; }
.lg-brand-name { font-weight: 800; letter-spacing: .08em; font-size: 15px; line-height: 1.1; }
.lg-brand-name small { display: block; font-weight: 500; letter-spacing: .14em; font-size: 10px; opacity: .8; margin-top: 3px; }

.lg-copy { max-width: 520px; margin-bottom: 8vh; }
.lg-copy h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.12; font-weight: 800; margin: 0 0 16px; letter-spacing: -.01em; }
.lg-copy h1 span { color: var(--lg-green-light); }
.lg-copy p { font-size: 16px; line-height: 1.6; opacity: .9; margin: 0 0 26px; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.lg-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 13px; font-weight: 600;
}
.lg-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--lg-green-light); display: inline-block; }
.lg-foot-hero { font-size: 12px; opacity: .7; }

/* ---- Panel del formulario ---- */
.lg-panel {
  display: flex; align-items: center; justify-content: center; padding: 32px 24px;
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(122,193,67,.14), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(43,89,148,.08), transparent 60%),
    var(--lg-bg);
}
.lg-card {
  width: 100%; max-width: 410px; background: #fff; border-radius: 22px;
  padding: 38px 36px 30px;
  box-shadow: 0 1px 2px rgba(15,42,67,.06), 0 18px 50px rgba(6,83,44,.12);
  animation: lg-in .55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes lg-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.lg-logo { text-align: center; margin-bottom: 18px; }
.lg-logo img { height: 92px; max-width: 100%; object-fit: contain; }
.lg-card h2 { margin: 0 0 4px; text-align: center; font-size: 22px; font-weight: 800; color: var(--lg-green-dark); }
.lg-sub { margin: 0 0 24px; text-align: center; font-size: 14px; color: var(--lg-muted); }

.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #3d4f44; margin-bottom: 6px; }
.lg-input { position: relative; }
.lg-input svg.lg-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #8a9a90; pointer-events: none; transition: color .2s; }
.lg-input input {
  width: 100%; height: 48px; padding: 0 44px 0 44px; font-size: 15px; font-family: inherit; color: var(--lg-ink);
  background: #f7faf8; border: 1.5px solid var(--lg-line); border-radius: 12px; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-input input::placeholder { color: #a3b0a8; }
.lg-input input:focus { background: #fff; border-color: var(--lg-green); box-shadow: 0 0 0 4px rgba(5,146,51,.14); }
.lg-input:focus-within svg.lg-ico { color: var(--lg-green); }
.lg-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px;
  border: 0; border-radius: 9px; background: transparent; color: #8a9a90; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: background .2s, color .2s;
}
.lg-eye:hover { background: #eaf3ec; color: var(--lg-green-dark); }
.lg-eye svg { width: 19px; height: 19px; }
.lg-caps { display: none; margin-top: 6px; font-size: 12px; color: #8a5a00; font-weight: 600; }
.lg-caps.on { display: block; }

.lg-error {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 11px 14px; border-radius: 12px;
  background: #fde8e8; color: #a12020; font-size: 14px; font-weight: 600;
  animation: lg-shake .4s ease both;
}
.lg-error svg { width: 18px; height: 18px; flex: 0 0 18px; }
@keyframes lg-shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

.lg-btn {
  position: relative; width: 100%; height: 50px; margin-top: 6px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 700; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, var(--lg-green-dark), var(--lg-green));
  box-shadow: 0 8px 20px rgba(5,146,51,.28);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.lg-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(5,146,51,.34); filter: brightness(1.04); }
.lg-btn:active { transform: translateY(0); }
.lg-btn:disabled { cursor: progress; filter: saturate(.85); transform: none; }
.lg-btn .lg-spin { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: lg-rot .7s linear infinite; margin-right: 8px; vertical-align: -3px; }
.lg-btn.loading .lg-spin { display: inline-block; }
@keyframes lg-rot { to { transform: rotate(360deg); } }

.lg-secure { margin: 20px 0 0; text-align: center; font-size: 12px; color: var(--lg-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.lg-secure svg { width: 14px; height: 14px; color: var(--lg-green); }
.lg-copyright { margin-top: 14px; text-align: center; font-size: 12px; color: #93a299; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-hero { display: none; }
  .lg-panel { min-height: 100vh; padding: 20px 16px; }
  .lg-card { padding: 30px 22px 24px; border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-card, .lg-error { animation: none; }
  * { transition: none !important; }
}
