/* =========================================================================
   Samo ERP v2 — login page only (views/site/login.php, mockups/v2-Login.dc.html)
   Colours come from tokens.css. The hero panel is navy in BOTH themes (docs/01), so its
   few fixed colours are defined once here and nowhere else.
   ========================================================================= */
:root {
  --lg-hero: #12141A;          /* hero card background, always */
  --lg-hero-ink: #FFFFFF;      /* hero headline / threads */
  --lg-hero-t2: #B4BECE;       /* hero subline */
  --lg-hero-t3: #D7DEEA;       /* hero chips */
  --lg-glow: #FFB599;          /* travelling highlight on the threads, loader */
}

.lg-body { margin: 0; background: var(--s-bg); color: var(--s-ink); font-family: var(--s-font); font-size: 15px; line-height: 1.5; -webkit-text-size-adjust: 100%; }
.lg, .lg * { box-sizing: border-box; }
.lg [hidden] { display: none !important; }
.lg {
  position: relative; overflow: hidden; min-height: 100vh; min-height: 100dvh; padding: 24px;
  display: flex; flex-wrap: wrap; gap: 24px; background: var(--s-bg); transition: background-color .3s, color .3s;
}
.lg a { color: var(--s-accent-ink); text-decoration: none; }
.lg a:hover { text-decoration: underline; }

/* soft drifting glows behind everything */
.lg-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.lg-blob--a { top: -220px; right: -160px; width: 680px; height: 680px; background: radial-gradient(circle, rgba(255, 94, 0, .20), rgba(255, 94, 0, 0) 65%); animation: lg-drift 22s ease-in-out infinite; }
.lg-blob--b { bottom: -260px; left: 32%; width: 620px; height: 620px; background: radial-gradient(circle, rgba(253, 166, 0, .16), rgba(253, 166, 0, 0) 65%); animation: lg-drift 28s ease-in-out infinite reverse; }

/* ---------- Hero ---------------------------------------------------------- */
.lg-hero {
  position: relative; flex: 1 1 560px; min-height: 560px; overflow: hidden; border-radius: 32px;
  background: var(--lg-hero); color: var(--lg-hero-ink); padding: 44px 48px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  animation: s-rise .7s var(--s-ease) both;
}
.lg-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.lg-brand__logo { width: 44px; height: 44px; border-radius: 14px; background: var(--s-logo); display: grid; place-items: center; color: var(--lg-hero-ink); }
.lg-brand__name { font-weight: 800; font-size: 22px; letter-spacing: .06em; }
.lg-brand__tag { height: 24px; padding: 0 10px; border-radius: 12px; background: rgba(255, 255, 255, .10); color: var(--lg-hero-t3); font-size: 12px; font-weight: 700; line-height: 24px; letter-spacing: .04em; }

.lg-threads { position: absolute; left: 0; right: 0; top: 112px; bottom: 250px; }
.lg-threads svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }

.lg-hero__text { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 18px; max-width: 620px; }
.lg-hero__title { margin: 0; font-weight: 700; font-size: 46px; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; animation: s-rise .8s .15s var(--s-ease) both; }
.lg-hero__sub { margin: 0; color: var(--lg-hero-t2); font-size: 17px; max-width: 520px; animation: s-rise .8s .25s var(--s-ease) both; }
.lg-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lg-chip { height: 34px; padding: 0 14px; border-radius: 17px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); color: var(--lg-hero-t3); font-size: 13px; font-weight: 600; line-height: 32px; animation: s-rise .6s var(--s-ease) both; }

/* ---------- Right side ---------------------------------------------------- */
.lg-side { position: relative; flex: 1 1 420px; min-width: 0; padding: 8px 8px 0; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.lg-tools { width: 100%; max-width: 440px; display: flex; justify-content: flex-end; gap: 8px; }
.lg-iconbtn, .lg-lang { border: 1px solid var(--s-panel-line); background: var(--s-panel); border-radius: 14px; color: var(--s-ink); }
.lg-iconbtn { width: 46px; height: 46px; display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit; transition: background .2s, color .2s; }
.lg-iconbtn:hover { background: var(--s-soft); }
.lg-iconbtn > span { display: grid; place-items: center; }
.lg-ico-sun { display: none !important; }
html[data-theme="dark"] .lg-ico-sun { display: grid !important; }
html[data-theme="dark"] .lg-ico-moon { display: none !important; }
.lg-lang { display: flex; gap: 2px; padding: 4px; }
.lg a.lg-lang__btn { height: 36px; min-width: 48px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--s-text-2); font-size: 13px; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.lg a.lg-lang__btn:hover { color: var(--s-ink); }
.lg a.lg-lang__btn[aria-current] { background: var(--s-primary); color: var(--s-primary-ink); }

.lg-stage { flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; }
.lg-card {
  position: relative; width: 100%; max-width: 440px; overflow: hidden; padding: 40px; border-radius: 28px;
  background: var(--s-panel); border: 1px solid var(--s-panel-line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 40px 80px -40px rgba(23, 37, 64, .38); animation: s-rise .7s .1s var(--s-ease) both;
}
.lg-card.is-shake { animation: s-shake .45s ease-in-out; }
.lg-card.is-leaving { animation: s-leave .4s ease-in both; }

.lg-form { margin: 0; display: flex; flex-direction: column; gap: 22px; }
.lg-title { margin: 0; font-weight: 800; font-size: 30px; letter-spacing: -.03em; }
.lg-subtitle { margin-top: 4px; color: var(--s-text-2); }

.lg-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--s-bad-bg); background: color-mix(in srgb, var(--s-error) 12%, transparent); color: var(--s-error); font-size: 14px; font-weight: 600; animation: s-rise .3s ease-out both; }

