/* Customer repair-status — light, mobile-first, matches login aesthetic */

body.lux-login-page.lux-rs-body {
  /* slightly taller pages for results */
}

.lux-rs-page {
  width: 100%;
  display: grid;
  gap: 1rem;
}

/* Search shell reuses .lux-login-shell */
.lux-rs-shell {
  margin: 0;
}

.lux-rs-form-panel .lux-login-form-intro {
  margin-bottom: 1.15rem;
}

.lux-rs-form-panel .lux-login-form-intro h1 {
  font-size: clamp(1.3rem, 4.5vw, 1.55rem);
}

/* Search type chips */
.lux-rs-type-field {
  display: grid;
  gap: 0.45rem;
}

.lux-rs-type-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.lux-rs-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lux-rs-type-tab {
  flex: 1 1 auto;
  min-width: min(100%, 7.5rem);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 42px;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(8, 14, 26, 0.65);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.lux-rs-type-tab svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.9;
}

.lux-rs-type-tab.is-active {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.16), rgba(37, 99, 235, 0.12));
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

.lux-rs-type-tab:hover:not(.is-active) {
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.14);
}

.lux-rs-optional {
  font-weight: 500;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
}

.lux-rs-error {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #fca5a5;
  font-size: 0.86rem;
  font-weight: 550;
}

.lux-rs-results {
  display: grid;
  gap: 1rem;
  scroll-margin-top: 1rem;
}

.lux-rs-results:empty {
  display: none;
}

/* Result card */
.lux-rs-card {
  background:
    linear-gradient(165deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.92) 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03) inset,
    0 16px 40px rgba(0,0,0,0.32);
}

.lux-rs-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 1.1rem 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(ellipse 80% 100% at 0% 0%, rgba(56, 189, 248, 0.1), transparent 55%);
}

.lux-rs-order-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}

.lux-rs-card-head h2 {
  margin: 0;
  font-size: clamp(1.15rem, 4vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  word-break: break-word;
}

.lux-rs-device-name {
  margin: 0.3rem 0 0;
  font-size: 0.88rem;
  color: #94a3b8;
  line-height: 1.4;
}

.lux-rs-status-pill {
  --rs-status-color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: 100%;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #f8fafc;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}

@supports (background: color-mix(in srgb, red 50%, blue)) {
  .lux-rs-status-pill {
    background: color-mix(in srgb, var(--rs-status-color) 22%, #0f172a);
    border-color: color-mix(in srgb, var(--rs-status-color) 45%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rs-status-color) 10%, transparent);
  }
}

.lux-rs-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rs-status-color);
  box-shadow: 0 0 8px var(--rs-status-color);
  flex-shrink: 0;
}

/* Stats */
.lux-rs-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
}

@media (min-width: 560px) {
  .lux-rs-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.lux-rs-stat {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.7rem 0.75rem;
  border-radius: 14px;
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
  min-width: 0;
}

.lux-rs-stat__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
  flex-shrink: 0;
}

.lux-rs-stat__icon svg {
  width: 16px;
  height: 16px;
}

.lux-rs-stat strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 750;
  color: #f1f5f9;
  word-break: break-word;
  line-height: 1.3;
}

.lux-rs-stat span {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.02em;
}

/* Sections */
.lux-rs-section {
  padding: 0.85rem 1rem 1.05rem;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.lux-rs-section h3 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 750;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lux-rs-section h3 .lux-rs-h-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

/* Tags */
.lux-rs-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lux-rs-tags li {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.lux-rs-tags--warn li {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}

/* Checklist compact */
.lux-rs-check-suite {
  display: grid;
  gap: 0.75rem;
}

.lux-rs-check-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
}

.lux-rs-check-hero--good { border-color: rgba(34, 197, 94, 0.28); }
.lux-rs-check-hero--fair { border-color: rgba(245, 158, 11, 0.28); }
.lux-rs-check-hero--poor { border-color: rgba(248, 113, 113, 0.28); }

.lux-rs-health-score {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1;
}

.lux-rs-health-score small {
  font-size: 0.75rem;
  font-weight: 650;
  color: #94a3b8;
  margin-inline-start: 0.15rem;
}

.lux-rs-health-meta {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 550;
}

.lux-rs-check-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 480px) {
  .lux-rs-check-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.lux-rs-check-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.45);
  border: 1px solid rgba(255,255,255,0.05);
  min-width: 0;
}

