/* =============================================================================================
   login.css - the sign-in screen (js/login.js, js/login-bg.js). PRESENTATION ONLY.
   Uses the theme variables from app.css (--accent, --surface, --text ...), so every colour theme
   in the theme picker restyles it. Old .login rules in app.css are left in place and unused.
   ============================================================================================= */

.lx {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  overflow: hidden; isolation: isolate; color: var(--text);
  background:
    radial-gradient(1200px 700px at 12% 10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(900px 600px at 95% 100%, color-mix(in srgb, var(--accent-2, var(--accent)) 14%, transparent), transparent 60%),
    var(--bg);
}
.lx-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.lx-glow { /* soft vignette so text stays readable over the network */
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--bg) 70%, transparent) 0%, transparent 45%, transparent 55%, color-mix(in srgb, var(--bg) 55%, transparent) 100%),
    radial-gradient(120% 90% at 50% 50%, transparent 55%, color-mix(in srgb, var(--bg) 85%, transparent) 100%);
}

.lx-main {
  flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 48px 40px 24px;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 440px); gap: 64px; align-items: center;
}

/* ---- hero (left) ---------------------------------------------------------------------------- */
.lx-hero { animation: lx-rise 700ms var(--ease) both; }
.lx-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 10px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--text);
  background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  backdrop-filter: blur(8px);
}
.lx-chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: lx-ping 2.2s ease-out infinite; }
.lx-title {
  margin: 22px 0 10px; font-family: var(--font-display); font-weight: 800; letter-spacing: -.035em; line-height: .95;
  font-size: clamp(48px, 6.4vw, 92px); color: var(--text);
}
.lx-title span {
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2, var(--accent)) 50%, var(--accent) 90%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: lx-sheen 6s linear infinite;
}
.lx-tagline { margin: 0 0 34px; max-width: 30ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.45; color: var(--text-2); opacity: .9; }
.lx-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; max-width: 470px; }
.lx-feat {
  display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-solid) 55%, transparent); border: 1px solid var(--border);
  backdrop-filter: blur(10px); transition: transform var(--t-med) var(--ease), border-color var(--t-med);
  animation: lx-rise 700ms var(--ease) both;
}
.lx-feat:nth-child(1) { animation-delay: 120ms; } .lx-feat:nth-child(2) { animation-delay: 220ms; } .lx-feat:nth-child(3) { animation-delay: 320ms; }
.lx-feat:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.lx-feat b { display: block; font-size: 14.5px; margin-bottom: 2px; }
.lx-feat span:not(.lx-ico) { font-size: 13px; color: var(--text-2); opacity: .85; }
.lx-feat__ico {
  flex: none; width: 36px; height: 36px; border-radius: 10px; --ico-size: 18px;
  background-color: color-mix(in srgb, var(--accent) 16%, transparent); position: relative;
}
.lx-feat__ico::before { background: var(--accent); }

/* ---- card (right) --------------------------------------------------------------------------- */
.lx-side { position: relative; animation: lx-rise 700ms 120ms var(--ease) both; }
/* HUD corner brackets: two L-shaped corners (top-left, bottom-right) that breathe in and out */
.lx-side::before, .lx-side::after {
  content: ""; position: absolute; width: 46px; height: 46px; z-index: 1; pointer-events: none;
  border: 3px solid var(--accent); filter: drop-shadow(0 0 8px var(--accent));
  animation: lx-bracket 3.2s var(--ease) infinite;
}
.lx-side::before { top: -10px; left: -10px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.lx-side::after { bottom: -10px; right: -10px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; border-color: var(--accent-2, var(--accent)); filter: drop-shadow(0 0 8px var(--accent-2, var(--accent))); animation-delay: -1.6s; }
/* scan line that sweeps down the card, like the analytics sweep in the background */
.lx-card::before {
  content: ""; position: absolute; left: 14px; right: 14px; top: 0; height: 2px; pointer-events: none; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent) 30%, var(--accent-2, var(--accent)) 70%, transparent);
  box-shadow: 0 0 14px 2px color-mix(in srgb, var(--accent) 55%, transparent);
  animation: lx-scan 4.5s ease-in-out infinite; opacity: 0;
}
.lx-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 34px 32px 26px; border-radius: 24px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface-raised) 92%, transparent), color-mix(in srgb, var(--surface-solid) 94%, transparent));
  border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg), 0 0 0 1px var(--highlight) inset;
  backdrop-filter: blur(18px) saturate(1.2);
}
.lx-card.is-shake { animation: lx-shake 420ms var(--ease); }

