/* =============================================================================
 * login.css — PRM ERP sign-in
 * Split layout: brand panel on the left, a single sign-in card on the right.
 * Built on the app's tokens so light and dark themes both work.
 * ===========================================================================*/
:root {
  --lg-green: #0d7a45;
  --lg-green-2: #16a34a;
  --lg-green-deep: #0a3a28;
}
.lg-body { margin: 0; background: var(--bg-primary); -webkit-font-smoothing: antialiased; }
.lg-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 44%) minmax(0, 1fr); }

/* ---- brand panel ---- */
.lg-brand {
  position: relative; overflow: hidden; color: #fff; padding: 44px 56px;
  display: flex; flex-direction: column; gap: 40px;
  background:
    radial-gradient(900px 520px at -10% 110%, rgba(34,197,94,.30), transparent 60%),
    radial-gradient(640px 420px at 115% -10%, rgba(16,185,129,.22), transparent 60%),
    linear-gradient(165deg, var(--lg-green-deep) 0%, #0c5236 55%, #0d6e40 100%);
}
.lg-brand::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .06;
  background-image: linear-gradient(rgba(255,255,255,.7) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.7) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.lg-brand > * { position: relative; z-index: 1; }

/* Decorative route line */
.lg-route { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 0 !important; pointer-events: none; }
.lg-route path { fill: none; stroke: rgba(255,255,255,.10); stroke-width: 22; stroke-linecap: round; }
.lg-route path.dash { stroke: rgba(255,255,255,.35); stroke-width: 2; stroke-dasharray: 10 14; animation: lg-drive 18s linear infinite; }
.lg-route circle { fill: #4ade80; filter: drop-shadow(0 0 8px rgba(74,222,128,.8)); }
@keyframes lg-drive { to { stroke-dashoffset: -480; } }

.lg-brand-top { display: flex; align-items: center; gap: 13px; }
.lg-mark {
  width: 46px; height: 46px; border-radius: 13px; flex: 0 0 46px;
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.lg-mark.sm { width: 40px; height: 40px; flex-basis: 40px; font-size: 16px; border-radius: 11px;
  background: linear-gradient(135deg, var(--lg-green), var(--lg-green-2)); border: 0;
  box-shadow: 0 6px 14px rgba(13,122,69,.28); }
.lg-co { font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.lg-co-sub { font-size: 12px; opacity: .7; margin-top: 1px; }

.lg-hero { margin: auto 0; max-width: 470px; }
.lg-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18); color: #bbf7d0;
}
.lg-hero h2 { font-size: 34px; line-height: 1.18; font-weight: 700; letter-spacing: -.025em; margin: 18px 0 0; }
.lg-hero p { margin: 14px 0 0; font-size: 15px; line-height: 1.65; opacity: .78; }
.lg-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
.lg-points li { display: flex; align-items: center; gap: 12px; font-size: 14px; opacity: .92; }
.lg-points i {
  width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; display: grid; place-items: center;
  font-size: 12.5px; background: rgba(255,255,255,.10); color: #86efac;
}
.lg-brand-foot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; font-size: 12px; opacity: .62; }
.lg-brand-foot i { margin-right: 6px; }

/* ---- form side ---- */
.lg-main {
  position: relative; display: flex; align-items: center; justify-content: center; padding: 40px 24px;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(13,122,69,.06), transparent 70%),
    var(--bg-primary);
}
.lg-theme {
  position: absolute; top: 20px; right: 20px; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-card, var(--bg-secondary)); color: var(--text-secondary);
  cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.lg-theme:hover { color: var(--lg-green); border-color: var(--lg-green); }

.lg-card {
  width: 100%; max-width: 420px; padding: 40px 38px 30px; border-radius: 18px;
  background: var(--bg-card, var(--bg-secondary)); border: 1px solid var(--border-light, var(--border));
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 18px 48px -12px rgba(15,23,42,.14);
  animation: lg-rise .45s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes lg-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
[data-theme="dark"] .lg-card { box-shadow: 0 18px 48px -12px rgba(0,0,0,.55); }

.lg-mobile-brand { display: none; align-items: center; gap: 11px; margin-bottom: 28px; color: var(--text-primary); }
.lg-mobile-brand b { display: block; font-size: 15px; }
.lg-mobile-brand small { display: block; font-size: 11.5px; color: var(--text-muted); }

.lg-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--text-primary); margin: 0; }
.lg-sub { font-size: 14px; color: var(--text-secondary); margin: 6px 0 26px; line-height: 1.5; }