.lg-label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; color: var(--s-text-2); }
.lg-fld {
  display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-radius: 14px; font-weight: 400;
  background: var(--s-field); border: 1px solid var(--s-field-line); color: var(--s-text-3);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.lg-fld--pw { padding-right: 6px; }
.lg-fld:focus-within { border-color: var(--s-accent); box-shadow: var(--s-focus-ring); }
.lg-fld.is-error, .lg-fld.is-error:focus-within { border-color: var(--s-error); }
.lg-fld.is-error:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--s-error) 20%, transparent); }
.lg-fld svg { flex: none; }
.lg-fld input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 500; color: var(--s-ink); }
.lg-fld input::placeholder { color: var(--s-text-3); }
.lg-fld input:-webkit-autofill { -webkit-text-fill-color: var(--s-ink); box-shadow: 0 0 0 40px var(--s-field) inset; }
.lg-eye { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--s-text-3); display: grid; place-items: center; cursor: pointer; padding: 0; }
.lg-eye:hover { color: var(--s-ink); background: var(--s-soft); }
.lg-eye span { display: grid; place-items: center; }
.lg button:focus-visible, .lg a:focus-visible { outline: 2px solid var(--s-accent); outline-offset: 2px; }

.lg-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.lg-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; color: var(--s-text-2); cursor: pointer; }
.lg-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--s-accent); }
.lg a.lg-link { display: flex; align-items: center; min-height: 44px; font-weight: 700; }

.lg-submit {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 56px; border: 0; border-radius: 16px;
  background: var(--s-primary); color: var(--s-primary-ink); font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: transform .18s var(--s-ease), box-shadow .18s, background .18s;
}
.lg-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px rgba(17, 26, 46, .55); }
.lg-submit:active { transform: translateY(0) scale(.99); }
.lg-submit[aria-busy="true"] { pointer-events: none; }
.lg-submit__idle, .lg-submit__busy { display: inline-flex; align-items: center; justify-content: center; gap: 12px; }
.lg-loader path:nth-child(odd) { stroke: var(--lg-glow); }
.lg-loader path:nth-child(even) { stroke: currentColor; }
.lg a.lg-qr { align-self: center; font-size: 13px; font-weight: 700; color: var(--s-text-2); }

/* ---------- Success state --------------------------------------------------- */
.lg-bar { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--s-track); }
.lg-bar__fill { height: 4px; background: var(--s-accent); transform-origin: left; animation: lg-bar 1.5s cubic-bezier(.4, 0, .2, 1) both; }
.lg-done { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 0 8px; text-align: center; }
.lg-done__icon { animation: lg-pop .5s var(--s-ease) both; }
.lg-done__circle { stroke-dasharray: 208; stroke-dashoffset: 208; animation: lg-draw .6s ease-out forwards; }
.lg-done__tick { stroke-dasharray: 40; stroke-dashoffset: 40; animation: lg-draw .35s .5s ease-out forwards; }
.lg-done__text { animation: s-rise .5s .3s ease-out both; }
.lg-done__title { font-weight: 800; font-size: 26px; letter-spacing: -.02em; }
.lg-done__sub { margin-top: 4px; color: var(--s-text-2); }
.lg-dots i { font-style: normal; animation: lg-dots 1.2s infinite; }
.lg-dots i:nth-child(2) { animation-delay: .2s; }
.lg-dots i:nth-child(3) { animation-delay: .4s; }
.lg a.lg-done__go { margin-top: 4px; color: var(--s-text-2); font-size: 13px; font-weight: 700; animation: s-rise .5s .9s ease-out both; }

