/* ===== Pantallas de ingreso: mismo diseño para todos los accesos ===== */
:root {
  --lg-primary: #1f7a4d;
  --lg-primary-dark: #186240;
  --lg-ink: #1b2b24;
  --lg-muted: #4a5a52;
  --lg-line: #cdd8d2;
  --lg-bg: #f3f6f4;
  --lg-danger: #c4261b;
  --lg-accent: #14b8a6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

.lg-body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--lg-ink);
  background: var(--lg-bg);
  min-height: 100vh;
}
.lg-body a { color: inherit; }
.lg-body button, .lg-body input { font: inherit; }
.lg-body :focus-visible { outline: 2px solid var(--lg-primary); outline-offset: 2px; }

/* ---------- Estructura: panel de marca + formulario ---------- */
.lg-shell { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; }

.lg-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: 48px;
  color: #fff;
  background: linear-gradient(160deg, #12372a 0%, #1f5c43 62%, #0f766e 140%);
}
.lg-admin .lg-brand { background: linear-gradient(160deg, #0d2a20 0%, #184d37 60%, #1f7a4d 140%); }
.lg-brand::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  pointer-events: none;
}
.lg-logo { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; }
.lg-logo svg { width: 44px; height: 44px; fill: none; stroke: #a8e0c4; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lg-brand-body { max-width: 460px; position: relative; z-index: 1; }
.lg-brand-body h2 { margin: 0 0 12px; font-size: 34px; line-height: 1.15; font-weight: 700; }
.lg-brand-body p { margin: 0; font-size: 17px; color: #d3eadf; }
.lg-brand-pie { font-size: 13px; color: #a9cdbb; position: relative; z-index: 1; }

.lg-main { display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.lg-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  border-top: 4px solid var(--lg-primary);
  box-shadow: 0 8px 28px rgba(18, 55, 42, .12);
  padding: 32px 28px;
}

.lg-titulo { margin: 0 0 6px; font-size: 26px; font-weight: 700; color: #14573a; }
.lg-sub { margin: 0 0 22px; color: var(--lg-muted); }

/* ---------- Campos ---------- */
.lg-field { margin-bottom: 16px; }
.lg-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }

.lg-input-wrap { position: relative; display: flex; align-items: center; }
.lg-input-wrap > svg {
  position: absolute; left: 14px;
  width: 20px; height: 20px;
  fill: none; stroke: #6f7f77; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  pointer-events: none;
}
.lg-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 46px 10px 44px;
  border: 1.5px solid var(--lg-line);
  border-radius: 10px;
  background: #fff;
  color: var(--lg-ink);
}
.lg-input::placeholder { color: #86928b; }
.lg-input:focus { outline: none; border-color: var(--lg-primary); box-shadow: 0 0 0 3px rgba(31, 122, 77, .18); }
.input-validation-error { border-color: var(--lg-danger); }

.lg-eye {
  position: absolute; right: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 0; border-radius: 8px; background: transparent; cursor: pointer;
}
.lg-eye svg { width: 20px; height: 20px; fill: none; stroke: #55655d; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-eye:hover { background: #e4f1ea; }
.lg-eye[aria-pressed="true"] svg { stroke: var(--lg-primary); }

.lg-error { display: block; margin-top: 5px; font-size: 13px; color: var(--lg-danger); }
.lg-error:empty { display: none; }
.lg-ayuda { display: block; margin-top: 5px; font-size: 13px; color: var(--lg-muted); }

.lg-fila { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 20px; font-size: 14px; }
.lg-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.lg-check input { width: 18px; height: 18px; accent-color: var(--lg-primary); }

.lg-link { color: var(--lg-primary); font-weight: 600; text-decoration: none; }
.lg-link:hover { text-decoration: underline; }
.lg-pie { margin: 22px 0 0; text-align: center; font-size: 14px; color: var(--lg-muted); }

/* ---------- Botón ---------- */
.lg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 10px 18px;
  border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--lg-primary) 0%, #2f9a68 100%);
  color: #fff; font-weight: 600; font-size: 16px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(31, 122, 77, .30);
}
.lg-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-btn:hover { background: linear-gradient(135deg, var(--lg-primary-dark) 0%, var(--lg-primary) 100%); }

/* ---------- Avisos ---------- */
.lg-alert {
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px; padding: 12px 14px;
  border-radius: 10px; border-left: 5px solid; font-size: 14px;
}
.lg-alert svg { width: 22px; height: 22px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lg-alert-ok { background: #dcf5e4; border-color: #1f9d4d; color: #14532d; }
.lg-alert-error { background: #fde0dd; border-color: var(--lg-danger); color: #7a1912; }
.lg-alert-aviso { background: #fff1cc; border-color: #d99a00; color: #5c3a00; }

/* ---------- Celular y tablet: el panel de marca pasa arriba y se achica ---------- */
@media (max-width: 900px) {
  .lg-shell { grid-template-columns: 1fr; min-height: 0; }
  .lg-brand { padding: 26px 20px 30px; gap: 16px; align-items: center; text-align: center; border-radius: 0 0 24px 24px; }
  .lg-brand-body { max-width: 340px; margin: 0 auto; }
  .lg-brand-body h2 { font-size: 21px; line-height: 1.25; margin-bottom: 8px; text-wrap: balance; }
  .lg-brand-body p { font-size: 14px; line-height: 1.5; text-wrap: balance; }
  .lg-brand-pie, .lg-brand::after { display: none; }
  .lg-logo { font-size: 20px; justify-content: center; gap: 10px; }
  .lg-logo svg { width: 34px; height: 34px; }
  .lg-main { padding: 20px 16px 32px; align-items: flex-start; }
  .lg-card { padding: 24px 20px; }
}

/* ---------- Registro de empresa: tarjeta más ancha con dos columnas ---------- */
.lg-card-ancha { max-width: 640px; }
.lg-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.lg-grid .lg-full { grid-column: 1 / -1; }
@media (max-width: 640px) { .lg-grid { grid-template-columns: 1fr; } }
.lg-input.lg-sin-icono { padding-left: 14px; }
.lg-hecho { text-align: center; }
.lg-hecho svg { width: 56px; height: 56px; fill: none; stroke: var(--lg-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 8px; }