.lx-brand { display: flex; align-items: center; min-height: 40px; }
.lx-brand__img { max-height: 44px; max-width: 220px; object-fit: contain; display: block; }
.lx-wordmark { display: inline-flex; align-items: center; gap: 10px; }
.lx-wordmark__mark {
  width: 34px; height: 34px; border-radius: 50%; position: relative;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-2, var(--accent)), var(--accent));
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 7px, #000 8px); mask: radial-gradient(circle at 50% 50%, transparent 7px, #000 8px);
}
.lx-wordmark__text { font-family: var(--font-display); font-size: 15px; letter-spacing: .18em; color: var(--text); }
.lx-wordmark__text b { font-weight: 800; }

.lx-card__head h2 { margin: 6px 0 4px; font-size: 26px; font-weight: 750; letter-spacing: -.02em; }
.lx-card__sub { margin: 0; font-size: 14px; color: var(--text-2); opacity: .85; }
.lx-card__sub b { color: var(--accent); font-weight: 650; }

.lx-field { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.lx-field__label { font-size: 12.5px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); }
.lx-field__box {
  position: relative; display: flex; align-items: center; border-radius: 12px;
  background: var(--surface-sunken); border: 1px solid var(--border-strong);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.lx-field__box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: color-mix(in srgb, var(--surface-sunken) 70%, var(--accent-soft)); }
.lx-field__box > .lx-ico { position: absolute; left: 14px; --ico-size: 17px; width: 17px; height: 17px; pointer-events: none; }
.lx-field__box > .lx-ico::before { background: var(--text-2); opacity: .7; }
.lx-field__box:focus-within > .lx-ico::before { background: var(--accent); opacity: 1; }
.lx .lx-field input {
  flex: 1; width: 100%; min-width: 0; height: 48px; padding: 0 44px 0 44px; margin: 0;
  background: transparent; border: 0; outline: none; box-shadow: none; color: var(--text); font-size: 15px;
}
.lx .lx-field input::placeholder { color: var(--text-2); opacity: .5; }
.lx .lx-field input:-webkit-autofill { -webkit-text-fill-color: var(--text); transition: background-color 9999s; }

.lx .lx-eye {
  position: absolute; right: 6px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 9px; cursor: pointer;
  background: transparent; box-shadow: none; --ico-size: 18px;
}
.lx-eye::before {
  content: ""; position: absolute; inset: 9px; background: var(--text-2); opacity: .7;
  -webkit-mask: var(--i-eye) center / contain no-repeat; mask: var(--i-eye) center / contain no-repeat;
}
.lx-eye.is-on::before { -webkit-mask-image: var(--i-eye-off); mask-image: var(--i-eye-off); }
.lx .lx-eye:hover { filter: none; box-shadow: none; background: var(--surface-hover); }
.lx-eye:hover::before { opacity: 1; background: var(--accent); }
.lx-eye:focus-visible { outline: 2px solid var(--ring); }

.lx-caps { margin-top: -8px; font-size: 12px; font-weight: 600; color: var(--warn); }
.lx-error { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 13px; line-height: 1.4; }

.lx-submit {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 50px; margin-top: 4px; border: 0; border-radius: 12px; cursor: pointer; overflow: hidden;
  font-size: 15.5px; font-weight: 700; letter-spacing: .01em; color: var(--on-accent);
  background: linear-gradient(100deg, var(--accent-strong), var(--accent) 45%, var(--accent-2, var(--accent)));
  box-shadow: 0 14px 30px -12px var(--accent), 0 1px 0 rgba(255, 255, 255, .25) inset;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-med), filter var(--t-fast);
}
.lx-submit::after { /* shine sweep on hover */
  content: ""; position: absolute; inset: 0; transform: translateX(-120%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transition: transform 700ms var(--ease);
}
.lx-submit:hover::after { transform: translateX(120%); }
.lx-submit:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -12px var(--accent), 0 1px 0 rgba(255, 255, 255, .25) inset; }
.lx-submit:active { transform: translateY(0); filter: brightness(.95); }
.lx-submit:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.lx-submit__arrow {
  width: 18px; height: 18px; background: currentColor; transition: transform var(--t-med) var(--ease);
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat;
}
.lx-submit:hover .lx-submit__arrow { transform: translateX(4px); }
.lx-spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: lx-spin-r 700ms linear infinite; }
.lx-submit.is-busy { cursor: progress; }
.lx-submit.is-busy .lx-spinner { display: inline-block; }
.lx-submit.is-busy .lx-submit__arrow { display: none; }
.lx .lx-submit:disabled, .lx .lx-submit:disabled:hover { opacity: .9; cursor: progress; }

.lx-sso { display: flex; flex-direction: column; gap: 12px; }
.lx-sso__btn { width: 100%; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; }
.lx-or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-2); opacity: .8; }
.lx-or::before, .lx-or::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

.lx-secure { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 4px; font-size: 12px; color: var(--text-2); opacity: .8; }
.lx-secure .lx-ico { width: 14px; height: 14px; --ico-size: 14px; position: relative; }
.lx-secure .lx-ico::before { background: var(--ok); }

