/**
 * dcma.ai — Luxe v2 design system overlay
 * Loaded after app.css. Maps legacy --dcma-* to --lx-* tokens per docs/ui-luxe-spec.md
 */

/* —— Tokens (Luxe v2) —— */
:root {
  color-scheme: light;

  --lx-canvas: #F5F3EE;
  --lx-canvas-tint: radial-gradient(ellipse 80% 55% at 100% 0%, rgba(243, 233, 214, 0.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 0%, rgba(45, 212, 191, 0.05), transparent 50%);
  --lx-surface: #FFFFFF;
  --lx-surface-2: #F8F6F2;
  --lx-sidebar: rgba(255, 255, 255, 0.72);
  --lx-glass: rgba(255, 255, 255, 0.72);
  --lx-glass-blur: blur(18px) saturate(1.4);
  --lx-border: rgba(28, 27, 25, 0.08);
  --lx-border-strong: rgba(28, 27, 25, 0.14);
  --lx-ink: #121413;
  --lx-ink-2: #4A504D;
  --lx-ink-3: #7A807C;
  --lx-accent: #0F766E;
  --lx-accent-2: #10B981;
  --lx-accent-hover: #0D6B63;
  --lx-accent-grad: linear-gradient(135deg, #0F766E 0%, #0E9F7E 55%, #10B981 100%);
  --lx-accent-soft: rgba(16, 185, 129, 0.10);
  --lx-on-accent: #FFFFFF;
  --lx-champagne: #C9A96E;
  --lx-champagne-fill: #F3E9D6;
  --lx-gold: var(--lx-champagne);
  --lx-success: #2F6B4F;
  --lx-success-tint: #EAF2EC;
  --lx-warning: #8A6414;
  --lx-warning-tint: #F6EFDD;
  --lx-danger: #9B2C2C;
  --lx-danger-tint: #F7E9E7;
  --lx-info: #2D5C7F;
  --lx-info-tint: #E8EFF5;

  --lx-shadow-sm: 0 1px 2px rgba(16, 24, 20, 0.04), 0 1px 1px rgba(16, 24, 20, 0.03);
  --lx-shadow-md: 0 10px 30px -12px rgba(16, 24, 20, 0.18);
  --lx-shadow-glow: 0 8px 24px -8px rgba(16, 185, 129, 0.45);
  --lx-r-sm: 10px;
  --lx-r-md: 14px;
  --lx-r-lg: 18px;
  --lx-r-xl: 24px;
  --lx-radius-sm: var(--lx-r-sm);
  --lx-radius: var(--lx-r-md);
  --lx-radius-lg: var(--lx-r-lg);
  --lx-radius-pill: 999px;
  --lx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --lx-transition: 180ms var(--lx-ease);
  --lx-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --lx-display: "Geist", "Plus Jakarta Sans", system-ui, sans-serif;
  --lx-serif-accent: "Instrument Serif", Georgia, serif;
  --lx-sidebar-w: 256px;
  --lx-header-h: 64px;
  --lx-control-h: 38px;
  --lx-control-h-sm: 32px;
  --lx-control-h-lg: 46px;
  --lx-page-pad: 32px;
  --lx-content-max: 1440px;
  --lx-fab-size: 40px;
  --lx-fab-stack-pad: 6px;
  --lx-fab-stack-h: calc(var(--lx-fab-stack-pad) * 2 + var(--lx-fab-size) * 2 + 1px);
  --lx-fab-reserve-x: 72px;
  --lx-fab-reserve-y: calc(var(--lx-fab-stack-h) + 24px);

  --dcma-surface: var(--lx-canvas);
  --dcma-surface-elevated: var(--lx-surface);
  --dcma-surface-card: var(--lx-surface);
  --dcma-surface-muted: var(--lx-surface-2);
  --dcma-ink: var(--lx-ink);
  --dcma-muted: var(--lx-ink-2);
  --dcma-border: var(--lx-border);
  --dcma-brand: var(--lx-accent);
  --dcma-brand-strong: var(--lx-accent-hover);
  --dcma-brand-soft: var(--lx-accent-soft);
  --dcma-danger: var(--lx-danger);
  --dcma-warning: var(--lx-warning);
  --dcma-success: var(--lx-success);
  --dcma-shadow: var(--lx-shadow-sm);
  --dcma-shadow-lg: var(--lx-shadow-md);
  --dcma-focus: 0 0 0 4px var(--lx-accent-soft);
  --dcma-radius-sm: var(--lx-radius-sm);
  --dcma-radius: var(--lx-radius);
  --dcma-radius-lg: var(--lx-radius-lg);
  --dcma-radius-pill: var(--lx-radius-pill);
  --dcma-ease: var(--lx-ease);
  --dcma-font: var(--lx-font);
}

[data-theme="dark"],
html[data-theme="dark"] {
  color-scheme: dark;

  --lx-canvas: #0A0E0D;
  --lx-canvas-tint: radial-gradient(ellipse 75% 55% at 0% 0%, rgba(45, 212, 191, 0.10), transparent 55%),
    radial-gradient(ellipse 65% 50% at 100% 0%, rgba(52, 211, 153, 0.06), transparent 50%);
  --lx-surface: #121816;
  --lx-surface-2: #18201E;
  --lx-sidebar: rgba(18, 24, 22, 0.62);
  --lx-glass: rgba(18, 24, 22, 0.62);
  --lx-glass-blur: blur(18px) saturate(1.2);
  --lx-border: rgba(255, 255, 255, 0.07);
  --lx-border-strong: rgba(255, 255, 255, 0.12);
  --lx-ink: #F1F3F2;
  --lx-ink-2: #B4BCB8;
  --lx-ink-3: #8A938F;
  --lx-accent: #2DD4BF;
  --lx-accent-2: #34D399;
  --lx-accent-hover: #5EEAD4;
  --lx-accent-grad: linear-gradient(135deg, #14B8A6, #34D399);
  --lx-accent-soft: rgba(45, 212, 191, 0.12);
  --lx-on-accent: #04110D;
  --lx-champagne: #D9C29A;
  --lx-champagne-fill: rgba(217, 194, 154, 0.12);
  --lx-gold: var(--lx-champagne);
  --lx-success: #7FC29C;
  --lx-success-tint: rgba(127, 194, 156, 0.12);
  --lx-warning: #D9B35E;
  --lx-warning-tint: rgba(217, 179, 94, 0.12);
  --lx-danger: #E58A80;
  --lx-danger-tint: rgba(229, 138, 128, 0.12);
  --lx-info: #8DB6D6;
  --lx-info-tint: rgba(141, 182, 214, 0.12);
  --lx-divider-soft: rgba(255, 255, 255, 0.06);

  --lx-shadow-sm: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --lx-shadow-md: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --lx-shadow-glow: 0 8px 28px -10px rgba(45, 212, 191, 0.35);
}

/* —— Base shell —— */
html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: clip;
}

body.dcma-shell,
body.dcma-shell.h-full,
body.dcma-shell.min-h-screen,
body.dcma-shell.min-h-dvh {
  font-family: var(--lx-font);
  font-size: 14px;
  line-height: 1.55;
  background: var(--lx-canvas) !important;
  background-image: none !important;
  color: var(--lx-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  max-width: 100%;
  overflow-x: clip;
}

body.dcma-shell ::selection {
  background: var(--lx-accent-soft);
  color: var(--lx-ink);
}

body.dcma-shell :focus-visible {
  outline: none;
  box-shadow: var(--dcma-focus);
}

/* —— Typography —— */
body.dcma-shell h1,
body.dcma-shell .lx-display,
body.dcma-shell .app-header .lx-page-title,
body.dcma-shell .login-brand-hero h1 {
  font-family: var(--lx-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

body.dcma-shell #app-content h1,
body.dcma-shell .login-brand-hero h1 {
  font-size: 28px;
  line-height: 1.21;
}

body.dcma-shell h2 {
  font-size: 18px;
  line-height: 1.44;
  font-weight: 600;
}

body.dcma-shell h3 {
  font-size: 15px;
  line-height: 1.47;
  font-weight: 600;
}

body.dcma-shell .lx-overline,
body.dcma-shell #app-content table thead th {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

body.dcma-shell #app-content table td,
body.dcma-shell .tabular-nums,
body.dcma-shell #app-content table {
  font-variant-numeric: tabular-nums;
}

/* —— Layout shell —— */
body.dcma-shell .app-sidebar-drawer {
  width: var(--lx-sidebar-w) !important;
}

body.dcma-shell .app-sidebar {
  width: var(--lx-sidebar-w);
  background: var(--lx-sidebar) !important;
  background-image: none !important;
  border-right: 1px solid var(--lx-border);
  color: var(--lx-ink);
}

body.dcma-shell .app-sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .app-sidebar-brand .sidebar-brand-name,
body.dcma-shell .app-sidebar-brand h2 {
  font-family: var(--lx-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--lx-ink);
  letter-spacing: -0.01em;
}

body.dcma-shell .app-sidebar-brand .sidebar-brand-tagline {
  font-size: 12px;
  color: var(--lx-ink-3);
}

body.dcma-shell .sidebar-brand-meta--inline {
  min-width: 0;
  flex: 1 1 auto;
}

body.dcma-shell .sidebar-brand-meta--inline h1 {
  font-family: var(--lx-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--lx-ink);
  letter-spacing: -0.01em;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
}

body.dcma-shell .sidebar-brand-meta--inline p {
  font-size: 11.5px;
  color: var(--lx-ink-3);
  line-height: 1.3;
  margin: 0.15rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dcma-shell .app-sidebar-brand .dcma-mark,
body.dcma-shell .app-sidebar-brand img.dcma-mark {
  max-height: 28px;
  max-width: 28px;
  width: 28px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

body.dcma-shell .sidebar-section-label {
  padding: 0.35rem 0.75rem 0.25rem;
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

body.dcma-shell .sidebar-group {
  border-top: 1px solid var(--lx-border);
  padding-top: 0.5rem;
  margin-top: 0.35rem;
}

body.dcma-shell .sidebar-group:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}

body.dcma-shell .sidebar-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  cursor: pointer;
  list-style: none;
  border-radius: var(--lx-radius-sm);
}

body.dcma-shell .sidebar-group-summary::-webkit-details-marker {
  display: none;
}

body.dcma-shell .sidebar-group-chevron {
  width: 14px;
  height: 14px;
  color: var(--lx-ink-3);
  transition: transform 0.2s var(--lx-ease);
}

body.dcma-shell .sidebar-group[open] .sidebar-group-chevron {
  transform: rotate(90deg);
}

body.dcma-shell .sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 34px;
  padding: 0 0.75rem;
  margin: 0 0.35rem;
  border-radius: var(--lx-radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--lx-ink-2);
  text-decoration: none;
  border: 0;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  transform: none !important;
  transition: background 0.15s var(--lx-ease), color 0.15s var(--lx-ease);
}

body.dcma-shell .sidebar-link:hover {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink);
}

body.dcma-shell .sidebar-link:focus-visible,
body.dcma-shell .sidebar-pin-btn:focus-visible,
body.dcma-shell .sidebar-user-action:focus-visible {
  outline: 2px solid var(--lx-accent);
  outline-offset: 2px;
  box-shadow: none;
}

body.dcma-shell .sidebar-link.active {
  background: var(--lx-accent-soft) !important;
  color: var(--lx-accent);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--lx-accent);
}

body.dcma-shell .sidebar-nav-icon,
body.dcma-shell [class*="sidebar-nav-icon--"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  padding: 0 !important;
  border-radius: 0 !important;
  background: none !important;
  background-image: none !important;
  box-shadow: none !important;
  color: var(--lx-ink-3);
  transform: none !important;
  filter: none !important;
}

body.dcma-shell .sidebar-link.active .sidebar-nav-icon,
body.dcma-shell .sidebar-link.active .sidebar-nav-icon svg {
  color: var(--lx-accent);
}

body.dcma-shell .sidebar-nav-icon__svg,
body.dcma-shell .sidebar-nav-icon svg {
  width: 16px !important;
  height: 16px !important;
}

body.dcma-shell .sidebar-link:hover .sidebar-nav-icon {
  transform: none !important;
  filter: none !important;
}

body.dcma-shell .sidebar-nav-count {
  margin-left: auto;
  min-width: 1.25rem;
  height: 18px;
  padding: 0 0.35rem;
  font-size: 10px;
  font-weight: 600;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-danger-tint);
  color: var(--lx-danger);
  box-shadow: none;
}

body.dcma-shell .sidebar-user-footer {
  padding: 0.75rem 1rem !important;
  border-top: 1px solid var(--lx-border) !important;
  background: transparent !important;
}

body.dcma-shell .sidebar-user-footer .rounded-2xl,
body.dcma-shell .sidebar-user-footer [class*="bg-"] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.dcma-shell .sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

body.dcma-shell .sidebar-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  color: var(--lx-ink-2);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

body.dcma-shell .sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lx-ink);
  margin: 0;
}

body.dcma-shell .sidebar-user-role {
  font-size: 11px;
  color: var(--lx-ink-3);
  margin: 0;
}

body.dcma-shell .sidebar-user-action {
  display: inline-flex;
  padding: 0.35rem;
  border-radius: var(--lx-radius-sm);
  color: var(--lx-ink-3);
  transition: background 0.15s ease, color 0.15s ease;
}

body.dcma-shell .sidebar-user-action:hover {
  background: var(--lx-surface-2);
  color: var(--lx-ink);
}

body.dcma-shell .sidebar-user-action--danger:hover {
  color: var(--lx-danger);
}

body.dcma-shell .sidebar-pins {
  margin: 0 0.5rem 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .sidebar-pins[hidden] {
  display: none !important;
}

body.dcma-shell .sidebar-pins-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  padding: 0.25rem 0.75rem 0.35rem;
}

body.dcma-shell .sidebar-pins-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

body.dcma-shell .sidebar-link .sidebar-pin-btn {
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  border: 0;
  background: transparent;
  color: var(--lx-ink-3);
  cursor: pointer;
  padding: 0.15rem;
  border-radius: var(--lx-radius-sm);
  line-height: 0;
}

body.dcma-shell .sidebar-link:hover .sidebar-pin-btn,
body.dcma-shell .sidebar-link:focus-within .sidebar-pin-btn,
body.dcma-shell .sidebar-pin-btn.is-pinned {
  opacity: 1;
  color: var(--lx-gold);
}

body.dcma-shell .sidebar-pin-btn:hover {
  background: var(--lx-surface-2);
}

/* —— Header —— */
body.dcma-shell .app-header {
  position: relative;
  min-height: var(--lx-header-h);
  background: var(--lx-canvas) !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-bottom: 1px solid var(--lx-border) !important;
  box-shadow: none !important;
}

body.dcma-shell .app-header-row {
  height: var(--lx-header-h);
  min-height: var(--lx-header-h);
  max-height: var(--lx-header-h);
}

body.dcma-shell .app-header-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  border: 0;
}

body.dcma-shell .app-header .lx-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  color: var(--lx-ink-3);
  margin: 0;
}

body.dcma-shell .app-header .lx-breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

body.dcma-shell .app-header .lx-breadcrumb svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--lx-ink-3);
}

body.dcma-shell .app-header-head .lx-page-title {
  margin: 0;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dcma-shell .dcma-page-load-bar {
  display: none !important;
}

.lx-locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border-radius: var(--lx-radius-sm);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  flex-shrink: 0;
}

.lx-locale-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-decoration: none;
  color: var(--lx-ink-3);
  transition: background 0.15s ease, color 0.15s ease;
}

.lx-locale-link.is-active {
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
}

.lx-locale-link:hover:not(.is-active) {
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
}

body.dcma-shell .app-header h1,
body.dcma-shell .app-header .lx-page-title {
  font-family: var(--lx-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--lx-ink) !important;
  letter-spacing: -0.01em;
}

body.dcma-shell .app-header .mobile-page-title h1 {
  font-family: var(--lx-font);
  font-size: 17px;
  font-weight: 600;
}

body.dcma-shell .app-header nav[aria-label] {
  font-size: 11px;
  color: var(--lx-ink-3);
}

body.dcma-shell .app-header .feature-icon,
body.dcma-shell .app-header .content-icon,
body.dcma-shell .app-header .page-header-icon {
  display: none !important;
}

body.dcma-shell .status-pill {
  display: none !important;
}

body.dcma-shell .edition-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lx-gold);
  background: transparent;
  border: 1px solid var(--lx-gold);
  border-radius: var(--lx-radius-pill);
  box-shadow: none;
}

body.dcma-shell .edition-pill svg {
  width: 10px;
  height: 10px;
}

body.dcma-shell .app-header-search:not(.hidden),
body.dcma-shell .app-header-search-compact:not(.hidden) {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 34px;
  padding: 0 0.65rem;
  border-radius: var(--lx-radius-sm);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink-2);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.dcma-shell .app-header-search:hover,
body.dcma-shell .app-header-search-compact:hover {
  border-color: var(--lx-accent);
  box-shadow: var(--dcma-focus);
}

body.dcma-shell .dcma-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--lx-radius-sm);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink-2);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.dcma-shell .dcma-theme-toggle:hover {
  background: var(--lx-surface-2);
  color: var(--lx-accent);
  border-color: var(--lx-border-strong);
}

body.dcma-shell .dcma-theme-toggle:active {
  transform: scale(0.98);
}

body.dcma-shell .app-header-actions {
  flex-wrap: nowrap;
}

/* —— Demo banner —— */
body.dcma-shell .dcma-demo-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 32px;
  padding: 0 1rem;
  font-size: 12.5px;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .dcma-demo-banner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lx-gold);
  flex-shrink: 0;
}

body.dcma-shell .dcma-demo-banner-dismiss {
  border: 0;
  background: transparent;
  color: var(--lx-ink-3);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
}

body.dcma-shell .dcma-demo-banner-dismiss:hover {
  color: var(--lx-ink);
}

/* —— Main content area —— */
body.dcma-shell .app-main {
  background: transparent;
}

body.dcma-shell #app-main-scroll {
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

