/* ══════════════════════════════════════════════════════════════════
   Lighthouse Platform — Design System v2.0
   Brand: #19212E navy · #6CB8E6 accent · #0E4878 deep horizon
   Font:  Inter (UI) · JetBrains Mono (serial/code)
   Grid:  4px base
   ══════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ══════════════════════════════════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════════════════════════════════ */
:root {
  /* ── Brand colours ──────────────────────────────────────────── */
  --lh-navy: #19212E;
  --lh-navy-dark: #141B25;
  --lh-navy-deeper: #0E1014;
  --lh-teal: #6CB8E6;
  --lh-teal-light: #70C2ED;
  --lh-beam: #6CB8E6;
  --lh-horizon: #0E4878;

  /* ── Backgrounds ────────────────────────────────────────────── */
  --lh-bg: #F8F9FB;
  --lh-bg-surface: #FFFFFF;
  --lh-bg-surface-alt: #F3F4F7;
  --lh-bg-hover: #EFF1F5;

  /* ── Text ───────────────────────────────────────────────────── */
  --lh-text: #19212E;
  --lh-text-2: #323A42;
  --lh-text-muted: #6B7585;
  --lh-text-disabled: #B0B8C4;

  /* ── Borders ────────────────────────────────────────────────── */
  --lh-border: #DDE1E8;
  --lh-border-subtle: #EDF0F4;

  /* ── Semantic status ────────────────────────────────────────── */
  --lh-success: #16A34A;
  --lh-success-subtle: #F0FDF4;
  --lh-error: #DC2626;
  --lh-error-subtle: #FEF2F2;
  --lh-warning: #D97706;
  --lh-warning-subtle: #FFFBEB;
  --lh-warning-text: #92400E;
  --lh-info: #2563EB;
  --lh-info-subtle: #EFF6FF;

  /* ── Lifecycle badge colours ────────────────────────────────── */
  --lh-in-service-bg: #ECFDF5;
  --lh-in-service-fg: #065F46;
  --lh-in-repair-bg: #FFF7ED;
  --lh-in-repair-fg: #9A3412;
  --lh-retired-bg: #F3F4F6;
  --lh-retired-fg: #374151;
  --lh-unknown-bg: #EFF6FF;
  --lh-unknown-fg: #1E40AF;
  --lh-lost-bg: #FEF2F2;
  --lh-lost-fg: #991B1B;
  --lh-recycled-bg: #F0FDF4;
  --lh-recycled-fg: #166534;
  --lh-disposed-bg: #F9FAFB;
  --lh-disposed-fg: #6B7280;
  --lh-stolen-bg: #FEF2F2;
  --lh-stolen-fg: #991B1B;

  /* ── Shadows ────────────────────────────────────────────────── */
  --lh-shadow-xs: 0 1px 2px rgba(25, 33, 46, 0.03);
  --lh-shadow-sm: 0 1px 2px rgba(25, 33, 46, 0.04);
  --lh-shadow-md: 0 2px 8px rgba(25, 33, 46, 0.08);
  --lh-shadow-lg: 0 4px 12px rgba(25, 33, 46, 0.08), 0 1px 3px rgba(25, 33, 46, 0.06);
  --lh-shadow-xl: 0 8px 24px rgba(25, 33, 46, 0.12);
  --lh-beam-glow: 0 0 16px rgba(108, 184, 230, 0.25);

  /* ── Border radii ───────────────────────────────────────────── */
  --lh-radius: 4px;
  --lh-radius-lg: 6px;
  --lh-radius-badge: 4px;
  --lh-radius-modal: 8px;

  /* ── Typography ─────────────────────────────────────────────── */
  --lh-font: 'Inter', system-ui, -apple-system, sans-serif;
  --lh-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* ── Nav ────────────────────────────────────────────────────── */
  --lh-nav-width: 220px;

  /* ── Transitions ────────────────────────────────────────────── */
  --lh-transition-fast: 120ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --lh-transition: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --lh-transition-slow: 300ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --lh-transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --lh-ease-out: cubic-bezier(0.25, 0.1, 0.25, 1);
  --lh-ease-in-out: cubic-bezier(0.42, 0, 0.58, 1);

  /* ── Overlay ────────────────────────────────────────────────── */
  --lh-overlay: rgba(25, 33, 46, 0.50);

  /* ── Z-index ────────────────────────────────────────────────── */
  --lh-z-dropdown: 100;
  --lh-z-modal: 1000;
  --lh-z-toast: 9999;
}

/* ══════════════════════════════════════════════════════════════════
   ANIMATION KEYFRAMES
   ══════════════════════════════════════════════════════════════════ */

