/* =====================================================================
   GICS sign-in page - standalone stylesheet.

   Self-contained, exactly like site-public.css: it deliberately does NOT
   touch site.css (the signed-in app shell). It reuses the same brand-green
   tokens as the internal app (copied, not imported) so the sign-in screen
   feels like the front door to that app, then presents a refined two-panel
   card - a branded aside on the left, the credential form on the right.

   No external fonts or CDN calls (this ships as a real deployed app that
   may run on an intranet); every icon is inline SVG in the markup, every
   texture an inline gradient - never a network request. Bootstrap's
   stylesheet is still linked by _LoginLayout for the unobtrusive-validation
   classes (input-validation-error, validation-summary-valid); the rules
   below override its look.
   ===================================================================== */

:root {
  --lg-darkest: #0b2417;
  --lg-darker: #10331c;
  --lg-dark: #1b5e31;
  --lg-green: #2e8b45;
  --lg-accent: #3fae57;
  --lg-soft: #e6f4e9;
  --lg-mist: #f5f9f5;

  --lg-ink: #1d2b21;
  --lg-ink-soft: #566458;
  --lg-ink-faint: #8a978c;
  --lg-line: #e0e8e1;
  --lg-danger: #c0392b;

  --lg-font: "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --lg-font-display: "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  --lg-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

body.login-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--lg-font);
  color: var(--lg-ink);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(920px 540px at 20% 30%, rgba(84, 178, 114, 0.55), transparent 60%),
    radial-gradient(760px 520px at 84% 6%, rgba(9, 44, 26, 0.55), transparent 55%),
    radial-gradient(720px 640px at 94% 98%, rgba(7, 33, 21, 0.7), transparent 60%),
    linear-gradient(150deg, #1c6035 0%, #123c22 55%, #0b2417 100%);
}

.login-body ::selection { background: rgba(63, 174, 87, 0.25); }
.login-body :focus-visible { outline: 3px solid rgba(63, 174, 87, 0.55); outline-offset: 2px; border-radius: 6px; }

/* ---------- Card shell ---------- */

.login-card {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 34px 90px rgba(6, 26, 15, 0.42), 0 6px 16px rgba(6, 26, 15, 0.18);
  display: flex;
  overflow: hidden;
  min-height: 520px;
}

/* ---------- Left: branded aside ---------- */

.login-aside {
  position: relative;
  isolation: isolate;
  flex: 0 0 46%;
  padding: 3.35rem 2.9rem;
  color: #eaf4ec;
  display: flex;
  flex-direction: column;
  background: linear-gradient(158deg, #206e3a 0%, #123f22 100%);
  overflow: hidden;
}
/* soft glow, upper right */
.login-aside::before {
  content: "";
  position: absolute;
  top: -28%;
  right: -22%;
  width: 78%;
  height: 62%;
  background: radial-gradient(circle, rgba(63, 174, 87, 0.55), transparent 65%);
  filter: blur(8px);
  z-index: -1;
}
/* fine dotted texture fading in from the right edge */
.login-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1.1px, transparent 1.1px);
  background-size: 17px 17px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 58%);
  mask-image: linear-gradient(to left, #000, transparent 58%);
  opacity: 0.55;
  z-index: -1;
  pointer-events: none;
}

.login-logo {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-logo svg { width: 30px; height: 30px; }

/* Uploaded company logo (Administration -> Company Settings) variant of
   .login-logo above - the plain icon badge is semi-transparent white,
   fine for a white-stroke SVG glyph but not enough backing for a full-color
   logo on this same dark green aside, so this swaps in a solid white card
   sized to the image's own aspect ratio instead of the fixed 60x60 square.
   Falls back to the plain .login-logo badge/SVG whenever no logo has been
   uploaded - see Views/Account/Login.cshtml's companyLogoDataUri. */
.login-logo.login-logo-img {
  width: auto;
  height: auto;
  background: #ffffff;
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0.75rem;
}
.login-logo.login-logo-img img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.login-aside h1 {
  font-family: var(--lg-font-display);
  font-size: 1.72rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 1.7rem 0 0;
  color: #ffffff;
}

.login-tagline {
  margin: 0.85rem 0 0;
  color: #cfe6d5;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 24ch;
}

.login-features {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}
.login-features li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.94rem;
  line-height: 1.45;
  color: #e2f0e6;
}
.login-features li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 0.42rem;
  border-radius: 50%;
  background: var(--lg-accent);
  box-shadow: 0 0 0 3px rgba(63, 174, 87, 0.22);
}