@media (max-width: 1023px) {
  body.dcma-shell #app-main-scroll {
    padding-bottom: calc(4.75rem + var(--lx-fab-reserve-y) + env(safe-area-inset-bottom));
  }

  body.dcma-shell #app-main-scroll:has(.lx-form-actions) {
    padding-bottom: calc(4.75rem + var(--lx-fab-reserve-y) + 3.75rem + env(safe-area-inset-bottom));
  }
}

body.dcma-shell #app-content {
  max-width: var(--lx-content-max);
  animation: lx-fade-up 0.35s var(--lx-ease) both;
  padding-bottom: var(--lx-fab-reserve-y);
}

@media (min-width: 1024px) {
  body.dcma-shell #app-content {
    padding-right: var(--lx-fab-reserve-x);
    padding-bottom: calc(2rem + var(--lx-fab-reserve-y));
  }
}

body.dcma-shell #app-content .page-header::after {
  display: none !important;
}

body.dcma-shell #app-content .stat-card-value {
  color: var(--lx-ink) !important;
}

body.dcma-shell #app-content .stat-card-label {
  color: var(--lx-ink-3) !important;
}

body.dcma-shell #app-content .page-subtitle {
  color: var(--lx-ink-2) !important;
}

@keyframes lx-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Page head / stat row —— */
body.dcma-shell #app-content .lx-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .lx-page-head-meta {
  font-size: 14px;
  color: var(--lx-ink-2);
  margin-top: 0.25rem;
}

body.dcma-shell .lx-stat-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin-bottom: 1.5rem;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  box-shadow: var(--lx-shadow-sm);
  overflow: hidden;
}

body.dcma-shell .lx-stat-row .lx-stat-cell {
  flex: 1 1 0;
  min-width: 8rem;
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--lx-border);
}

body.dcma-shell .lx-stat-row .lx-stat-cell:last-child {
  border-right: 0;
}

body.dcma-shell .lx-stat-row .lx-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  margin-bottom: 0.35rem;
}

body.dcma-shell .lx-stat-row .lx-stat-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--lx-ink);
  line-height: 1.2;
}

body.dcma-shell .lx-stat-row .lx-stat-delta {
  font-size: 12px;
  color: var(--lx-ink-3);
  margin-top: 0.15rem;
}

/* Legacy statCard() grids → unified stat row appearance */
body.dcma-shell #app-content .stat-grid,
body.dcma-shell #app-content .kpi-grid {
  display: flex;
  flex-wrap: wrap;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  box-shadow: var(--lx-shadow-sm);
  overflow: hidden;
  margin-bottom: 1.5rem;
  gap: 0;
}

body.dcma-shell #app-content .stat-grid > .stat-card,
body.dcma-shell #app-content .kpi-grid > .stat-card,
body.dcma-shell #app-content .stat-grid > a.stat-card,
body.dcma-shell #app-content .kpi-grid > a.stat-card {
  flex: 1 1 140px;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-right: 1px solid var(--lx-border) !important;
  padding: 1rem 1.25rem;
}

body.dcma-shell #app-content .stat-grid > :last-child,
body.dcma-shell #app-content .kpi-grid > :last-child {
  border-right: none !important;
}

body.dcma-shell #app-content .stat-card .stat-card-value {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin-top: 0.25rem;
}

body.dcma-shell .section-card-title-icon {
  display: inline-flex;
  color: var(--lx-ink-3);
  flex-shrink: 0;
}

body.dcma-shell .lx-banner {
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 14px;
  color: var(--lx-ink);
  background: var(--lx-surface);
  border-left-width: 3px;
}

body.dcma-shell .lx-banner--warning { border-left-color: var(--lx-warning); background: var(--lx-warning-tint); }
body.dcma-shell .lx-banner--danger { border-left-color: var(--lx-danger); background: var(--lx-danger-tint); }
body.dcma-shell .lx-banner--success { border-left-color: var(--lx-success); background: var(--lx-success-tint); }
body.dcma-shell .lx-banner--info { border-left-color: var(--lx-info); background: var(--lx-info-tint); }

body.dcma-shell .lx-banner .lx-banner-icon,
body.dcma-shell .lx-banner .alert-banner-icon {
  color: var(--lx-ink-3);
}

body.dcma-shell .lx-progress-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--lx-surface-2);
  overflow: hidden;
}

body.dcma-shell .lx-progress-bar > span {
  display: block;
  height: 100%;
  background: var(--lx-accent);
  border-radius: 999px;
}

body.dcma-shell #app-content tr.lx-table-total-row {
  background: var(--lx-surface-2);
}

body.dcma-shell .lx-soap-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid var(--lx-border);
  background: var(--lx-surface-2);
  color: var(--lx-ink-2);
  font-weight: 600;
  font-size: 14px;
}

body.dcma-shell .lx-soap-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
}

body.dcma-shell .pos-product-tile {
  text-align: left;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: 10px;
  padding: 1rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}

body.dcma-shell .pos-product-tile:hover {
  border-color: var(--lx-border-strong);
  background: var(--lx-surface-2);
}

body.dcma-shell .lx-page-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  body.dcma-shell .lx-page-head {
    flex-direction: column;
    align-items: stretch;
  }

  body.dcma-shell .lx-page-head-actions,
  body.dcma-shell .lx-page-head-actions--split {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  body.dcma-shell .lx-page-head-actions-primary,
  body.dcma-shell .lx-page-head-actions-primary > .btn-primary,
  body.dcma-shell .lx-page-head-actions-primary > a.btn-primary {
    width: 100%;
  }

  body.dcma-shell .lx-page-head-actions-primary > .btn-primary,
  body.dcma-shell .lx-page-head-actions-primary > a.btn-primary {
    justify-content: center;
  }

  body.dcma-shell .lx-page-head-actions-secondary {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.125rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  body.dcma-shell .lx-page-head-actions-secondary::-webkit-scrollbar {
    display: none;
  }

  body.dcma-shell .lx-page-head-actions-secondary > * {
    flex: 0 0 auto;
  }

  body.dcma-shell .lx-page-head-actions-secondary .btn-secondary,
  body.dcma-shell .lx-page-head-actions-secondary .btn-ghost,
  body.dcma-shell .lx-page-head-actions-secondary a.btn-secondary,
  body.dcma-shell .lx-page-head-actions-secondary a.btn-ghost,
  body.dcma-shell .lx-page-head-actions-secondary form button {
    min-height: var(--lx-control-h-sm);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    font-size: 12.5px;
    white-space: nowrap;
  }

  /* V2I: sticky page-actions band — transparent in light + dark (button keeps its gradient) */
  body.dcma-shell #app-content .lx-page-head-actions.page-actions,
  body.dcma-shell #app-content .lx-page-head-actions-primary,
  body.dcma-shell .lx-page-head-actions-primary,
  body.dcma-shell .page-header:not(.page-header--simple) .page-actions {
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

body.dcma-shell .lx-dash-greeting {
  font-family: var(--lx-display);
  font-size: clamp(1.35rem, 2.5vw, 1.875rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--lx-ink);
  margin: 0;
}

body.dcma-shell .lx-dash-date {
  font-size: 14px;
  color: var(--lx-ink-3);
  margin: 0 0 1.25rem;
}

body.dcma-shell .lx-dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

body.dcma-shell .lx-dash-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  body.dcma-shell .lx-dash-grid {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

body.dcma-shell .lx-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--lx-border);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}

body.dcma-shell .lx-list-row:hover {
  background: var(--lx-surface-2);
}

body.dcma-shell .lx-list-row:last-child {
  border-bottom: 0;
}

body.dcma-shell .lx-mrn {
  font-variant-numeric: tabular-nums;
  color: var(--lx-ink-2);
  font-family: var(--lx-font);
  white-space: nowrap;
}

body.dcma-shell #app-content table td.lx-mrn,
body.dcma-shell #app-content table td.whitespace-nowrap,
body.dcma-shell #app-content table .tabular-nums {
  white-space: nowrap;
}

body.dcma-shell .lx-progress {
  height: 4px;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-surface-2);
  overflow: hidden;
  min-width: 4rem;
}

body.dcma-shell .lx-progress > span {
  display: block;
  height: 100%;
  background: var(--lx-accent);
  border-radius: inherit;
}

body.dcma-shell .lx-stepper {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

body.dcma-shell .lx-stepper-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lx-border-strong);
}

body.dcma-shell .lx-stepper-dot.is-active {
  background: var(--lx-accent);
}

body.dcma-shell .lx-stepper-dot.is-done {
  background: var(--lx-success);
}

body.dcma-shell .module-tip {
  margin-bottom: 1rem;
}

body.dcma-shell .module-tip-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-sm);
  font-size: 13px;
  line-height: 1.45;
  color: var(--lx-ink-2);
}

body.dcma-shell .module-tip-icon {
  flex-shrink: 0;
  color: var(--lx-ink-3);
}

body.dcma-shell .module-tip-icon svg {
  width: 1rem;
  height: 1rem;
}

body.dcma-shell .module-tip-title {
  display: none;
}

body.dcma-shell .module-tip-body {
  margin: 0;
  flex: 1;
  min-width: 0;
}

body.dcma-shell .module-tip-body--clamp {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

body.dcma-shell .module-tip.is-expanded .module-tip-body--clamp {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}

body.dcma-shell .module-tip-more {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--lx-accent);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

body.dcma-shell .module-tip-more:hover {
  color: var(--lx-accent-hover);
}

html[data-theme="dark"] body.dcma-shell .module-tip-inner {
  color: var(--lx-ink-2);
}

body.dcma-shell .module-tip-body :is(p, ul) {
  margin: 0;
  display: inline;
}

body.dcma-shell .module-tip-dismiss {
  flex-shrink: 0;
  border: 0;
  background: transparent;
  padding: 0.15rem 0.35rem;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lx-ink-2);
  cursor: pointer;
  text-decoration: none;
}

body.dcma-shell .module-tip-dismiss:hover {
  color: var(--lx-ink);
}

body.dcma-shell .lx-form-shell {
  max-width: 860px;
}

body.dcma-shell .lx-form-section {
  margin-bottom: 1.5rem;
}

body.dcma-shell .lx-form-section h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.47;
  color: var(--lx-ink);
  margin: 0 0 1rem;
}

body.dcma-shell .lx-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--lx-border);
  position: sticky;
  bottom: 0;
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  z-index: 2;
  border-radius: var(--lx-r-lg) var(--lx-r-lg) 0 0;
}

body.dcma-shell .lx-patient-identity {
  margin-bottom: 1.25rem;
  padding: 1.25rem 1.5rem;
}

body.dcma-shell .lx-patient-identity--glass {
  border-radius: var(--lx-r-xl) !important;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border) !important;
  box-shadow: var(--lx-shadow-sm);
}

body.dcma-shell .lx-avatar--ring {
  box-shadow: 0 0 0 3px var(--lx-surface), 0 0 0 5px var(--lx-accent-soft);
  background: linear-gradient(135deg, var(--lx-accent-soft), var(--lx-champagne-fill));
}

body.dcma-shell .lx-patient-name {
  font-family: var(--lx-display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--lx-ink);
  margin: 0 0 0.35rem;
}

body.dcma-shell .lx-patient-meta {
  font-size: 14px;
  color: var(--lx-ink-2);
  margin: 0 0 0.75rem;
}

body.dcma-shell .lx-patient-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

body.dcma-shell .lx-patient-identity-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}

body.dcma-shell .lx-patient-identity-main {
  flex: 1 1 320px;
  min-width: min(100%, 320px);
}

body.dcma-shell .lx-patient-identity-actions {
  flex: 1 1 280px;
  max-width: 100%;
  justify-content: flex-end;
}

@media (min-width: 1280px) {
  body.dcma-shell .lx-patient-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 1279px) {
  body.dcma-shell .lx-patient-identity-actions {
    flex-basis: 100%;
    order: 2;
    justify-content: flex-start;
  }
}

body.dcma-shell .lx-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

body.dcma-shell .lx-card-head > h3,
body.dcma-shell .lx-card-head > .section-card-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.dcma-shell .first-day-guide {
  margin-bottom: 1.5rem;
  border-color: var(--lx-border) !important;
  background: var(--lx-surface) !important;
}

body.dcma-shell .first-day-guide summary {
  list-style: none;
  padding: 0.75rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--lx-ink-2);
}

body.dcma-shell .first-day-guide summary::-webkit-details-marker {
  display: none;
}

/* —— Buttons —— */
body.dcma-shell .btn-primary,
body.dcma-shell .btn-secondary,
body.dcma-shell .btn-ghost,
body.dcma-shell .btn-danger,
body.dcma-shell .btn-danger-solid,
body.dcma-shell #app-content a.btn-primary,
body.dcma-shell #app-content button.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--lx-control-h);
  padding: 0 1rem;
  border-radius: var(--lx-radius-sm);
  font-family: var(--lx-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
  box-shadow: none !important;
  transform: none !important;
  filter: none !important;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow var(--lx-transition), transform var(--lx-transition);
}

body.dcma-shell .btn-secondary,
body.dcma-shell .btn-ghost,
body.dcma-shell .btn-danger,
body.dcma-shell .btn-danger-solid {
  background-image: none !important;
}

body.dcma-shell .btn-primary,
body.dcma-shell #app-content a.btn-primary,
body.dcma-shell #app-content button.btn-primary {
  background-color: var(--lx-accent) !important;
  background-image: var(--lx-accent-grad) !important;
  color: var(--lx-on-accent) !important;
  border-color: transparent !important;
}

body.dcma-shell .btn-primary:hover,
body.dcma-shell #app-content a.btn-primary:hover,
body.dcma-shell #app-content button.btn-primary:hover {
  background-color: var(--lx-accent-hover) !important;
  background-image: var(--lx-accent-grad) !important;
  border-color: transparent !important;
}

body.dcma-shell .btn-secondary {
  background: var(--lx-surface) !important;
  color: var(--lx-ink) !important;
  border-color: var(--lx-border-strong) !important;
}

body.dcma-shell .btn-secondary:hover {
  background: var(--lx-surface-2) !important;
}

body.dcma-shell .btn-ghost {
  background: transparent !important;
  color: var(--lx-ink-2) !important;
  border-color: transparent !important;
}

body.dcma-shell .btn-ghost:hover {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink) !important;
}

body.dcma-shell .btn-danger,
body.dcma-shell .btn-danger-solid {
  background: var(--lx-danger-tint) !important;
  color: var(--lx-danger) !important;
  border-color: transparent !important;
}

body.dcma-shell .btn-danger:hover,
body.dcma-shell .btn-danger-solid:hover {
  filter: brightness(0.97);
}

body.dcma-shell .btn-sm {
  min-height: var(--lx-control-h-sm);
  padding: 0 0.75rem;
  font-size: 13px;
}

body.dcma-shell .btn-lg {
  min-height: var(--lx-control-h-lg);
  padding: 0 1.25rem;
  font-size: 15px;
}

/* —— Forms —— */
body.dcma-shell .form-label,
body.dcma-shell #app-content .form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lx-ink-2);
}

body.dcma-shell .form-input,
body.dcma-shell .form-select,
body.dcma-shell #app-content .form-input,
body.dcma-shell #app-content select.form-input,
body.dcma-shell #app-content textarea.form-input,
body.dcma-shell #app-content input.form-input {
  width: 100%;
  min-height: var(--lx-control-h);
  padding: 0 0.75rem;
  font-family: var(--lx-font);
  font-size: 14px;
  line-height: 1.4;
  color: var(--lx-ink);
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border-strong) !important;
  border-radius: var(--lx-radius-sm) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.dcma-shell .form-input:focus,
body.dcma-shell #app-content .form-input:focus {
  outline: none;
  border-color: var(--lx-accent) !important;
  box-shadow: var(--dcma-focus) !important;
}

body.dcma-shell #app-content .filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1100px) {
  body.dcma-shell #app-content .filter-form {
    flex-wrap: nowrap;
  }
}

body.dcma-shell #app-content .filter-form input:not([type='hidden']),
body.dcma-shell #app-content .filter-form select {
  width: auto !important;
  max-width: none;
  flex: 0 0 auto;
  min-height: var(--lx-control-h);
  padding: 0 0.75rem;
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border-strong) !important;
  border-radius: var(--lx-radius-sm) !important;
  color: var(--lx-ink) !important;
  box-shadow: none !important;
}

body.dcma-shell #app-content .filter-form input[name='search'],
body.dcma-shell #app-content .filter-form input[name='q'] {
  flex: 1 1 220px;
  min-width: 200px;
  max-width: 100%;
}

body.dcma-shell #app-content .filter-form select {
  flex: 0 1 auto;
  max-width: 9.375rem;
  min-width: 7.5rem;
  width: auto;
}

@media (min-width: 1100px) {
  body.dcma-shell #app-content .filter-form select {
    max-width: 9.375rem;
  }

  body.dcma-shell #app-content .filter-form button[type='submit'].btn-primary,
  body.dcma-shell #app-content .filter-form button[type='submit'] {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
}

body.dcma-shell #app-content .filter-form button[type='submit'],
body.dcma-shell #app-content .filter-form a {
  width: auto !important;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  body.dcma-shell #app-content .filter-form {
    flex-wrap: wrap;
  }

  body.dcma-shell #app-content .filter-form input[name='search'],
  body.dcma-shell #app-content .filter-form input[name='q'] {
    width: 100% !important;
    flex: 1 1 100%;
  }
}

body.dcma-shell #app-content input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']):not([type='color']):not([type='range']),
body.dcma-shell #app-content select,
body.dcma-shell #app-content textarea {
  background: var(--lx-surface) !important;
  border-color: var(--lx-border-strong) !important;
  color: var(--lx-ink) !important;
}

/* —— Cards —— */
body.dcma-shell #app-content .section-card,
body.dcma-shell #app-content .card {
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border) !important;
  border-radius: var(--lx-radius) !important;
  box-shadow: var(--lx-shadow-sm) !important;
  overflow: hidden;
}