/* ── Page / content entrance ─────────────────────────────────── */
@keyframes lh-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lh-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lh-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal ────────────────────────────────────────────────────── */
@keyframes lh-modal-in {
  from { opacity: 0; transform: scale(0.95) translateY(4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes lh-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Toast ────────────────────────────────────────────────────── */
@keyframes lh-toast-in {
  from { opacity: 0; transform: translateX(1rem) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes lh-toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(1rem) scale(0.95); }
}

/* ── Skeleton ─────────────────────────────────────────────────── */
@keyframes lh-skeleton-pulse {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Stagger entrance ─────────────────────────────────────────── */
@keyframes lh-stagger-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Spinner ──────────────────────────────────────────────────── */
@keyframes lh-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Dropdown ─────────────────────────────────────────────────── */
@keyframes lh-dropdown-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Status dot pulse ─────────────────────────────────────────── */
@keyframes lh-status-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ── Loading bar ──────────────────────────────────────────────── */
@keyframes lh-loading-bar {
  from { transform: translateX(-100%); }
  to   { transform: translateX(100%); }
}

/* ══════════════════════════════════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--lh-font);
  font-size: 14px;
  color: var(--mud-palette-text-primary, var(--lh-text));
  background: var(--mud-palette-background, var(--lh-bg));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--mud-palette-primary, var(--lh-navy));
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus,
.mud-typography:focus {
  outline: none;
}

button {
  font-family: var(--lh-font);
}

/* Old app shell + sidebar nav removed — replaced by MudBlazor MudDrawer (Slice 1.96) */

/* ══════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════════════ */
.lh-main {
  flex: 1;
  padding: 28px 36px;
  min-width: 0;
  overflow-x: hidden;
  animation: lh-fade-in 200ms ease both;
}

/* Content links */
.lh-main a:not(.lh-btn):not(.lh-nav a) {
  color: var(--lh-teal);
  text-decoration: none;
  transition: color var(--lh-transition-fast);
}

.lh-main a:not(.lh-btn):not(.lh-nav a):hover {
  color: var(--lh-teal-light);
  text-decoration: none;
}

/* ══════════════════════════════════════════════════════════════════
   PAGE HEADER
   ══════════════════════════════════════════════════════════════════ */
.lh-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.lh-page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--lh-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.lh-page-sub {
  font-size: 13px;
  color: var(--lh-text-muted);
  margin-top: 2px;
}

.lh-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--lh-text-muted);
  margin-bottom: 4px;
}

.lh-breadcrumb a {
  color: var(--lh-text-muted);
  text-decoration: none;
}

.lh-breadcrumb a:hover {
  color: var(--lh-navy);
  text-decoration: underline;
}

.lh-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--lh-text);
  margin: 0 0 12px;
}

/* ══════════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════════ */
.lh-card {
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border);
  border-radius: var(--lh-radius-lg);
  padding: 20px 24px;
  box-shadow: var(--lh-shadow-sm);
  transition: box-shadow var(--lh-transition), border-color var(--lh-transition);
}

.lh-card:hover {
  box-shadow: var(--lh-shadow-md);
  border-color: var(--lh-teal);
}

.lh-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--lh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════════════ */
.lh-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .lh-form-row { grid-template-columns: 1fr; }
}

.lh-divider {
  border: none;
  border-top: 1px solid var(--lh-border);
  margin: 20px 0;
  padding: 0;
}

/* ══════════════════════════════════════════════════════════════════
   TABLES — Kept utility classes
   ══════════════════════════════════════════════════════════════════ */
.lh-table-cell-primary {
  font-weight: 500;
  color: var(--lh-text);
}

/* ══════════════════════════════════════════════════════════════════
   EMPTY STATES
   ══════════════════════════════════════════════════════════════════ */
.lh-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  animation: lh-fade-in var(--lh-transition-slow) var(--lh-ease-out) both;
}

.lh-empty-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  opacity: 0.50;
  color: var(--lh-text-muted);
}

.lh-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--lh-text);
  margin-bottom: 6px;
}

.lh-empty-sub {
  font-size: 13px;
  color: var(--lh-text-muted);
  margin-bottom: 16px;
  max-width: 320px;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
   TIMELINE
   ══════════════════════════════════════════════════════════════════ */
.lh-timeline {
  list-style: none;
  position: relative;
  padding-left: 36px;
  margin: 0;
}

.lh-timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: var(--lh-border);
}

.lh-timeline-item {
  position: relative;
  padding-bottom: 20px;
  animation: lh-fade-in var(--lh-transition-slow) var(--lh-ease-out) both;
}

.lh-timeline-item:last-child { padding-bottom: 0; }

.lh-timeline-item:nth-child(1) { animation-delay: 0ms; }
.lh-timeline-item:nth-child(2) { animation-delay: 50ms; }
.lh-timeline-item:nth-child(3) { animation-delay: 100ms; }
.lh-timeline-item:nth-child(4) { animation-delay: 150ms; }
.lh-timeline-item:nth-child(5) { animation-delay: 200ms; }
.lh-timeline-item:nth-child(6) { animation-delay: 250ms; }
.lh-timeline-item:nth-child(7) { animation-delay: 300ms; }
.lh-timeline-item:nth-child(8) { animation-delay: 350ms; }

.lh-timeline-dot {
  position: absolute;
  left: -30px;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--lh-bg-surface);
  z-index: 1;
}

