/* Lux login — polished, light, eye-catching (no heavy canvas/vendor) */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body.lux-login-page {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #e8eef8;
  background-color: #070b14;
  background-image:
    radial-gradient(ellipse 80% 50% at 15% -10%, rgba(56, 189, 248, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 5%, rgba(99, 102, 241, 0.16), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 110%, rgba(37, 99, 235, 0.1), transparent 55%),
    linear-gradient(165deg, #080d18 0%, #0a1020 45%, #070b14 100%);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: #7dd3fc; text-decoration: none; }
a:hover { color: #bae6fd; }

img { max-width: 100%; height: auto; display: block; }

/* ── Top bar ── */
.lux-login-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.15rem 0.65rem;
  max-width: 1040px;
  margin: 0 auto;
}

.lux-login-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #f8fafc !important;
  font-weight: 750;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}


.lux-login-top__actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lux-login-link {
  color: #94a3b8 !important;
  font-size: 0.8rem;
  font-weight: 550;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.lux-login-link:hover {
  color: #f1f5f9 !important;
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.08);
}

/* Language */
.lux-lang { position: relative; }

.lux-lang > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  font-size: 0.78rem;
  font-weight: 650;
  color: #e2e8f0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
}

.lux-lang > summary::-webkit-details-marker { display: none; }

.lux-lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  min-width: 10rem;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  z-index: 30;
}

[dir="rtl"] .lux-lang ul { right: auto; left: 0; }

.lux-lang a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 9px;
  color: #e2e8f0 !important;
  font-size: 0.82rem;
}

.lux-lang a:hover {
  background: rgba(59, 130, 246, 0.14);
  color: #fff !important;
}

/* ── Shell ── */
.lux-login-main {
  width: min(100% - 1.5rem, 960px);
  margin: 0.35rem auto 1.75rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

.lux-login-shell {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
  background:
    linear-gradient(160deg, rgba(30, 41, 59, 0.55) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 24px 64px rgba(0, 0, 0, 0.45),
    0 0 80px rgba(37, 99, 235, 0.08);
}

.lux-login-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 211, 252, 0.45), rgba(99, 102, 241, 0.4), transparent);
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 900px) {
  .lux-login-shell {
    grid-template-columns: 1.08fr 0.92fr;
    min-height: 540px;
  }
}

/* Visual */
.lux-login-visual {
  display: none;
  padding: 2.15rem 1.9rem 1.75rem;
  background:
    radial-gradient(ellipse 90% 70% at 0% 0%, rgba(56, 189, 248, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 60% at 100% 100%, rgba(99, 102, 241, 0.14), transparent 50%),
    linear-gradient(165deg, #0c1629 0%, #0a1220 100%);
  border-inline-end: 1px solid rgba(255,255,255,0.06);
  position: relative;
}

@media (min-width: 900px) {
  .lux-login-visual {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

.lux-login-visual h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #f8fafc;
  line-height: 1.2;
}

.lux-login-visual p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.95rem;
  max-width: 30ch;
  line-height: 1.6;
}

.lux-login-visual__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  margin-bottom: 1.15rem;
}

.lux-login-visual__points {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

.lux-login-visual__point {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 550;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

.lux-login-visual__point svg {
  width: 32px;
  height: 32px;
  padding: 6px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(56,189,248,0.18), rgba(99,102,241,0.12));
  border: 1px solid rgba(125, 211, 252, 0.2);
  color: #7dd3fc;
  flex-shrink: 0;
}

.lux-login-visual__foot {
  margin-top: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* ── Login left: feature flash ── */
.lux-login-visual--flash {
  gap: 1rem;
}

.lux-flash-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.lux-flash-slides {
  position: relative;
  flex: 1;
  min-height: 220px;
}

.lux-flash-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  pointer-events: none;
}

.lux-flash-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.lux-flash-tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e0f2fe;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.28);
}