body.dcma-shell #app-content .section-card-header {
  background: var(--lx-surface-2) !important;
  border-bottom: 1px solid var(--lx-border) !important;
  color: var(--lx-ink);
}

body.dcma-shell #app-content .section-card-header .section-card-title {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card-header,
html.dark body.dcma-shell #app-content .section-card-header,
.dark body.dcma-shell #app-content .section-card-header {
  background: transparent !important;
  border-bottom-color: var(--lx-border) !important;
}

body.dcma-shell #app-content .section-card::before,
body.dcma-shell #app-content .stat-card::before,
body.dcma-shell #app-content .stat-card::after {
  display: none !important;
}

body.dcma-shell #app-content .section-card:hover,
body.dcma-shell #app-content a.card:hover {
  box-shadow: var(--lx-shadow-sm) !important;
  border-color: var(--lx-border) !important;
  transform: none !important;
}

/* —— Tables —— */
body.dcma-shell #app-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  overflow: hidden;
}

body.dcma-shell #app-content .section-card table {
  border: 0;
  border-radius: 0;
}

body.dcma-shell #app-content table thead th {
  padding: 0.65rem 1rem;
  background: var(--lx-surface-2) !important;
  background-image: none !important;
  color: var(--lx-ink-3) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--lx-border) !important;
}

body.dcma-shell #app-content table tbody td {
  padding: 0 1rem;
  height: 52px;
  vertical-align: middle;
  border-bottom: 1px solid var(--lx-border);
  color: var(--lx-ink);
}

body.dcma-shell #app-content table tbody tr:last-child td {
  border-bottom: 0;
}

body.dcma-shell #app-content table tbody tr:hover {
  background: var(--lx-surface-2) !important;
}

body.dcma-shell .table-scroll-wrap {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— Badges —— */
body.dcma-shell #app-content .badge,
body.dcma-shell .badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  border-radius: var(--lx-radius-pill);
  border: 1px solid transparent;
  background-image: none !important;
  box-shadow: none !important;
}

body.dcma-shell .badge-success {
  background: var(--lx-success-tint) !important;
  color: var(--lx-success) !important;
  border-color: color-mix(in srgb, var(--lx-success) 22%, transparent);
}

body.dcma-shell .badge-warning {
  background: var(--lx-warning-tint) !important;
  color: var(--lx-warning) !important;
  border-color: color-mix(in srgb, var(--lx-warning) 22%, transparent);
}

body.dcma-shell .badge-danger {
  background: var(--lx-danger-tint) !important;
  color: var(--lx-danger) !important;
  border-color: color-mix(in srgb, var(--lx-danger) 22%, transparent);
}

body.dcma-shell .badge-info {
  background: var(--lx-info-tint) !important;
  color: var(--lx-info) !important;
  border-color: color-mix(in srgb, var(--lx-info) 22%, transparent);
}

body.dcma-shell .badge-neutral {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink-2) !important;
  border-color: color-mix(in srgb, var(--lx-ink-3) 25%, transparent);
}

html[data-theme="dark"] body.dcma-shell #app-content .badge-success,
html[data-theme="dark"] body.dcma-shell .badge-success {
  background: rgba(140, 201, 166, 0.12) !important;
  color: #8cc9a6 !important;
  border-color: rgba(140, 201, 166, 0.25) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .badge-warning,
html[data-theme="dark"] body.dcma-shell .badge-warning {
  background: rgba(217, 183, 112, 0.12) !important;
  color: #d9b770 !important;
  border-color: rgba(217, 183, 112, 0.25) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .badge-danger,
html[data-theme="dark"] body.dcma-shell .badge-danger {
  background: rgba(229, 154, 145, 0.12) !important;
  color: #e59a91 !important;
  border-color: rgba(229, 154, 145, 0.25) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .badge-info,
html[data-theme="dark"] body.dcma-shell .badge-info {
  background: rgba(157, 191, 220, 0.12) !important;
  color: #9dbfdc !important;
  border-color: rgba(157, 191, 220, 0.25) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .badge-neutral,
html[data-theme="dark"] body.dcma-shell .badge-neutral {
  background: rgba(169, 164, 155, 0.1) !important;
  color: #a9a49b !important;
  border-color: rgba(169, 164, 155, 0.25) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-emerald-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-green-5"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-green-1"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-green-"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-emerald-"] {
  background: rgba(140, 201, 166, 0.12) !important;
  color: #8cc9a6 !important;
  border: 1px solid rgba(140, 201, 166, 0.25) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-red-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-rose-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-orange-1"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-red-"] {
  background: rgba(229, 154, 145, 0.12) !important;
  color: #e59a91 !important;
  border: 1px solid rgba(229, 154, 145, 0.25) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-amber-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-orange-5"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-yellow-"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-amber-"] {
  background: rgba(217, 183, 112, 0.12) !important;
  color: #d9b770 !important;
  border: 1px solid rgba(217, 183, 112, 0.25) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-sky-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-blue-1"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-cyan-"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-blue-"],
html[data-theme="dark"] body.dcma-shell #app-content .rounded-full[class*="bg-sky-"] {
  background: rgba(157, 191, 220, 0.12) !important;
  color: #9dbfdc !important;
  border: 1px solid rgba(157, 191, 220, 0.25) !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-teal-1"] {
  background: rgba(124, 197, 188, 0.12) !important;
  color: #7cc5bc !important;
  border: 1px solid rgba(124, 197, 188, 0.25) !important;
  font-weight: 500 !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-violet-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-purple-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-pink-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-indigo-"] {
  background: rgba(157, 191, 220, 0.1) !important;
  color: #9dbfdc !important;
  border: 1px solid rgba(157, 191, 220, 0.22) !important;
  font-weight: 500 !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-slate-"]:not([class*="bg-slate-8"]):not([class*="bg-slate-9"]),
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-gray-1"] {
  background: rgba(169, 164, 155, 0.1) !important;
  color: #a9a49b !important;
  border: 1px solid rgba(169, 164, 155, 0.25) !important;
  font-weight: 500 !important;
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-slate-8"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="bg-slate-900"] {
  background: rgba(169, 164, 155, 0.14) !important;
  color: #c4bfb6 !important;
  border: 1px solid rgba(169, 164, 155, 0.3) !important;
}

html[data-theme="dark"] body.dcma-shell .lx-tint-neutral,
html[data-theme="dark"] body.dcma-shell .lx-tint-info {
  background: rgba(169, 164, 155, 0.1) !important;
  color: #a9a49b !important;
  border: 1px solid rgba(169, 164, 155, 0.25);
}

html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-emerald-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-sky-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-amber-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-teal-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-orange-"],
html[data-theme="dark"] body.dcma-shell #app-content span[class*="border-slate-"] {
  border-color: rgba(169, 164, 155, 0.25) !important;
}

/* —— Tabs (underline) —— */
body.dcma-shell .dcma-tabs-wrap {
  position: relative;
  margin-bottom: 1rem;
}

body.dcma-shell .tab-group,
body.dcma-shell .tenant-admin-tabs,
body.dcma-shell .tenant-settings-quicknav,
body.dcma-shell [data-dcma-tabs] {
  display: flex !important;
  align-items: stretch;
  gap: 0 !important;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--lx-border) !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  border-radius: 0 !important;
}

body.dcma-shell .tab-group::-webkit-scrollbar,
body.dcma-shell [data-dcma-tabs]::-webkit-scrollbar {
  display: none;
}

body.dcma-shell .tab-pill,
body.dcma-shell a.tab-pill,
body.dcma-shell button.tab-pill,
body.dcma-shell .tenant-admin-tabs a,
body.dcma-shell .tenant-settings-quicknav a {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 40px;
  padding: 0.5rem 1rem !important;
  margin-bottom: -1px;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--lx-ink-2) !important;
  background: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  white-space: nowrap;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

body.dcma-shell .tab-pill:hover,
body.dcma-shell a.tab-pill:hover {
  color: var(--lx-ink) !important;
  background: transparent !important;
}

body.dcma-shell .tab-pill-active,
body.dcma-shell a.tab-pill-active,
body.dcma-shell .tab-pill.is-active,
body.dcma-shell .tenant-admin-tabs a.is-active,
body.dcma-shell .tenant-admin-tabs a[aria-current="page"] {
  color: var(--lx-ink) !important;
  font-weight: 600 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dcma-shell .tab-pill-active::after,
body.dcma-shell a.tab-pill-active::after,
body.dcma-shell .tab-pill.is-active::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  right: 0.65rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--lx-accent-grad);
}

body.dcma-shell .dcma-tabs-wrap::before,
body.dcma-shell .dcma-tabs-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.25rem;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body.dcma-shell .dcma-tabs-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--lx-canvas), transparent);
}

body.dcma-shell .dcma-tabs-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--lx-canvas), transparent);
}

body.dcma-shell .dcma-tabs-wrap.is-scroll-left::before,
body.dcma-shell .dcma-tabs-wrap.is-scroll-right::after {
  opacity: 1;
}

/* —— Flash —— */
body.dcma-shell .flash-success,
body.dcma-shell .flash-error,
body.dcma-shell .flash-info,
body.dcma-shell .flash-warning,
body.dcma-shell [data-dcma-flash] {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--lx-radius);
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  color: var(--lx-ink);
  box-shadow: none;
}

body.dcma-shell .flash-success {
  border-left: 3px solid var(--lx-success);
  background: var(--lx-success-tint);
  color: var(--lx-success);
}

body.dcma-shell .flash-error {
  border-left: 3px solid var(--lx-danger);
  background: var(--lx-danger-tint);
  color: var(--lx-danger);
}

body.dcma-shell .flash-info {
  border-left: 3px solid var(--lx-info);
  background: var(--lx-info-tint);
  color: var(--lx-info);
}

body.dcma-shell .flash-warning {
  border-left: 3px solid var(--lx-warning);
  background: var(--lx-warning-tint);
  color: var(--lx-warning);
}

body.dcma-shell .flash-dismissible .flash-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  padding: 0.15rem;
}

body.dcma-shell .flash-dismissible .flash-close:hover {
  opacity: 1;
}

/* —— Toasts —— */
#dcma-toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(24rem, calc(100vw - 2rem));
  pointer-events: none;
}

.dcma-toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  font-size: 14px;
  line-height: 1.45;
  color: var(--lx-ink);
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  box-shadow: var(--lx-shadow-md);
  animation: lx-toast-in 0.22s var(--lx-ease);
}

.dcma-toast.is-success { border-left: 3px solid var(--lx-success); }
.dcma-toast.is-error { border-left: 3px solid var(--lx-danger); }
.dcma-toast.is-info { border-left: 3px solid var(--lx-info); }

@keyframes lx-toast-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Command palette —— */
.cmd-palette {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-lg);
  box-shadow: var(--lx-shadow-md);
  overflow: hidden;
}

.cmd-palette-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--lx-ink);
  padding: 0.85rem 0;
}

.cmd-result {
  text-decoration: none;
  border-left: 2px solid transparent;
}

.cmd-result:hover {
  background: var(--lx-surface-2);
}

.cmd-result-active,
.cmd-result.cmd-result-active {
  background: var(--lx-accent-soft);
  border-left-color: var(--lx-accent);
}

/* —— Empty state —— */
body.dcma-shell #app-content .empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--lx-ink-2);
}

body.dcma-shell #app-content .empty-state-title {
  font-family: var(--lx-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--lx-ink);
  margin-bottom: 0.35rem;
}

body.dcma-shell #app-content .empty-state svg,
body.dcma-shell #app-content .empty-state-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  color: var(--lx-ink-3);
  stroke-width: 1.25;
}

/* —— Skeleton —— */
.dcma-page-skeleton {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem 0 1rem;
}

.dcma-page-skeleton .dcma-skeleton-line {
  height: 0.75rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-surface-2);
}

.dcma-page-skeleton .dcma-skeleton-line.is-lg {
  height: 2.25rem;
  border-radius: var(--lx-radius-sm);
}

.dcma-page-skeleton .dcma-skeleton-line.is-md { width: 70%; }
.dcma-page-skeleton .dcma-skeleton-line.is-sm { width: 42%; }

#app-content.is-skel-loading > :not(.dcma-page-skeleton) {
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

.lx-copilot-panel-skeleton .lx-copilot-skel-line {
  height: 0.65rem;
  border-radius: var(--lx-radius-pill);
  background: linear-gradient(
    90deg,
    var(--lx-surface) 0%,
    var(--lx-accent-soft) 45%,
    var(--lx-surface) 90%
  );
  background-size: 200% 100%;
  animation: lx-copilot-skel-shimmer 1.4s ease-in-out infinite;
}

.lx-copilot-panel-skeleton .lx-copilot-skel-line.is-lg {
  height: 1.75rem;
  border-radius: var(--lx-r-sm);
  width: 88%;
}

.lx-copilot-panel-skeleton .lx-copilot-skel-line.is-md { width: 62%; }

.lx-copilot-panel-skeleton .lx-copilot-skel-line.is-label {
  width: 36%;
  height: 0.5rem;
}

.lx-copilot-panel-skeleton {
  min-height: 9.5rem;
}

.lx-copilot-panel-skeleton .lx-copilot-skel-chip {
  height: 1.625rem;
  width: 4.25rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
}

.lx-copilot-panel-skeleton .lx-copilot-skel-chip.is-wide {
  width: 5.5rem;
}

@keyframes lx-copilot-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .lx-copilot-panel-skeleton .lx-copilot-skel-line {
    animation: none;
    background: var(--lx-surface-2);
  }
}

/* —— Dense mode —— */
body.dcma-dense #app-content {
  font-size: 13px;
}

body.dcma-dense #app-content table tbody td {
  height: 44px;
}

body.dcma-dense #app-content table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* —— Mobile bottom nav —— */
body.dcma-shell .mobile-quick-nav {
  background: var(--lx-surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: 1px solid var(--lx-border) !important;
  box-shadow: none !important;
  padding-top: 0.35rem;
  padding-bottom: max(0.35rem, env(safe-area-inset-bottom));
}

body.dcma-shell .mobile-quick-nav-item {
  color: var(--lx-ink-3);
  border-radius: var(--lx-radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

body.dcma-shell .mobile-quick-nav-item.is-active {
  color: var(--lx-accent);
  background: var(--lx-accent-soft);
}

/* —— FAB stack —— */
body.dcma-shell .lx-fab-stack {
  position: fixed;
  z-index: 90;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: var(--lx-fab-stack-pad);
  border-radius: var(--lx-radius-pill);
}

body.dcma-shell .lx-fab-stack .floating-widget-anchor {
  position: static;
}

.floating-widget-fab,
.floating-widget-fab--support,
.floating-widget-fab--copilot {
  width: var(--lx-fab-size) !important;
  height: var(--lx-fab-size) !important;
  border-radius: var(--lx-radius-sm) !important;
  background: transparent !important;
  background-image: none !important;
  color: var(--lx-ink) !important;
  border: 0 !important;
  box-shadow: none !important;
  position: static !important;
  right: auto !important;
  bottom: auto !important;
}

.floating-widget-fab svg {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

@media (max-width: 1023px) {
  body.dcma-shell .lx-fab-stack {
    bottom: calc(4.75rem + env(safe-area-inset-bottom));
  }

  body.dcma-shell:has(.lx-form-actions) .lx-fab-stack {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

@media (min-width: 1024px) {
  body.dcma-shell .lx-fab-stack {
    right: max(1.25rem, env(safe-area-inset-right));
  }
}

/* —— Login —— */
.dcma-login-shell .login-orb {
  display: none !important;
}

.dcma-login-shell .login-panel-brand {
  background: var(--lx-sidebar) !important;
  background-image: none !important;
  color: var(--lx-ink);
}

.dcma-login-shell .login-panel-form {
  background: var(--lx-canvas) !important;
  background-image: none !important;
  color: var(--lx-ink);
}

.dcma-login-shell .login-form-surface,
.dcma-login-shell .login-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  box-shadow: var(--lx-shadow-sm);
}

.dcma-login-shell .login-brand-hero h1,
.dcma-login-shell .login-hero-title,
.dcma-login-shell .lx-display {
  font-family: var(--lx-display);
  font-size: clamp(1.625rem, 2.5vw, 2.125rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--lx-ink);
  line-height: 1.25;
  max-width: 22rem;
}

.dcma-login-shell .login-hero-subtitle {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--lx-ink-2);
  max-width: 20rem;
}

.dcma-login-shell .login-features {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.875rem;
  color: var(--lx-ink-2);
}

.dcma-login-shell .login-features li {
  padding-left: 1rem;
  border-left: 1px solid var(--lx-border-strong);
}

.dcma-login-shell .login-brand-locale {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--lx-ink-3);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dcma-login-shell .login-brand-locale .lx-locale-switch {
  margin-left: 0;
}

.dcma-login-shell .mobile-locale-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: var(--lx-radius-sm);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  gap: 0;
}

.dcma-login-shell .mobile-locale-pill a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.22rem 0.5rem;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--lx-ink-3);
  text-decoration: none;
  background: transparent !important;
}

.dcma-login-shell .mobile-locale-pill a.is-active {
  background: var(--lx-accent-soft) !important;
  color: var(--lx-accent) !important;
}

.dcma-login-shell .form-input,
.dcma-login-shell input.form-input,
.dcma-login-shell select.form-input,
.dcma-login-shell textarea.form-input {
  display: block;
  width: 100%;
  min-height: 40px;
  padding: 0 0.75rem;
  font-family: var(--lx-font);
  font-size: 14px;
  line-height: 1.4;
  color: var(--lx-ink) !important;
  -webkit-text-fill-color: var(--lx-ink);
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border-strong) !important;
  border-radius: var(--lx-radius-sm) !important;
  box-shadow: none !important;
}

.dcma-login-shell .form-input:focus,
.dcma-login-shell input.form-input:focus {
  outline: none;
  border-color: var(--lx-accent) !important;
  box-shadow: var(--dcma-focus) !important;
}

.dcma-login-shell .btn-primary,
.dcma-login-shell button.btn-primary {
  text-shadow: none !important;
}

.dcma-login-shell {
  background: var(--lx-canvas) !important;
  color: var(--lx-ink);
}