.lg-foot { padding: 8px 0 12px; color: var(--s-text-2); font-size: 13px; }

/* ---------- Keyframes (the shared ones — s-rise, s-shake, s-leave, s-flow — live in samo-v2.css) ---- */
@keyframes lg-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-60px, 40px) scale(1.08); } }
@keyframes lg-comet { from { stroke-dashoffset: 980; } to { stroke-dashoffset: 0; } }
@keyframes lg-draw { to { stroke-dashoffset: 0; } }
@keyframes lg-bar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lg-pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes lg-dots { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------- Responsive -------------------------------------------------------- */
@media (max-width: 1000px) {
  .lg-hero { min-height: 420px; padding: 36px; }
  .lg-hero__title { font-size: 38px; }
  .lg-threads { bottom: 230px; }
}
@media (max-width: 720px) {
  /* hero becomes a short band above the form */
  .lg { padding: 12px; gap: 12px; }
  .lg-hero { flex: 1 1 100%; min-height: 0; padding: 20px 20px 22px; border-radius: 24px; gap: 14px; }
  .lg-brand__logo { width: 38px; height: 38px; border-radius: 12px; }
  .lg-threads { top: 0; bottom: 0; }
  .lg-hero__title { font-size: 24px; letter-spacing: -.025em; }
  .lg-hero__sub, .lg-chips { display: none; }
  .lg-side { flex: 1 1 100%; padding: 0; gap: 12px; }
  .lg-card { padding: 28px 22px; border-radius: 24px; }
  .lg-title { font-size: 26px; }
  .lg-tools { max-width: none; }
  .lg-foot { padding-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg *, .lg-blob { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- fluid sizing: the page must fit a laptop screen at 100 % zoom without scrolling ---------- */
.lg-hero { min-height: 0; padding: clamp(24px, 4.2vh, 44px) clamp(24px, 3.4vw, 48px); }
.lg-hero__title { font-size: clamp(28px, 3.1vw, 46px); }
.lg-hero__sub { font-size: clamp(14px, 1.2vw, 17px); }
.lg-card { padding: clamp(22px, 3.6vh, 40px) clamp(22px, 2.6vw, 40px); max-width: min(440px, 100%); }
.lg-title { font-size: clamp(24px, 2.2vw, 30px); }
.lg-fld { height: clamp(44px, 6vh, 52px); }
.lg-submit, .lg button.lg-submit { height: clamp(48px, 6.4vh, 56px); }
@media (max-height: 800px) and (min-width: 721px) {
  .lg { padding: 14px; }
  .lg-tools .lg-iconbtn { width: 40px; height: 40px; }
  .lg-hero__text { gap: 12px; }
  .lg-hero__sub { display: none; }
  .lg-side { gap: 12px; }
  .lg-card { gap: 14px; }
  .lg-check, .lg a.lg-link { min-height: 36px; }
}
@media (max-height: 620px) and (min-width: 721px) { .lg-chips { display: none; } .lg-brand__tag { display: none; } }
@media (max-width: 900px) and (min-width: 721px) { .lg-hero { flex: 1 1 100%; } .lg-hero__sub { display: block; } }
.lg { overflow-x: hidden; overflow-y: auto; }
/* the glows sit in their own clipped layer: they used to stick out of the page and made it scroll */
.lg-blobs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.lg-blobs .lg-blob { position: absolute; }
@media (max-height: 700px) and (min-width: 721px) {
  .lg { padding: 10px; gap: 10px; }
  .lg-hero { padding: 18px 26px; gap: 14px; border-radius: 24px; }
  .lg-hero__title { font-size: clamp(24px, 2.6vw, 34px); }
  .lg-chips, .lg-hero__sub { display: none; }
  .lg-card { padding: 16px 24px; gap: 10px; border-radius: 22px; }
  .lg-title { font-size: 22px; }
  .lg-fld { height: 42px; }
  .lg-submit, .lg button.lg-submit { height: 46px; }
  .lg-side { gap: 8px; }
}

/* real Samo logo in the hero (mark in colour, wordmark masked to white) */
.lg-brand__logo { width: 52px; height: auto; border-radius: 0; background: none; display: block; }
.lg-brand__logo img { width: 100%; height: auto; display: block; }
.lg-brand__name { display: block; height: 20px; width: calc(20px * 254 / 55); background: var(--lg-hero-ink); font-size: 0;
  -webkit-mask: url(../../img/v2/samo-word.png) center / contain no-repeat; mask: url(../../img/v2/samo-word.png) center / contain no-repeat; }

/* main button: amber gradient */
.lg-submit, .lg a.lg-lang__btn[aria-current] { background-image: var(--s-primary-grad); }