.lux-flash-tag--payments { color: #bbf7d0; background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.28); }
.lux-flash-tag--tax { color: #fde68a; background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.3); }
.lux-flash-tag--whatsapp { color: #86efac; background: rgba(22,163,74,0.14); border-color: rgba(34,197,94,0.32); }
.lux-flash-tag--chat { color: #c4b5fd; background: rgba(139,92,246,0.14); border-color: rgba(167,139,250,0.3); }
.lux-flash-tag--panic { color: #fda4af; background: rgba(244,63,94,0.12); border-color: rgba(251,113,133,0.3); }
.lux-flash-tag--accountant { color: #93c5fd; background: rgba(59,130,246,0.14); border-color: rgba(96,165,250,0.3); }
.lux-flash-tag--tech { color: #fdba74; background: rgba(249,115,22,0.12); border-color: rgba(251,146,60,0.3); }
.lux-flash-tag--pharma { color: #5eead4; background: rgba(20,184,166,0.12); border-color: rgba(45,212,191,0.3); }

.lux-flash-title {
  margin: 0 0 0.55rem;
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.25;
}

.lux-flash-desc {
  margin: 0 0 1rem;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 34ch;
}

.lux-flash-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lux-flash-bullets li {
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 650;
  color: #e2e8f0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.lux-flash-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.15rem;
}

.lux-flash-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.lux-flash-dot.is-active {
  width: 22px;
  background: linear-gradient(90deg, #38bdf8, #6366f1);
}

.lux-flash-dot:hover {
  background: rgba(125, 211, 252, 0.7);
}

.lux-flash-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.lux-flash-strip span {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
}

/* Mobile: compact flash banner above form */
.lux-login-mobile-flash {
  display: none;
}

@media (max-width: 899px) {
  .lux-login-mobile-flash {
    display: block;
    margin: 0 0 0.85rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(12, 22, 41, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.18);
    overflow: hidden;
  }

  .lux-login-mobile-flash .lux-flash-slides {
    min-height: 0;
  }

  .lux-login-mobile-flash .lux-flash-slide {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .lux-login-mobile-flash .lux-flash-slide:not(.is-active) {
    display: none;
  }

  .lux-login-mobile-flash .lux-flash-title {
    font-size: 0.98rem;
    margin-bottom: 0.3rem;
  }

  .lux-login-mobile-flash .lux-flash-desc {
    font-size: 0.8rem;
    margin-bottom: 0.55rem;
    max-width: none;
  }

  .lux-login-mobile-flash .lux-flash-bullets {
    display: none;
  }

  .lux-login-mobile-flash .lux-flash-dots {
    margin-top: 0.55rem;
  }

  .lux-login-mobile-flash .lux-login-visual__badge,
  .lux-login-mobile-flash .lux-flash-strip,
  .lux-login-mobile-flash .lux-login-visual__foot {
    display: none;
  }
}

@media (min-width: 900px) {
  .lux-login-mobile-flash {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lux-flash-slide {
    transition: none;
  }
}

/* Form panel */
.lux-login-form-panel {
  padding: 1.65rem 1.3rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.35) 0%, rgba(8, 12, 22, 0.55) 100%);
}

@media (min-width: 480px) {
  .lux-login-form-panel { padding: 2rem 1.9rem 1.75rem; }
}

.lux-login-form-intro {
  margin-bottom: 1.4rem;
}

.lux-login-form-intro h1 {
  margin: 0 0 0.4rem;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #f8fafc;
}

.lux-login-form-intro p {
  margin: 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

.lux-login-version {
  display: inline-block;
  margin-bottom: 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

/* ── Fields ── */
.lux-login-form {
  display: grid;
  gap: 1rem;
}

.lux-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 650;
  color: #94a3b8;
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

/*
 * Input group: the bordered "box" wraps input + eye button,
 * so the toggle is always visually INSIDE the field.
 */
.lux-field-control {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(8, 14, 26, 0.92);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.lux-field-control:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow:
    0 0 0 3px rgba(56, 189, 248, 0.14),
    0 1px 0 rgba(255,255,255,0.03) inset;
  background: rgba(10, 18, 34, 0.98);
}

.lux-field.has-error .lux-field-control {
  border-color: rgba(248, 113, 113, 0.55);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.12);
}

.lux-field input[type="text"],
.lux-field input[type="password"],
.lux-field input[type="email"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 0.95rem;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: #f1f5f9;
  font-size: 0.95rem;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}

/* Kill browser autofill yellow/white fill */
.lux-field input:-webkit-autofill,
.lux-field input:-webkit-autofill:hover,
.lux-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f1f5f9;
  -webkit-box-shadow: 0 0 0 1000px #0a1220 inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

.lux-field input::placeholder { color: #64748b; }

.lux-field-error {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #fca5a5;
  font-weight: 550;
}

/* Eye toggle — inside the group, never outside */
.lux-field-toggle {
  flex: 0 0 auto;
  align-self: center;
  position: relative;
  z-index: 2;
  width: 42px;
  height: 40px;
  margin: 0 0.3rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s, background 0.15s;
}

[dir="rtl"] .lux-field-toggle {
  margin: 0 0 0 0.3rem;
}

.lux-field-toggle:hover,
.lux-field-toggle:focus-visible {
  color: #e2e8f0;
  background: rgba(255,255,255,0.07);
  outline: none;
}

.lux-field-toggle[aria-pressed="true"] {
  color: #7dd3fc;
}

.lux-field-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
}

/* Must beat display:block above — otherwise both eye icons show side by side */
.lux-field-toggle svg[hidden],
.lux-field-toggle svg.is-hidden {
  display: none !important;
}

/* Meta row */
.lux-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: -0.1rem;
}

.lux-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}

.lux-remember input {
  width: 16px;
  height: 16px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.lux-forgot {
  font-size: 0.84rem;
  font-weight: 650;
  color: #7dd3fc !important;
}

.lux-forgot:hover { color: #bae6fd !important; }

/* Submit */
.lux-submit {
  margin-top: 0.35rem;
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #38bdf8 0%, #2563eb 55%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: -0.015em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 10px 24px rgba(37, 99, 235, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.lux-submit:hover {
  filter: brightness(1.07);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.2) inset,
    0 14px 30px rgba(37, 99, 235, 0.42);
}

.lux-submit:active { transform: scale(0.985); }
.lux-submit:disabled { opacity: 0.65; cursor: wait; filter: none; }

.lux-submit svg { width: 17px; height: 17px; }

[dir="rtl"] .lux-submit svg { transform: scaleX(-1); }

.lux-login-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.84rem;
  color: #64748b;
}

.lux-login-footer a {
  font-weight: 700;
  color: #7dd3fc !important;
}

/* Flash */
.lux-flash {
  margin: 0.65rem auto 0;
  width: min(100% - 1.5rem, 960px);
  padding: 0.7rem 1rem;
  border-radius: 14px;
  font-size: 0.86rem;
  font-weight: 550;
}

.lux-flash--inline {
  width: 100%;
  margin: 0 0 1rem;
}

.lux-flash--ok {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  color: #86efac;
}

.lux-flash--err {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fca5a5;
}

.g-recaptcha { transform-origin: left top; }

.lux-demo-panel {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
}

@media (prefers-reduced-motion: reduce) {
  .lux-submit,
  .lux-field-control { transition: none; }
}

.lux-login-link--accent {
  color: #7dd3fc !important;
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(14, 165, 233, 0.08);
}

.lux-login-link--accent:hover {
  color: #e0f2fe !important;
  background: rgba(14, 165, 233, 0.14);
}

/* ── Mobile-first polish ── */
@media (max-width: 640px) {
  .lux-login-top {
    padding: 0.7rem 0.85rem 0.45rem;
    max-width: none;
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.94) 0%, rgba(7, 11, 20, 0.82) 100%);
  }

  .lux-login-brand {
    font-size: 0.98rem;
    gap: 0.45rem;
    min-width: 0;
  }


  .lux-login-brand__text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }

  .lux-login-top__actions {
    gap: 0.25rem;
  }

  .lux-login-link {
    font-size: 0.72rem;
    padding: 0.35rem 0.55rem;
  }

  .lux-login-link--hide-xs {
    display: none;
  }

  .lux-login-main {
    width: min(100% - 1rem, 960px);
    margin: 0.15rem auto 1.1rem;
  }

  .lux-login-shell {
    border-radius: 18px;
  }

  .lux-login-form-panel {
    padding: 1.25rem 1rem 1.15rem;
  }

  .lux-login-form-intro {
    margin-bottom: 1.05rem;
  }

  .lux-login-form-intro h1 {
    font-size: 1.35rem;
  }

  .lux-login-form-intro p {
    font-size: 0.84rem;
  }

  .lux-field-control {
    min-height: 48px;
  }

  .lux-field input[type="text"],
  .lux-field input[type="password"],
  .lux-field input[type="email"] {
    height: 48px;
    /* prevent iOS zoom on focus */
    font-size: 16px;
  }

  .lux-submit {
    height: 50px;
    font-size: 1rem;
    margin-top: 0.5rem;
  }

  .lux-lang > summary {
    font-size: 0.72rem;
    padding: 0.35rem 0.65rem;
  }
}

@media (max-width: 380px) {
  .lux-login-form-panel { padding: 1.1rem 0.85rem 1rem; }
  .lux-login-top { padding: 0.6rem 0.7rem 0.4rem; }
  .lux-login-form-intro h1 { font-size: 1.25rem; }
  .lux-login-brand__text { max-width: 34vw; }
}

@media (max-height: 480px) and (orientation: landscape) {
  .lux-login-top { position: static; }
  .lux-login-main { margin-top: 0.25rem; }
  .lux-login-form-panel { padding-top: 1rem; padding-bottom: 0.85rem; }
  .lux-login-form-intro { margin-bottom: 0.75rem; }
}

@supports (padding: max(0px)) {
  body.lux-login-page {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .lux-login-top {
    padding-top: max(0.7rem, env(safe-area-inset-top));
  }
  .lux-login-main {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
}