.dcma-login-shell .login-brand-footer {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--lx-ink-3);
}

.dcma-login-shell .login-brand-footer a {
  color: var(--lx-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dcma-login-shell .login-form-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1rem 0;
}

.dcma-login-shell .login-form-head {
  margin-bottom: 1.5rem;
}

.dcma-login-shell .login-form-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--lx-ink);
  margin: 0;
}

.dcma-login-shell .login-form-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lx-ink-3);
  margin: 0 0 0.35rem;
}

.dcma-login-shell .login-form-lead {
  margin: 0.35rem 0 0;
  font-size: 0.875rem;
  color: var(--lx-ink-2);
}

.dcma-login-shell .login-flash {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--lx-radius-sm);
  font-size: 0.875rem;
  border: 1px solid var(--lx-border);
}

.dcma-login-shell .login-flash--error {
  background: var(--lx-danger-tint);
  color: var(--lx-danger);
  border-color: color-mix(in srgb, var(--lx-danger) 25%, var(--lx-border));
}

.dcma-login-shell .login-flash--success {
  background: var(--lx-success-tint);
  color: var(--lx-success);
}

.dcma-login-shell .login-note {
  margin-bottom: 1rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.8125rem;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-sm);
}

.dcma-login-shell .login-note--demo {
  color: var(--lx-ink-2);
}

.dcma-login-shell [class*="from-teal"],
.dcma-login-shell [class*="bg-gradient"] {
  background: var(--lx-surface-2) !important;
  background-image: none !important;
  border: 1px solid var(--lx-border) !important;
  color: var(--lx-ink) !important;
}

.dcma-login-shell [class*="from-teal"] .text-white,
.dcma-login-shell [class*="from-teal"] .text-slate-300,
.dcma-login-shell [class*="from-teal"] .text-teal-200,
.dcma-login-shell [class*="from-teal"] .text-teal-300,
.dcma-login-shell [class*="from-teal"] .text-cyan-300 {
  color: var(--lx-ink) !important;
}

.dcma-login-shell .login-form-surface {
  padding: 1.75rem 1.5rem 2rem;
}

.dcma-login-shell .login-card {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}

.dcma-login-shell .login-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
}

.dcma-login-shell .login-panel-brand {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 2.5rem 2rem;
}

@media (min-width: 1024px) {
  .dcma-login-shell .login-panel-brand {
    display: flex;
    width: 42%;
    max-width: 520px;
  }
  .dcma-login-shell > .flex {
    flex-direction: row;
  }
}

.dcma-login-shell .form-label {
  color: var(--lx-ink-2);
}

.dcma-login-shell a.text-sm,
.dcma-login-shell .text-center a {
  color: var(--lx-ink-2) !important;
}

.dcma-login-shell a.text-sm:hover,
.dcma-login-shell .text-center a:hover {
  color: var(--lx-accent) !important;
}

.dcma-login-footer,
.dcma-login-shell .text-slate-500,
.dcma-login-shell .text-slate-400 {
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] .dcma-login-shell .login-panel-brand {
  background: var(--lx-sidebar) !important;
}

html[data-theme="dark"] .dcma-login-shell .login-panel-form {
  background: var(--lx-canvas) !important;
}

/* Login overflow guard */
body > .flex.min-h-screen {
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.login-panel-form,
.login-card,
.login-form-surface {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* —— Tailwind calm-down (decorative color in app content) —— */
body.dcma-shell #app-content [class*="bg-gradient"],
body.dcma-shell #app-content [class*="from-teal"],
body.dcma-shell #app-content [class*="from-emerald"],
body.dcma-shell #app-content [class*="from-violet"],
body.dcma-shell #app-content [class*="from-purple"],
body.dcma-shell #app-content [class*="from-indigo"],
body.dcma-shell #app-content [class*="from-pink"] {
  background-image: none !important;
  background: var(--lx-surface-2) !important;
}

body.dcma-shell #app-content .bg-white,
body.dcma-shell #app-content [class*="bg-white"] {
  background-color: var(--lx-surface) !important;
}

body.dcma-shell #app-content .stat-card,
body.dcma-shell #app-content .stat-card:hover {
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border) !important;
  box-shadow: var(--lx-shadow-sm) !important;
  transform: none !important;
}

body.dcma-shell #app-content .stat-card-icon,
body.dcma-shell #app-content [class*="stat-card-icon"] {
  display: none !important;
}

body.dcma-shell #app-content .text-teal-600,
body.dcma-shell #app-content .text-teal-700,
body.dcma-shell #app-content a.text-teal-600 {
  color: var(--lx-accent) !important;
}

/* —— Dark mode shell —— */
html[data-theme="dark"] body.dcma-shell {
  background: var(--lx-canvas) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .bg-white,
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-white"],
html[data-theme="dark"] body.dcma-shell #app-content .section-card,
html[data-theme="dark"] body.dcma-shell #app-content .card,
html[data-theme="dark"] body.dcma-shell #app-content table,
html[data-theme="dark"] body.dcma-shell .table-scroll-wrap,
html[data-theme="dark"] body.dcma-shell #app-content .filter-form {
  background: var(--lx-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .text-slate-900,
html[data-theme="dark"] body.dcma-shell #app-content .text-slate-800,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-900 {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .text-slate-500,
html[data-theme="dark"] body.dcma-shell #app-content .text-slate-600,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-500 {
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .border-slate-200,
html[data-theme="dark"] body.dcma-shell #app-content .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--lx-border) !important;
}

html[data-theme="dark"] body.dcma-shell .flash-success,
html[data-theme="dark"] body.dcma-shell .flash-error,
html[data-theme="dark"] body.dcma-shell .flash-info,
html[data-theme="dark"] body.dcma-shell [data-dcma-flash] {
  background: var(--lx-surface) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .dcma-toast,
html[data-theme="dark"] .cmd-palette,
html[data-theme="dark"] body.dcma-shell .lx-stat-row {
  box-shadow: none;
}

html[data-theme="dark"] body.dcma-shell .btn-secondary {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink) !important;
  border-color: var(--lx-border-strong) !important;
}

html[data-theme="dark"] body.dcma-shell .dcma-theme-toggle {
  background: var(--lx-surface);
  border-color: var(--lx-border-strong);
  color: var(--lx-ink-2);
}

html[data-theme="dark"] body.dcma-shell .dcma-tabs-wrap::before {
  background: linear-gradient(90deg, var(--lx-canvas), transparent);
}

html[data-theme="dark"] body.dcma-shell .dcma-tabs-wrap::after {
  background: linear-gradient(270deg, var(--lx-canvas), transparent);
}

html[data-theme="dark"] body.dcma-shell #app-content input:not([type='checkbox']):not([type='radio']):not([type='hidden']):not([type='file']):not([type='color']):not([type='range']),
html[data-theme="dark"] body.dcma-shell #app-content select,
html[data-theme="dark"] body.dcma-shell #app-content textarea {
  background: var(--lx-surface) !important;
  color: var(--lx-ink) !important;
  border-color: var(--lx-border-strong) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .stat-card-value {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .text-black,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-900,
html[data-theme="dark"] body.dcma-shell #app-content .text-slate-900 {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .bg-gray-50,
html[data-theme="dark"] body.dcma-shell #app-content .bg-slate-50,
html[data-theme="dark"] body.dcma-shell #app-content .hover\:bg-slate-50\/80:hover {
  background-color: var(--lx-surface-2) !important;
}

html[data-theme="dark"] .dcma-login-shell .text-slate-800,
html[data-theme="dark"] .dcma-login-shell .text-slate-600,
html[data-theme="dark"] .dcma-login-shell .text-slate-500,
html[data-theme="dark"] .dcma-login-shell .text-slate-400 {
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] .dcma-login-shell .login-form-surface,
html[data-theme="dark"] .dcma-login-shell .login-card {
  background: var(--lx-surface) !important;
  border-color: var(--lx-border) !important;
  box-shadow: none !important;
}

/* —— Chairside: preserve dedicated dark UI —— */
body.dcma-chairside-page:not([data-theme-forced="light"]),
html[data-theme="dark"] body.dcma-chairside-page {
  background: #070b14 !important;
}

/* —— Misc —— */
/* —— Card titles (dark-readable) —— */
body.dcma-shell #app-content .section-card h3,
body.dcma-shell #app-content .section-card .section-card-title,
body.dcma-shell #app-content .card-body > h3 {
  color: var(--lx-ink);
}

body.dcma-shell #app-content .empty-state .content-icon {
  display: none !important;
}

body.dcma-shell #app-content .lx-empty-inset {
  background: transparent !important;
  border: 1px dashed var(--lx-border) !important;
  border-color: var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
  border-radius: var(--lx-r-md);
}

body.dcma-shell #app-content .lx-empty-inset .empty-state {
  background: transparent !important;
  border: none !important;
  margin: 0;
  padding: 1.25rem 0.5rem !important;
  color: var(--lx-ink-2);
}

body.dcma-shell #app-content .lx-empty-inset .empty-state-desc {
  color: var(--lx-ink-3);
}

body.dcma-shell #app-content .dcma-board-empty {
  background: var(--lx-surface) !important;
  border: 1px dashed var(--lx-border) !important;
  border-color: var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
  border-radius: var(--lx-r-lg);
}

body.dcma-shell #app-content .border-dashed.border-slate-200:not(.empty-state):not(:has(.empty-state)),
body.dcma-shell #app-content .border-dashed.border-\[var\(--lx-border\)\]:not(.empty-state):not(:has(.empty-state)) {
  background: var(--lx-surface-2) !important;
  border: 1px dashed var(--lx-border) !important;
  border-color: var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
  border-radius: var(--lx-r-md);
}

html[data-theme="dark"] body.dcma-shell #app-content .lx-empty-inset,
html[data-theme="dark"] body.dcma-shell #app-content .lx-empty-inset .empty-state,
html[data-theme="dark"] body.dcma-shell #app-content .dcma-board-empty {
  background: transparent !important;
  border-color: var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .border-dashed.border-slate-200 {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink-2) !important;
}

/* —— Reports hub —— */
body.dcma-shell .lx-report-section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  margin: 0 0 0.75rem;
}

body.dcma-shell .lx-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

body.dcma-shell .lx-report-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease;
}

body.dcma-shell .lx-report-card:hover {
  background: var(--lx-surface-2);
}

body.dcma-shell .lx-report-card-icon {
  flex-shrink: 0;
  color: var(--lx-ink-3);
  margin-top: 0.1rem;
}

body.dcma-shell .lx-report-card-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--lx-ink);
}

body.dcma-shell .lx-report-card-desc {
  display: block;
  font-size: 13px;
  color: var(--lx-ink-2);
  margin-top: 0.15rem;
  line-height: 1.4;
}

body.dcma-shell .lx-note {
  padding: 0.65rem 0.85rem;
  border-radius: var(--lx-radius-sm);
  border: 1px solid var(--lx-border);
  background: var(--lx-surface-2);
  color: var(--lx-ink-2);
}

body.dcma-shell .lx-note--warning {
  background: var(--lx-warning-tint, #F6EFDD);
  border-color: var(--lx-border);
  color: var(--lx-warning);
}

html[data-theme="dark"] body.dcma-shell .lx-note--warning {
  background: rgba(217, 179, 94, 0.12);
  color: var(--lx-warning);
}

body.dcma-shell .lx-note-link {
  color: var(--lx-accent);
  font-weight: 500;
  margin-left: 0.35rem;
}

/* —— Patient status KV —— */
body.dcma-shell .lx-kv-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}

body.dcma-shell .lx-kv-cell {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-sm);
  background: var(--lx-surface-2);
}

body.dcma-shell .lx-kv-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--lx-ink-3);
  margin-bottom: 0.2rem;
}

body.dcma-shell .lx-kv-value {
  display: block;
  font-weight: 500;
  color: var(--lx-ink);
}

body.dcma-shell .lx-kv-meta {
  display: block;
  font-size: 11px;
  color: var(--lx-ink-3);
  margin-top: 0.1rem;
}

/* —— Appointments calendar —— */
body.dcma-shell .lx-cal-doctor-col,
body.dcma-shell .lx-cal-doctor-head {
  width: 180px;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dcma-shell .lx-cal-today {
  background: var(--lx-accent-soft) !important;
}

body.dcma-shell .lx-soap-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-ink-3);
  margin: 0 0 0.25rem;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  body.dcma-shell #app-content {
    animation: none;
  }
}

@media (max-width: 767px) {
  body.dcma-shell {
    --lx-header-h: 56px;
  }

  body.dcma-shell .app-header .app-header-head,
  body.dcma-shell .app-header .lx-header-date,
  body.dcma-shell .app-header .app-header-locale,
  body.dcma-shell .app-header .app-header-theme,
  body.dcma-shell .app-header .edition-pill {
    display: none !important;
  }

  body.dcma-shell .app-header .mobile-page-title {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  body.dcma-shell .app-header .mobile-page-title .lx-page-title {
    font-family: var(--lx-font) !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.dcma-shell .app-header .app-header-search {
    display: none !important;
  }

  body.dcma-shell .sidebar-drawer-locale-theme {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-top: 1px solid var(--lx-border);
  }

  body.dcma-shell .dcma-demo-banner {
    font-size: 12px;
    min-height: 28px;
  }

  body.dcma-shell .dcma-demo-banner > .flex-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 1024px) {
  body.dcma-shell .app-header-search-wide {
    min-width: 260px;
    max-width: 280px;
  }
}

@media (min-width: 768px) {
  body.dcma-shell .sidebar-drawer-locale-theme {
    display: none;
  }
}

/* —— Form intro (create/edit pages) —— */
body.dcma-shell .lx-page-intro {
  margin-bottom: 1.5rem;
}

body.dcma-shell .lx-page-back {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--lx-ink-2);
  text-decoration: none;
}

body.dcma-shell .lx-page-back:hover {
  color: var(--lx-ink);
}

body.dcma-shell .lx-page-intro-title {
  font-family: var(--lx-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  color: var(--lx-ink);
  margin: 0;
}

body.dcma-shell .lx-page-intro-meta {
  margin: 0.35rem 0 0;
  font-size: 14px;
  color: var(--lx-ink-2);
}

body.dcma-shell .lx-page-intro-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

body.dcma-shell .lx-page-intro .page-header-icon-wrap {
  display: none;
}

body.dcma-shell .lx-form-shell .lx-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  body.dcma-shell .lx-form-shell .lx-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

body.dcma-shell .lx-form-shell .lx-form-grid > .sm\:col-span-2,
body.dcma-shell .lx-form-shell .lx-form-grid > [class*="col-span-2"] {
  grid-column: 1 / -1;
}

body.dcma-shell .lx-form-shell .lx-form-grid > div > label,
body.dcma-shell .lx-form-shell .lx-form-grid > div > .form-label,
body.dcma-shell .lx-form-shell .card-body label,
body.dcma-shell .lx-form-shell .card-body .form-label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lx-ink-2);
}

body.dcma-shell .lx-form-shell form.space-y-6,
body.dcma-shell .lx-form-shell .space-y-6,
body.dcma-shell .lx-form-shell .space-y-5,
body.dcma-shell .lx-form-shell .card-body.space-y-5 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

body.dcma-shell .lx-form-shell .card-body .grid {
  gap: 1rem;
}

body.dcma-shell .lx-settings-section-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--lx-border);
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

body.dcma-shell .lx-settings-section-nav::-webkit-scrollbar {
  display: none;
}

body.dcma-shell .lx-settings-section-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.5rem 1rem;
  margin-bottom: -1px;
  font-size: 14px;
  font-weight: 500;
  color: var(--lx-ink-2);
  text-decoration: none;
  white-space: nowrap;
}

body.dcma-shell .lx-settings-section-nav a:hover {
  color: var(--lx-ink);
}

body.dcma-shell .lx-plan-card {
  border-top: 2px solid var(--lx-gold);
}

body.dcma-shell .lx-note--danger {
  background: var(--lx-danger-tint, #f7e9e7);
  border: 1px solid var(--lx-border);
  color: var(--lx-danger);
}

html[data-theme="dark"] body.dcma-shell .lx-note--danger {
  background: rgba(229, 138, 128, 0.12);
}

/* —— Avatars (neutral initials app-wide) —— */
body.dcma-shell .lx-avatar,
body.dcma-shell .avatar-doctor,
body.dcma-shell .avatar-doctor-sm,
body.dcma-shell .avatar-brand,
body.dcma-shell .avatar-brand-md,
body.dcma-shell .avatar-brand-lg,
body.dcma-shell .avatar-table,
body.dcma-shell .avatar-table-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 600;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  box-shadow: none !important;
  border-radius: var(--lx-radius-pill);
}

body.dcma-shell .lx-avatar--sm,
body.dcma-shell .avatar-doctor-sm,
body.dcma-shell .avatar-table {
  width: 2rem;
  height: 2rem;
  font-size: 0.6875rem;
}

body.dcma-shell .lx-avatar--md,
body.dcma-shell .avatar-doctor {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.8125rem;
  border-radius: var(--lx-radius);
}

body.dcma-shell .lx-avatar--lg,
body.dcma-shell .avatar-brand-md {
  width: 3rem;
  height: 3rem;
  font-size: 1rem;
  border-radius: var(--lx-radius);
}

body.dcma-shell .lx-avatar--xl,
body.dcma-shell .avatar-brand-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.125rem;
  border-radius: var(--lx-radius);
}

body.dcma-shell .avatar-schedule-warn {
  background: var(--lx-warning-tint);
  color: var(--lx-warning);
  border: 1px solid var(--lx-border);
  box-shadow: none !important;
}

/* —— Module / billing rows —— */
body.dcma-shell .lx-module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-sm);
  background: var(--lx-surface);
  font-size: 0.875rem;
}

body.dcma-shell .lx-module-row__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-accent);
  flex-shrink: 0;
}

body.dcma-shell .lx-callout {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
}

body.dcma-shell .lx-callout-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--lx-ink);
  margin: 0 0 0.35rem;
}