.lh-timeline-dot .mud-icon-root { font-size: 14px !important; color: #fff; }

.lh-timeline-dot--created   { background: var(--lh-teal); }
.lh-timeline-dot--updated   { background: var(--lh-primary); }
.lh-timeline-dot--lifecycle  { background: #F59E0B; }
.lh-timeline-dot--assigned  { background: #8B5CF6; }
.lh-timeline-dot--observed  { background: #64748B; }
.lh-timeline-dot--default   { background: var(--lh-border); }
.lh-timeline-dot--info      { background: var(--lh-info); }

.lh-timeline-event {
  font-size: 13px;
  font-weight: 600;
  color: var(--lh-text);
  line-height: 1.4;
}

.lh-timeline-actor {
  font-size: 12px;
  color: var(--lh-text-2);
  margin-top: 1px;
}

.lh-timeline-detail {
  font-size: 12px;
  color: var(--lh-text-muted);
  margin-top: 4px;
  line-height: 1.4;
}

.lh-timeline-notes {
  font-size: 12px;
  color: var(--lh-text-2);
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--lh-bg-surface-alt);
  border-radius: 6px;
  border-left: 3px solid var(--lh-border);
  line-height: 1.5;
  overflow: hidden;
}

.lh-timeline-notes--truncated {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lh-timeline-time {
  font-size: 11px;
  color: var(--lh-text-muted);
  margin-top: 4px;
}

.lh-timeline-body {
  font-size: 13px;
  color: var(--lh-text);
  line-height: 1.5;
}

.lh-timeline-meta {
  font-size: 11px;
  color: var(--lh-text-muted);
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   MONO  (serial numbers, IDs, slugs)
   ══════════════════════════════════════════════════════════════════ */
.lh-mono {
  font-family: var(--lh-mono);
  font-size: 12px;
  color: var(--lh-text-2);
  background: var(--lh-bg-surface-alt);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--lh-border-subtle);
}

/* ══════════════════════════════════════════════════════════════════
   PLATFORM CONTEXT NAV ELEMENTS  (Slice 1.9)
   ══════════════════════════════════════════════════════════════════ */
.lh-btn-exit-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 10px 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--lh-radius);
  color: #FFFFFF;
  font-family: var(--lh-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  width: calc(100% - 20px);
  transition: background var(--lh-transition);
  text-align: left;
}

.lh-btn-exit-platform:hover {
  background: rgba(255, 255, 255, 0.18);
}

.lh-btn-exit-platform .lh-nav-icon {
  width: 14px;
  height: 14px;
  opacity: 1;
  flex-shrink: 0;
}

.lh-platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  background: rgba(108, 184, 230, 0.15);
  border: 1px solid rgba(108, 184, 230, 0.35);
  border-radius: var(--lh-radius-badge);
  color: var(--lh-beam);
  font-family: var(--lh-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--lh-transition);
  white-space: nowrap;
}

.lh-platform-pill:hover {
  background: rgba(108, 184, 230, 0.25);
}

.lh-viewing-as-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: -24px -32px 24px;
  background: var(--lh-warning-subtle);
  border-bottom: 1px solid #FCD34D;
  color: var(--lh-warning-text);
  font-size: 13px;
  font-weight: 500;
}

.lh-viewing-as-banner strong {
  font-weight: 700;
}

.lh-viewing-as-exit {
  margin-left: auto;
  padding: 2px 10px;
  background: transparent;
  border: 1px solid var(--lh-warning-text);
  border-radius: var(--lh-radius);
  color: var(--lh-warning-text);
  font-family: var(--lh-font);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background var(--lh-transition);
  flex-shrink: 0;
}

.lh-viewing-as-exit:hover {
  background: rgba(146, 64, 14, 0.08);
}

/* ══════════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ══════════════════════════════════════════════════════════════════ */
.lh-text-sm {
  font-size: 12px;
}

.lh-text-xs {
  font-size: 11px;
}

.lh-text-muted {
  color: var(--lh-text-muted);
}

.lh-text-2 {
  color: var(--lh-text-2);
}

.lh-text-success {
  color: var(--lh-success);
}

.lh-text-error {
  color: var(--lh-error);
}

.lh-text-warning {
  color: var(--lh-warning);
}

.lh-fw-400 {
  font-weight: 400;
}

.lh-fw-500 {
  font-weight: 500;
}

.lh-fw-600 {
  font-weight: 600;
}

.lh-fw-700 {
  font-weight: 700;
}

.lh-mt-1 {
  margin-top: 4px;
}

.lh-mt-2 {
  margin-top: 8px;
}

.lh-mt-3 {
  margin-top: 12px;
}

.lh-mt-4 {
  margin-top: 16px;
}

.lh-mb-1 {
  margin-bottom: 4px;
}

.lh-mb-2 {
  margin-bottom: 8px;
}

.lh-mb-3 {
  margin-bottom: 12px;
}

.lh-mb-4 {
  margin-bottom: 16px;
}

.lh-flex {
  display: flex;
}

.lh-flex-center {
  display: flex;
  align-items: center;
}

.lh-flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lh-flex-col {
  display: flex;
  flex-direction: column;
}

.lh-flex-wrap {
  flex-wrap: wrap;
}

.lh-flex-1 {
  flex: 1;
}

.lh-items-center {
  align-items: center;
}

.lh-justify-between {
  justify-content: space-between;
}

.lh-gap-1 {
  gap: 4px;
}

.lh-gap-2 {
  gap: 8px;
}

.lh-gap-3 {
  gap: 12px;
}

.lh-gap-4 {
  gap: 16px;
}

.lh-gap-5 {
  gap: 20px;
}

.lh-mb-6 {
  margin-bottom: 24px;
}

.lh-w-full {
  width: 100%;
}

.lh-truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lh-clickable {
  cursor: pointer;
}

.lh-text-xs {
  font-size: 12px;
}

.lh-text-sm {
  font-size: 13px;
}

.lh-container-sm {
  max-width: 480px;
}

.lh-container-md {
  max-width: 640px;
}

.lh-container-lg {
  max-width: 720px;
}

/* ══════════════════════════════════════════════════════════════════
   WORKSPACE SWITCHER  (Slice 1.9 nav redesign)
   ══════════════════════════════════════════════════════════════════ */
.lh-ws-switcher {
  position: relative;
  margin: 8px 10px;
  border-radius: var(--lh-radius-lg);
  border: 1px solid var(--lh-border);
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  background: var(--lh-bg-surface-alt);
  transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}

.lh-ws-switcher:hover {
  border-color: var(--lh-border);
  background: var(--lh-bg-hover);
}

.lh-ws-current {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.lh-ws-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: var(--mud-palette-primary, #1E299B);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.lh-ws-info {
  flex: 1;
  min-width: 0;
}

.lh-ws-name {
  color: var(--lh-text);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lh-ws-slug {
  color: var(--lh-text-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.lh-ws-chevron {
  width: 14px;
  height: 14px;
  color: var(--lh-text-muted);
  flex-shrink: 0;
  transition: transform 150ms ease;
}

.lh-ws-chevron.open {
  transform: rotate(180deg);
}

/* Dropdown */
.lh-ws-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border);
  border-radius: var(--lh-radius-lg);
  box-shadow: var(--lh-shadow-lg);
  z-index: var(--lh-z-dropdown);
  overflow: hidden;
  min-width: 200px;
  animation: lh-dropdown-in var(--lh-transition) var(--lh-ease-out);
}

.lh-ws-dropdown-section {
  padding: 8px 12px 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: var(--lh-text-muted);
  text-transform: uppercase;
}

.lh-ws-divider {
  height: 1px;
  background: var(--lh-border-subtle);
  margin: 4px 0;
}

.lh-ws-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--lh-transition);
  border-radius: 0;
}

.lh-ws-option:hover {
  background: var(--lh-bg-hover);
}

.lh-ws-option.active {
  background: rgba(30, 41, 155, 0.06);
}

.lh-ws-option-main {
  display: flex;
  align-items: center;
  gap: 4px;
}

.lh-ws-option-name {
  color: var(--lh-text);
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lh-ws-option-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
  font-size: 11px;
  color: var(--lh-text-muted);
}

.lh-ws-option-role {
  color: var(--lh-text-2);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── AUTH PAGES ─────────────────────────────────────────────── */
.lh-auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--lh-bg) 0%, #0E1A2B 50%, #0E2A3D 100%);
  padding: 24px;
}