.login-aside-footer {
  margin-top: auto;
  padding-top: 2.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(207, 230, 213, 0.62);
}

/* ---------- Right: form panel ---------- */

.login-main {
  flex: 1;
  padding: 3.35rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-main h2 {
  font-family: var(--lg-font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--lg-darker);
  margin: 0 0 0.4rem;
}
.login-sub {
  color: var(--lg-ink-soft);
  font-size: 0.98rem;
  margin: 0 0 2rem;
}

/* Validation summary - hidden by unobtrusive validation when there are no
   model-level errors (validation-summary-valid). */
.login-validation {
  background: #fdecea;
  border: 1px solid #f3cfca;
  border-left: 3px solid #d9534f;
  border-radius: 11px;
  padding: 0.7rem 0.95rem;
  margin-bottom: 1.25rem;
  color: #9a271b;
  font-size: 0.88rem;
}
.login-validation.validation-summary-valid { display: none; }
.login-validation ul { margin: 0; padding: 0; list-style: none; }
.login-validation ul li { line-height: 1.45; }

.lg-field { margin-bottom: 1.15rem; }

.lg-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lg-darker);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
}

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

.lg-input-icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--lg-green);
  display: flex;
  pointer-events: none;
}
.lg-input-icon svg { width: 20px; height: 20px; }

.lg-input-wrap input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--lg-line);
  border-radius: 13px;
  background: var(--lg-mist);
  padding: 0 1rem 0 2.85rem;
  font-family: var(--lg-font);
  font-size: 0.98rem;
  color: var(--lg-ink);
  transition: border-color 0.18s var(--lg-ease), box-shadow 0.18s var(--lg-ease), background 0.18s var(--lg-ease);
}
.lg-input-wrap input.lg-has-toggle { padding-right: 3rem; }
.lg-input-wrap input::placeholder { color: var(--lg-ink-faint); }
.lg-input-wrap input:focus {
  outline: none;
  border-color: var(--lg-accent);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(63, 174, 87, 0.16);
}
.lg-input-wrap input.input-validation-error {
  border-color: #e0736a;
  background: #fdf4f3;
}
.lg-input-wrap input.input-validation-error:focus {
  box-shadow: 0 0 0 4px rgba(217, 83, 79, 0.15);
}

.lg-eye {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--lg-ink-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  transition: color 0.15s var(--lg-ease), background 0.15s var(--lg-ease);
}
.lg-eye:hover { color: var(--lg-dark); background: var(--lg-soft); }
.lg-eye svg { width: 20px; height: 20px; }
.lg-eye .lg-eye-off { display: none; }
.lg-eye.is-visible .lg-eye-open { display: none; }
.lg-eye.is-visible .lg-eye-off { display: block; }

.lg-field .field-validation-error,
.lg-field .text-danger {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.8rem;
  color: var(--lg-danger);
}

.lg-remember {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.4rem 0 1.65rem;
}
.lg-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--lg-green);
  cursor: pointer;
  margin: 0;
}
.lg-remember label {
  font-size: 0.9rem;
  color: var(--lg-ink-soft);
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.lg-submit {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--lg-green) 0%, var(--lg-dark) 100%);
  color: #ffffff;
  font-family: var(--lg-font);
  font-size: 1.02rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 10px 24px rgba(27, 94, 49, 0.3);
  transition: transform 0.18s var(--lg-ease), box-shadow 0.18s var(--lg-ease), filter 0.18s var(--lg-ease);
}
.lg-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(27, 94, 49, 0.38); filter: brightness(1.03); }
.lg-submit:active { transform: translateY(0); }
.lg-submit svg { width: 19px; height: 19px; transition: transform 0.18s var(--lg-ease); }
.lg-submit:hover svg { transform: translateX(3px); }

.login-note {
  margin: 1.7rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--lg-ink-faint);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .login-card { flex-direction: column; max-width: 440px; min-height: 0; }
  .login-aside { flex: none; padding: 2.6rem 2rem 2.4rem; }
  .login-aside h1 { font-size: 1.5rem; }
  .login-tagline { max-width: none; }
  .login-main { padding: 2.6rem 2rem; }
}

@media (max-width: 480px) {
  body.login-body { padding: 1rem; }
  .login-aside { padding: 2.2rem 1.6rem 2rem; }
  .login-main { padding: 2.2rem 1.6rem; }
  .login-features { gap: 0.85rem; }
}

/* ---------- Motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
  .lg-submit:hover { transform: none; }
}