body.dcma-shell .lx-callout-body {
  font-size: 0.75rem;
  color: var(--lx-ink-2);
  margin: 0;
}

/* —— CRM pipeline (calm columns) —— */
body.dcma-shell .crm-pipeline-col {
  flex-shrink: 0;
  width: 18rem;
  padding: 0.75rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface-2);
}

body.dcma-shell .crm-pipeline-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-sm);
  padding: 0.75rem;
  box-shadow: var(--lx-shadow-sm);
}

/* —— Specialty hub (no saturated hero) —— */
body.dcma-shell .lx-specialty-head {
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface);
}

body.dcma-shell .lx-specialty-head h2 {
  font-family: var(--lx-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--lx-ink);
  margin: 0;
}

body.dcma-shell .lx-specialty-head p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--lx-ink-2);
  max-width: 42rem;
  line-height: 1.55;
}

body.dcma-shell .specialty-hero-solid {
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  padding: 1.25rem 1.5rem !important;
  color: var(--lx-ink) !important;
}

body.dcma-shell .specialty-hero-solid h2,
body.dcma-shell .specialty-hero-solid p {
  color: var(--lx-ink) !important;
  opacity: 1 !important;
}

body.dcma-shell .specialty-hero-solid .module-chip {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink-2) !important;
  border-color: var(--lx-border) !important;
}

/* —— Luxe dialogs —— */
body.dcma-shell dialog.lx-dialog {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius-lg);
  box-shadow: var(--lx-shadow-md);
  padding: 0;
  max-width: calc(100% - 2rem);
  background: var(--lx-surface);
  color: var(--lx-ink);
}

html[data-theme="dark"] body.dcma-shell dialog.lx-dialog {
  box-shadow: none;
}

body.dcma-shell dialog.lx-dialog::backdrop {
  background: rgba(15, 17, 19, 0.45);
}

body.dcma-shell .lx-ai-panel {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  background: var(--lx-surface-2);
  padding: 1rem;
}

body.dcma-shell .btn-ai-neutral {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--lx-control-h);
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--lx-border-strong);
  border-radius: var(--lx-radius-sm);
  background: var(--lx-surface);
  color: var(--lx-ink);
}

body.dcma-shell .btn-ai-neutral:hover {
  background: var(--lx-surface-2);
}

/* C3: table column layout */
body.dcma-shell #app-content .section-card > .overflow-x-auto {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.dcma-shell #app-content .section-card table {
  table-layout: auto;
  width: 100%;
  min-width: min(100%, 36rem);
}

body.dcma-shell #app-content table th.lx-col-name,
body.dcma-shell #app-content table td.lx-col-name {
  min-width: 11.25rem;
  vertical-align: top;
}

body.dcma-shell #app-content table .lx-col-nowrap,
body.dcma-shell #app-content table th.lx-col-nowrap,
body.dcma-shell #app-content table td.lx-col-nowrap {
  white-space: nowrap;
}

body.dcma-shell #app-content table .lx-col-money,
body.dcma-shell #app-content table td.lx-col-money {
  white-space: nowrap;
  text-align: right;
}

body.dcma-shell #app-content table td.lx-col-clamp-2,
body.dcma-shell #app-content table th.lx-col-clamp-2 {
  max-width: 16rem;
  vertical-align: middle;
  white-space: normal;
}

body.dcma-shell #app-content .lx-line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  line-height: 1.4;
}

body.dcma-shell .lx-stat-row .lx-stat-link {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--lx-accent);
  margin-top: 0.35rem;
  text-decoration: none;
}

body.dcma-shell .lx-stat-row .lx-stat-link:hover {
  text-decoration: underline;
}

/* Ortho legacy purple buttons → accent primary */
body.dcma-shell .btn-ortho,
body.dcma-shell .btn-ortho-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--lx-control-h);
  padding: 0 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--lx-radius-sm);
  background: var(--lx-accent) !important;
  color: var(--lx-on-accent) !important;
  border: 1px solid transparent;
  box-shadow: none !important;
  transition: background 0.15s ease;
}

body.dcma-shell .btn-ortho-lg {
  padding: 0 1.25rem;
  min-height: var(--lx-control-h-lg, 2.75rem);
}

body.dcma-shell .btn-ortho:hover,
body.dcma-shell .btn-ortho-lg:hover {
  background: var(--lx-accent-hover) !important;
}

body.dcma-shell .lx-sop-chat-user {
  background: var(--lx-surface-2);
  color: var(--lx-ink);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  padding: 0.75rem;
  font-size: 14px;
}

body.dcma-shell .lx-sop-chat-assistant {
  background: var(--lx-surface);
  color: var(--lx-ink);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-radius);
  padding: 0.75rem;
  font-size: 14px;
  margin-right: 1rem;
}

body.dcma-shell .lx-sop-chat-assistant.is-error {
  border-color: var(--lx-danger);
  background: var(--lx-danger-tint);
  color: var(--lx-danger);
}

/* Portal / standalone public shells */
.portal-shell {
  background: var(--lx-canvas, #f7f4ee);
  color: var(--lx-ink, #1c1b19);
  min-height: 100%;
}

.portal-header {
  background: var(--lx-surface, #fff);
  border-bottom: 1px solid var(--lx-border, #e7e1d6);
}

.portal-header-title {
  font-family: var(--lx-display, "Fraunces", Georgia, serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--lx-ink, #1c1b19);
  margin: 0;
}

.portal-clinic-label,
.portal-header-sub {
  font-size: 12px;
  color: var(--lx-ink-3, #8c867c);
  margin: 0 0 0.25rem;
}

/* Public pricing (marketing site) */
body.lx-pricing-page {
  background: var(--lx-canvas);
  color: var(--lx-ink);
  font-family: var(--lx-font, "Plus Jakarta Sans", system-ui, sans-serif);
}

body.lx-pricing-page .lx-pricing-hero-title {
  font-family: var(--lx-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--lx-ink);
}

body.lx-pricing-page .lx-pricing-plan-card {
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-xl);
  box-shadow: var(--lx-shadow-sm);
  padding: 1.25rem 1.5rem;
}

body.lx-pricing-page .lx-pricing-plan-card.is-recommended {
  border-color: rgba(201, 169, 110, 0.55);
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.35), var(--lx-shadow-md);
}

body.lx-pricing-page .lx-pricing-plan-card.is-recommended .lx-pricing-plan-overline {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-champagne-fill);
  border: 1px solid rgba(201, 169, 110, 0.35);
}

body.lx-pricing-page .lx-pricing-plan-overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-gold);
}

body.lx-pricing-page .lx-pricing-cta-primary {
  display: block;
  text-align: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--lx-radius-pill);
  font-size: 14px;
  font-weight: 600;
  background: var(--lx-accent-grad);
  color: var(--lx-on-accent);
  text-decoration: none;
  transition: transform var(--lx-transition), box-shadow var(--lx-transition);
}

body.lx-pricing-page .lx-pricing-cta-primary:hover {
  box-shadow: var(--lx-shadow-glow);
  transform: translateY(-1px);
}

body.lx-pricing-page .lx-pricing-cta-secondary {
  display: block;
  text-align: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--lx-radius-pill);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink);
  text-decoration: none;
}

body.lx-pricing-page .lx-pricing-aurora {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

body.lx-pricing-page .lx-pricing-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

body.lx-pricing-page .lx-pricing-aurora--teal {
  width: 42vw;
  height: 42vw;
  top: -12%;
  left: -8%;
  background: rgba(45, 212, 191, 0.35);
}

body.lx-pricing-page .lx-pricing-aurora--emerald {
  width: 36vw;
  height: 36vw;
  top: 8%;
  right: -6%;
  background: rgba(52, 211, 153, 0.28);
}

body.lx-pricing-page .lx-pricing-aurora--champagne {
  width: 30vw;
  height: 30vw;
  bottom: 10%;
  left: 30%;
  background: rgba(243, 233, 214, 0.35);
}

body.lx-pricing-page > header,
body.lx-pricing-page > main {
  position: relative;
  z-index: 1;
}

body.lx-public-microsite {
  background: var(--lx-canvas, #f7f4ee);
  color: var(--lx-ink, #1c1b19);
  font-family: var(--lx-font, "Plus Jakarta Sans", system-ui, sans-serif);
  margin: 0;
  padding: 1.5rem 1rem;
}

body.lx-public-microsite .lx-public-card {
  max-width: 32rem;
  margin: 0 auto;
  background: var(--lx-surface, #fff);
  border: 1px solid var(--lx-border, #e7e1d6);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--lx-shadow-sm, 0 1px 2px rgba(28, 27, 25, 0.04));
}

body.lx-public-microsite h1 {
  font-family: var(--lx-display, "Fraunces", Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 0 0 0.25rem;
}

body.lx-public-microsite label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--lx-ink-2, #57534c);
  margin-bottom: 0.35rem;
}

body.lx-public-microsite input,
body.lx-public-microsite select,
body.lx-public-microsite textarea {
  width: 100%;
  min-height: 36px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--lx-border-strong, #d6cec0);
  border-radius: 6px;
  margin-bottom: 0.875rem;
  font-size: 14px;
  background: var(--lx-surface, #fff);
}

body.lx-public-microsite button,
body.lx-public-microsite .lx-btn-primary {
  display: inline-block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: none;
  border-radius: 6px;
  background: var(--lx-accent, #0f5e5a);
  color: var(--lx-on-accent, #fff);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

body.lx-public-microsite .lx-btn-secondary {
  display: inline-block;
  padding: 0.625rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink);
  font-weight: 600;
  text-decoration: none;
}

html[data-theme="dark"] body.dcma-shell #app-content .bg-white,
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-white/"],
html[data-theme="dark"] body.dcma-shell .bg-white,
html[data-theme="dark"] body.dcma-shell [class*="bg-white"]:not(.lx-keep-white):not([class*="bg-white/"]) {
  background-color: var(--lx-surface) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .text-slate-900,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-900 {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .border-slate-200,
html[data-theme="dark"] body.dcma-shell #app-content .border-slate-100 {
  border-color: var(--lx-border) !important;
}

/* C3b: token utilities used in markup migrations */
body.dcma-shell .lx-tint-neutral {
  background: var(--lx-surface-2);
  color: var(--lx-ink-2);
  border: 1px solid color-mix(in srgb, var(--lx-ink-3) 22%, transparent);
}

body.dcma-shell .lx-tint-info {
  background: var(--lx-info-tint);
  color: var(--lx-info);
  border: 1px solid color-mix(in srgb, var(--lx-info) 22%, transparent);
}

body.dcma-shell .lx-tint-ink {
  background: var(--lx-ink);
  color: var(--lx-on-accent);
}

body.dcma-shell .lx-text-accent {
  color: var(--lx-accent);
}

body.dcma-shell .lx-text-info {
  color: var(--lx-info);
}

/* Calendar appointment chips (semantic tints) */
body.dcma-shell .lx-appt-status {
  border-width: 1px;
  border-style: solid;
  border-radius: var(--lx-radius-sm);
  font-size: 0.6875rem;
  font-weight: 500;
}

body.dcma-shell .lx-appt-status--scheduled {
  background: var(--lx-info-tint);
  border-color: var(--lx-border);
  color: var(--lx-info);
}

body.dcma-shell .lx-appt-status--confirmed {
  background: var(--lx-accent-soft);
  border-color: var(--lx-border);
  color: var(--lx-accent);
}

body.dcma-shell .lx-appt-status--progress {
  background: var(--lx-accent-soft);
  border-color: var(--lx-border-strong);
  color: var(--lx-accent);
}

body.dcma-shell .lx-appt-status--completed {
  background: var(--lx-success-tint);
  border-color: var(--lx-border);
  color: var(--lx-success);
}

body.dcma-shell .lx-appt-status--cancelled {
  background: var(--lx-surface-2);
  border-color: var(--lx-border);
  color: var(--lx-ink-3);
}

body.dcma-shell .lx-appt-status--noshow {
  background: var(--lx-danger-tint);
  border-color: var(--lx-border);
  color: var(--lx-danger);
}

/* Clinical copilot panel — neutral luxe chrome */
body.dcma-shell .floating-widget-panel--copilot {
  background: var(--lx-surface) !important;
  border: 1px solid var(--lx-border) !important;
  border-radius: var(--lx-radius-lg, 14px) !important;
  box-shadow: var(--lx-shadow-md) !important;
}

body.dcma-shell .lx-copilot-head {
  background: var(--lx-surface-2);
  color: var(--lx-ink);
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .lx-copilot-head-meta {
  color: var(--lx-ink-3);
  font-size: 11px;
}

body.dcma-shell .lx-copilot-msg-user {
  background: var(--lx-accent);
  color: var(--lx-on-accent);
}

body.dcma-shell .lx-copilot-trust-active {
  background: var(--lx-accent);
  color: var(--lx-on-accent);
  border-color: var(--lx-accent);
}

/*
 * C3b fallback: map stray Tailwind decorative utilities inside the app shell
 * (primary fix is markup; this catches legacy fragments).
 */
body.dcma-shell #app-content [class*="bg-violet-"],
body.dcma-shell #app-content [class*="bg-purple-"],
body.dcma-shell #app-content [class*="bg-indigo-"],
body.dcma-shell #app-content [class*="bg-fuchsia-"],
body.dcma-shell #app-content [class*="bg-pink-"],
body.dcma-shell #app-content [class*="bg-rose-"],
body.dcma-shell .app-main [class*="bg-gradient-to-"] {
  background-color: var(--lx-surface-2) !important;
  background-image: none !important;
}

body.dcma-shell #app-content [class*="text-violet-"],
body.dcma-shell #app-content [class*="text-purple-"],
body.dcma-shell #app-content [class*="text-indigo-"],
body.dcma-shell #app-content [class*="text-fuchsia-"],
body.dcma-shell #app-content [class*="text-pink-"],
body.dcma-shell #app-content [class*="text-rose-"] {
  color: var(--lx-ink-2) !important;
}

body.dcma-shell #app-content [class*="border-violet-"],
body.dcma-shell #app-content [class*="border-purple-"],
body.dcma-shell #app-content [class*="border-indigo-"],
body.dcma-shell #app-content [class*="border-fuchsia-"],
body.dcma-shell #app-content [class*="border-pink-"],
body.dcma-shell #app-content [class*="border-rose-"] {
  border-color: var(--lx-border) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-violet-"],
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-purple-"],
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-indigo-"],
html[data-theme="dark"] body.dcma-shell .app-main [class*="bg-gradient-to-"] {
  background-color: var(--lx-surface-2) !important;
}

body.dcma-shell #app-content .lx-col-narrow-only,
body.dcma-shell #app-content .lx-inline-narrow-only {
  display: none;
}

@media (max-width: 1439px) {
  body.dcma-shell #app-content .lx-col-wide-only {
    display: none !important;
  }

  body.dcma-shell #app-content th.lx-col-narrow-only,
  body.dcma-shell #app-content td.lx-col-narrow-only {
    display: table-cell !important;
  }

  body.dcma-shell #app-content a.lx-col-narrow-only,
  body.dcma-shell #app-content button.lx-col-narrow-only {
    display: inline-flex !important;
  }

  body.dcma-shell #app-content .lx-inline-narrow-only {
    display: block !important;
  }

  body.dcma-shell #app-content .badge.lx-inline-narrow-only {
    display: inline-flex !important;
  }

  body.dcma-shell #app-content .section-card.lx-table-fit > .overflow-x-auto,
  body.dcma-shell #app-content .section-card > .overflow-x-auto.lx-table-fit {
    overflow-x: visible;
  }

  body.dcma-shell #app-content .lx-table-fit table th,
  body.dcma-shell #app-content .lx-table-fit table td,
  body.dcma-shell #app-content .section-card.lx-table-fit table th,
  body.dcma-shell #app-content .section-card.lx-table-fit table td {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  body.dcma-shell #app-content .lx-table-fit table .lx-col-clamp-2,
  body.dcma-shell #app-content .section-card.lx-table-fit table .lx-col-clamp-2 {
    max-width: 9.5rem;
  }

  body.dcma-shell #app-content .lx-table-fit table th.lx-col-name,
  body.dcma-shell #app-content .lx-table-fit table td.lx-col-name {
    min-width: 7.5rem;
  }

  body.dcma-shell #app-content .lx-table-fit table th.lx-col-actions,
  body.dcma-shell #app-content .lx-table-fit table td.lx-col-actions {
    width: 2.75rem;
    max-width: 2.75rem;
    padding-left: 0.35rem;
    padding-right: 0.5rem;
  }

  body.dcma-shell #app-content .lx-table-fit table th.lx-col-actions.lx-col-actions--pair,
  body.dcma-shell #app-content .lx-table-fit table td.lx-col-actions.lx-col-actions--pair {
    width: 4.85rem;
    max-width: 4.85rem;
    padding-left: 0.25rem;
    padding-right: 0.35rem;
  }

  body.dcma-shell #app-content .lx-table-fit span.lx-table-action-group.lx-col-narrow-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
  }

  body.dcma-shell #app-content .lx-table-fit .lx-coverage-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.125rem;
    max-width: 6.25rem;
  }

  body.dcma-shell #app-content .lx-table-fit .lx-coverage-compact span {
    font-size: 9px;
    padding: 0.1rem 0.3rem;
  }
}

@media (min-width: 1440px) {
  body.dcma-shell #app-content .lx-col-narrow-only,
  body.dcma-shell #app-content .lx-inline-narrow-only {
    display: none !important;
  }
}

body.dcma-shell #app-content .lx-table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--lx-radius-sm);
  color: var(--lx-accent);
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  text-decoration: none;
  flex-shrink: 0;
}

body.dcma-shell #app-content .lx-table-action:hover {
  background: var(--lx-surface-2);
  border-color: var(--lx-border-strong);
}

body.dcma-shell #app-content .lx-table-action svg {
  width: 1rem;
  height: 1rem;
}