/* ---- footer ----------------------------------------------------------------------------------- */
.lx-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  width: 100%; max-width: 1240px; margin: 0 auto; padding: 18px 40px 22px;
  font-size: 12.5px; color: var(--text-2); border-top: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
}
.lx-foot__left { opacity: .75; }
.lx-foot__right { display: inline-flex; align-items: center; gap: 6px; opacity: .9; }
.lx-foot__right b {
  font-weight: 750; letter-spacing: .02em;
  background: linear-gradient(100deg, var(--accent), var(--accent-2, var(--accent))); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---- icons (CSS masks; currentColor-free so they follow the theme) ------------------------------ */
.lx {
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
  --i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --i-bolt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z' fill='%23000'/%3E%3C/svg%3E");
  --i-radar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 12 19 5'/%3E%3Ccircle cx='12' cy='12' r='1.5' fill='%23000'/%3E%3C/svg%3E");
  --i-map: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-7-6.2-7-12a7 7 0 0 1 14 0c0 5.8-7 12-7 12z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E");
  --i-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --i-eye-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3l18 18'/%3E%3Cpath d='M10.6 5.1A10 10 0 0 1 12 5c6.5 0 10 7 10 7a17 17 0 0 1-3.2 4.1M6.6 6.6A17 17 0 0 0 2 12s3.5 7 10 7a9.6 9.6 0 0 0 5.4-1.6'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
}
.lx-ico { display: inline-block; }
.lx-ico::before {
  content: ""; position: absolute; inset: 0; margin: auto; width: var(--ico-size, 16px); height: var(--ico-size, 16px);
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.lx-ico--user { --ico: var(--i-user); } .lx-ico--lock { --ico: var(--i-lock); } .lx-ico--shield { --ico: var(--i-shield); }
.lx-ico--bolt { --ico: var(--i-bolt); } .lx-ico--radar { --ico: var(--i-radar); } .lx-ico--map { --ico: var(--i-map); }

/* ---- light theme tweaks ------------------------------------------------------------------------- */
html[data-theme="light"] .lx-card { background: linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(255, 255, 255, .88)); }
html[data-theme="light"] .lx-feat { background: rgba(255, 255, 255, .7); }
html[data-theme="light"] .lx-glow {
  background: linear-gradient(90deg, rgba(246, 248, 252, .8) 0%, transparent 45%, transparent 60%, rgba(246, 248, 252, .6) 100%);
}

/* ---- motion ------------------------------------------------------------------------------------- */
@keyframes lx-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes lx-sheen { to { background-position: -200% 0; } }
@keyframes lx-bracket { 0%, 100% { width: 46px; height: 46px; opacity: .55; } 50% { width: 78px; height: 78px; opacity: 1; } }
@keyframes lx-scan { 0% { top: 6px; opacity: 0; } 12% { opacity: .9; } 80% { opacity: .9; } 100% { top: calc(100% - 8px); opacity: 0; } }
@keyframes lx-spin-r { to { transform: rotate(360deg); } }
@keyframes lx-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 70%, transparent); } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes lx-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) {
  .lx *, .lx *::before, .lx *::after { animation: none !important; transition: none !important; }
}

/* ---- responsive --------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .lx-main { grid-template-columns: 1fr; gap: 28px; padding: 32px 20px 16px; max-width: 520px; }
  .lx-hero { text-align: center; }
  .lx-title { font-size: clamp(44px, 12vw, 64px); margin-top: 16px; }
  .lx-tagline { margin: 0 auto 8px; }
  .lx-feats { display: none; }
  .lx-foot { padding: 16px 20px 20px; justify-content: center; text-align: center; }
}
@media (max-width: 420px) { .lx-card { padding: 26px 20px 20px; } }

/* app.css section 18 squares every corner; true circles here keep their shape (status dot, spinner, brand ring). */
.lx-chip__dot, .lx-spinner { border-radius: 50% !important; }
.lx-wordmark__mark {
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 6.5px, #000 7.5px, #000 16px, transparent 17px);
  mask: radial-gradient(circle at 50% 50%, transparent 6.5px, #000 7.5px, #000 16px, transparent 17px);
}

/* ---- brand logos (js/login.js LOGOS) ------------------------------------------------------------ */
.lx-logo { display: inline-flex; align-items: center; }
.lx-logo__img { display: block; height: 100%; width: auto; object-fit: contain; }
.lx-logo__img--on-light { display: none; }
html[data-theme="light"] .lx-logo__img--on-dark { display: none; }
html[data-theme="light"] .lx-logo__img--on-light { display: block; }
.lx-logo--orbus { height: 54px; }
.lx-logo--scs { height: 36px; }
.lx-foot__right { gap: 10px; }
@media (max-width: 980px) { .lx-logo--scs { height: 26px; } }

/* Edge adds its own password eye: the sign-in form already has one */
input::-ms-reveal, input::-ms-clear { display: none; }