.lh-auth-card {
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border);
  border-radius: 16px;
  box-shadow: var(--lh-shadow-lg);
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
  animation: lh-modal-in var(--lh-transition-slow) var(--lh-ease-out);
}

.lh-auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.lh-auth-logo img {
  height: 200px;
  width: auto;
  object-fit: contain;
}

.lh-auth-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--lh-text);
  margin-bottom: 6px;
  text-align: center;
}

.lh-auth-sub {
  font-size: 13px;
  color: var(--lh-text-muted);
  margin-bottom: 24px;
  text-align: center;
  line-height: 1.5;
}

/* ══════════════════════════════════════════════════════════════════
   PATCH — append to end of lighthouse-theme.css
   New classes added in Slice 1.9 workspace switcher + TenantDetail
   ══════════════════════════════════════════════════════════════════ */

/* ── Stats row  (TenantDetail overview cards) ───────────────────── */
.lh-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .lh-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lh-snapshot-freshness {
  margin-top: -12px;
  margin-bottom: 12px;
}

.lh-snapshot-stale {
  color: var(--lh-warning);
}

.lh-stat-card {
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border);
  border-radius: var(--lh-radius-lg);
  padding: 16px 20px;
  box-shadow: none;
  transition: border-color 150ms ease;
}

.lh-stat-card:hover {
  border-color: var(--lh-teal);
  box-shadow: var(--lh-shadow-sm);
}

.lh-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--lh-text);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.lh-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--lh-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Workspace switcher search  (MainLayout dropdown) ───────────── */
.lh-ws-scroll {
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--lh-text-disabled) transparent;
}

.lh-ws-scroll::-webkit-scrollbar {
  width: 4px;
}

.lh-ws-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.lh-ws-scroll::-webkit-scrollbar-thumb {
  background: var(--lh-text-disabled);
  border-radius: 2px;
}

.lh-ws-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--lh-border-subtle);
}

.lh-ws-search-icon {
  width: 14px;
  height: 14px;
  color: var(--lh-text-muted);
  flex-shrink: 0;
}

