/* ============================================================
   LexOps — Login page (v4)
   Central windowed card · turquoise graphics · premium
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  color: #0f172a;
  background: #f0fdfa;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

/* ---- Ambient turquoise background ---- */
.lg-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; background: radial-gradient(1400px 800px at 50% -10%, rgba(16,185,129,.22), transparent 60%), linear-gradient(180deg, #f0fdfa 0%, #ecfeff 50%, #f0f9ff 100%); }
.lg-bg-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: .55; animation: lgOrb 22s ease-in-out infinite alternate; }
.lg-bg-orb-a { width: 520px; height: 520px; top: -140px; left: -100px; background: radial-gradient(circle, #10b981, transparent 70%); }
.lg-bg-orb-b { width: 620px; height: 620px; bottom: -160px; right: -120px; background: radial-gradient(circle, #0ea5e9, transparent 70%); animation-delay: -8s; }
@keyframes lgOrb { 0%{transform:translate(0,0) scale(1)} 100%{transform:translate(40px,-30px) scale(1.08)} }
.lg-bg-grid { position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(13,148,136,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,148,136,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 25%, transparent 75%);
}

/* ---- Centered viewport ---- */
.lg-viewport {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.lg-card {
  width: 100%;
  max-width: 460px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow:
    0 30px 80px -20px rgba(13,148,136,.22),
    0 10px 30px -10px rgba(15,23,42,.15),
    0 0 0 1px rgba(13,148,136,.1);
  padding: 36px 38px 28px;
  position: relative;
  overflow: hidden;
}
/* Top accent stripe */
.lg-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #14b8a6 50%, #0ea5e9 100%);
}
@media (max-width: 480px) {
  .lg-card { padding: 26px 22px 20px; border-radius: 14px; }
}

/* ---- Header ---- */
.lg-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.lg-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.lg-brand-mark { width: 36px; height: 36px; flex-shrink: 0; }
.lg-brand-word {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 55%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lg-lang-picker select {
  appearance: none; -webkit-appearance: none;
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 5px 24px 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  font-family: inherit;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2394a3b8' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.lg-lang-picker select:hover { border-color: #cbd5e1; color: #0f172a; }

/* ---- Panel switching (pro ↔ client) ---- */
.lg-panel { display: none; }
.lg-panel.lg-active { display: block; }

/* ---- Title + sub ---- */
.lg-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.8px;
  line-height: 1.1;
  margin: 0 0 8px;
  color: #0f172a;
}
.lg-sub {
  font-size: 14px;
  color: #64748b;
  margin: 0 0 22px;
  line-height: 1.55;
}

/* ---- Error banner ---- */
.lg-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* ---- Fields ---- */
.lg-field { display: block; margin-bottom: 14px; }
.lg-lbl {
  display: flex;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  letter-spacing: .2px;
  margin-bottom: 6px;
}
.lg-lbl-row { justify-content: space-between; align-items: center; }
.lg-forgot {
  font-size: 12px;
  color: #0d9488;
  font-weight: 600;
  transition: color .15s;
}
.lg-forgot:hover { color: #0f766e; text-decoration: underline; text-underline-offset: 3px; }

.lg-in {
  width: 100%;
  padding: 11px 14px;
  font-size: 15px;
  font-family: inherit;
  color: #0f172a;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.lg-in::placeholder { color: #94a3b8; }
.lg-in:hover { border-color: #cbd5e1; }
.lg-in:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13,148,136,.14);
}

.lg-in-wrap { position: relative; display: block; }
.lg-in-wrap .lg-in { padding-right: 42px; }
.lg-eye {
  position: absolute; top: 50%; right: 8px;
  transform: translateY(-50%);
  background: transparent; border: 0;
  padding: 6px;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 6px;
  transition: color .15s, background .15s;
}
.lg-eye:hover { color: #475569; background: #f1f5f9; }

/* ---- Remember ---- */
.lg-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: #475569;
  margin: 4px 0 20px;
  cursor: pointer;
  user-select: none;
}
.lg-check input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
  position: relative;
}
.lg-check input[type="checkbox"]:hover { border-color: #94a3b8; }
.lg-check input[type="checkbox"]:checked {
  background: linear-gradient(135deg, #10b981, #0891b2);
  border-color: transparent;
}
.lg-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 7l2.5 2.5L11 4'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ---- Primary button ---- */
.lg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, filter .15s;
  box-shadow: 0 8px 20px -4px rgba(13,148,136,.45), 0 0 0 1px rgba(255,255,255,.08) inset;
}
.lg-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -6px rgba(13,148,136,.6);
  filter: brightness(1.05);
}
.lg-btn:active { transform: translateY(0); }
.lg-btn:disabled { opacity: .62; cursor: not-allowed; }
.lg-btn:focus-visible { outline: 3px solid rgba(13,148,136,.35); outline-offset: 2px; }

/* ---- Alt links ---- */
.lg-alt {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
}
.lg-alt a {
  color: #0d9488;
  font-weight: 600;
  transition: color .15s;
}
.lg-alt a:hover { color: #0f766e; text-decoration: underline; text-underline-offset: 3px; }
.lg-alt-sep { color: #cbd5e1; }

/* ---- Footer ---- */
.lg-foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #f1f5f9;
  flex-wrap: wrap;
}
.lg-foot a { color: #64748b; }
.lg-foot a:hover { color: #0d9488; }
.lg-foot-sep { color: #cbd5e1; }

/* ============ Desktop mode top bar (LexOps Desktop) ============ */
html.is-desktop body { padding-top: 44px; }
html.is-desktop [data-toggle-panel="client"],
html.is-desktop .lg-alt .lg-alt-sep:last-of-type,
html.is-desktop .lg-card-client { display: none !important; }

#lxDesktopBar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 44px;
  z-index: 10000;
  background: linear-gradient(135deg, #042f2e 0%, #052e35 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 13px;
  -webkit-app-region: drag;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
#lxDesktopBar .lxd-bar-left,
#lxDesktopBar .lxd-bar-right {
  display: inline-flex; align-items: center; gap: 10px;
  -webkit-app-region: no-drag;
}
#lxDesktopBar .lxd-bar-left { font-weight: 700; color: #5eead4; }
#lxDesktopBar .lxd-ver {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(94,234,212,.12);
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(204,251,241,.8);
}
#lxDesktopBar .lxd-env {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px;
  color: rgba(204,251,241,.7);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
}
#lxDesktopBar .lxd-env select {
  background: rgba(94,234,212,.12);
  color: #fff;
  border: 1px solid rgba(94,234,212,.25);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px; font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
}
#lxDesktopBar .lxd-env select option { background: #042f2e; color: #fff; }

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .lg-title { font-size: 24px; }
  .lg-sub { font-size: 13px; margin-bottom: 18px; }
}