body.dcma-shell #app-content .lx-table-actions-compact select {
  max-width: 6.5rem;
  font-size: 11px;
  padding: 0.2rem 0.35rem;
  min-height: 1.75rem;
}

  @media (max-width: 1439px) {
  body.dcma-shell #app-content .lx-table-fit table th.lx-col-actions.lx-col-actions--multi,
  body.dcma-shell #app-content .lx-table-fit table td.lx-col-actions.lx-col-actions--multi {
    width: auto;
    max-width: none;
    min-width: 5.5rem;
    padding-left: 0.25rem;
    padding-right: 0.35rem;
  }

  body.dcma-shell #app-content .lx-table-fit span.lx-table-action-group.lx-col-narrow-only.lx-table-action-group--wrap {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 8.5rem;
  }
}

body.dcma-shell #app-content .lx-table-action--danger {
  color: var(--lx-danger);
}

body.dcma-shell #app-content .lx-table-action-form {
  display: inline-flex;
  margin: 0;
  vertical-align: middle;
}

@media (max-width: 390px) {
  body.dcma-shell #app-content .lx-page-head-actions {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  body.dcma-shell #app-content {
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* —— Mobile stacked list tables (<640px) —— */
@media (max-width: 639px) {
  body.dcma-shell #app-content .lx-table-stack .overflow-x-auto {
    overflow-x: visible;
  }

  body.dcma-shell #app-content .lx-table-stack table {
    display: block;
    width: 100%;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  body.dcma-shell #app-content .lx-table-stack thead,
  body.dcma-shell #app-content .lx-table-stack thead tr,
  body.dcma-shell #app-content .lx-table-stack .lx-table-stack-head {
    display: none !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody {
    display: block;
    padding: 0.5rem 0.65rem 0.75rem;
  }

  body.dcma-shell #app-content .lx-table-stack tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.65rem;
    position: relative;
    padding: 0.75rem 0.85rem 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--lx-surface) !important;
    border: 1px solid var(--lx-border) !important;
    border-radius: var(--lx-r-lg);
    box-shadow: var(--lx-shadow-sm);
    align-items: start;
    max-height: 150px;
    overflow: hidden;
  }

  body.dcma-shell #app-content .lx-table-stack tbody tr:last-child {
    margin-bottom: 0;
  }

  body.dcma-shell #app-content .lx-table-stack tbody tr:hover {
    background: var(--lx-surface-2) !important;
  }

  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr,
  html.dark body.dcma-shell #app-content .lx-table-stack tbody tr,
  .dark body.dcma-shell #app-content .lx-table-stack tbody tr {
    background: var(--lx-glass) !important;
    backdrop-filter: var(--lx-glass-blur);
    -webkit-backdrop-filter: var(--lx-glass-blur);
  }

  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:hover,
  html.dark body.dcma-shell #app-content .lx-table-stack tbody tr:hover,
  .dark body.dcma-shell #app-content .lx-table-stack tbody tr:hover {
    background: var(--lx-surface-2) !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td {
    display: block;
    padding: 0;
    border: none;
    text-align: left !important;
    max-width: none !important;
    font-size: 13px;
    line-height: 1.35;
    color: var(--lx-ink);
  }

  body.dcma-shell #app-content .lx-table-stack tbody td::before {
    content: attr(data-label) " ";
    display: inline;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--lx-ink-3);
    margin-right: 0.15rem;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-primary::before,
  body.dcma-shell #app-content .lx-table-stack tbody td.lx-col-actions::before,
  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-status::before,
  body.dcma-shell #app-content .lx-table-stack tbody td[data-label=""]::before {
    display: none;
    content: "";
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-primary {
    grid-column: 1 / -1;
    font-size: 14px;
    font-weight: 600;
    color: var(--lx-ink);
    padding-right: 4.5rem;
    min-height: 2.5rem;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-status {
    position: absolute;
    top: 0.72rem;
    right: 2.65rem;
    padding: 0;
    width: auto;
    max-width: 42%;
    text-align: right !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-status .badge {
    font-size: 10px;
    padding: 0.15rem 0.45rem;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-col-actions {
    position: absolute;
    top: 0.65rem;
    right: 0.5rem;
    padding: 0;
    width: auto;
    max-width: none;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-col-narrow-only {
    display: none !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-stack-skip-sm {
    display: none !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td.lx-col-wide-only {
    display: block !important;
  }

  /* V2I: empty-state / colspan rows — full-width, visible, not clipped as stack cards */
  body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state),
  body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty),
  body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]) {
    display: block;
    grid-template-columns: none;
    gap: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin-bottom: 0;
    background: transparent !important;
    border: none !important;
    border-radius: 0;
    box-shadow: none !important;
    position: static;
  }

  body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state):hover,
  body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty):hover,
  body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]):hover,
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state),
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty),
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]),
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state):hover,
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty):hover,
  html[data-theme="dark"] body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]):hover,
  html.dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state),
  html.dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty),
  html.dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]),
  .dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(.empty-state),
  .dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(.lx-empty),
  .dark body.dcma-shell #app-content .lx-table-stack tbody tr:has(> td[colspan]) {
    background: transparent !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td[colspan],
  body.dcma-shell #app-content .lx-table-stack tbody td:has(.empty-state),
  body.dcma-shell #app-content .lx-table-stack tbody td:has(.lx-empty) {
    display: block !important;
    grid-column: 1 / -1;
    width: 100%;
    max-width: none !important;
    height: auto !important;
    min-height: 0;
    padding: 0.75rem 0.5rem 1.25rem !important;
    text-align: center;
    position: static;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td[colspan]::before,
  body.dcma-shell #app-content .lx-table-stack tbody td:has(.empty-state)::before,
  body.dcma-shell #app-content .lx-table-stack tbody td:has(.lx-empty)::before {
    display: none !important;
    content: "" !important;
  }

  body.dcma-shell #app-content .lx-table-stack tbody td[colspan] .empty-state,
  body.dcma-shell #app-content .lx-table-stack tbody td:has(.lx-empty) .empty-state {
    margin: 0 auto;
  }
}

html[data-theme="dark"] body.dcma-shell input:disabled,
html[data-theme="dark"] body.dcma-shell select:disabled,
html[data-theme="dark"] body.dcma-shell textarea:disabled,
html[data-theme="dark"] body.dcma-shell .form-input:disabled {
  color: var(--lx-ink-3);
  opacity: 1;
}

html[data-theme="dark"] body.dcma-shell input::placeholder,
html[data-theme="dark"] body.dcma-shell textarea::placeholder {
  color: var(--lx-ink-3);
  opacity: 1;
}

/* Decorative Tailwind hues → Luxe tokens (non-clinical app shell) */
body.dcma-shell #app-content [class*="bg-emerald-"]:not(.badge):not([class*="badge"]),
body.dcma-shell #app-content [class*="bg-sky-"]:not(.badge),
body.dcma-shell #app-content [class*="bg-cyan-"]:not(.badge),
body.dcma-shell #app-content [class*="bg-teal-"]:not(.badge),
body.dcma-shell #app-content [class*="bg-blue-"]:not(.badge),
body.dcma-shell #app-content [class*="bg-green-"]:not(.badge):not([class*="badge-success"]),
body.dcma-shell #app-content [class*="bg-lime-"],
body.dcma-shell #app-content [class*="bg-amber-"]:not(.badge):not([class*="badge-warning"]),
body.dcma-shell #app-content [class*="bg-orange-"]:not(.badge),
body.dcma-shell #app-content [class*="bg-yellow-"] {
  background-color: var(--lx-surface-2) !important;
  background-image: none !important;
}

body.dcma-shell #app-content [class*="text-emerald-"]:not(.badge),
body.dcma-shell #app-content [class*="text-sky-"]:not(.badge),
body.dcma-shell #app-content [class*="text-cyan-"]:not(.badge),
body.dcma-shell #app-content [class*="text-teal-"]:not(.badge),
body.dcma-shell #app-content [class*="text-blue-"]:not(.badge),
body.dcma-shell #app-content [class*="text-green-"]:not(.badge):not([class*="badge-success"]),
body.dcma-shell #app-content [class*="text-lime-"],
body.dcma-shell #app-content [class*="text-amber-"]:not(.badge-warning):not(.badge),
body.dcma-shell #app-content [class*="text-orange-"]:not(.badge),
body.dcma-shell #app-content [class*="text-yellow-"] {
  color: var(--lx-ink-2) !important;
}

body.dcma-shell #app-content [class*="border-emerald-"],
body.dcma-shell #app-content [class*="border-sky-"],
body.dcma-shell #app-content [class*="border-cyan-"],
body.dcma-shell #app-content [class*="border-teal-"],
body.dcma-shell #app-content [class*="border-blue-"],
body.dcma-shell #app-content [class*="border-green-"],
body.dcma-shell #app-content [class*="border-amber-"],
body.dcma-shell #app-content [class*="border-orange-"] {
  border-color: var(--lx-border) !important;
}

/* —— Luxe v2 Phase V2A —— */
.lx-accent-serif {
  font-family: var(--lx-serif-accent);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--lx-accent);
}

body.dcma-shell {
  position: relative;
}

body.dcma-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: var(--lx-canvas-tint);
}

body.dcma-shell > .flex {
  position: relative;
  z-index: 1;
}

body.dcma-shell h1,
body.dcma-shell .lx-display,
body.dcma-shell .app-header .lx-page-title,
body.dcma-shell .login-brand-hero h1,
body.dcma-shell .empty-state-title,
body.dcma-shell .lx-stat-value {
  font-family: var(--lx-display);
  font-weight: 600;
  letter-spacing: -0.025em;
}

body.dcma-shell #app-content h1,
body.dcma-shell .login-brand-hero h1 {
  font-size: 30px;
  line-height: 1.2;
}

@media (max-width: 767px) {
  body.dcma-shell #app-content h1,
  body.dcma-shell .login-brand-hero h1 {
    font-size: 24px;
    line-height: 1.25;
  }
}

@media (min-width: 1024px) {
  body.dcma-shell .app-sidebar-drawer {
    padding: 12px 0 12px 12px;
    width: calc(var(--lx-sidebar-w) + 12px) !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  body.dcma-shell .app-sidebar {
    border-radius: var(--lx-r-xl);
    background: var(--lx-glass) !important;
    backdrop-filter: var(--lx-glass-blur);
    -webkit-backdrop-filter: var(--lx-glass-blur);
    border: 1px solid var(--lx-border) !important;
    box-shadow: var(--lx-shadow-sm);
  }
}

body.dcma-shell .app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border-bottom: 1px solid var(--lx-border) !important;
}

body.dcma-shell .sidebar-link {
  min-height: 36px;
  border-radius: var(--lx-radius-pill);
  transition: background var(--lx-transition), color var(--lx-transition), box-shadow var(--lx-transition);
}

body.dcma-shell .sidebar-link.active {
  box-shadow: inset 3px 0 0 transparent;
  position: relative;
}

body.dcma-shell .sidebar-link.active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--lx-accent-grad);
  flex-shrink: 0;
  margin-right: -0.15rem;
  margin-left: -0.1rem;
  box-shadow: 0 0 0 3px var(--lx-accent-soft);
}

body.dcma-shell .sidebar-nav-icon,
body.dcma-shell .sidebar-nav-icon svg {
  width: 18px !important;
  height: 18px !important;
}

body.dcma-shell .btn-primary,
body.dcma-shell .btn.btn-primary,
body.dcma-shell #app-content .filter-form button[type='submit'].btn-primary {
  background-color: var(--lx-accent) !important;
  background-image: var(--lx-accent-grad) !important;
  border-color: transparent !important;
  border-radius: var(--lx-radius-pill) !important;
  color: var(--lx-on-accent) !important;
  transition: transform var(--lx-transition), box-shadow var(--lx-transition), filter var(--lx-transition);
}

body.dcma-shell .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-glow) !important;
}

body.dcma-shell .btn-primary:active {
  transform: scale(0.98);
}

body.dcma-shell .btn-secondary {
  border-radius: var(--lx-radius-pill) !important;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
}

body.dcma-shell .btn-ghost,
body.dcma-shell .btn-danger,
body.dcma-shell .btn-danger-solid {
  border-radius: var(--lx-radius-pill) !important;
}

body.dcma-shell .form-input,
body.dcma-shell #app-content input.form-input,
body.dcma-shell #app-content select.form-input,
body.dcma-shell #app-content textarea.form-input {
  min-height: 40px;
  border-radius: var(--lx-r-md) !important;
}

body.dcma-shell .form-input:focus,
body.dcma-shell #app-content input.form-input:focus {
  border-color: var(--lx-accent) !important;
  box-shadow: 0 0 0 4px var(--lx-accent-soft) !important;
}

body.dcma-shell .app-header-search,
body.dcma-shell .app-header-search-wide {
  border-radius: var(--lx-radius-pill) !important;
}

body.dcma-shell .edition-pill {
  background: var(--lx-champagne-fill) !important;
  color: var(--lx-champagne) !important;
  border: 1px solid rgba(201, 169, 110, 0.35);
  border-radius: var(--lx-radius-pill);
}

body.dcma-shell .dcma-demo-banner {
  border-radius: var(--lx-radius-pill);
  background: var(--lx-champagne-fill) !important;
  border: 1px solid rgba(201, 169, 110, 0.28);
  color: var(--lx-ink-2);
  max-width: 42rem;
  margin: 0.5rem auto;
  padding: 0.35rem 0.85rem;
}

body.dcma-shell #app-content .dcma-card,
body.dcma-shell #app-content .lx-card {
  border-radius: var(--lx-r-lg);
}

body.dcma-shell #app-content a.lx-card--interactive:hover,
body.dcma-shell #app-content .lx-card--interactive:hover,
body.dcma-shell #app-content a[data-href].lx-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-md);
  transition: transform var(--lx-transition), box-shadow var(--lx-transition);
}

body.dcma-shell #app-content .dcma-table-wrap,
body.dcma-shell #app-content table {
  border-radius: var(--lx-r-lg);
}

body.dcma-shell #app-content table tbody td {
  height: 56px;
}

body.dcma-shell #app-content table tbody tr:hover {
  background: var(--lx-accent-soft);
}

body.dcma-shell #app-content .empty-state-halo {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, var(--lx-accent-soft), transparent 70%);
}

body.dcma-shell #app-content .empty-state-icon {
  width: 56px !important;
  height: 56px !important;
  margin: 0;
  color: var(--lx-accent);
}

body.dcma-shell #app-content .empty-state-title {
  font-size: 18px;
  font-weight: 600;
}

body.dcma-shell #app-content .empty-state-cta {
  margin-top: 1rem;
  border-radius: var(--lx-radius-pill);
}

body.dcma-shell .mobile-quick-nav {
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  width: auto;
  border-radius: var(--lx-r-xl) !important;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border) !important;
  box-shadow: var(--lx-shadow-md) !important;
  padding: 0.4rem 0.35rem;
}

body.dcma-shell .mobile-quick-nav-item {
  border-radius: var(--lx-radius-pill);
  min-height: 44px;
}

body.dcma-shell .mobile-quick-nav-item.is-active {
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
}

body.dcma-shell .mobile-quick-nav-item__icon {
  width: 1.125rem;
  height: 1.125rem;
}

body.dcma-shell .lx-fab-stack {
  isolation: isolate;
  width: auto;
  max-width: none;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.dcma-shell .lx-fab-stack::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border);
  box-shadow: var(--lx-shadow-md);
}

body.dcma-shell .lx-fab-stack > .floating-widget-anchor,
body.dcma-shell .lx-fab-stack > .floating-widget-anchor--copilot {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  body.dcma-shell .lx-fab-stack {
    position: fixed !important;
    right: max(20px, env(safe-area-inset-right)) !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    gap: 8px;
    z-index: 95;
    flex-direction: column;
  }

  body.dcma-shell .lx-fab-stack .floating-widget-anchor,
  body.dcma-shell .lx-fab-stack .floating-widget-anchor--copilot {
    position: relative !important;
    width: var(--lx-fab-size) !important;
    height: var(--lx-fab-size) !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    flex-shrink: 0;
  }

  body.dcma-shell .lx-fab-stack .floating-widget-panel,
  body.dcma-shell .lx-fab-stack .floating-widget-panel--copilot {
    position: fixed !important;
    right: 76px !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
    left: auto !important;
    top: auto !important;
    width: min(400px, calc(100vw - 96px)) !important;
    max-height: min(640px, calc(100vh - 40px)) !important;
    transform-origin: bottom right !important;
    border-radius: var(--lx-r-lg) !important;
  }
}

@media (max-width: 767px) {
  body.dcma-shell .floating-widget-anchor,
  body.dcma-shell .floating-widget-anchor--copilot {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }

  body.dcma-shell .lx-fab-stack {
    position: fixed !important;
    left: -9999px !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    box-shadow: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
    display: flex !important;
  }

  body.dcma-shell .lx-fab-stack .floating-widget-anchor,
  body.dcma-shell .lx-fab-stack .floating-widget-anchor--copilot {
    position: static !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
  }

  body.dcma-shell .lx-fab-stack .floating-widget-fab,
  body.dcma-shell .lx-fab-stack .floating-widget-fab--support,
  body.dcma-shell .lx-fab-stack .floating-widget-fab--copilot {
    pointer-events: auto !important;
  }

  body.dcma-shell #app-main-scroll,
  body.dcma-shell #app-content {
    --lx-fab-reserve-y: 0px;
  }

  body.dcma-shell .app-main,
  body.dcma-shell #app-content {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }
}

body.dcma-shell .lx-mobile-head-widget {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  border: 1px solid var(--lx-border);
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
}

.dcma-login-shell {
  position: relative;
  overflow: hidden;
  background: var(--lx-canvas) !important;
}

.dcma-login-shell .login-aurora-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.dcma-login-shell .login-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(88px);
  opacity: 0.72;
  animation: lx-aurora-drift 28s ease-in-out infinite alternate;
}

.dcma-login-shell .login-orb--teal {
  width: min(58vw, 480px);
  height: min(58vw, 480px);
  top: 6%;
  left: -10%;
  background: rgba(45, 212, 191, 0.48);
}

