/* External device status — same visual language as internal repair-status + marketing chrome */

:root {
  --lp-bg: #0f172a;
  --lp-surface: rgba(15, 23, 42, 0.72);
  --lp-border: rgba(148, 163, 184, 0.16);
  --lp-text: #f8fafc;
  --lp-muted: #94a3b8;
  --lp-primary: #2563eb;
  --lp-accent: #6366f1;
  --lux-auth-primary: #2563eb;
  --lux-auth-primary-glow: rgba(37, 99, 235, 0.35);
  --lux-auth-transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

body.lux-device-ext,
body.lux-device-match {
  margin: 0;
  min-height: 100vh;
  font-family: var(--lp-font, Outfit, system-ui, -apple-system, sans-serif);
  color: var(--lp-text, #f3f4f6);
  background-color: var(--lp-bg, #0f172a);
  background-image: var(--lp-bg-image,
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(79, 70, 229, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(139, 92, 246, 0.1), transparent 50%),
    radial-gradient(ellipse 45% 35% at 0% 70%, rgba(59, 130, 246, 0.07), transparent 50%));
  background-attachment: fixed;
}

body.lux-device-ext[dir="rtl"],
body.lux-device-match[dir="rtl"] {
  font-family: "Noto Sans Arabic", Outfit, system-ui, sans-serif;
}

/* Top marketing bar */
/* Match homepage .lp-nav height (56px) and width */
.ldx-top {
  --lp-nav-bar-h: 56px;
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: nowrap;
  height: var(--lp-nav-bar-h);
  min-height: var(--lp-nav-bar-h);
  max-height: var(--lp-nav-bar-h);
  padding: 0 0.85rem 0 1rem;
  margin: 14px auto 0;
  width: min(96%, 1120px);
  border-radius: 999px;
  background: var(--lp-surface, rgba(15, 23, 42, 0.78));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--lp-border, rgba(148, 163, 184, 0.16));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.ldx-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  height: 40px;
  line-height: 1;
  flex-shrink: 0;
  min-width: 0;
}
.ldx-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  object-fit: contain;
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.ldx-brand span {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ldx-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: nowrap;
  height: 40px;
  flex-shrink: 0;
}

/* Floating language FAB (side) */
.ldx-lang-fab {
  position: fixed;
  z-index: 80;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}
[dir="rtl"] .ldx-lang-fab {
  right: auto;
  left: 14px;
  align-items: flex-start;
}

.ldx-lang-fab-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(145deg, rgba(79,70,229,.95), rgba(139,92,246,.88));
  color: #fff;
  box-shadow: 0 10px 28px rgba(79,70,229,.35), 0 0 0 1px rgba(255,255,255,.06) inset;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s, box-shadow .15s;
}
.ldx-lang-fab-btn:hover,
.ldx-lang-fab.is-open .ldx-lang-fab-btn {
  transform: scale(1.04);
  box-shadow: 0 12px 32px rgba(79,70,229,.45);
}
.ldx-lang-fab-btn i { font-size: 1.05rem; line-height: 1; }
.ldx-lang-fab-code {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: .04em;
  opacity: .95;
}

.ldx-lang-menu {
  min-width: 168px;
  padding: 0.4rem;
  border-radius: 16px;
  background: rgba(12, 12, 18, 0.96);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: grid;
  gap: 0.2rem;
}
.ldx-lang-menu[hidden] { display: none !important; }

.ldx-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background .15s;
}
.ldx-lang-item strong {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: #a5b4fc;
  min-width: 1.6rem;
}
.ldx-lang-item:hover {
  background: rgba(79,70,229,.18);
}
.ldx-lang-item.is-active {
  background: rgba(79,70,229,.28);
  color: #fff;
}
.ldx-lang-item.is-active strong { color: #c7d2fe; }

@media (max-width: 640px) {
  .ldx-lang-fab {
    top: auto;
    bottom: 18px;
    transform: none;
    right: 14px;
  }
  [dir="rtl"] .ldx-lang-fab {
    left: 14px;
    right: auto;
  }
  .ldx-lang-fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }
}