.lh-ws-search {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--lh-text);
  font-family: var(--lh-font);
  font-size: 12px;
  padding: 0;
}

.lh-ws-search::placeholder {
  color: var(--lh-text-disabled);
}

/* ── Workspace switcher slug + role combined line ───────────────── */
.lh-ws-slug-role {
  color: var(--lh-text-muted);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ══════════════════════════════════════════════════════════════════
   DARK MODE — Wire lh-* tokens to MudBlazor palette
   ══════════════════════════════════════════════════════════════════ */
.lh-dark {
  --lh-bg: var(--mud-palette-background);
  --lh-bg-surface: var(--mud-palette-surface);
  --lh-bg-surface-alt: #253348;
  --lh-bg-hover: rgba(255, 255, 255, 0.08);
  --lh-text: #F1F5F9;
  --lh-text-2: #E2E8F0;
  --lh-text-muted: #CBD5E1;
  --lh-text-disabled: #64748B;
  --lh-border: rgba(255, 255, 255, 0.12);
  --lh-border-subtle: rgba(255, 255, 255, 0.06);
  --lh-shadow-xs: none;
  --lh-shadow-sm: none;
  --lh-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── Dark mode text overrides — force uniform brightness ─────── */
.lh-dark .lh-page-title,
.lh-dark .lh-section-title,
.lh-dark .lh-card-title,
.lh-dark .lh-stat-value,
.lh-dark .lh-empty-title,
.lh-dark .lh-table-cell-primary {
  color: #F1F5F9;
}

.lh-dark .lh-page-sub,
.lh-dark .lh-empty-sub,
.lh-dark .lh-text-muted,
.lh-dark .lh-stat-label,
.lh-dark .lh-breadcrumb,
.lh-dark .lh-timeline-time,
.lh-dark .lh-timeline-meta {
  color: #CBD5E1;
}

.lh-dark .lh-text-2,
.lh-dark .lh-text-sm {
  color: #E2E8F0;
}

.lh-dark .lh-card,
.lh-dark .lh-stat-card {
  background: var(--mud-palette-surface);
  border-color: rgba(255, 255, 255, 0.08);
}

.lh-dark .lh-mono {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
}

.lh-dark a {
  color: #818CF8;
}

.lh-dark .lh-breadcrumb a {
  color: #CBD5E1;
}

.lh-dark .lh-breadcrumb a:hover {
  color: #F1F5F9;
}

/* Dark mode — override MudBlazor palette variables globally */
.lh-dark {
  --mud-palette-text-primary: #F1F5F9 !important;
  --mud-palette-text-secondary: #CBD5E1 !important;
  --mud-palette-text-disabled: #94A3B8 !important;
  --mud-palette-action-default: #CBD5E1 !important;
}

/* Dark mode MudTable — ensure all cell text is bright */
.lh-dark .mud-table-cell {
  color: #F1F5F9 !important;
}

.lh-dark .mud-table-head .mud-table-cell {
  color: #F1F5F9 !important;
}

/* Dark mode table headers inside dialogs/popovers (outside .lh-dark tree) */
.mud-theme-dark .mud-table-head .mud-table-cell,
.mud-theme-dark .mud-data-grid .mud-table-head .header-cell {
  color: #F1F5F9 !important;
  background: var(--lh-bg-surface-alt) !important;
}

/* Page title + subtitle in dark mode */
.lh-dark .lh-page-title {
  color: #F1F5F9 !important;
}

.lh-dark .lh-page-sub {
  color: #CBD5E1 !important;
}

/* ══════════════════════════════════════════════════════════════════
   MODERN SIDEBAR
   ══════════════════════════════════════════════════════════════════ */

/* ── Sidebar container ───────────────────────────────────────── */
.lh-sidebar.mud-drawer {
  border-right: 1px solid var(--lh-border);
  background: var(--mud-palette-drawer-background) !important;
}

.lh-sidebar.mud-drawer::after {
  display: none;
}

.lh-dark .lh-sidebar.mud-drawer::after {
  display: none;
}

/* ── Brand area ──────────────────────────────────────────────── */
.lh-sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 8px;
  overflow: hidden;
}

.lh-sidebar-logo {
  width: 210px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/* ── Chips inside table cells — remove default MudChip margin ── */
.mud-table-cell .mud-chip {
  margin: 0;
}

/* ── Status dot (Active/Inactive indicator) ────────────────── */
.lh-status-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lh-status-dot .mud-icon-root {
  width: 10px;
  height: 10px;
  font-size: 10px;
}

/* Logo — no hover effects */

/* Dark mode logo uses brand/primary-logo-dark.svg — no filter needed */

/* ── Nav link styling ────────────────────────────────────────── */
.lh-sidebar .mud-navmenu .mud-nav-link {
  border-radius: 5px;
  margin: 1px 8px;
  padding: 8px 12px;
  transition: background 150ms ease, color 150ms ease;
  position: relative;
}

.lh-sidebar .mud-navmenu .mud-nav-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.lh-sidebar .mud-navmenu .mud-nav-link.active {
  background: rgba(30, 41, 155, 0.08);
  font-weight: 600;
}

.lh-sidebar .mud-navmenu .mud-nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--mud-palette-primary);
}

