/* ============================================================
   Login / Sign-in — WhyGoLess

   This is the one screen where the brand yellow is allowed to own
   a large area. Everywhere else in the panel it is confined to
   controls, bars and halos; here it is the surface, because the
   login page is glanced at, not worked in.

   Fixes a live bug at the same time: the previous version painted
   .bg-left / .bg-right / .bg-left2 from signin_bg1-3.webp, none of
   which exist in wwwroot/Content/site/images/backgrounds/. The
   panels rendered empty. They are drawn in CSS now — no image
   assets required, nothing left to 404.
   ============================================================ */

/* ── Full-height layout ──────────────────────────────────────── */
.container-fluid,
.row { height: 100%; }

/* ── Brand panel (left) — the yellow field the logo lives on ──
      A single flat wash of the brand color, with a soft radial lift
      so a 60%-of-viewport area of saturated yellow doesn't read as
      a solid block. The eye motif is echoed as a large, very low
      contrast ring rather than an image, so it costs nothing and
      scales to any viewport.                                    ── */
.bg-left {
  background:
    radial-gradient(60% 55% at 22% 28%,
      rgba(255, 255, 255, 0.30) 0%,
      rgba(255, 255, 255, 0) 60%),
    var(--wgl-yellow);
  position: relative;
  overflow: hidden;
}
.bg-left::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -32%;
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2.5rem solid rgba(var(--wgl-black-rgb), 0.05);
  pointer-events: none;
}

/* ── Panel side (right) — the identity black, so the card reads
      against it. This is --wgl-black and not --wgl-ink2: ink2 is the
      dark ramp's *elevated surface* step (cards, inputs, the sidebar
      rail), one lightness above the page. Using it here put a second,
      slightly lighter black on screen next to the brand black, which
      read as a mismatch rather than as depth.                     ── */
.bg-right {
  background: var(--wgl-black);
  position: relative;
}
/* The brand band, straight from the source's topbar/totals chrome */
.bg-right::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 5px;
  background: var(--wgl-yellow);
}
.bg-left2 {
  background: var(--wgl-yellow);
}

/* ── Welcome content container ───────────────────────────────── */
.welcome-container {
  width: 100%;
  padding: clamp(2rem, 6vw, 7rem);
}
.welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ── Welcome text — black on yellow (13.4:1). White on this field
      would be 1.4:1, which is the whole reason the ink inverts. ── */
.welcome-text {
  color: rgba(var(--wgl-black-rgb), 0.62);
  font-family: var(--header-font);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500;
}
.cufex-text,
.slogan-text,
.customer-text,
.management-text,
.footer-text {
  font-family: var(--header-font);
  color: var(--wgl-black);
}
.cufex-text {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.customer-text,
.management-text {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.management-text {
  font-weight: 500;
}
.slogan-text {
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-weight: 400;
  margin-top: 1.25rem;
  color: rgba(var(--wgl-black-rgb), 0.72);
  max-width: 34ch;
}
.footer-text {
  font-size: 0.8rem;
  color: rgba(var(--wgl-black-rgb), 0.55);
}

/* ── Login panel ─────────────────────────────────────────────── */
.LoginPanel {
  position: absolute;
  top: 50%;
  left: 73%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 510px !important;
  max-width: 95%;
  background: var(--s-card-solid-bg);
  border: 1px solid var(--s-card-border);
  border-radius: var(--bs-border-radius-xl);
  box-shadow: var(--s-shadow-xl);
  padding: 2rem 2.25rem;
  overflow: hidden;
}
/* ── Logo — remove circle ────────────────────────────────────── */
.LoginPanel .s-form-title-logo {
  border-radius: 20px;
  background-color: transparent;
  height: auto;
  width: auto;
  max-width: 180px;
  padding: 0;
}

/* ── Strip inner property-grid card borders ──────────────────────
      .category carries the card border from components/form.css; on the
      login panel it nests a card inside a card, so it is flattened here
      rather than removed globally.                                   ── */
.LoginPanel .s-Panel,
.LoginPanel .panel-body,
.LoginPanel .s-PropertyGrid .categories,
.LoginPanel .s-PropertyGrid .category {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
}

/* ── Login title / description ───────────────────────────────── */
.login-title {
  font-family: var(--header-font);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--bs-heading-color);
  letter-spacing: -0.01em;
}
.login-desc {
  font-family: var(--header-font);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--s-category-title);
}
.login-text-color { color: var(--bs-body-color); }

/* ── Login button — same pill as the active sidebar item: identity
      yellow fill, black label (14.9:1). Matches
      --s-sidebar-active-bg / --s-sidebar-active-color, which both
      themes set to --wgl-yellow / --wgl-black.

      Hover/active step along the yellow ramp (--wgl-yellow-hi /
      --wgl-yellow-lo) rather than changing hue.                   ── */
.login-btn {
  background-color: var(--wgl-yellow);
  color: var(--wgl-black);
  height: 46px;
  width: 100%;
  display: block;
  border: none;
  border-radius: var(--bs-border-radius-lg);
  font-family: var(--header-font);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color var(--s-transition),
              box-shadow var(--s-transition),
              transform var(--s-transition);
  box-shadow: 0 4px 14px rgba(var(--wgl-yellow-rgb), 0.32);
}
.login-btn:hover {
  background-color: var(--wgl-yellow-hi);
  color: var(--wgl-black);
  box-shadow: 0 6px 20px rgba(var(--wgl-yellow-rgb), 0.42);
  transform: translateY(-1px);
}
.login-btn:active {
  background-color: var(--wgl-yellow-lo);
  transform: translateY(0);
}
/* Black ring, not yellow: the button itself is yellow now, so a yellow
   outline would be invisible against it. */
.login-btn:focus-visible {
  outline: 2px solid var(--wgl-black);
  outline-offset: 2px;
}

/* Dark theme: yellow on --wgl-ink2 (#1B1B1B) already separates on its
   own, so the fill only needs a darker ambient shadow to sit in. */
:root.theme-cosmos-dark .login-btn {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
:root.theme-cosmos-dark .login-btn:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}
/* The dark card is near-black, so the black ring would vanish against
   it — the offset gap is what reads. Use white instead. */
:root.theme-cosmos-dark .login-btn:focus-visible {
  outline-color: var(--wgl-white);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
  /* Brand panel is decorative below this width — the card is the page */
  .bg-left, .bg-left2 { display: none !important; }
  .bg-right { width: 100%; flex: 0 0 100%; max-width: 100%; }
  .LoginPanel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}
@media (min-width: 1200px) {
  .container-fluid { max-width: 2700px; margin: 0 auto; }
}

/* ===== RTL support — mirror the login panel position to match the English layout ===== */
[dir="rtl"] .LoginPanel { left: 27%; }
[dir="rtl"] .bg-left::after { right: auto; left: -12%; }
@media (max-width: 1199.98px) {
  [dir="rtl"] .LoginPanel { left: 50%; }
}