.lux-rs-check-item__label {
  font-size: 0.8rem;
  font-weight: 550;
  color: #e2e8f0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lux-rs-check-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 750;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

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

.lux-rs-check-badge--fail {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.lux-rs-check-badge--na {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

/* Comments / timeline */
.lux-rs-comments {
  display: grid;
  gap: 0.65rem;
}

.lux-rs-comment {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.lux-rs-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  font-size: 0.75rem;
  font-weight: 800;
}

.lux-rs-comment--status .lux-rs-comment-avatar {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
}

.lux-rs-comment-body {
  flex: 1;
  min-width: 0;
}

.lux-rs-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.65rem;
  margin-bottom: 0.3rem;
}

.lux-rs-comment-author {
  font-size: 0.84rem;
  color: #f1f5f9;
}

.lux-rs-comment-time,
.lux-rs-comment-badge {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.lux-rs-comment-badge {
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.lux-rs-comment-badge--status {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.lux-rs-comment--comment .lux-rs-comment-avatar {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

.lux-rs-section-lead {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.4;
}

.lux-rs-section-count {
  margin-inline-start: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.lux-rs-h-dot--panic {
  background: #a78bfa !important;
  box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.18) !important;
}

/* Full Panic (customer status page) */
.lux-rs-panic-list {
  display: grid;
  gap: 0.75rem;
}

.lux-rs-panic-card {
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  background: rgba(8, 14, 26, 0.6);
  border: 1px solid rgba(167, 139, 250, 0.22);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.lux-rs-panic-card--high {
  border-color: rgba(248, 113, 113, 0.35);
}

.lux-rs-panic-card--medium {
  border-color: rgba(251, 191, 36, 0.32);
}

.lux-rs-panic-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.lux-rs-panic-device {
  display: block;
  font-size: 0.92rem;
  color: #f1f5f9;
  font-weight: 750;
}

.lux-rs-panic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-top: 0.25rem;
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 600;
}

.lux-rs-panic-match-pill {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 750;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  white-space: nowrap;
}

.lux-rs-panic-conf {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.lux-rs-panic-conf-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 650;
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.lux-rs-panic-conf-item b {
  font-weight: 800;
  color: #e2e8f0;
}

.lux-rs-panic-conf-item.is-high {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}
.lux-rs-panic-conf-item.is-high b { color: #fecaca; }

.lux-rs-panic-conf-item.is-med {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.22);
  color: #fcd34d;
}
.lux-rs-panic-conf-item.is-med b { color: #fde68a; }

.lux-rs-panic-conf-item.is-low {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.18);
  color: #7dd3fc;
}
.lux-rs-panic-conf-item.is-low b { color: #bae6fd; }

.lux-rs-panic-excerpt {
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-rs-panic-excerpt > span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.lux-rs-panic-excerpt code {
  display: block;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #cbd5e1;
  word-break: break-word;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lux-rs-panic-findings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.lux-rs-panic-finding {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.6rem 0.65rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-rs-panic-finding--high {
  border-color: rgba(248, 113, 113, 0.28);
}

.lux-rs-panic-finding--medium {
  border-color: rgba(251, 191, 36, 0.25);
}

.lux-rs-panic-rank {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(167, 139, 250, 0.28);
}

.lux-rs-panic-finding-body {
  min-width: 0;
  flex: 1;
}

.lux-rs-panic-diag {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #f1f5f9;
  line-height: 1.4;
}

.lux-rs-panic-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.lux-rs-panic-badge {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 750;
}

.lux-rs-panic-badge--high {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.14);
  border: 1px solid rgba(248, 113, 113, 0.28);
}

.lux-rs-panic-badge--medium {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.lux-rs-panic-badge--low {
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.lux-rs-comment-bubble {
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid rgba(255,255,255,0.06);
}

.lux-rs-comment-bubble p {
  margin: 0;
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.lux-rs-comment-quote {
  margin-top: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border-inline-start: 3px solid rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.06);
  font-size: 0.82rem;
  color: #94a3b8;
}

.lux-rs-empty-note {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
  padding: 0.75rem;
}

/* Visual side tweaks for repair */
.lux-rs-visual .lux-login-visual__badge {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(167, 139, 250, 0.28);
}

/* Mobile polish */
@media (max-width: 480px) {
  .lux-rs-card-head {
    padding: 1rem 0.95rem 0.85rem;
  }

  .lux-rs-stats,
  .lux-rs-section {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  .lux-rs-type-tab {
    min-width: calc(50% - 0.25rem);
  }
}

@media (max-width: 360px) {
  .lux-rs-type-tab span {
    font-size: 0.72rem;
  }
}

/* ── Customer portal profile ── */
.lux-rs-field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.35;
}

.lux-rs-quick-lookup {
  margin-top: 1.15rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.85rem;
}

.lux-rs-quick-lookup > summary {
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 650;
  color: #94a3b8;
  list-style: none;
}

.lux-rs-quick-lookup > summary::-webkit-details-marker { display: none; }

.lux-rs-form--nested {
  margin-top: 0.75rem;
}

.lux-submit--ghost {
  background: rgba(30, 41, 59, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

/* Balanced mid theme (not pure white, not pure black) */
body.lux-rs-body.lux-rs-portal-mode,
body.lux-rs-body:has(#lux_rs_portal_profile) {
  background:
    radial-gradient(ellipse 70% 55% at 8% -5%, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(ellipse 55% 45% at 92% 5%, rgba(129, 140, 248, 0.1), transparent 50%),
    linear-gradient(180deg, #121a2b 0%, #0f172a 42%, #111827 100%) !important;
}

body.lux-rs-body.lux-rs-portal-mode .lux-login-top,
body.lux-rs-body:has(#lux_rs_portal_profile) .lux-login-top {
  background: transparent;
}

/* Full-width portal shell (desktop system feel) */
.lux-rs-page:has(#lux_rs_portal_profile),
.lux-rs-page:has(.lux-rs-results--portal) {
  max-width: min(1280px, 100%);
  margin: 0 auto;
  gap: 1.25rem;
  padding: 0.25rem 0 1.5rem;
}

.lux-rs-results:has(#lux_rs_portal_profile),
.lux-rs-results--portal {
  width: 100%;
}

/* When portal is shown — desktop app width (override auth_lite 960px) */
body.lux-rs-body:has(#lux_rs_portal_profile) .lux-login-main,
body.lux-rs-body:has(.lux-rs-results--portal) .lux-login-main {
  width: min(100% - 2rem, 1360px) !important;
  max-width: 1360px !important;
  margin-top: 0.75rem !important;
}

body.lux-rs-body:has(#lux_rs_portal_profile) .lux-login-top,
body.lux-rs-body:has(.lux-rs-results--portal) .lux-login-top {
  max-width: min(1360px, 100% - 1rem) !important;
}

/* Fallback if :has() unsupported — class set when profile present */
body.lux-rs-body.lux-rs-portal-mode .lux-login-main {
  width: min(100% - 2rem, 1360px) !important;
  max-width: 1360px !important;
}

body.lux-rs-body.lux-rs-portal-mode .lux-login-top {
  max-width: min(1360px, 100% - 1rem) !important;
}

.lux-rs-portal {
  width: 100%;
  max-width: none;
  margin: 0;
  display: grid;
  gap: 1.15rem;
  padding: 0.15rem;
}

.lux-rs-portal--blend .lux-rs-portal-hero {
  color: #e2e8f0;
}

.lux-rs-portal-hero {
  position: relative;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 1.25rem 1.4rem;
  border-radius: 22px;
  overflow: visible;
  background:
    radial-gradient(ellipse 80% 120% at 0% 0%, rgba(99, 102, 241, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 90% at 100% 100%, rgba(56, 189, 248, 0.1), transparent 50%),
    linear-gradient(145deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.92));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.lux-rs-portal-hero-main {
  display: flex;
  gap: 1rem;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.lux-rs-portal-hero-text {
  min-width: 0;
  overflow: visible;
}

.lux-rs-portal-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.lux-rs-portal-avatar,
.lux-rs-portal-avatar-btn {
  position: relative;
  width: 4.15rem;
  height: 4.15rem;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #c7d2fe;
  background: linear-gradient(145deg, rgba(129, 140, 248, 0.32), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(165, 180, 252, 0.32);
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.2);
  overflow: hidden;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.lux-rs-portal-avatar-btn:hover,
.lux-rs-portal-avatar-btn:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(125, 211, 252, 0.55);
  box-shadow: 0 12px 24px rgba(56, 189, 248, 0.22);
  outline: none;
}

.lux-rs-portal-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.lux-rs-portal-avatar-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lux-rs-portal-avatar-edit {
  position: absolute;
  inset-inline-end: 0.2rem;
  bottom: 0.2rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #0b1220;
  background: #7dd3fc;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.lux-rs-portal-avatar-hint {
  font-size: 0.65rem;
  font-weight: 650;
  color: #94a3b8;
  text-align: center;
  max-width: 5.5rem;
  line-height: 1.25;
}

.lux-rs-portal-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #a5b4fc;
}

.lux-rs-portal-name {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.35rem, 2vw, 1.65rem);
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.025em;
  line-height: 1.25;
  word-break: break-word;
}

.lux-rs-portal-meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  font-size: 0.84rem;
  color: #94a3b8;
}

.lux-rs-portal-meta .fa { margin-inline-end: 0.25rem; opacity: 0.8; }

.lux-rs-portal-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.lux-rs-portal-logout:hover {
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
}

.lux-rs-portal-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.lux-rs-portal-stat {
  padding: 1rem 1.15rem;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.12);
  text-align: start;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.lux-rs-portal-stat:nth-child(1) {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(30, 41, 59, 0.5));
  border-color: rgba(56, 189, 248, 0.16);
}

.lux-rs-portal-stat:nth-child(2) {
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.12), rgba(30, 41, 59, 0.5));
  border-color: rgba(167, 139, 250, 0.16);
}

.lux-rs-portal-stat:nth-child(3) {
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.1), rgba(30, 41, 59, 0.5));
  border-color: rgba(52, 211, 153, 0.14);
}

.lux-rs-portal-stat strong {
  display: block;
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 800;
  color: #f1f5f9;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lux-rs-portal-stat span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
}

.lux-rs-portal-section {
  padding: 1.2rem 1.3rem 1.35rem;
  border-radius: 20px;
  background: rgba(30, 41, 59, 0.42);
  border: 1px solid rgba(148, 163, 184, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(8px);
}

.lux-rs-portal-section h3 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 750;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.lux-rs-portal-feed {
  display: grid;
  gap: 0.5rem;
}

.lux-rs-portal-feed-item {
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-rs-portal-feed-item.is-status {
  border-color: rgba(245, 158, 11, 0.22);
}

.lux-rs-portal-feed-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.25rem;
  font-size: 0.78rem;
}

.lux-rs-portal-feed-top strong { color: #f1f5f9; }
.lux-rs-portal-feed-top time { color: #64748b; margin-inline-start: auto; font-size: 0.7rem; }

.lux-rs-portal-sheet-ref {
  color: #7dd3fc;
  font-weight: 700;
  font-size: 0.72rem;
}

.lux-rs-portal-feed-item p {
  margin: 0;
  font-size: 0.84rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.lux-rs-portal-invoices {
  display: grid;
  gap: 0.45rem;
}

.lux-rs-portal-invoice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(8, 14, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-rs-portal-invoice strong { color: #f1f5f9; font-size: 0.9rem; }
.lux-rs-portal-invoice-date { display: block; font-size: 0.72rem; color: #64748b; margin-top: 0.15rem; }
.lux-rs-portal-invoice-right { text-align: end; }
.lux-rs-portal-amount { display: block; color: #a5b4fc; font-size: 0.95rem; }

.lux-rs-portal-pay {
  display: inline-block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  color: #94a3b8;
}

.lux-rs-portal-pay--paid {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
}

.lux-rs-portal-pay--due,
.lux-rs-portal-pay--partial {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.lux-rs-empty-note {
  color: #94a3b8 !important;
}

/* Soft glass tiles — mid blend */
.lux-rs-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.9rem;
}

.lux-rs-tile-grid--devices {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.lux-rs-tile-grid--updates {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.lux-rs-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-height: 168px;
  padding: 1.05rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(165deg, rgba(51, 65, 85, 0.45) 0%, rgba(30, 41, 59, 0.55) 100%);
  color: inherit;
  text-align: start;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  border-inline-start: 3px solid color-mix(in srgb, var(--tile-accent, #38bdf8) 72%, transparent);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.14);
  font: inherit;
}

.lux-rs-tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--tile-accent, #94a3b8) 35%, rgba(148, 163, 184, 0.2));
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2),
    0 0 0 1px color-mix(in srgb, var(--tile-accent, #38bdf8) 22%, transparent);
  background: linear-gradient(165deg, rgba(71, 85, 105, 0.5) 0%, rgba(30, 41, 59, 0.62) 100%);
}

/* Device cards: split design — dark info + solid status color, auto contrast */
.lux-rs-tile--device {
  --tile-accent: #38bdf8;
  --tile-on: #ffffff;
  --tile-on-muted: rgba(255, 255, 255, 0.82);
  --tile-on-soft: rgba(255, 255, 255, 0.16);
  --tile-on-border: rgba(255, 255, 255, 0.28);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
  min-height: 148px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-inline-start: 0;
  border-radius: 20px;
  background: #0b1220 !important;
  background-color: #0b1220 !important;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  appearance: none;
  -webkit-appearance: none;
  color: #e2e8f0;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lux-rs-tile--device:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: color-mix(in srgb, var(--tile-accent) 45%, rgba(148, 163, 184, 0.2));
  background: #0b1220 !important;
  background-color: #0b1220 !important;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.34),
    0 0 0 1px color-mix(in srgb, var(--tile-accent) 40%, transparent),
    0 0 32px color-mix(in srgb, var(--tile-accent) 18%, transparent);
}

.lux-rs-tile--device:hover .lux-rs-device-open {
  color: #7dd3fc;
  gap: 0.35rem;
}

.lux-rs-tile--device:hover .lux-rs-device-accent-ring {
  transform: scale(1.08);
  opacity: 1;
}

.lux-rs-tile--device:hover .lux-rs-device-accent-ico {
  transform: translateY(-2px) scale(1.05);
}

/* Dark half */
.lux-rs-device-main {
  position: relative;
  flex: 1 1 54%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.05rem 1.15rem;
  background:
    radial-gradient(circle at 0% 100%, color-mix(in srgb, var(--tile-accent) 10%, transparent), transparent 55%),
    #0b1220;
  text-align: start;
  z-index: 1;
}

.lux-rs-device-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.66rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--tile-accent) 70%, #94a3b8);
}

.lux-rs-device-kicker .fa {
  font-size: 0.72rem;
  opacity: 0.9;
}

.lux-rs-device-main .lux-rs-tile-title {
  color: #f8fafc;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1.28;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.lux-rs-device-main .lux-rs-tile-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  color: #94a3b8;
  font-size: 0.76rem;
  width: 100%;
}

.lux-rs-device-main .lux-rs-tile-line em {
  font-style: normal;
  opacity: 0.85;
}

.lux-rs-device-main .lux-rs-tile-line b {
  color: #e2e8f0;
  font-weight: 750;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.08rem 0.4rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.lux-rs-device-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.lux-rs-device-main .lux-rs-tile-ref {
  margin-top: 0;
  font-size: 0.74rem;
  font-weight: 750;
  color: #64748b;
  letter-spacing: 0.02em;
}

.lux-rs-device-open {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 750;
  color: #94a3b8;
  transition: color 0.15s, gap 0.15s;
}

.lux-rs-device-open .fa {
  font-size: 0.85rem;
}

/* Solid status half — contrast-aware text/icon */
.lux-rs-device-accent {
  position: relative;
  flex: 0 0 42%;
  max-width: 44%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1rem 0.75rem;
  overflow: hidden;
  background: var(--tile-accent, #38bdf8) !important;
  background-color: var(--tile-accent, #38bdf8) !important;
  color: var(--tile-on, #fff);
  text-align: center;
  isolation: isolate;
  /* diagonal cut edge */
  clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  margin-inline-start: -0.35rem;
  padding-inline-start: 1.1rem;
}

[dir="rtl"] .lux-rs-device-accent {
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
  margin-inline-start: 0;
  margin-inline-end: -0.35rem;
  padding-inline-start: 0.75rem;
  padding-inline-end: 1.1rem;
}

/* soft sheen only — not a muddy color gradient */
.lux-rs-device-accent-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(0, 0, 0, 0.12), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.lux-rs-device-accent-ring {
  position: absolute;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 999px;
  border: 1px solid var(--tile-on-border);
  opacity: 0.55;
  z-index: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.lux-rs-device-accent-ring::after {
  content: "";
  position: absolute;
  inset: 0.55rem;
  border-radius: inherit;
  border: 1px dashed var(--tile-on-border);
  opacity: 0.7;
}

.lux-rs-device-accent-ico,
.lux-rs-device-accent-label,
.lux-rs-device-accent-status {
  position: relative;
  z-index: 1;
}

.lux-rs-device-accent-ico {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--tile-on) !important;
  background: var(--tile-on-soft) !important;
  border: 1px solid var(--tile-on-border);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform 0.18s ease;
}

.lux-rs-device-accent-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tile-on-muted) !important;
  line-height: 1;
}

.lux-rs-device-accent-status {
  display: block;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--tile-on) !important;
  background: var(--tile-on-soft) !important;
  border: 1px solid var(--tile-on-border);
  backdrop-filter: blur(4px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Light accent → black ink; dark accent → white ink (set via PHP vars) */
.lux-rs-tile--device.is-accent-light .lux-rs-device-accent-glow {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 48%),
    radial-gradient(circle at 80% 90%, rgba(0, 0, 0, 0.08), transparent 50%);
}

.lux-rs-tile--device.is-accent-dark .lux-rs-device-accent-ico {
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.lux-rs-tile--device.has-notif {
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(248, 113, 113, 0.4),
    0 0 24px rgba(239, 68, 68, 0.12);
}

.lux-rs-tile--device .lux-rs-tile-notif {
  top: 0.5rem;
  inset-inline-end: auto;
  inset-inline-start: 0.5rem;
  z-index: 4;
}

.lux-rs-tile--invoice {
  border-inline-start-color: rgba(167, 139, 250, 0.75);
  background: linear-gradient(160deg, rgba(167, 139, 250, 0.14) 0%, rgba(30, 41, 59, 0.52) 55%);
  border-color: rgba(167, 139, 250, 0.14);
}

.lux-rs-tile--update.is-status {
  border-inline-start-color: rgba(251, 191, 36, 0.7);
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.12) 0%, rgba(30, 41, 59, 0.52) 55%);
  border-color: rgba(251, 191, 36, 0.14);
}

.lux-rs-tile--update.is-comment {
  border-inline-start-color: rgba(52, 211, 153, 0.7);
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.12) 0%, rgba(30, 41, 59, 0.52) 55%);
  border-color: rgba(52, 211, 153, 0.14);
}

.lux-rs-tile.has-notif {
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.14), 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.lux-rs-tile-notif {
  position: absolute;
  top: 0.55rem;
  inset-inline-end: 0.55rem;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.35);
  z-index: 2;
  animation: luxRsNotifPulse 1.8s ease-in-out infinite;
}

@keyframes luxRsNotifPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.lux-rs-tile-ico {
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: color-mix(in srgb, var(--tile-accent, #38bdf8) 88%, #fff);
  background: color-mix(in srgb, var(--tile-accent, #38bdf8) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile-accent, #38bdf8) 32%, transparent);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
  box-shadow: 0 0 16px color-mix(in srgb, var(--tile-accent, #38bdf8) 12%, transparent);
}

.lux-rs-tile-ico--inv {
  color: #c4b5fd;
  background: rgba(167, 139, 250, 0.14);
  border-color: rgba(167, 139, 250, 0.24);
}

.lux-rs-tile-ico--status {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.24);
}

.lux-rs-tile-title {
  font-size: 0.95rem;
  font-weight: 750;
  color: #f1f5f9;
  line-height: 1.35;
  word-break: break-word;
  letter-spacing: -0.01em;
}

.lux-rs-tile-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  align-items: baseline;
  font-size: 0.78rem;
  color: #94a3b8;
  width: 100%;
}

.lux-rs-tile-line em {
  font-style: normal;
  opacity: 0.9;
}

.lux-rs-tile-line b {
  color: #e2e8f0;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.lux-rs-tile-tag {
  font-family: inherit !important;
  font-size: 0.68rem !important;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc !important;
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.lux-rs-tile-status {
  margin-top: auto;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  color: color-mix(in srgb, var(--tile-accent, #38bdf8) 75%, #f8fafc);
  background: color-mix(in srgb, var(--tile-accent, #38bdf8) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--tile-accent, #38bdf8) 38%, transparent);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tile-accent, #38bdf8) 8%, transparent);
}

.lux-rs-tile-amount {
  margin-top: 0.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ddd6fe;
  letter-spacing: -0.02em;
}

.lux-rs-tile-ref {
  margin-top: auto;
  font-size: 0.74rem;
  font-weight: 650;
  color: #64748b;
}

.lux-rs-section-count {
  margin-inline-start: 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
}

.lux-rs-portal-hero-actions {
  position: relative;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  overflow: visible;
}

.lux-rs-portal-pin-btn {
  border-color: rgba(251, 191, 36, 0.3) !important;
  color: #fcd34d !important;
  background: rgba(251, 191, 36, 0.1) !important;
}

/* ── Notifications dropdown (dark, no white browser-button flash) ── */
.lux-rs-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 30;
}

.lux-rs-notif-bell {
  position: relative;
  box-sizing: border-box;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  background: #1e293b !important;
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  font: inherit;
  line-height: 1;
}

.lux-rs-notif-bell:hover,
.lux-rs-notif-bell:focus-visible,
.lux-rs-notif-bell[aria-expanded="true"] {
  background: #243447 !important;
  background-color: #243447 !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #7dd3fc !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.lux-rs-notif-bell.has-unread {
  color: #fcd34d !important;
  border-color: rgba(251, 191, 36, 0.45) !important;
  background: #2a2418 !important;
  background-color: #2a2418 !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.1), 0 2px 10px rgba(0, 0, 0, 0.22);
}

.lux-rs-notif-bell-count {
  position: absolute;
  top: -0.3rem;
  inset-inline-end: -0.28rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  color: #fff !important;
  background: #ef4444 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.45);
  line-height: 1;
  z-index: 1;
}

.lux-rs-notif-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  width: min(360px, calc(100vw - 1.5rem));
  max-height: min(420px, 65vh);
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background: #152033 !important;
  background-color: #152033 !important;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(15, 23, 42, 0.6);
  z-index: 80;
  overflow: hidden;
  color: #e2e8f0;
}

.lux-rs-notif-panel[hidden] {
  display: none !important;
}

.lux-rs-notif-panel-head {
  flex-shrink: 0;
  padding: 0.8rem 0.95rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: linear-gradient(180deg, #1a2740 0%, #152033 100%) !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: start;
}

.lux-rs-notif-panel-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  color: #f8fafc;
}

.lux-rs-notif-panel-title > .fa {
  color: #fbbf24;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.lux-rs-notif-panel-head strong,
.lux-rs-notif-panel-title strong {
  color: #f8fafc !important;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.lux-rs-notif-panel-sub {
  display: block;
  margin-inline-start: 1.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8 !important;
  line-height: 1.3;
}

.lux-rs-notif-list {
  overflow-y: auto;
  max-height: 320px;
  background: #121c2e !important;
  background-color: #121c2e !important;
  -webkit-overflow-scrolling: touch;
}

.lux-rs-notif-item {
  box-sizing: border-box;
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.75rem 0.9rem;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08) !important;
  background: #121c2e !important;
  background-color: #121c2e !important;
  color: #e2e8f0 !important;
  text-align: start;
  cursor: pointer;
  font: inherit;
  line-height: 1.35;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none !important;
  transition: background 0.12s ease;
}

.lux-rs-notif-item:hover,
.lux-rs-notif-item:focus-visible {
  background: #1a2740 !important;
  background-color: #1a2740 !important;
  outline: none;
}

/* Unread / new — amber tint, never white */
.lux-rs-notif-item.is-new {
  background: #1f2418 !important;
  background-color: #1f2418 !important;
  box-shadow: inset 3px 0 0 #f59e0b !important;
}

.lux-rs-notif-item.is-new:hover,
.lux-rs-notif-item.is-new:focus-visible {
  background: #2a2f1c !important;
  background-color: #2a2f1c !important;
}

[dir="rtl"] .lux-rs-notif-item.is-new {
  box-shadow: inset -3px 0 0 #f59e0b !important;
}

.lux-rs-notif-item-ico {
  flex-shrink: 0;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7dd3fc !important;
  background: rgba(56, 189, 248, 0.14) !important;
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.8rem;
}

.lux-rs-notif-item-ico.is-status {
  color: #fcd34d !important;
  background: rgba(251, 191, 36, 0.14) !important;
  border-color: rgba(251, 191, 36, 0.28);
}

.lux-rs-notif-item-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  text-align: start;
}

.lux-rs-notif-item-body strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f1f5f9 !important;
  line-height: 1.35;
  word-break: break-word;
}

.lux-rs-notif-item.is-new .lux-rs-notif-item-body strong {
  color: #fef3c7 !important;
}

.lux-rs-notif-item-body em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 550;
  color: #94a3b8 !important;
  line-height: 1.3;
}

.lux-rs-notif-dot {
  flex-shrink: 0;
  width: 0.48rem;
  height: 0.48rem;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.lux-rs-notif-item.is-new .lux-rs-notif-dot {
  background: #fbbf24 !important;
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.lux-rs-notif-empty {
  margin: 0;
  padding: 1.25rem 1rem;
  text-align: center;
  color: #94a3b8 !important;
  font-size: 0.84rem;
  background: #121c2e !important;
}

/* Small screens: keep dropdown on-screen */
@media (max-width: 520px) {
  .lux-rs-notif-panel {
    position: fixed;
    top: auto;
    bottom: 0.75rem;
    inset-inline-start: 0.75rem;
    inset-inline-end: 0.75rem;
    width: auto;
    max-height: min(70vh, 480px);
    border-radius: 18px;
  }

  .lux-rs-portal-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ===== Chat: normal window, tight message bubbles ===== */
.lux-rs-section--chat {
  margin-top: 0.45rem;
}

.lux-rs-chat-title {
  margin: 0 0 0.4rem !important;
  font-size: 0.9rem !important;
}

.lux-rs-chat-panel,
.lux-rs-chat-panel--pro,
.lux-rs-chat-panel--compact {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: #0c1424;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  height: min(48vh, 380px);
  max-height: min(48vh, 380px);
}

.lux-rs-chat,
.lux-rs-chat--pro {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow-y: auto;
  scroll-behavior: smooth;
  background: #0c1424;
}

.lux-rs-chat-empty {
  margin: 0.55rem auto;
  max-width: 14rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
}
.lux-rs-chat-empty p { margin: 0; }
.lux-rs-chat-empty-ico {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.18);
  font-size: 0.8rem;
}

.lux-rs-chat-sys {
  display: flex;
  justify-content: center;
  margin: 0.05rem 0;
}

.lux-rs-chat-sys-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.18rem 0.28rem;
  max-width: 96%;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 650;
  line-height: 1.25;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: none;
}

.lux-rs-chat-sys-pill > .fa {
  color: #fbbf24;
  font-size: 0.68rem;
}

.lux-rs-chat-sys-note {
  color: #94a3b8;
  font-weight: 500;
}

.lux-rs-chat-sys-pill time {
  color: #64748b;
  font-weight: 600;
  font-size: 0.64rem;
}

.lux-rs-chat-row {
  display: flex;
  align-items: flex-end;
  gap: 0.35rem;
  max-width: 88%;
}

.lux-rs-chat-row.is-them { align-self: flex-start; }

.lux-rs-chat-row.is-me {
  align-self: flex-end;
  flex-direction: row-reverse;
  margin-inline-start: auto;
}

.lux-rs-chat-av {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.58rem;
  font-weight: 800;
  color: #bae6fd;
  background: #1e3a5f;
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
}
.lux-rs-chat-av.is-me {
  color: #a7f3d0;
  background: #0f766e;
  border-color: rgba(45, 212, 191, 0.35);
}
.lux-rs-chat-av--img {
  padding: 0;
  background: #1e293b;
}
.lux-rs-chat-av--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Bubble height = content only (no tall empty padding) */
.lux-rs-chat-bubble {
  position: relative;
  min-width: 0;
  max-width: 100%;
  min-height: 0 !important;
  padding: 0.18rem 0.48rem 0.14rem !important;
  border-radius: 9px;
  box-shadow: none;
  line-height: 1.2;
}

.lux-rs-chat-bubble.is-them {
  background: #172033;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-end-start-radius: 3px;
  color: #e2e8f0;
}

.lux-rs-chat-bubble.is-me {
  background: #134e4a;
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-end-end-radius: 3px;
  color: #ecfeff;
}

/* Staff name: one thin line only */
.lux-rs-chat-name {
  display: block;
  margin: 0 0 1px;
  font-size: 0.58rem;
  font-weight: 750;
  color: #7dd3fc;
  line-height: 1.1;
}
.lux-rs-chat-bubble.is-me .lux-rs-chat-name { display: none; } /* own messages: no name row */

.lux-rs-chat-text {
  margin: 0 !important;
  padding: 0 !important;
  display: block;
  font-size: 0.8rem !important;
  font-weight: 500;
  line-height: 1.22 !important;
  white-space: pre-wrap;
  word-break: break-word;
}

.lux-rs-chat-bubble.is-them .lux-rs-chat-text { color: #e8eef8; }
.lux-rs-chat-bubble.is-me .lux-rs-chat-text { color: #f0fdfa; }

/* Time tucked under text, minimal height */
.lux-rs-chat-meta {
  display: flex;
  justify-content: flex-end;
  margin: 1px 0 0;
  line-height: 1;
}

.lux-rs-chat-time {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  font-size: 0.54rem;
  font-weight: 650;
  opacity: 0.72;
  line-height: 1;
  white-space: nowrap;
}

.lux-rs-chat-bubble.is-them .lux-rs-chat-time { color: #94a3b8; }
.lux-rs-chat-bubble.is-me .lux-rs-chat-time { color: #99f6e4; }

.lux-rs-chat-time .fa {
  font-size: 0.5rem;
  opacity: 0.9;
}

/* Composer under feed */
.lux-rs-chat-panel > .lux-rs-wa-composer,
.lux-rs-chat-panel--compact > .lux-rs-wa-composer {
  margin-top: 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: #111b2e;
  flex-shrink: 0;
}

/* Customer portal: WhatsApp bar — short input, messages take the height */
.lux-rs-wa-composer,
.lux-rs-wa-composer--compact {
  margin-top: 0;
  padding: 0.4rem 0.5rem;
  border-radius: 0;
  background: #111b2e;
  border: 0;
  flex-shrink: 0;
}

.lux-rs-wa-hint { display: none; }

.lux-rs-wa-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
}

.lux-rs-wa-av {
  flex-shrink: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 0.15rem;
}
.lux-rs-wa-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lux-rs-wa-av--letter {
  font-size: 0.65rem;
  font-weight: 800;
  color: #7dd3fc;
}

.lux-rs-wa-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 96px;
  height: 40px;
  padding: 0.5rem 0.85rem;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(30, 41, 59, 0.9);
  color: #e2e8f0;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.35;
  resize: none;
  overflow-y: auto;
}

.lux-rs-wa-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.12);
}

.lux-rs-wa-send {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(145deg, #38bdf8, #0ea5e9);
  box-shadow: 0 3px 8px rgba(14, 165, 233, 0.28);
  transition: transform 0.12s, box-shadow 0.12s, opacity 0.12s;
  font-size: 0.75rem;
}

.lux-rs-wa-send:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.38);
}

.lux-rs-wa-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.lux-rs-wa-send .fa {
  margin-inline-start: 1px;
}

.lux-rs-customer-comment-msg {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  font-weight: 650;
}
.lux-rs-customer-comment-msg.is-ok { color: #86efac; }
.lux-rs-customer-comment-msg.is-err { color: #fca5a5; }

/* Modal stays mid-dark (comfortable, not white) */
body.lux-rs-portal-mode .lux-rs-modal-panel {
  background: linear-gradient(180deg, #1a2438 0%, #121a2b 100%);
  border-color: rgba(148, 163, 184, 0.16);
}

body.lux-rs-portal-mode .lux-rs-modal-head {
  background: rgba(15, 23, 42, 0.75);
  border-bottom-color: rgba(148, 163, 184, 0.12);
}

body.lux-rs-portal-mode .lux-rs-modal-head h3 {
  color: #f1f5f9;
}

body.lux-rs-portal-mode .lux-rs-modal-close,
body.lux-rs-portal-mode .lux-rs-modal-btn {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border-color: rgba(148, 163, 184, 0.18);
}

body.lux-rs-portal-mode .lux-rs-empty-note {
  color: #94a3b8;
}

body.lux-rs-portal-mode .lux-rs-modal-body .lux-rs-card {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

/* Modal */
body.lux-rs-modal-open {
  overflow: hidden;
}

.lux-rs-modal {
  position: fixed;
  inset: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lux-rs-modal[hidden] {
  display: none !important;
}

.lux-rs-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.lux-rs-modal-panel {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: min(92vh, 940px);
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: linear-gradient(180deg, #121a2b 0%, #0b1220 100%);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.lux-rs-modal-panel--sm {
  width: min(420px, 100%);
  max-height: none;
}

.lux-rs-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(15, 23, 42, 0.9);
}

.lux-rs-modal-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f1f5f9;
}

.lux-rs-modal-head-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.lux-rs-modal-close,
.lux-rs-modal-btn {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.4rem 0.65rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 650;
}

.lux-rs-modal-close {
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lux-rs-modal-body {
  overflow: auto;
  padding: 1rem;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.lux-rs-modal-loading {
  text-align: center;
  padding: 2.5rem;
  color: #94a3b8;
  font-size: 1.5rem;
}

/* Printed invoice looks white paper */
.lux-rs-print-sheet {
  background: #fff;
  color: #000;
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
}

.lux-rs-print-sheet * {
  color: inherit;
}

.lux-rs-print-sheet .text-center { text-align: center; }
.lux-rs-print-sheet .pull-left { float: left; }
.lux-rs-print-sheet .pull-right { float: right; }
.lux-rs-print-sheet .row::after {
  content: "";
  display: table;
  clear: both;
}

.lux-rs-pin-form {
  display: grid;
  gap: 0.75rem;
}

.lux-rs-pin-field label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
}

.lux-rs-pin-field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #0f172a;
  color: #e2e8f0;
  font-size: 1rem;
  letter-spacing: 0.08em;
}

.lux-rs-pin-msg {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
}

.lux-rs-pin-msg.is-ok { color: #86efac; }
.lux-rs-pin-msg.is-err { color: #fca5a5; }

.lux-rs-update-full {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: #f1f5f9;
  line-height: 1.5;
  white-space: pre-wrap;
}

.lux-rs-update-meta {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

/* Desktop: integrated dashboard density */
@media (min-width: 1024px) {
  .lux-rs-page:has(#lux_rs_portal_profile) {
    max-width: min(1360px, calc(100% - 2rem));
    padding-top: 0.5rem;
  }

  .lux-rs-portal {
    gap: 1.35rem;
  }

  .lux-rs-tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1rem;
  }

  .lux-rs-tile-grid--devices {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  .lux-rs-tile:not(.lux-rs-tile--device) {
    min-height: 180px;
    padding: 1.15rem 1.1rem;
  }

  .lux-rs-tile--device {
    min-height: 140px;
  }

  .lux-rs-portal-section {
    padding: 1.35rem 1.45rem 1.5rem;
  }

  .lux-rs-portal-stats {
    gap: 1rem;
  }
}

@media (min-width: 1280px) {
  .lux-rs-tile-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .lux-rs-tile-grid--devices {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lux-rs-tile-grid--updates {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .lux-rs-portal-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .lux-rs-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .lux-rs-tile-grid--devices {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .lux-rs-tile:not(.lux-rs-tile--device) {
    min-height: 140px;
    padding: 0.8rem 0.75rem;
  }

  .lux-rs-tile--device {
    min-height: 132px;
  }

  .lux-rs-device-main {
    padding: 0.9rem 0.95rem;
    gap: 0.32rem;
  }

  .lux-rs-device-main .lux-rs-tile-title {
    font-size: 0.92rem;
  }

  .lux-rs-device-accent {
    flex-basis: 40%;
    max-width: 42%;
    padding: 0.8rem 0.55rem 0.8rem 0.95rem;
    gap: 0.32rem;
  }

  [dir="rtl"] .lux-rs-device-accent {
    padding: 0.8rem 0.95rem 0.8rem 0.55rem;
  }

  .lux-rs-device-accent-ico {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.1rem;
    border-radius: 13px;
  }

  .lux-rs-device-accent-ring {
    width: 4.4rem;
    height: 4.4rem;
  }

  .lux-rs-device-accent-status {
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
  }

  .lux-rs-device-accent-label {
    font-size: 0.58rem;
  }

  .lux-rs-modal {
    padding: 0.5rem;
  }
  .lux-rs-modal-panel {
    max-height: 96vh;
  }
}

.lux-rs-portal-sheet {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(8, 14, 26, 0.45);
  overflow: hidden;
}

.lux-rs-portal-sheet-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  cursor: pointer;
  list-style: none;
}

.lux-rs-portal-sheet-sum::-webkit-details-marker { display: none; }

.lux-rs-portal-sheet-sum strong {
  display: block;
  color: #7dd3fc;
  font-size: 0.92rem;
  font-weight: 800;
}

.lux-rs-portal-sheet-device {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.lux-rs-portal-sheet-body {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lux-rs-portal-sheet-body .lux-rs-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

@media (max-width: 640px) {
  .lux-rs-portal-stats {
    grid-template-columns: 1fr;
  }
}