.dcma-login-shell .login-orb--emerald {
  width: min(50vw, 400px);
  height: min(50vw, 400px);
  bottom: 8%;
  right: 2%;
  background: rgba(52, 211, 153, 0.42);
}

.dcma-login-shell .login-orb--champagne {
  width: min(44vw, 340px);
  height: min(44vw, 340px);
  top: 40%;
  left: 32%;
  background: rgba(243, 233, 214, 0.5);
}

.dcma-login-shell .login-orb--delay {
  animation-delay: -9s;
}

.dcma-login-shell .login-orb--delay-2 {
  animation-delay: -18s;
}

@keyframes lx-aurora-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(2%, -3%) scale(1.06); }
}

.dcma-login-shell .login-layout {
  position: relative;
  z-index: 1;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .dcma-login-shell .login-layout {
    flex-direction: row;
    align-items: stretch;
  }
}

.dcma-login-shell .login-orb {
  display: block !important;
}

.dcma-login-shell .login-panel-brand,
.dcma-login-shell .login-panel-form {
  background: transparent !important;
}

.dcma-login-shell .login-card {
  border-radius: var(--lx-r-xl) !important;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border) !important;
  box-shadow: var(--lx-shadow-md);
}

.dcma-login-shell .login-features {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dcma-login-shell .login-feature-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-glass);
  border: 1px solid var(--lx-border);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--lx-ink-2);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
}

.dcma-login-shell .login-feature-chip__icon {
  width: 1rem;
  height: 1rem;
  color: var(--lx-accent);
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  .dcma-login-shell .login-panel-brand {
    display: flex;
    width: 100%;
    max-width: none;
    padding: 1.5rem 1.25rem 0.5rem;
  }

  .dcma-login-shell .login-brand-hero h1 {
    max-width: none;
  }

  .dcma-login-shell .login-panel-form {
    width: 100%;
    max-width: 100%;
    padding: 0 1rem 1.5rem;
    box-sizing: border-box;
  }

  .dcma-login-shell .login-card {
    max-width: 100%;
  }
}

/* —— Luxe v2 Phase V2A2 —— */
body.dcma-shell .btn-primary,
body.dcma-shell .btn.btn-primary,
body.dcma-shell a.btn-primary,
body.dcma-shell button.btn-primary,
body.dcma-shell #app-content .btn-primary,
body.dcma-shell #app-content a.btn-primary,
body.dcma-shell #app-content button.btn-primary,
body.dcma-shell #app-content button[type='submit'].btn-primary,
body.dcma-shell #app-content .filter-form button[type='submit'].btn-primary,
.dcma-login-shell .btn-primary,
.dcma-login-shell button.btn-primary,
body.lx-public-microsite .lx-btn-primary {
  background-color: var(--lx-accent) !important;
  background-image: var(--lx-accent-grad) !important;
  color: var(--lx-on-accent) !important;
  -webkit-text-fill-color: var(--lx-on-accent);
  border-color: transparent !important;
}

body.dcma-shell #app-content .filter-form button[type='submit'].btn-primary {
  min-height: var(--lx-control-h);
  padding: 0 1.1rem;
  border-radius: var(--lx-radius-pill) !important;
  flex-shrink: 0;
}

.dcma-login-shell .login-hero-title,
.dcma-login-shell .login-brand-hero h1.lx-display {
  font-family: var(--lx-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--lx-ink);
  max-width: 28rem;
}

@media (min-width: 1024px) {
  .dcma-login-shell .login-hero-title,
  .dcma-login-shell .login-brand-hero h1.lx-display {
    font-size: 2.75rem;
    max-width: 22rem;
  }
}

.dcma-login-shell .login-brand-mark,
.dcma-login-shell .login-tenant-logo-wrap {
  position: relative;
  z-index: 1;
}

.dcma-login-shell .login-form-surface .form-input,
.dcma-login-shell .login-card .form-input,
.dcma-login-shell .login-card input.form-input,
.dcma-login-shell .login-card select.form-input {
  border-radius: var(--lx-r-md) !important;
  min-height: 40px;
}

.dcma-login-shell .login-card .btn-primary,
.dcma-login-shell .login-card button.btn-primary {
  width: 100%;
  min-height: var(--lx-control-h-lg);
  border-radius: var(--lx-radius-pill) !important;
  font-weight: 600;
  box-shadow: var(--lx-shadow-glow);
}

.dcma-login-shell .login-card {
  border-radius: var(--lx-r-xl) !important;
}

.dcma-login-shell .login-form-surface {
  border-radius: var(--lx-r-xl);
}

.dcma-login-shell .login-brand-locale,
.dcma-login-shell .login-brand-footer {
  position: relative;
  z-index: 1;
}

@media (max-width: 479px) {
  .dcma-login-shell .login-features {
    display: none;
  }
}

@media (max-width: 1023px) {
  .dcma-login-shell .login-mobile-card-head {
    display: none !important;
  }
}

html[data-theme="dark"] .dcma-login-shell .login-orb--teal {
  background: rgba(45, 212, 191, 0.28);
  opacity: 0.85;
}

html[data-theme="dark"] .dcma-login-shell .login-orb--emerald {
  background: rgba(52, 211, 153, 0.22);
}

html[data-theme="dark"] .dcma-login-shell .login-orb--champagne {
  background: rgba(217, 194, 154, 0.18);
}

/* —— Luxe v2 Phase V2B —— */
body.dcma-shell .lx-dash-hero {
  position: relative;
  margin-bottom: 1.25rem;
  border-radius: var(--lx-r-xl);
  overflow: hidden;
}

body.dcma-shell .lx-dash-aurora {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

body.dcma-shell .lx-dash-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(72px);
  opacity: 0.55;
}

body.dcma-shell .lx-dash-orb--teal {
  width: 42%;
  height: 70%;
  top: -20%;
  left: -8%;
  background: rgba(45, 212, 191, 0.45);
}

body.dcma-shell .lx-dash-orb--emerald {
  width: 38%;
  height: 65%;
  bottom: -25%;
  right: 5%;
  background: rgba(52, 211, 153, 0.38);
}

body.dcma-shell .lx-dash-orb--champagne {
  width: 32%;
  height: 55%;
  top: 10%;
  right: 28%;
  background: rgba(243, 233, 214, 0.42);
}

body.dcma-shell .lx-dash-hero-card {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1.5rem;
  border-radius: var(--lx-r-xl);
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border);
  box-shadow: var(--lx-shadow-sm);
}

body.dcma-shell .lx-dash-hero-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

body.dcma-shell .lx-dash-date-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: var(--lx-radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--lx-ink-2);
  background: var(--lx-surface-2);
  border: 1px solid var(--lx-border);
  white-space: nowrap;
}

body.dcma-shell .lx-stat-row--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0;
  margin-bottom: 1.25rem;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

@media (min-width: 768px) {
  body.dcma-shell .lx-stat-row--cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

body.dcma-shell .lx-stat-row--cards .lx-stat-cell {
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-lg);
  background: var(--lx-surface);
  box-shadow: var(--lx-shadow-sm);
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--lx-border);
}

body.dcma-shell .lx-stat-row--cards .lx-stat-value {
  font-family: var(--lx-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

body.dcma-shell .lx-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.1rem 0.45rem;
  margin-left: 0.35rem;
  border-radius: var(--lx-radius-pill);
  font-size: 11px;
  font-weight: 600;
  color: var(--lx-accent);
  background: var(--lx-accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.22);
  vertical-align: middle;
}

body.dcma-shell .lx-list-row {
  border-radius: var(--lx-r-md);
  margin: 0 0.35rem;
  transition: background var(--lx-transition), transform var(--lx-transition);
}

body.dcma-shell .lx-list-row:hover {
  background: var(--lx-accent-soft);
}

body.dcma-shell .lx-queue-column {
  border-radius: var(--lx-r-lg) !important;
  background: var(--lx-glass) !important;
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border) !important;
}

body.dcma-shell .lx-queue-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .lx-queue-column-body {
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 7rem;
}

body.dcma-shell .lx-queue-card {
  padding: 0.75rem;
  border-radius: var(--lx-r-md);
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
}

body.dcma-shell .lx-stepper--pill {
  gap: 0.25rem;
}

body.dcma-shell .lx-stepper-pill {
  width: 1.35rem;
  height: 0.35rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-border-strong);
}

body.dcma-shell .lx-stepper-pill.is-active {
  background: var(--lx-accent);
}

body.dcma-shell .lx-stepper-pill.is-done {
  background: var(--lx-accent-2);
}

body.dcma-shell .lx-report-card {
  border-radius: var(--lx-r-lg) !important;
  transition: background var(--lx-transition), transform var(--lx-transition), box-shadow var(--lx-transition);
}

body.dcma-shell .lx-report-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-md);
}

body.dcma-shell .lx-report-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--lx-radius-pill);
  background: var(--lx-accent-soft);
  color: var(--lx-accent);
}

.dcma-login-shell .login-brand-hero-toolbar {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.dcma-login-shell .login-brand-mark--hero {
  margin-bottom: 1rem;
}

@media (max-width: 1023px) {
  .dcma-login-shell .login-brand-hero-toolbar {
    display: flex;
  }

  .dcma-login-shell .login-brand-footer--desktop {
    display: none !important;
  }

  .dcma-login-shell .login-form-toolbar--desktop {
    display: none !important;
  }

  .dcma-login-shell .login-panel-brand {
    padding-bottom: 0.35rem !important;
  }

  .dcma-login-shell .login-panel-form {
    padding-top: 0 !important;
  }

  .dcma-login-shell .login-brand-hero {
    margin-bottom: 0;
  }
}

@media (min-width: 1024px) {
  .dcma-login-shell .login-brand-hero-toolbar {
    display: none !important;
  }

  .dcma-login-shell .login-form-toolbar--desktop {
    display: flex;
  }
}

/* —— Luxe v2C: global polish —— */
@media (max-width: 767px) {
  body.dcma-shell .dcma-demo-banner {
    width: calc(100% - 16px);
    max-width: none;
    margin-left: 8px;
    margin-right: 8px;
    box-sizing: border-box;
  }

  body.dcma-shell .dcma-demo-banner > .flex-1 {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.dcma-shell .dcma-demo-banner-dismiss {
    flex-shrink: 0;
  }
}

html[data-theme="dark"] body.dcma-shell input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] body.dcma-shell select,
html[data-theme="dark"] body.dcma-shell textarea,
html[data-theme="dark"] body.dcma-shell .form-input {
  color-scheme: dark;
}

html[data-theme="dark"] body.dcma-shell ::selection {
  background: var(--lx-accent-soft);
  color: var(--lx-ink);
}

body.dcma-shell ::selection {
  background: var(--lx-accent-soft);
}

body.dcma-shell #app-main-scroll,
body.dcma-shell .sidebar-nav-scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--lx-border-strong) transparent;
}

body.dcma-shell #app-content .card.card-body {
  border-radius: var(--lx-r-lg);
  border: 1px solid var(--lx-border);
  background: var(--lx-surface);
  transition: transform var(--lx-transition), box-shadow var(--lx-transition), border-color var(--lx-transition);
}

body.dcma-shell #app-content .grid > .card.card-body:hover,
body.dcma-shell #app-content a.card.card-body:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-md);
}

body.dcma-shell .avatar-doctor,
body.dcma-shell .avatar-doctor-sm {
  box-shadow: 0 0 0 3px var(--lx-surface), 0 0 0 5px var(--lx-accent-soft) !important;
  background: linear-gradient(135deg, var(--lx-accent-soft), var(--lx-champagne-fill)) !important;
}

body.dcma-shell .crm-pipeline-card,
body.dcma-shell #app-content a.lx-module-tile,
body.dcma-shell #app-content .lx-module-tile {
  border-radius: var(--lx-r-lg);
  transition: transform var(--lx-transition), box-shadow var(--lx-transition);
}

body.dcma-shell .crm-pipeline-card:hover,
body.dcma-shell #app-content a.lx-module-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-md);
}

body.lx-queue-display.queue-display {
  font-family: var(--lx-font);
  background: var(--lx-canvas);
  color: var(--lx-ink);
}

body.lx-queue-display.queue-display::before {
  display: block;
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 45% at 15% 20%, rgba(45, 212, 191, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 85% 15%, rgba(52, 211, 153, 0.16), transparent 50%),
    radial-gradient(ellipse 40% 35% at 50% 90%, rgba(217, 194, 154, 0.12), transparent 55%);
}

body.lx-queue-display .qd-hero-number,
body.lx-queue-display .qd-next-number,
body.lx-queue-display .qd-mini-number,
body.lx-queue-display .qd-wait-number,
body.lx-queue-display .qd-clock {
  font-family: var(--lx-display), system-ui, sans-serif !important;
}

/* —— Luxe v2 Phase V2D —— */
[x-cloak] {
  display: none !important;
}

/* Reset legacy app.css empty-state boxes (dashed grey slabs) */
body.dcma-shell #app-content .empty-state,
body.dcma-shell #app-content table .empty-state,
body.dcma-shell #app-content td[colspan] .empty-state {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

body.dcma-shell #app-content .empty-state-desc {
  color: var(--lx-ink-3) !important;
  font-size: 14px;
  line-height: 1.45;
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

body.dcma-shell #app-content table td[colspan]:has(.empty-state) {
  background: transparent !important;
  border: none !important;
}

body.dcma-shell #app-content .lx-empty-inset {
  background: transparent !important;
  border: 1px dashed var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .border-dashed.border-slate-200,
html[data-theme="dark"] body.dcma-shell #app-content .border-dashed.border-\[var\(--lx-border\)\] {
  background: transparent !important;
  border-color: var(--lx-border) !important;
  color: var(--lx-ink-2) !important;
}

/* Dark: Tailwind light utility safety net */
html[data-theme="dark"] body.dcma-shell #app-content .bg-gray-100,
html[data-theme="dark"] body.dcma-shell #app-content .bg-gray-200,
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-gray-50"],
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-gray-100"],
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-gray-200"],
html[data-theme="dark"] body.dcma-shell #app-content .bg-neutral-50,
html[data-theme="dark"] body.dcma-shell #app-content .bg-neutral-100,
html[data-theme="dark"] body.dcma-shell #app-content [class*="bg-slate-100"],
html[data-theme="dark"] body.dcma-shell #app-content thead [class*="bg-slate-50"],
html[data-theme="dark"] body.dcma-shell #app-content thead [class*="bg-gray-50"] {
  background-color: var(--lx-surface-2) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .text-gray-800,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-700,
html[data-theme="dark"] body.dcma-shell #app-content .text-gray-600 {
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .border-gray-100,
html[data-theme="dark"] body.dcma-shell #app-content .border-gray-200,
html[data-theme="dark"] body.dcma-shell #app-content [class*="border-gray-100"],
html[data-theme="dark"] body.dcma-shell #app-content [class*="border-gray-200"] {
  border-color: var(--lx-border) !important;
}

html[data-theme="dark"] body.dcma-shell .btn-secondary,
html[data-theme="dark"] body.dcma-shell .btn-ghost {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink) !important;
  border-color: var(--lx-border-strong) !important;
}

html[data-theme="dark"] body.dcma-shell .btn-ghost {
  background: transparent !important;
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.dcma-shell .btn-ghost:hover {
  background: var(--lx-surface-2) !important;
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .lx-form-actions,
html[data-theme="dark"] body.dcma-shell .lx-form-actions {
  background: var(--lx-glass) !important;
  border-top-color: var(--lx-border) !important;
}

html[data-theme="dark"] body.dcma-shell #app-content .card,
html[data-theme="dark"] body.dcma-shell #app-content .card-body {
  background: var(--lx-surface) !important;
}

body.dcma-shell .floating-widget-anchor,
body.dcma-shell .floating-widget-anchor--copilot {
  background: transparent !important;
}

/* Closed until Alpine x-show */
body.dcma-shell .floating-widget-panel,
body.dcma-shell .floating-widget-panel--copilot {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border-strong);
  box-shadow: var(--lx-shadow-md);
}

html.dcma-sidebar-open,
html.dcma-sidebar-open body {
  overflow: hidden;
}