.ldx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  padding: 0 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: var(--lp-text, #f8fafc);
  border: 1px solid var(--lp-border, rgba(148, 163, 184, 0.16));
  background: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ldx-btn:hover { background: rgba(37, 99, 235, 0.14); border-color: rgba(96, 165, 250, 0.35); }
.ldx-btn-primary {
  background: linear-gradient(135deg, var(--lp-primary, #2563eb), var(--lp-accent, #6366f1));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px var(--lp-glow, rgba(37, 99, 235, 0.32));
}

/* Page wrap */
.ldx-wrap {
  width: min(96%, 1120px);
  margin: 1.25rem auto 2.5rem;
}

/* Reuse login shell — lighter, aligned with landing cards */
body.lux-device-ext .lux-login-shell,
body.lux-device-match .lux-login-shell {
  min-height: min(78vh, 720px);
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
  background: rgba(20, 20, 25, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.lux-device-ext .lux-login-visual.lux-rs-visual,
body.lux-device-match .lux-login-visual.lux-rs-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
  padding: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(79,70,229,.2), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(139,92,246,.12), transparent 50%),
    linear-gradient(165deg, rgba(20,20,28,.88), rgba(12,12,18,.94));
}

/* Illustration glows */
.lux-visual-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  pointer-events: none;
  background: rgba(79,70,229,.45);
  top: -40px;
  left: -40px;
}
.lux-visual-glow--accent {
  background: rgba(139,92,246,.4);
  top: auto;
  left: auto;
  right: -60px;
  bottom: 10%;
}
.lux-visual-glow--cyan {
  background: rgba(56,189,248,.25);
  width: 180px;
  height: 180px;
  top: 50%;
  left: 40%;
}

.lux-visual-brand {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.25rem 0;
  font-size: 0.82rem;
  color: #c7d2fe;
  font-weight: 600;
}
.lux-visual-brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #818cf8;
  box-shadow: 0 0 0 4px rgba(129,140,248,.15);
}
.lux-visual-brand__sep { opacity: .45; }
.lux-visual-brand strong { color: #fff; font-weight: 800; }

/* Slides (from lux-auth style) */
.lux-slider-container {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 340px;
  padding: 1.25rem 1.25rem 0.75rem;
  box-sizing: border-box;
}

.lux-login-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 1.25rem 1.25rem 0.75rem;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  opacity: 0;
  transform: translateX(18px);
  transition: var(--lux-auth-transition);
  pointer-events: none;
}
[dir="rtl"] .lux-login-slide { transform: translateX(-18px); }
.lux-login-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.lux-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  border: 1px solid transparent;
}
.lux-slide-badge--indigo {
  color: #c7d2fe;
  background: rgba(79,70,229,.15);
  border-color: rgba(129,140,248,.25);
}
.lux-slide-badge--amber {
  color: #fde68a;
  background: rgba(245,158,11,.12);
  border-color: rgba(245,158,11,.28);
}
.lux-slide-badge--violet {
  color: #ddd6fe;
  background: rgba(139,92,246,.14);
  border-color: rgba(167,139,250,.28);
}

.lux-slide-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.lux-login-slide--pos .lux-slide-icon {
  background: rgba(79,70,229,.1);
  color: #818cf8;
  border: 1px solid rgba(79,70,229,.2);
}
.lux-login-slide--inventory .lux-slide-icon {
  background: rgba(245,158,11,.1);
  color: #fbbf24;
  border: 1px solid rgba(245,158,11,.2);
}
.lux-login-slide--reports .lux-slide-icon {
  background: rgba(161,161,170,.1);
  color: #e4e4e7;
  border: 1px solid rgba(161,161,170,.2);
}

.lux-slide-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(to right, #fff, #9ca3af);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lux-slide-desc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #d1d5db;
  line-height: 1.55;
}

.lux-slide-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}
.lux-slide-stat {
  padding: 0.55rem 0.5rem;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  text-align: center;
}
.lux-slide-stat strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}
.lux-slide-stat span {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

.lux-slide-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.lux-slide-feature {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: #e5e7eb;
}
.lux-slide-feature i {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  background: rgba(79,70,229,.2);
  color: #a5b4fc;
}

.lux-visual-footer {
  position: relative;
  z-index: 5;
  padding: 0.75rem 1.25rem 1.1rem;
  margin-top: auto;
}
.lux-visual-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.lux-visual-chips span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c7d2fe;
  background: rgba(79,70,229,.12);
  border: 1px solid rgba(129,140,248,.2);
}

.lux-slider-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.lux-slider-dot {
  width: 36px;
  height: 4px;
  border: none;
  border-radius: 2px;
  background: rgba(255,255,255,.12);
  padding: 0;
  cursor: pointer;
  transition: var(--lux-auth-transition);
}
.lux-slider-dot.is-active {
  width: 54px;
  background: var(--lux-auth-primary);
  box-shadow: 0 0 10px var(--lux-auth-primary-glow);
}

/* Form panel polish — same spirit as landing glass panels */
body.lux-device-ext .lux-login-form-panel,
body.lux-device-match .lux-login-form-panel {
  background: rgba(18, 18, 24, 0.72);
  padding: 1.75rem 1.5rem;
}

body.lux-device-ext .lux-rs-form-panel .lux-login-form-intro h1 {
  color: #fff !important;
}

body.lux-device-ext .lux-rs-quick-lookup {
  margin-top: 1rem;
  border-radius: 14px;
  border: 1px solid var(--lp-border);
  background: rgba(255,255,255,.03);
  padding: 0.15rem 0.85rem 0.85rem;
}
body.lux-device-ext .lux-rs-quick-lookup summary {
  cursor: pointer;
  padding: 0.75rem 0;
  font-weight: 650;
  font-size: 0.9rem;
  color: #c7d2fe;
  list-style: none;
}
body.lux-device-ext .lux-rs-quick-lookup summary::-webkit-details-marker { display: none; }

body.lux-device-ext .ldx-foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.1rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
}
body.lux-device-ext .ldx-foot-links a {
  color: var(--lp-muted);
  text-decoration: none;
}
body.lux-device-ext .ldx-foot-links a:hover { color: #fff; }

@media (max-width: 900px) {
  body.lux-device-ext .lux-login-shell {
    min-height: auto;
  }
  .lux-slider-container { min-height: 280px; }
  .lux-slide-features { grid-template-columns: 1fr; }
}
