body:has(.lg) { height: 100vh; height: 100dvh; overflow: hidden; }
.lg {
  --lg-bg: oklch(.985 0 0);
  --lg-card: var(--background);
  --lg-field: var(--background);
  --lg-line: var(--border);
  --lg-line-strong: color-mix(in oklab, var(--foreground) 16%, transparent);
  --lg-soft: var(--muted-foreground);
  --lg-faint: color-mix(in oklab, var(--foreground) 45%, transparent);
  --lg-grid: color-mix(in oklab, var(--foreground) 7%, transparent);
  --lg-shadow: 0 0 0 1px var(--lg-line-strong), 0 2px 4px rgb(0 0 0 / .03), 0 40px 80px -36px rgb(0 0 0 / .28);
  --lg-ease: cubic-bezier(.16, 1, .3, 1);

  position: relative; isolation: isolate;
  height: 100vh; height: 100dvh;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem);
  background: var(--lg-bg);
  color: var(--foreground);
  font-family: var(--font-sans);
}
html.dark .lg {
  --lg-bg: oklch(.1 0 0);
  --lg-card: oklch(.155 0 0 / .78);
  --lg-field: oklch(.2 0 0);
  --lg-line: oklch(1 0 0 / .09);
  --lg-line-strong: oklch(1 0 0 / .16);
  --lg-soft: oklch(.74 0 0);
  --lg-faint: oklch(.56 0 0);
  --lg-grid: oklch(1 0 0 / .06);
  --lg-shadow: 0 0 0 1px var(--lg-line-strong), 0 40px 80px -30px oklch(0 0 0 / .95), inset 0 1px 0 oklch(1 0 0 / .06);
}
.lg .icono { width: 1rem; height: 1rem; flex-shrink: 0; }

.lg-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background: radial-gradient(50rem 32rem at 50% 42%, color-mix(in oklab, var(--foreground) 6%, transparent), transparent 70%); }
.lg-grid { position: absolute; inset: 0;
  background-image: linear-gradient(to right, var(--lg-grid) 1px, transparent 1px), linear-gradient(to bottom, var(--lg-grid) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center center;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 55% 60% at 50% 45%, #000 20%, transparent 75%); }

.lg-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%; max-width: 80rem; min-height: 2.5rem; margin: 0 auto; }
.lg-brand { display: inline-flex; align-items: center; gap: .55rem; color: inherit; text-decoration: none; font-weight: 600; font-size: 1.0625rem; letter-spacing: -.02em; }
.lg-brand .logo { width: 1.6rem; height: 1.6rem; }
.lg-ghost { display: inline-flex; align-items: center; gap: .3rem; height: 2.25rem; padding: 0 .75rem; border-radius: var(--radius-md); color: var(--lg-soft); font-size: .875rem; font-weight: 500; text-decoration: none; transition: background-color .15s, color .15s; }
.lg-ghost:hover { background: color-mix(in oklab, var(--foreground) 7%, transparent); color: var(--foreground); }
.lg-ghost .icono { width: .95rem; height: .95rem; }

.lg-stage { display: grid; place-items: center; min-height: 0; padding: 1rem 0; }
.lg-card {
  width: 100%; max-width: 25.5rem;
  padding: clamp(1.5rem, 4vh, 2.5rem) clamp(1.25rem, 4vw, 2.25rem);
  border-radius: 1.25rem;
  background: var(--lg-card);
  box-shadow: var(--lg-shadow);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  animation: lg-in .6s var(--lg-ease) both;
}
.lg-head h1 { margin: 0; font-size: 1.625rem; line-height: 1.2; font-weight: 600; letter-spacing: -.03em; }
.lg-head p { margin: .375rem 0 0; color: var(--lg-soft); font-size: .9375rem; }

.lg-form { display: flex; flex-direction: column; gap: 1rem; margin-top: clamp(1.25rem, 3.5vh, 1.75rem); }
.lg-group label { display: block; margin-bottom: .5rem; font-size: .875rem; font-weight: 500; }
.lg-field { position: relative; }
.lg-ic { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); display: flex; color: var(--lg-faint); pointer-events: none; transition: color .15s; }
.lg-field:focus-within .lg-ic { color: var(--foreground); }
.lg-field input {
  width: 100%; height: 2.75rem; padding: 0 .875rem 0 2.625rem;
  border: 1px solid var(--lg-line-strong); border-radius: var(--radius);
  background: var(--lg-field); color: var(--foreground);
  font: inherit; font-size: .9375rem; outline: none;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.lg-field input#password { padding-right: 2.875rem; }
.lg-field input::placeholder { color: var(--lg-faint); }
.lg-field input:hover { border-color: color-mix(in oklab, var(--foreground) 26%, transparent); }
.lg-field input:focus { border-color: color-mix(in oklab, var(--foreground) 50%, transparent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--foreground) 10%, transparent); }
.lg-field input:-webkit-autofill { -webkit-text-fill-color: var(--foreground); -webkit-box-shadow: 0 0 0 40px var(--lg-field) inset; caret-color: var(--foreground); }
.lg-eye { position: absolute; right: .3125rem; top: 50%; transform: translateY(-50%); width: 2.125rem; height: 2.125rem; display: flex; align-items: center; justify-content: center; border: 0; border-radius: .5rem; background: transparent; color: var(--lg-faint); cursor: pointer; transition: background-color .15s, color .15s; }
.lg-eye:hover { background: color-mix(in oklab, var(--foreground) 7%, transparent); color: var(--foreground); }

.lg-error { margin: 0; color: var(--destructive); font-size: .875rem; }
.lg-btn {
  width: 100%; height: 2.75rem; margin-top: .25rem;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  border: 0; border-radius: var(--radius);
  background: var(--primary); color: var(--primary-foreground);
  font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer;
  transition: background-color .15s, transform .08s;
}
.lg-btn:hover { background: color-mix(in oklab, var(--primary) 88%, transparent); }
.lg-btn:active { transform: scale(.985); }
.lg-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.lg-btn:disabled { cursor: wait; opacity: .85; }

.lg-help { margin: clamp(1.25rem, 3.5vh, 1.75rem) 0 0; padding-top: 1.25rem; border-top: 1px solid var(--lg-line); color: var(--lg-faint); font-size: .875rem; }

.lg-foot { margin: 0 auto; color: var(--lg-faint); font-size: .78rem; text-align: center; }

@keyframes lg-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 479.98px) { .lg { padding: 1rem; } .lg-card { border-radius: 1rem; } }
@media (max-height: 560px) { .lg-help, .lg-foot { display: none; } }
@media (prefers-reduced-motion: reduce) { .lg-card { animation: none; } }