@media (max-width: 1023px) {
  body.dcma-shell .lx-drawer-overlay {
    z-index: 110;
    background: rgba(10, 14, 13, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  body.dcma-shell .app-sidebar-drawer {
    z-index: 120 !important;
    top: 0;
    bottom: 0;
    height: 100dvh;
    max-height: 100dvh;
  }

  body.dcma-shell .app-sidebar-drawer .app-sidebar {
    background: var(--lx-surface) !important;
    backdrop-filter: var(--lx-glass-blur);
    -webkit-backdrop-filter: var(--lx-glass-blur);
    border-right: 1px solid var(--lx-border-strong) !important;
    box-shadow: var(--lx-shadow-md);
  }

  html.dcma-sidebar-open body.dcma-shell .mobile-quick-nav {
    display: none !important;
  }

  html.dcma-sidebar-open body.dcma-shell .app-sidebar-drawer .sidebar-user-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.dcma-shell .app-sidebar-drawer {
    transition: none !important;
  }
}

body.dcma-shell .lx-table-scroll-fade {
  position: relative;
}

@media (max-width: 639px) {
  body.dcma-shell .lx-table-scroll-fade::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2rem;
    pointer-events: none;
    background: linear-gradient(270deg, var(--lx-surface), transparent);
  }
}

/* —— V2E: calendar week view, odontogram shell, public microsite —— */
body.dcma-shell .lx-cal-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

body.dcma-shell .lx-cal-today-head .text-base {
  box-shadow: 0 0 0 2px var(--lx-accent);
  border-radius: 999px;
  display: inline-block;
  min-width: 1.75rem;
  line-height: 1.75rem;
}

body.dcma-shell .lx-cal-cell {
  border-radius: var(--lx-r-md);
}

body.dcma-shell .lx-cal-event {
  border-radius: 999px;
  border: 1px solid var(--lx-border);
  padding: 0.35rem 0.5rem;
  font-size: 11px;
  line-height: 1.35;
  background: var(--lx-surface-2);
  box-shadow: var(--lx-shadow-sm);
  transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.dcma-shell .lx-cal-event:hover {
  transform: translateY(-1px);
  box-shadow: var(--lx-shadow-md);
}

/* —— V2G: calendar grid fit + stacked table head —— */
body.dcma-shell .lx-cal-grid-wrap {
  position: relative;
  overflow-x: visible;
}

body.dcma-shell .lx-cal-grid {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}

body.dcma-shell .lx-cal-grid .lx-cal-day-head,
body.dcma-shell .lx-cal-grid .lx-cal-day-col {
  width: auto;
  min-width: 0;
}

body.dcma-shell .lx-cal-grid-head {
  border-color: var(--lx-border);
}

body.dcma-shell .lx-table-stack-head {
  background: var(--lx-surface-2);
  border-bottom: 1px solid var(--lx-border);
}

body.dcma-shell .lx-table-stack-head th {
  color: var(--lx-ink-3);
}

@media (max-width: 1023px) {
  body.dcma-shell .lx-cal-grid-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.dcma-shell .lx-cal-grid-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2rem;
    pointer-events: none;
    background: linear-gradient(270deg, var(--lx-surface), transparent);
  }

  body.dcma-shell .lx-cal-grid {
    min-width: 720px;
  }
}

@media (min-width: 1024px) {
  body.dcma-shell .lx-cal-grid-wrap::after {
    display: none;
  }
}

body.dcma-shell .lx-odontogram-shell {
  border-radius: var(--lx-r-xl) !important;
}

body.dcma-shell .lx-soap-card {
  border-radius: var(--lx-r-lg);
}

html[data-theme="dark"] body.dcma-shell .lx-odontogram-shell .text-green-700 {
  color: #6ee7b7;
}

html[data-theme="dark"] body.dcma-shell .lx-odontogram-shell .text-slate-500,
html[data-theme="dark"] body.dcma-shell .lx-odontogram-shell .text-slate-400 {
  color: var(--lx-ink-2);
}

body.lx-public-microsite {
  position: relative;
  min-height: 100vh;
  padding: 0;
  background: var(--lx-canvas);
}

body.lx-public-microsite .lx-public-aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(45, 212, 191, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(52, 211, 153, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(243, 233, 214, 0.14), transparent 55%);
}

html[data-theme="dark"] body.lx-public-microsite .lx-public-aurora {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(45, 212, 191, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(52, 211, 153, 0.06), transparent 50%);
}

body.lx-public-microsite .lx-public-wrap {
  position: relative;
  z-index: 1;
  max-width: 45rem;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

body.lx-public-microsite .lx-public-card {
  max-width: 32rem;
  border-radius: var(--lx-r-xl);
  background: var(--lx-glass);
  backdrop-filter: var(--lx-glass-blur);
  -webkit-backdrop-filter: var(--lx-glass-blur);
  border: 1px solid var(--lx-border);
  box-shadow: var(--lx-shadow-md);
  padding: 1.75rem 1.5rem;
}

body.lx-public-microsite .lx-public-card--wide {
  max-width: none;
}

body.lx-public-microsite h1 {
  font-family: var(--lx-display, "Geist", system-ui, sans-serif);
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

body.lx-public-microsite .lx-public-lead,
body.lx-public-microsite .lx-public-muted {
  color: var(--lx-ink-2);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 0.75rem;
}

body.lx-public-microsite .lx-public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

body.lx-public-microsite .lx-btn-pill {
  width: auto !important;
  border-radius: 999px !important;
  padding: 0.65rem 1.25rem !important;
}

body.lx-public-microsite .lx-public-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--lx-border);
}

body.lx-public-microsite .lx-public-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  font-family: var(--lx-display, "Geist", system-ui, sans-serif);
}

body.lx-public-microsite .lx-public-doc-row {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--lx-border);
  font-size: 14px;
}

body.lx-public-microsite .lx-public-foot {
  text-align: center;
  margin-top: 1rem;
  font-size: 12px;
}

body.lx-public-microsite .lx-public-foot a {
  color: var(--lx-accent);
}

body.lx-public-microsite input,
body.lx-public-microsite select,
body.lx-public-microsite textarea {
  border-radius: var(--lx-r-md);
  margin-bottom: 0.875rem;
}

body.lx-public-microsite button.lx-btn-primary,
body.lx-public-microsite .lx-btn-primary {
  border-radius: 999px;
}

@media (prefers-reduced-motion: reduce) {
  body.dcma-shell .lx-cal-event:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.dcma-shell .lx-dash-orb {
    animation: none !important;
  }

  .dcma-login-shell .login-orb {
    animation: none !important;
  }

  body.dcma-shell .btn-primary:hover,
  body.dcma-shell #app-content a.lx-card--interactive:hover,
  body.dcma-shell #app-content .lx-card--interactive:hover {
    transform: none !important;
  }

  body.dcma-shell *,
  body.dcma-shell *::before,
  body.dcma-shell *::after,
  .dcma-login-shell *,
  .dcma-login-shell *::before,
  .dcma-login-shell *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* —— Luxe v2 PHASE F: filters, copilot, public pricing, microsite forms —— */

body.dcma-shell .filter-form-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: var(--lx-radius-pill);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface-2);
  color: var(--lx-ink-2);
  font-size: 0.8125rem;
  font-weight: 600;
  touch-action: manipulation;
  cursor: pointer;
  font-family: inherit;
}

body.dcma-shell .filter-form-toggle:hover {
  border-color: color-mix(in srgb, var(--lx-accent) 45%, var(--lx-border-strong));
  color: var(--lx-accent);
  background: var(--lx-accent-soft);
}

@media (max-width: 639px) {
  body.dcma-shell #app-content .filter-form--expandable:not(.filter-form--expanded) > select,
  body.dcma-shell #app-content .filter-form--expandable:not(.filter-form--expanded) > .filter-reset-link,
  body.dcma-shell #app-content .filter-form--expandable:not(.filter-form--expanded) > input:not([type='hidden']):not([name='search']):not([name='q']) {
    display: none;
  }

  body.dcma-shell #app-content .filter-form--expandable .filter-form-toggle {
    display: inline-flex;
  }

  body.dcma-shell #app-content .filter-form--expandable:not(.filter-form--expanded) {
    gap: 0.5rem;
  }
}

@media (max-width: 767px) {
  body.dcma-shell .lx-page-head-actions-secondary > a.btn-ortho,
  body.dcma-shell .lx-page-head-actions-secondary > .btn-ortho {
    width: 100%;
    justify-content: center;
    border-radius: var(--lx-radius-pill);
    background: var(--lx-accent-grad) !important;
  }
}

body.dcma-shell .lx-copilot-msg-bot {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  color: var(--lx-ink);
}

body.dcma-shell .lx-copilot-composer {
  background: var(--lx-surface);
  border-top: 1px solid var(--lx-border);
}

body.dcma-shell .lx-copilot-composer-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  min-width: 0;
  min-height: 2.5rem;
}

body.dcma-shell .lx-copilot-composer-input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
}

body.dcma-shell .lx-copilot-composer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  flex-shrink: 0;
}

body.dcma-shell .lx-copilot-memory-card {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  border-radius: var(--lx-r-md);
  padding: 0.5rem;
}

body.dcma-shell .lx-copilot-trust-inactive {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  color: var(--lx-ink-2);
}

body.dcma-shell .lx-copilot-quick-chip {
  background: var(--lx-surface);
  border: 1px solid var(--lx-border);
  color: var(--lx-ink);
}

body.dcma-shell .floating-widget-panel--copilot .bg-white,
body.dcma-shell .floating-widget-panel--copilot [class*="border-slate-200"],
body.dcma-shell .floating-widget-panel--copilot [class*="border-slate-100"] {
  border-color: var(--lx-border) !important;
}

body.lx-pricing-page .lx-pricing-register-title {
  font-family: var(--lx-display);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--lx-ink);
}

body.lx-pricing-page .lx-pricing-register-lead {
  color: var(--lx-ink-2);
}

body.lx-pricing-page .lx-pricing-selected-plan {
  border-radius: var(--lx-r-lg);
  border: 1px solid color-mix(in srgb, var(--lx-accent) 35%, var(--lx-border));
  background: var(--lx-accent-soft);
  color: var(--lx-ink);
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
}

body.lx-pricing-page .lx-pricing-selected-plan strong,
body.lx-pricing-page .lx-pricing-selected-plan .lx-pricing-selected-plan-name {
  color: var(--lx-ink);
  font-weight: 600;
}

body.lx-pricing-page .lx-pricing-selected-plan .lx-pricing-selected-plan-meta {
  color: var(--lx-ink-2);
}

body.lx-pricing-page .lx-pricing-selected-plan .lx-pricing-selected-plan-url {
  color: var(--lx-accent);
  font-family: ui-monospace, monospace;
}

body.lx-pricing-page .lx-pricing-form-section-head {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--lx-border);
  background: var(--lx-surface-2);
}

body.lx-pricing-page .lx-pricing-form-section-head h2 {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lx-ink);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.lx-pricing-page .lx-pricing-form-section-head h2::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lx-accent);
  flex-shrink: 0;
}

body.lx-pricing-page .lx-pricing-field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lx-ink-2);
  margin-bottom: 0.25rem;
}

body.lx-pricing-page .lx-pricing-field-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  padding: 0.625rem 1rem;
  border-radius: var(--lx-r-md);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink);
  font-size: 0.875rem;
}

body.lx-pricing-page .lx-pricing-field-input:focus {
  outline: none;
  border-color: var(--lx-accent);
  box-shadow: var(--dcma-focus);
}

body.lx-pricing-page .lx-pricing-field-hint {
  font-size: 0.75rem;
  color: var(--lx-ink-3);
  margin-top: 0.25rem;
}

body.lx-pricing-page .lx-pricing-locale-active {
  background: var(--lx-accent-soft) !important;
  color: var(--lx-accent) !important;
}

body.lx-pricing-page .lx-pricing-locale-idle {
  color: var(--lx-ink-3) !important;
}

html[data-theme="dark"] body.lx-pricing-page .text-slate-900,
html[data-theme="dark"] body.lx-pricing-page .text-slate-800 {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.lx-pricing-page .text-slate-700,
html[data-theme="dark"] body.lx-pricing-page .text-slate-600,
html[data-theme="dark"] body.lx-pricing-page .text-slate-500 {
  color: var(--lx-ink-2) !important;
}

html[data-theme="dark"] body.lx-pricing-page .bg-slate-50,
html[data-theme="dark"] body.lx-pricing-page [class*="bg-slate-50"] {
  background: var(--lx-surface-2) !important;
}

html[data-theme="dark"] body.lx-pricing-page .bg-teal-50,
html[data-theme="dark"] body.lx-pricing-page [class*="bg-teal-50"] {
  background: var(--lx-accent-soft) !important;
  border-color: color-mix(in srgb, var(--lx-accent) 30%, var(--lx-border)) !important;
}

html[data-theme="dark"] body.lx-pricing-page .text-teal-900,
html[data-theme="dark"] body.lx-pricing-page .text-teal-800,
html[data-theme="dark"] body.lx-pricing-page .text-teal-700 {
  color: var(--lx-ink) !important;
}

html[data-theme="dark"] body.lx-pricing-page .border-slate-100,
html[data-theme="dark"] body.lx-pricing-page .border-slate-200,
html[data-theme="dark"] body.lx-pricing-page .border-teal-100,
html[data-theme="dark"] body.lx-pricing-page .border-teal-200 {
  border-color: var(--lx-border) !important;
}

html[data-theme="dark"] body.lx-pricing-page .bg-teal-100 {
  background: var(--lx-accent-soft) !important;
  color: var(--lx-accent) !important;
}

body.lx-public-microsite .lx-public-card form {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

body.lx-public-microsite .lx-public-card input,
body.lx-public-microsite .lx-public-card select,
body.lx-public-microsite .lx-public-card textarea {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 0.625rem 0.875rem;
  border-radius: var(--lx-r-md);
  border: 1px solid var(--lx-border-strong);
  background: var(--lx-surface);
  color: var(--lx-ink);
  font-size: 14px;
  margin-bottom: 0.875rem;
}

body.lx-public-microsite .lx-public-card textarea {
  min-height: 5.5rem;
  resize: vertical;
}

body.lx-public-microsite .lx-public-card select {
  appearance: auto;
  line-height: 1.25;
}

/* —— Luxe v3: dark logo (class on <img> or nested under lockup/mark) —— */
html[data-theme="dark"] img.dcma-mark,
html[data-theme="dark"] .dcma-mark img,
html[data-theme="dark"] img.dcma-brand-lockup,
html[data-theme="dark"] .dcma-brand-lockup img,
html.dark img.dcma-mark,
html.dark .dcma-mark img,
html.dark img.dcma-brand-lockup,
html.dark .dcma-brand-lockup img,
.dark img.dcma-mark,
.dark .dcma-mark img,
.dark img.dcma-brand-lockup,
.dark .dcma-brand-lockup img {
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

@media print {
  html[data-theme="dark"] img.dcma-mark,
  html[data-theme="dark"] .dcma-mark img,
  html[data-theme="dark"] img.dcma-brand-lockup,
  html[data-theme="dark"] .dcma-brand-lockup img,
  html.dark img.dcma-mark,
  html.dark .dcma-mark img,
  html.dark img.dcma-brand-lockup,
  html.dark .dcma-brand-lockup img,
  .dark img.dcma-mark,
  .dark .dcma-mark img,
  .dark img.dcma-brand-lockup,
  .dark .dcma-brand-lockup img {
    filter: none !important;
    opacity: 1 !important;
  }
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card-header,
html.dark body.dcma-shell #app-content .section-card-header,
.dark body.dcma-shell #app-content .section-card-header,
html[data-theme="dark"] body.dcma-shell .lx-card-head[class*="border"],
html.dark body.dcma-shell .lx-card-head[class*="border"],
.dark body.dcma-shell .lx-card-head[class*="border"] {
  border-bottom-color: color-mix(in srgb, var(--lx-border) 55%, transparent) !important;
}

body.dcma-shell .lx-stat-link.is-active {
  font-weight: 600;
  color: var(--lx-accent);
}

/* —— Luxe v3C: --lx-* arbitrary utilities (not in compiled app.css) —— */
.border-\[var\(--lx-border\)\] {
  border-color: var(--lx-border);
}

.border-\[var\(--lx-border-strong\)\] {
  border-color: var(--lx-border-strong);
}

.border-\[var\(--lx-accent\)\] {
  border-color: var(--lx-accent);
}

.bg-\[var\(--lx-accent\)\] {
  background-color: var(--lx-accent);
}

.bg-\[var\(--lx-accent-hover\)\] {
  background-color: var(--lx-accent-hover);
}

.bg-\[var\(--lx-accent-soft\)\] {
  background-color: var(--lx-accent-soft);
}

.bg-\[var\(--lx-border\)\] {
  background-color: var(--lx-border);
}

.bg-\[var\(--lx-surface\)\] {
  background-color: var(--lx-surface);
}

.bg-\[var\(--lx-surface-2\)\] {
  background-color: var(--lx-surface-2);
}

.text-\[var\(--lx-accent\)\] {
  color: var(--lx-accent);
}

.text-\[var\(--lx-danger\)\] {
  color: var(--lx-danger);
}

.text-\[var\(--lx-ink\)\] {
  color: var(--lx-ink);
}

.text-\[var\(--lx-ink-2\)\] {
  color: var(--lx-ink-2);
}

.text-\[var\(--lx-ink-3\)\] {
  color: var(--lx-ink-3);
}

.text-\[var\(--lx-success\)\] {
  color: var(--lx-success);
}

.text-\[var\(--lx-warning\)\] {
  color: var(--lx-warning);
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card .border-b,
html.dark body.dcma-shell #app-content .section-card .border-b,
.dark body.dcma-shell #app-content .section-card .border-b {
  border-bottom-color: var(--lx-divider-soft);
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card .border-t,
html.dark body.dcma-shell #app-content .section-card .border-t,
.dark body.dcma-shell #app-content .section-card .border-t {
  border-top-color: var(--lx-divider-soft);
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card .divide-y > :not([hidden]) ~ :not([hidden]),
html.dark body.dcma-shell #app-content .section-card .divide-y > :not([hidden]) ~ :not([hidden]),
.dark body.dcma-shell #app-content .section-card .divide-y > :not([hidden]) ~ :not([hidden]) {
  border-color: var(--lx-divider-soft);
}

html[data-theme="dark"] body.dcma-shell #app-content .section-card .border-\[var\(--lx-border\)\],
html.dark body.dcma-shell #app-content .section-card .border-\[var\(--lx-border\)\],
.dark body.dcma-shell #app-content .section-card .border-\[var\(--lx-border\)\] {
  border-color: var(--lx-divider-soft);
}

/* Tailwind arbitrary hover/focus utilities (fallbacks — not in compiled app.css) */
.hover\:bg-\[var\(--lx-accent\)\]:hover {
  background-color: var(--lx-accent) !important;
}

.hover\:bg-\[var\(--lx-accent-hover\)\]:hover {
  background-color: var(--lx-accent-hover) !important;
}

.hover\:bg-\[var\(--lx-accent-soft\)\]:hover {
  background-color: var(--lx-accent-soft) !important;
}

.hover\:text-\[var\(--lx-accent\)\]:hover {
  color: var(--lx-accent) !important;
}

.hover\:text-\[var\(--lx-ink\)\]:hover {
  color: var(--lx-ink) !important;
}

.hover\:border-\[var\(--lx-accent\)\]:hover {
  border-color: var(--lx-accent) !important;
}

.focus\:border-\[var\(--lx-accent\)\]:focus {
  border-color: var(--lx-accent) !important;
}

.focus\:ring-\[var\(--lx-accent-soft\)\]:focus {
  --tw-ring-color: var(--lx-accent-soft);
  box-shadow: 0 0 0 2px var(--lx-accent-soft);
}

.group:hover .group-hover\:text-\[var\(--lx-accent\)\] {
  color: var(--lx-accent);
}

body.dcma-shell .mobile-quick-nav {
  z-index: 100;
}