.lg-alert {
  display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 10px;
  font-size: 13px; line-height: 1.45; margin-bottom: 18px;
  background: rgba(220,38,38,.08); color: #b91c1c; border: 1px solid rgba(220,38,38,.22);
}
.lg-alert i { margin-top: 2px; }
[data-theme="dark"] .lg-alert { color: #f87171; }
.lg-shake { animation: lg-shake .38s ease; }
@keyframes lg-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.lg-field { margin-bottom: 18px; }
.lg-field label, .lg-label-row label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 7px; }
.lg-label-row { display: flex; justify-content: space-between; align-items: baseline; }
.lg-input { position: relative; display: flex; align-items: center; }
.lg-input > i { position: absolute; left: 15px; font-size: 13px; color: var(--text-muted); pointer-events: none; transition: color .15s; }
.lg-input input {
  width: 100%; height: 48px; padding: 0 46px 0 42px; border-radius: 11px; font-size: 14.5px;
  border: 1px solid var(--border); background: var(--bg-primary); color: var(--text-primary);
  transition: border-color .15s, box-shadow .15s, background .15s; font-family: inherit;
}
.lg-input input::placeholder { color: var(--text-muted); }
.lg-input input:hover { border-color: var(--text-muted); }
.lg-input input:focus { outline: none; border-color: var(--lg-green); background: var(--bg-card, var(--bg-secondary)); box-shadow: 0 0 0 4px rgba(13,122,69,.12); }
.lg-input:focus-within > i { color: var(--lg-green); }
.lg-input input[aria-invalid="true"] { border-color: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.10); }
/* Keep browser autofill on-theme */
.lg-input input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--bg-primary) inset; -webkit-text-fill-color: var(--text-primary); }
.lg-eye {
  position: absolute; right: 7px; width: 34px; height: 34px; border-radius: 8px; border: 0;
  background: transparent; color: var(--text-muted); cursor: pointer;
}
.lg-eye:hover { color: var(--text-primary); background: var(--bg-hover); }
.lg-caps { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b45309; margin-top: 7px; font-weight: 600; }

.lg-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 22px; }
.lg-check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none; }
.lg-check input { width: 16px; height: 16px; accent-color: var(--lg-green); cursor: pointer; }

.lg-btn {
  width: 100%; height: 50px; border: 0; border-radius: 11px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 15px; font-weight: 600; color: #fff; font-family: inherit; letter-spacing: .01em;
  background: linear-gradient(135deg, var(--lg-green), var(--lg-green-2));
  box-shadow: 0 10px 22px -8px rgba(13,122,69,.55); transition: transform .12s, box-shadow .15s, filter .15s, opacity .12s;
}
.lg-btn i { transition: transform .15s; }
.lg-btn:hover:not(:disabled) { filter: brightness(1.05); box-shadow: 0 14px 26px -8px rgba(13,122,69,.6); }
.lg-btn:hover:not(:disabled) .fa-arrow-right { transform: translateX(3px); }
.lg-btn:active:not(:disabled) { transform: translateY(1px); }
.lg-btn:focus-visible { outline: 3px solid rgba(13,122,69,.35); outline-offset: 2px; }
.lg-btn:disabled { opacity: .75; cursor: progress; }

.lg-link { background: none; border: 0; padding: 0; cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--lg-green); font-family: inherit; }
.lg-link:hover { text-decoration: underline; }
.lg-help {
  display: flex; gap: 9px; margin: -4px 0 18px; padding: 11px 13px; border-radius: 10px; font-size: 12.5px;
  line-height: 1.5; color: var(--text-secondary); background: var(--bg-tertiary); border: 1px solid var(--border-light, var(--border));
}
.lg-help i { color: var(--lg-green); margin-top: 2px; }
.lg-secure {
  display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--border-light, var(--border)); font-size: 12px; color: var(--text-muted);
}
.lg-secure i { color: var(--lg-green); }

/* ---- responsive ---- */
@media (max-width: 1100px) { .lg-brand { padding: 36px 40px; } .lg-hero h2 { font-size: 29px; } }
@media (max-width: 960px) {
  .lg-shell { grid-template-columns: minmax(0, 1fr); }
  .lg-brand { display: none; }
  .lg-main { min-height: 100vh; min-height: 100dvh; }
  .lg-mobile-brand { display: flex; }
}
@media (max-width: 520px) {
  .lg-main { padding: 72px 16px 24px; align-items: flex-start; }
  .lg-card { padding: 28px 22px 22px; border-radius: 16px; }
  .lg-title { font-size: 23px; }
  .lg-theme { top: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-card, .lg-shake, .lg-route path.dash { animation: none; }
}

/* Component display rules must not override the [hidden] attribute. */
.lg-alert[hidden], .lg-help[hidden], .lg-caps[hidden] { display: none !important; }

/* ---- Minimal brand panel: company name + slogan only ------------------- */
.lg-brand { justify-content: center; align-items: center; text-align: center; }
.lg-hero { margin: 0; max-width: none; display: flex; flex-direction: column; align-items: center; }
.lg-mark.lg { width: 76px; height: 76px; flex-basis: 76px; border-radius: 20px; font-size: 32px; margin-bottom: 22px; }
.lg-hero h2 { font-size: 40px; margin: 0; letter-spacing: -.02em; }
.lg-slogan { margin: 12px 0 0; font-size: 16px; font-weight: 500; letter-spacing: .02em; opacity: .8; }
.lg-slogan::before { content: ''; display: block; width: 44px; height: 3px; border-radius: 3px; margin: 0 auto 14px; background: #4ade80; }