/* Dark mode nav adjustments */
.lh-dark .lh-sidebar .mud-navmenu .mud-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lh-dark .lh-sidebar .mud-navmenu .mud-nav-link.active {
  background: rgba(255, 255, 255, 0.08);
}

/* ── Nav group labels ────────────────────────────────────────── */
.lh-sidebar .mud-nav-group-label {
  padding: 16px 22px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mud-palette-text-secondary);
  opacity: 0.7;
}

/* ── Nav spacer (replaces section labels) ────────────────────── */
.lh-nav-spacer {
  height: 12px;
}

/* ── Nav group sub-item indentation ─────────────────────────── */
.lh-sidebar .mud-nav-group .mud-collapse-wrapper .mud-nav-link {
  padding-left: 44px;
  font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════════════════════ */
.lh-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 960px) {
  .lh-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.lh-dashboard-activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--lh-border-subtle);
  cursor: pointer;
  border-radius: var(--lh-radius);
  transition: background var(--lh-transition-fast);
}

.lh-dashboard-activity-row:last-child {
  border-bottom: none;
}

.lh-dashboard-activity-row:hover {
  background: var(--lh-bg-hover);
}

/* ── Dashboard: severity dot ─────────────────────────────────── */
.lh-severity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.lh-severity-dot--critical { background: var(--lh-error); }
.lh-severity-dot--warning  { background: var(--lh-warning); }
.lh-severity-dot--info     { background: var(--lh-info); }
.lh-severity-dot--success  { background: var(--lh-success); }

/* ── Dashboard: age profile bar ──────────────────────────────── */
.lh-age-bar-container {
  width: 100px;
  height: 6px;
  background: var(--lh-bg-surface-alt);
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
}

.lh-age-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 300ms ease;
}

/* ── Dashboard: fleet health stat value colors ───────────────── */
.lh-stat-value--success { color: var(--lh-success); }
.lh-stat-value--warning { color: var(--lh-warning); }
.lh-stat-value--error   { color: var(--lh-error); }

/* ── Dashboard: OS version row ───────────────────────────────── */
.lh-os-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.lh-os-version {
  flex: 1;
  font-family: var(--lh-mono);
  font-size: 12px;
  color: var(--lh-text);
}

.lh-os-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--lh-text-muted);
}

/* ── Dashboard: age profile row ──────────────────────────────── */
.lh-age-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.lh-age-label {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--lh-text);
}

.lh-age-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--lh-text-muted);
  min-width: 24px;
  text-align: right;
}

/* ── Dashboard: placeholder widget ───────────────────────────── */
.lh-placeholder-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.lh-placeholder-widget .lh-text-muted {
  font-size: 13px;
  max-width: 240px;
  line-height: 1.5;
}

/* ── Dark mode: dashboard widget overrides ────────────────────── */
.lh-dark .lh-os-version { color: #E2E8F0; }
.lh-dark .lh-age-label { color: #E2E8F0; }
.lh-dark .lh-age-bar-container { background: rgba(255, 255, 255, 0.06); }

/* ── Workspace switcher — light mode ─────────────────────────── */
.lh-sidebar .lh-ws-switcher {
  border-color: var(--lh-border);
  background: var(--lh-bg-surface-alt);
}

.lh-sidebar .lh-ws-switcher:hover {
  border-color: rgba(30, 41, 155, 0.2);
  background: rgba(30, 41, 155, 0.04);
}

.lh-sidebar .lh-ws-name {
  color: var(--mud-palette-drawer-text);
}

.lh-sidebar .lh-ws-slug {
  color: var(--mud-palette-text-secondary);
}

.lh-sidebar .lh-ws-icon {
  background: var(--mud-palette-primary);
  color: #FFFFFF;
}

/* Dark mode workspace switcher */
.lh-dark .lh-sidebar .lh-ws-switcher {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
}

.lh-dark .lh-sidebar .lh-ws-switcher:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.lh-dark .lh-sidebar .lh-ws-name {
  color: #E2E8F0;
}

.lh-dark .lh-sidebar .lh-ws-slug {
  color: #94A3B8;
}

.lh-dark .lh-sidebar .lh-ws-icon {
  background: rgba(255, 255, 255, 0.10);
  color: #E2E8F0;
}

/* ── Viewing-as banner (top of content area) ─────────────────── */
.lh-viewing-bar.mud-alert {
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

/* ── Bottom section (user info, dark mode toggle) ────────────── */
.lh-sidebar-bottom {
  border-top: 1px solid var(--lh-border-subtle);
  color: var(--mud-palette-drawer-text);
}

.lh-sidebar-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--mud-palette-drawer-text);
}

.lh-sidebar-user-email {
  font-size: 11px;
  margin-top: 2px;
  color: var(--mud-palette-text-secondary);
}

/* ══════════════════════════════════════════════════════════════════
   MudDataGrid — Column Resize Fix
   table-layout:fixed required for drag-resize to apply widths
   ══════════════════════════════════════════════════════════════════ */
.mud-data-grid .mud-table-root {
  table-layout: fixed;
}

.mud-data-grid .mud-table-root th,
.mud-data-grid .mud-table-root td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mud-data-grid .mud-table-container {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}

.mud-data-grid .mud-table-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--mud-palette-surface);
}

/* Sort arrows: hidden by default, visible on hover or when active */
.mud-data-grid th .column-options {
  opacity: 0;
  transition: opacity 0.15s;
}
.mud-data-grid th:hover .column-options,
.mud-data-grid th .column-options .mud-sort-button.active,
.mud-data-grid th .column-options:has(.active) {
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE — Breakpoints
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 1280px) {
  .lh-page-title { font-size: 20px !important; }
}

@media (max-width: 960px) {
  .mud-drawer { width: 60px !important; min-width: 60px !important; }
  .mud-drawer .lh-sidebar-brand,
  .mud-drawer .lh-ws-switcher,
  .mud-drawer .mud-nav-group-label,
  .mud-drawer .lh-sidebar-footer { display: none !important; }
  .mud-drawer .mud-navlink .mud-nav-link-text { display: none; }
}

@media (max-width: 768px) {
  .mud-data-grid .mud-table-root { font-size: 13px; }
  .mud-data-grid .mud-table-cell,
  .mud-data-grid .mud-table-head .header-cell { padding: 6px 8px !important; }
  .lh-page-header { flex-direction: column; gap: 12px; align-items: flex-start; }
}

/* ══════════════════════════════════════════════════════════════════
   DESIGNER POLISH — v2.1 (hardened edges, quieter UI)
   ══════════════════════════════════════════════════════════════════ */

/* ── Chips — rectangular, not pills ────────────────────────────── */
.mud-chip {
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.mud-chip.mud-chip-size-small {
  border-radius: 3px;
  font-size: 11px;
}

/* ── Table header — subtle, professional ───────────────────────── */
.mud-table-head .mud-table-cell,
.mud-data-grid .mud-table-head .header-cell {
  font-size: 12px;
  font-weight: 600;
  color: var(--mud-palette-text-secondary);
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--lh-border);
  background: var(--lh-bg-surface-alt);
}

/* ── Table rows — lighter dividers ─────────────────────────────── */
.mud-table-cell {
  border-bottom: 1px solid var(--lh-border-subtle);
}

.mud-table-row:hover {
  background: var(--lh-bg-hover);
}

/* ── Sidebar workspace switcher — cleaner hover ────────────────── */
.lh-sidebar .lh-ws-switcher:hover {
  border-color: var(--lh-border);
  background: var(--lh-bg-hover);
  box-shadow: none;
}

/* ── Dropdowns / popovers — precise shadow ─────────────────────── */
.mud-popover-paper {
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.06);
}

/* ── Stat label refinement ─────────────────────────────────────── */
.lh-stat-label {
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

/* ══════════════════════════════════════════════════════════════════
   FLEET HEALTH HERO CARD
   ══════════════════════════════════════════════════════════════════ */
.lh-hero-card {
  border: 1px solid var(--lh-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  background: var(--lh-bg-surface);
}
.lh-hero-grade {
  font-size: 36px;
  font-weight: 700;
  line-height: 1;
}
.lh-hero-grade-xl {
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.lh-hero-split {
  display: flex;
  gap: 32px;
  align-items: center;
}
@media (max-width: 640px) {
  .lh-hero-split { flex-direction: column; gap: 16px; align-items: flex-start; }
  .lh-hero-grade-xl { font-size: 48px; }
}
.lh-share-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}
@media print {
  .lh-share-page { max-width: 100%; padding: 0; }
}
.lh-hero-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin: 12px 0;
  background: var(--lh-bg-surface-alt);
}
.lh-hero-bar > div { transition: width 0.3s ease; }

/* ══════════════════════════════════════════════════════════════════
   DEVICE FLYOUT PANEL
   ══════════════════════════════════════════════════════════════════ */
.lh-flyout-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--lh-bg-surface, #fff);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 1201;
    display: flex;
    flex-direction: column;
    transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}
.lh-flyout-panel--open {
    right: 0;
}
.lh-flyout-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--lh-border, #DDE1E8);
    gap: 12px;
}
.lh-flyout-body {
    flex: 1;
    padding: 12px 20px;
    overflow-y: auto;
}
.lh-flyout-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--lh-border, #DDE1E8);
    font-size: 13px;
}
.lh-flyout-row:last-child {
    border-bottom: none;
}
.lh-flyout-label {
    color: var(--lh-text-muted, #6B7585);
    flex-shrink: 0;
    width: 100px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.lh-flyout-actions {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--lh-border, #DDE1E8);
    flex-wrap: wrap;
}
.lh-flyout-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--lh-border, #DDE1E8);
}
.lh-dark .lh-flyout-panel {
    background: var(--lh-bg-surface, #1E293B);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.4);
}
.lh-action-hint {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════
   COMMAND PALETTE (Ctrl+K)
   ══════════════════════════════════════════════════════════════════ */
.lh-cmd-overlay { z-index: 1300; }
.lh-cmd-panel { max-width: 560px; width: 90%; margin: 15vh auto 0; border-radius: 12px; overflow: hidden; }
.lh-cmd-input { border-bottom: 1px solid var(--lh-border); }
.lh-cmd-results { max-height: 400px; overflow-y: auto; }
.lh-cmd-result { padding: 10px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; }
.lh-cmd-result:hover, .lh-cmd-result.active { background: rgba(0,0,0,0.04); }
.lh-dark .lh-cmd-result:hover, .lh-dark .lh-cmd-result.active { background: rgba(255,255,255,0.06); }
.lh-kbd { font-family: 'JetBrains Mono', monospace; font-size: 11px; padding: 2px 6px; border: 1px solid var(--lh-border); border-radius: 4px; opacity: 0.6; margin-left: auto; }
.lh-search-hint { display: flex; align-items: center; padding: 8px 16px; margin: 4px 8px; border-radius: 6px; }
.lh-search-hint:hover { background: rgba(0,0,0,0.04); }
.lh-dark .lh-search-hint:hover { background: rgba(255,255,255,0.06); }

/* ══════════════════════════════════════════════════════════════════
   CHART TOOLTIP — Reusable floating tooltip for charts/visuals
   ══════════════════════════════════════════════════════════════════ */
.lh-chart-tooltip {
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border);
  border-radius: var(--lh-radius-lg);
  padding: 10px 14px;
  box-shadow: var(--lh-shadow-md);
  min-width: 120px;
  max-width: 200px;
  pointer-events: none;
}
.lh-chart-tooltip-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.lh-chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lh-chart-tooltip-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--lh-text-muted);
  letter-spacing: 0.02em;
}
.lh-chart-tooltip-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--lh-text);
  line-height: 1.2;
}
.lh-chart-tooltip-pct {
  font-size: 12px;
  color: var(--lh-text-muted);
  margin-top: 2px;
}
.lh-chart-tooltip-sub {
  font-size: 11px;
  color: var(--lh-text-muted);
  margin-top: 4px;
}

/* ── Donut tooltip sizing ── */
.lh-chart-interactive .mud-chart-donut text {
  font-size: 11px !important;
  font-weight: 600;
  font-family: 'Inter', sans-serif !important;
}
.lh-chart-interactive .mud-chart-donut rect + text,
.lh-chart-interactive .mud-chart-donut text[fill="white"] {
  font-size: 11px !important;
  font-family: 'Inter', sans-serif !important;
}
/* Tooltip background rects — larger padding, rounded */
.lh-chart-interactive .mud-chart-donut rect {
  rx: 4;
  ry: 4;
}
/* Ensure crisp SVG text rendering */
.lh-chart-interactive svg {
  shape-rendering: geometricPrecision;
  text-rendering: optimizeLegibility;
}

/* ── Fleet Trend KPI cards ── */
.lh-trend-kpi {
  padding: 12px 14px;
  border: 1px solid var(--lh-border-subtle);
  border-radius: var(--lh-radius-lg);
  background: var(--lh-bg-surface);
}
.lh-trend-kpi--improving {
  border-left: 3px solid var(--lh-success);
}
.lh-trend-kpi--degrading {
  border-left: 3px solid var(--lh-error);
}
@media (max-width: 768px) {
  .lh-trend-kpi { min-width: 0; }
  /* collapse to 2-col on mobile */
  .lh-card > div[style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* ── Endpoint Intelligence category cards ── */
.lh-endpoint-category {
  padding: 10px 14px;
  border-radius: var(--lh-radius-lg);
  background: var(--lh-bg-surface);
  border: 1px solid var(--lh-border-subtle);
}
.lh-endpoint-rating {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  line-height: 1.6;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lh-endpoint-category--warning {
  background: color-mix(in srgb, var(--lh-warning) 6%, var(--lh-bg-surface));
}
.lh-endpoint-category--poor {
  background: color-mix(in srgb, var(--lh-error) 6%, var(--lh-bg-surface));
}
.lh-action-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border-top: 1px solid var(--lh-border-subtle);
  margin-top: 8px;
}

/* ── Donut segment hover highlight (opt-in via .lh-chart-interactive) ── */
.lh-chart-interactive .mud-chart-donut path {
  transition: opacity 150ms ease, filter 150ms ease;
  cursor: pointer;
}
.lh-chart-interactive .mud-chart-donut:hover path {
  opacity: 0.4;
  transition: opacity 200ms ease;
}
.lh-chart-interactive .mud-chart-donut:hover path:hover {
  opacity: 1;
  filter: brightness(1.15);
}

/* ══════════════════════════════════════════════════════════════════
   REDUCED MOTION — Accessibility
   ══════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ══════════════════════════════════════════════════════════════════
   PRINT — Hide chrome, clean output
   ══════════════════════════════════════════════════════════════════ */
@media print {
  .lh-sidebar,
  .lh-cmd-overlay,
  .lh-cmd-panel,
  .lh-flyout-overlay,
  .lh-flyout-panel,
  .mud-snackbar-provider,
  .mud-overlay,
  .mud-appbar {
    display: none !important;
  }
  .lh-main {
    padding: 0;
    margin: 0;
  }
  body {
    background: white;
    color: black;
  }
  .lh-card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}