/* Live Clinicos: DMA page content inside OS prototype shell (light canvas + dark rail) */

/* ── Prototype canvas lock: light OS tokens beat dma doc-static dark + os.css dark ── */
html.os-live,
html.os-live[data-theme="dark"],
html.os-live[data-theme="light"] {
  --bg: #f2f6f5;
  --bg2: #e8efed;
  --card: #fff;
  --card2: #f8fbfa;
  --ink: #0f1a24;
  --ink2: #3e5063;
  --mut: #667789;
  --line: #e0e8e6;
  --line2: #cbd7d4;
  --teal-t: #eef8f5;
  --teal-t2: #c6eae1;
  --ok-b: #ddf3ec;
  --warn-b: #ffefcf;
  --bad-b: #fce4e1;
  --info-b: #e0ecfb;
  --vio-b: #ece5fa;
  --neu-b: #ebf0f4;
  --sh: 0 1px 2px rgba(15, 26, 36, 0.04), 0 6px 20px -8px rgba(15, 26, 36, 0.1);
  --sh2: 0 2px 4px rgba(15, 26, 36, 0.05), 0 18px 40px -14px rgba(15, 26, 36, 0.22);
  color-scheme: light;
}

html.os-live.doc-static[data-theme="dark"],
html.os-live.doc-static[data-theme="dark"] body,
html.os-live.sa-static[data-theme="dark"],
html.os-live.sa-static[data-theme="dark"] body,
html.os-live.doc-static[data-theme="light"],
html.os-live.doc-static[data-theme="light"] body,
html.os-live.sa-static[data-theme="light"],
html.os-live.sa-static[data-theme="light"] body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

/* Beat dma-design-system doc-static dark canvas (#141C2B !important) */
html.os-live.doc-static[data-theme="dark"] .doc-layout,
html.os-live.doc-static[data-theme="dark"] .doc-main-wrap,
html.os-live.doc-static[data-theme="dark"] .doc-main,
html.os-live.doc-static[data-theme="dark"] #doc-page,
html.os-live.doc-static[data-theme="dark"] .doc-page,
html.os-live.sa-static[data-theme="dark"] .sa-layout,
html.os-live.sa-static[data-theme="dark"] .sa-main,
html.os-live.sa-static[data-theme="dark"] .sa-main-inner,
html.os-live.doc-static .app > .main,
html.os-live.sa-static .app > .main,
html.os-live.doc-static .main,
html.os-live.sa-static .main {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

/* ── Canvas: OS tokens win over dma doc-static dark canvas ── */
html.os-live.doc-static,
html.os-live.doc-static body,
html.os-live.sa-static,
html.os-live.sa-static body {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

html.os-live.doc-static .app > .main,
html.os-live.sa-static .app > .main {
  background: var(--bg) !important;
}

html.os-live.doc-static .pg.os-live-mount,
html.os-live.sa-static .pg.os-live-mount,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .doc-main,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount #doc-page,
html.os-live.doc-static[data-theme="light"] .pg.os-live-mount .doc-main,
html.os-live.doc-static[data-theme="light"] .pg.os-live-mount #doc-page,
html.os-live.sa-static[data-theme="dark"] .pg.os-live-mount .sa-main,
html.os-live.sa-static[data-theme="dark"] .pg.os-live-mount .sa-main-inner,
html.os-live.sa-static[data-theme="light"] .pg.os-live-mount .sa-main,
html.os-live.sa-static[data-theme="light"] .pg.os-live-mount .sa-main-inner,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .doc-main,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount #doc-page,
html.os-live.sa-static[data-theme="dark"] .pg.os-live-mount .sa-main-inner {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

.pg.os-live-mount {
  max-width: var(--content, 1440px);
  padding: 6px 20px 28px;
  box-sizing: border-box;
  background: var(--bg) !important;
}

.pg.os-live-mount .doc-main,
.pg.os-live-mount #doc-page,
.pg.os-live-mount .dma-clinic-canvas,
.pg.os-live-mount .sa-main,
.pg.os-live-mount .sa-main-inner {
  padding: 0 0 8px !important;
  max-width: none;
  background: var(--bg) !important;
  color: var(--ink);
  box-sizing: border-box;
}

/* Remap DMA doc tokens → OS prototype tokens inside live mount */
html.os-live .pg.os-live-mount {
  --doc-bg: var(--bg);
  --doc-surface: var(--card);
  --doc-surface-2: var(--card2);
  --doc-text: var(--ink);
  --doc-muted: var(--mut);
  --doc-border: var(--line);
  --ds-bg: var(--bg);
  --ds-bg-2: var(--bg2);
  --ds-surface: var(--card);
  --ds-surface-2: var(--card2);
  --ds-surface-section: var(--card);
  --ds-surface-hover: rgba(15, 26, 36, 0.04);
  --ds-text: var(--ink);
  --ds-text-3: var(--mut);
  --ds-text-2: var(--ink2);
  --ds-muted: var(--mut);
  --ds-border: var(--line);
  --ds-border-2: var(--line2);
  --sa-main-bg: var(--bg);
  --sa-card-bg: var(--card);
  --sa-text: var(--ink);
  --sa-muted: var(--mut);
}

html.os-live .pg.os-live-mount,
html.os-live #pg.os-live-mount {
  --doc-bg: var(--bg);
  --ds-bg: var(--bg);
  --ds-surface: var(--card);
  --ds-surface-section: var(--card);
}

/* Beat html.doc-static dark section tokens (#243044) on live clinic pages */
html.os-live.doc-static {
  --ds-surface-section: var(--card);
  --ds-surface-hover: rgba(15, 26, 36, 0.04);
}

html.doc-static .pg.os-live-mount .doc-main,
html.doc-static .pg.os-live-mount #doc-page {
  padding: 0 0 16px !important;
}

html.sa-static .pg.os-live-mount .sa-main,
html.sa-static .pg.os-live-mount .sa-main-inner {
  padding: 0 0 16px !important;
}

.pg.os-live-mount .dma-head {
  margin-bottom: 18px;
  padding: 4px 0 0;
}

.pg.os-live-mount .dma-head-title,
.pg.os-live-mount .dma-head h1 {
  color: var(--ink);
}

.pg.os-live-mount .dma-prose,
.pg.os-live-mount .dma-hint {
  color: var(--mut);
}

.pg.os-live-mount .dma-section,
.pg.os-live-mount .cos-card,
.pg.os-live-mount .ds-section,
.pg.os-live-mount .ds-card,
.pg.os-live-mount .dma-card,
html.os-live .pg.os-live-mount .cos-card--kpi,
html.os-live .pg.os-live-mount .cos-card--feature,
html.os-live .pg.os-live-mount .cos-card--data,
html.os-live .pg.os-live-mount .cos-card--action,
html.os-live .pg.os-live-mount .cos-card--status,
html.os-live .pg.os-live-mount .cos-card--appt,
html.os-live .pg.os-live-mount .dma-section,
html.os-live .pg.os-live-mount .dma-panel,
html.os-live .pg.os-live-mount .dma-kpi {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--sh);
  border-radius: var(--r, 16px);
  color: var(--ink) !important;
  background-image: none !important;
}

html.os-live .pg.os-live-mount .cos-card--feature {
  background: linear-gradient(165deg, #fff 0%, #eef8f5 58%, #fff8e8 140%) !important;
}

.pg.os-live-mount .dma-btn {
  border-radius: var(--r2, 10px);
}

.pg.os-live-mount .dma-section,
.pg.os-live-mount .cos-empty,
.pg.os-live-mount .ds-section {
  border-radius: var(--rc, 14px);
}

.pg.os-live-mount .cos-empty,
html.os-live .pg.os-live-mount .cos-empty,
html.os-live .pg.os-live-mount .dma-empty,
html.os-live .pg.os-live-mount .ds-empty {
  background: var(--card) !important;
  border: 1px solid var(--line);
  padding: 28px 24px;
  text-align: center;
  color: var(--mut) !important;
}

.pg.os-live-mount .cos-empty h2,
html.os-live .pg.os-live-mount .cos-empty b {
  color: var(--ink);
}

.pg.os-live-mount .cos-empty p {
  color: var(--mut);
}

.pg.os-live-mount .doc-layout,
.pg.os-live-mount .doc-sidebar,
.pg.os-live-mount .doc-topbar,
.pg.os-live-mount .sa-layout > .sa-sidebar,
.pg.os-live-mount .sa-mobile-bar,
.pg.os-live-mount .sa-nav-backdrop {
  display: none !important;
}

.pg.os-live-mount .ds-workspace-tabs {
  margin-bottom: 16px;
}

/* Quick actions + ghost buttons (prototype pill row) */
html.os-live .pg.os-live-mount .cos-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  align-items: center;
}

html.os-live .pg.os-live-mount .cos-quick-actions .dma-btn-ghost,
html.os-live .pg.os-live-mount .dma-head-actions .dma-btn-ghost,
html.os-live .pg.os-live-mount .dma-btn-row .dma-btn-ghost {
  background: var(--card) !important;
  color: var(--teal-d, #0e7a68) !important;
  border: 1.5px solid var(--line2) !important;
  box-shadow: var(--sh, 0 1px 2px rgba(15, 26, 36, 0.06));
  min-height: 40px;
  padding: 0 14px;
  font-weight: 600;
  white-space: nowrap;
}

html.os-live .pg.os-live-mount .cos-quick-actions .dma-btn-ghost:hover,
html.os-live .pg.os-live-mount .dma-btn-ghost:hover:not(:disabled) {
  background: var(--teal-t, #eef8f5) !important;
  border-color: var(--teal, #14967f) !important;
}

/* KPI grids */
html.doc-static .pg.os-live-mount .cos-kpi-row,
html.doc-static .pg.os-live-mount .dma-kpis,
html.doc-static .pg.os-live-mount .ds-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 18px;
}

@media (max-width: 1024px) {
  html.doc-static .pg.os-live-mount .cos-kpi-row,
  html.doc-static .pg.os-live-mount .dma-kpis,
  html.doc-static .pg.os-live-mount .ds-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html.doc-static .pg.os-live-mount .cos-card--kpi {
  padding: 16px 18px;
  min-height: 0;
  background: var(--card) !important;
}

html.doc-static .pg.os-live-mount .cos-card--kpi span,
html.doc-static .pg.os-live-mount .cos-card--kpi strong,
html.doc-static .pg.os-live-mount .cos-card--kpi em {
  display: block;
}

html.doc-static .pg.os-live-mount .cos-card--kpi span {
  color: var(--mut);
}

html.doc-static .pg.os-live-mount .cos-card--kpi strong {
  color: var(--ink);
}

html.doc-static .pg.os-live-mount .cos-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

html.doc-static .pg.os-live-mount .dma-grid-2,
html.doc-static .pg.os-live-mount .ds-work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 768px) {
  html.doc-static .pg.os-live-mount .dma-grid-2,
  html.doc-static .pg.os-live-mount .ds-work-grid {
    grid-template-columns: 1fr;
  }
}

/* Superadmin tables / panels inside live mount */
html.os-live.sa-static .pg.os-live-mount .sa-panel,
html.os-live.sa-static .pg.os-live-mount .dma-section,
html.os-live.sa-static .pg.os-live-mount table {
  color: var(--ink);
}

html.os-live.sa-static .pg.os-live-mount .sa-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r, 16px);
  box-shadow: var(--sh);
}

/* WhatsApp hub (preserved #os-live-preserve content) */
html.os-live .pg.os-live-mount .dma-wa-root,
html.os-live .pg.os-live-mount #dma-wa-command-center {
  max-width: none;
  width: 100%;
}

html.os-live .pg.os-live-mount .dma-wa-root {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

html.os-live .pg.os-live-mount .dma-wa-panel,
html.os-live .pg.os-live-mount .dma-wa-stat,
html.os-live .pg.os-live-mount .dma-wa-quick__item,
html.os-live .pg.os-live-mount .dma-wa-settings-teaser,
html.os-live .pg.os-live-mount .dma-wa-phone-badge {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--rc, 14px);
  color: var(--ink);
  box-shadow: var(--sh);
}

html.os-live .pg.os-live-mount .dma-wa-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html.os-live .pg.os-live-mount .dma-wa-quick__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html.os-live .pg.os-live-mount .dma-wa-quick__item strong,
html.os-live .pg.os-live-mount .dma-wa-quick__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

html.os-live .pg.os-live-mount .dma-wa-quick__item span,
html.os-live .pg.os-live-mount .dma-wa-quick__desc {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--mut) !important;
  -webkit-text-fill-color: var(--mut) !important;
}

@media (max-width: 520px) {
  html.os-live .pg.os-live-mount .dma-wa-quick {
    grid-template-columns: 1fr;
  }
}

html.os-live .pg.os-live-mount .dma-wa-quick__item:hover {
  border-color: var(--teal, #14967f) !important;
  box-shadow: var(--sh2);
}

html.os-live .pg.os-live-mount .dma-wa-muted,
html.os-live .pg.os-live-mount .dma-wa-stat__lbl,
html.os-live .pg.os-live-mount .dma-wa-phone-meta {
  color: var(--mut) !important;
}

html.os-live .pg.os-live-mount .dma-wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--r2, 10px);
  font-size: 14px;
  font-weight: 700;
  font-family: var(--fb, "Plus Jakarta Sans", Inter, sans-serif);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  box-sizing: border-box;
}

html.os-live .pg.os-live-mount .dma-wa-btn--primary,
html.os-live .pg.os-live-mount .dma-wa-btn--whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.28);
}

html.os-live .pg.os-live-mount .dma-wa-btn--ghost {
  background: var(--card) !important;
  border: 1.5px solid var(--line2) !important;
  color: var(--teal-d, #0e7a68) !important;
  -webkit-text-fill-color: var(--teal-d, #0e7a68) !important;
  font-weight: 600;
}

html.os-live .pg.os-live-mount .dma-wa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

/* Top bar stays prototype light glass on live shell */
html.os-live .tb {
  background: rgba(242, 246, 245, 0.82) !important;
}

/* Toasts above OS rail / dock */
#dma-toast-root {
  position: fixed !important;
  top: calc(var(--tb, 66px) + 12px + env(safe-area-inset-top, 0px)) !important;
  right: 16px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 10050 !important;
  pointer-events: none;
}

html:not(.os-live) #dma-toast-root {
  top: calc(12px + env(safe-area-inset-top, 0px)) !important;
}

.dma-toast {
  pointer-events: auto;
  box-shadow: var(--sh2, 0 8px 24px rgba(15, 26, 36, 0.18));
}

.dma-modal-bg,
.ds-drawer-backdrop,
.ds-modal-backdrop {
  z-index: 10100 !important;
}

.app > .main > .foot {
  margin: 24px 20px 12px;
}

/* WhatsApp Command Center inside OS live shell */
html.os-live .pg.os-live-mount .dma-wa-root,
html.os-live .os-wa-hub-live.dma-wa-root {
  margin-bottom: 18px;
  max-width: none;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-hero,
html.os-live .os-wa-hub-live .dma-wa-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 20px;
  background: var(--card) !important;
  border: 1px solid var(--line);
  border-radius: var(--r, 16px);
  box-shadow: var(--sh);
  padding: 18px 20px;
  margin-bottom: 14px;
  color: var(--ink) !important;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-hero h1,
html.os-live .os-wa-hub-live .dma-wa-hero h1 {
  font-family: var(--fh, Montserrat, sans-serif);
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1.35;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  margin: 0 0 6px;
  max-width: 42rem;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-eyebrow,
html.os-live .os-wa-hub-live .dma-wa-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mut) !important;
  -webkit-text-fill-color: var(--mut) !important;
  margin: 0 0 6px;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-hero p,
html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-muted,
html.os-live .os-wa-hub-live .dma-wa-hero p,
html.os-live .os-wa-hub-live .dma-wa-muted {
  font-size: 14px;
  color: var(--mut) !important;
  -webkit-text-fill-color: var(--mut) !important;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-hero__status {
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card2);
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-panel h2,
html.os-live .os-wa-hub-live .dma-wa-panel h2 {
  font-family: var(--fh, Montserrat, sans-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  margin: 0 0 12px;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-panel p,
html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-caps li,
html.os-live .os-wa-hub-live .dma-wa-panel p,
html.os-live .os-wa-hub-live .dma-wa-caps li {
  font-size: 14px;
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-stat__val,
html.os-live .os-wa-hub-live .dma-wa-stat__val {
  font-size: 22px;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

/* Force light comm panels even if doc-static dark rules load */
html.os-live.doc-static .pg.os-live-mount .dma-wa-panel,
html.os-live.doc-static .pg.os-live-mount .dma-wa-stat,
html.os-live.doc-static .pg.os-live-mount .dma-wa-quick__item,
html.os-live.doc-static .pg.os-live-mount .dma-wa-log th,
html.os-live.doc-static .pg.os-live-mount .dma-wa-log td,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-wa-panel,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-wa-stat,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-wa-quick__item,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-wa-log th,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-wa-log td {
  background: var(--card) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live.doc-static .pg.os-live-mount .dma-wa-phone-badge {
  background: var(--ok-b, #ddf3ec) !important;
  border: 1px solid var(--teal-t2, #c6eae1) !important;
}

html.os-live.doc-static .pg.os-live-mount .dma-wa-phone-number {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  font-size: 15px;
}

html.os-live.doc-static .pg.os-live-mount .dma-wa-phone-meta {
  color: var(--mut) !important;
  -webkit-text-fill-color: var(--mut) !important;
  font-size: 13px;
}

html.os-live.doc-static .pg.os-live-mount .dma-wa-state__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink) !important;
}

html.os-live.doc-static .pg.os-live-mount .dma-wa-state__desc {
  font-size: 14px;
  color: var(--mut) !important;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-stats,
html.os-live .os-wa-hub-live .dma-wa-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

html.os-live .os-wa-hub-live .dma-wa-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--sh);
}

html.os-live .os-wa-hub-live .dma-wa-stat__val {
  display: block;
  font: 700 22px/1.2 var(--fh, Montserrat, sans-serif);
  color: var(--ink);
}

html.os-live .os-wa-hub-live .dma-wa-stat__lbl {
  display: block;
  font-size: 12px;
  color: var(--mut);
  margin-top: 4px;
}

html.os-live .pg.os-live-mount .dma-wa-root .dma-wa-grid,
html.os-live .os-wa-hub-live .dma-wa-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

html.os-live .os-wa-hub-live .dma-wa-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--sh);
}

html.os-live .os-wa-hub-live .dma-wa-panel--wide {
  grid-column: 1 / -1;
}

html.os-live .os-wa-hub-live .dma-wa-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

html.os-live .os-wa-hub-live .dma-wa-quick__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card2);
  color: var(--ink);
  text-decoration: none;
}

html.os-live .os-wa-hub-live .dma-wa-quick__title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink) !important;
}

html.os-live .os-wa-hub-live .dma-wa-quick__desc {
  display: block;
  font-size: 13px;
  color: var(--mut) !important;
}

html.os-live .os-wa-hub-live .dma-wa-log {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

html.os-live .os-wa-hub-live .dma-wa-log th,
html.os-live .os-wa-hub-live .dma-wa-log td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

html.os-live .wa-cc-hero {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--sh);
  padding: 18px 20px;
}

@media (max-width: 1024px) {
  html.os-live .os-wa-hub-live .dma-wa-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html.os-live .os-wa-hub-live .dma-wa-grid {
    grid-template-columns: 1fr;
  }
}

/* Live auth: force readable inputs (ignore stored dark prototype theme) */
html.os-live-auth,
html.os-live-auth body {
  background: #f2f6f5 !important;
  color: #0f1a24 !important;
  color-scheme: light;
}

html.os-live-auth .inp,
html.os-live-auth .sel,
html.os-live-auth .txt,
html.os-live-auth input,
html.os-live-auth select,
html.os-live-auth textarea {
  background: #fff !important;
  color: #0f1a24 !important;
  border-color: #cbd7d4 !important;
  -webkit-text-fill-color: #0f1a24 !important;
}

html.os-live-auth input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #fff inset !important;
  -webkit-text-fill-color: #0f1a24 !important;
}

/* Forms, filters, modals inside live DMA mount */
html.os-live .pg.os-live-mount .inp,
html.os-live .pg.os-live-mount .sel,
html.os-live .pg.os-live-mount .txt,
html.os-live .pg.os-live-mount input:not([type="checkbox"]):not([type="radio"]),
html.os-live .pg.os-live-mount select,
html.os-live .pg.os-live-mount textarea,
html.os-live .mo .inp,
html.os-live .mo .sel,
html.os-live .mo .txt,
html.os-live .dma-modal input,
html.os-live .dma-modal select,
html.os-live .dma-modal textarea,
html.os-live .ds-modal input,
html.os-live .ds-modal select,
html.os-live .ds-modal textarea {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line2) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

html.os-live .pg.os-live-mount .cos-filterbar,
html.os-live .pg.os-live-mount .dma-filters,
html.os-live .pg.os-live-mount .dma-filter-row {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.os-live .pg.os-live-mount .cos-filterbar button,
html.os-live .pg.os-live-mount .dma-filters button,
html.os-live .pg.os-live-mount .dma-filter-row button {
  background: var(--card2) !important;
  color: var(--ink2) !important;
  border-color: var(--line) !important;
}

html.os-live .app > .main > .foot {
  background: transparent !important;
  color: var(--mut) !important;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

html.os-live .app > .main > .foot a {
  color: var(--ink2) !important;
}

/* ── os-live light canvas: beat dma-doctor-pages html[data-theme="dark"] leaks ── */
html.os-live[data-theme="light"] .pg.os-live-mount .doc-main,
html.os-live[data-theme="light"] .pg.os-live-mount #doc-page {
  background: var(--bg) !important;
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-table-wrap,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-filters,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-pt-toolbar {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
  box-shadow: var(--sh);
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-table thead th {
  background: var(--card2) !important;
  color: var(--mut) !important;
  border-color: var(--line) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-table tbody td {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-table tbody td strong,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-pt-identity strong {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-table tbody tr:hover td {
  background: var(--teal-t, #eef8f5) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-tabs {
  border-bottom-color: var(--line) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-tabs button {
  background: var(--card2) !important;
  color: var(--ink2) !important;
  border-color: var(--line) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-tabs button:hover,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-tabs button.active {
  background: var(--card) !important;
  color: var(--teal-d, #0e7a68) !important;
  border-color: var(--line2) !important;
}

/* ── os-live light: inner card/section spacing (beats missing dma-design-system + doc-static resets) ── */
html.os-live[data-theme="light"] .pg.os-live-mount {
  --ds-space-3: 12px;
  --ds-space-4: 16px;
  --ds-space-5: 20px;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section,
html.os-live[data-theme="light"] .pg.os-live-mount .doc-section,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-card,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-section {
  margin-bottom: var(--ds-space-4);
  overflow: hidden;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-h,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-h,
html.os-live[data-theme="light"] .pg.os-live-mount .doc-section-h,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel-h {
  padding: var(--ds-space-4) var(--ds-space-5) var(--ds-space-3);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-h h2,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-h h2 {
  margin: 0;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-b,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-b,
html.os-live[data-theme="light"] .pg.os-live-mount .doc-section-b,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel-b {
  padding: var(--ds-space-3) var(--ds-space-5) var(--ds-space-5);
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-4);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section:not(:has(.dma-section-h)),
html.os-live[data-theme="light"] .pg.os-live-mount .ds-section:not(:has(.ds-section-h)) {
  padding: var(--ds-space-3);
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-card:not([class*="cos-card--"]) {
  padding: var(--ds-space-4) var(--ds-space-5);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-card--data,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-card--action,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-card--status,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-card--alert {
  padding: var(--ds-space-4) var(--ds-space-5);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel {
  overflow: hidden;
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-profile-hero {
  padding: var(--ds-space-5);
  margin-bottom: var(--ds-space-4);
  gap: var(--ds-space-4);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-meta {
  padding: 2px 0;
  margin-top: 4px;
}

html.os-live[data-theme="light"] .pg.os-live-mount .ds-kv,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-kv {
  padding: var(--ds-space-3) 0;
}

html.os-live[data-theme="light"] .pg.os-live-mount .ds-kv dt,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-kv dt {
  margin: 0 0 4px;
}

html.os-live[data-theme="light"] .pg.os-live-mount .ds-kv dd,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-kv dd {
  margin: 0 0 var(--ds-space-3);
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-b .dma-field {
  margin-bottom: 0;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-b .dma-field label {
  margin-bottom: 6px;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-head {
  padding: var(--ds-space-3) 0 0;
  margin-bottom: var(--ds-space-5);
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-tabs,
html.os-live[data-theme="light"] .pg.os-live-mount .wtabs,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-workspace-tabs {
  gap: 8px;
  margin-bottom: var(--ds-space-4);
  padding: var(--ds-space-3) 0;
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .cos-preview,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .dma-thread,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--messages .dma-thread {
  padding: var(--ds-space-4) var(--ds-space-5);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .cos-preview .dma-tabs,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .cos-preview .ds-tabs {
  margin-left: calc(-1 * var(--ds-space-5));
  margin-right: calc(-1 * var(--ds-space-5));
  padding-left: var(--ds-space-5);
  padding-right: var(--ds-space-5);
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-empty,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-empty,
html.os-live[data-theme="light"] .pg.os-live-mount .ds-empty {
  padding: var(--ds-space-5) var(--ds-space-5);
}

html.os-live[data-theme="light"] .pg.os-live-mount .cos-input,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-field input,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-field select,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-field textarea,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-search,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-status-sel,
html.os-live[data-theme="light"] .pg.os-live-mount select,
html.os-live[data-theme="light"] .pg.os-live-mount textarea {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line2) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-field label,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-label {
  color: var(--ink2) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-hint,
html.os-live[data-theme="light"] .pg.os-live-mount .cos-hint,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-prose {
  color: var(--mut) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .ds-hours-row input[type="time"] {
  min-width: 8.75rem;
  padding-right: 10px;
}

/* Modals / drawers (teleported to body) */
html.os-live[data-theme="light"] .dma-modal-bg,
html.os-live[data-theme="light"] .ds-drawer-backdrop,
html.os-live[data-theme="light"] .ds-drawer-bg,
html.os-live[data-theme="light"] .cos-drawer-bg,
html.os-live[data-theme="light"] .ds-modal-backdrop {
  background: rgba(15, 26, 36, 0.32) !important;
}

html.os-live[data-theme="light"] .dma-modal,
html.os-live[data-theme="light"] .ds-drawer,
html.os-live[data-theme="light"] .ds-modal {
  background: var(--card) !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--sh2);
}

html.os-live[data-theme="light"] .dma-modal-h,
html.os-live[data-theme="light"] .dma-modal-f,
html.os-live[data-theme="light"] .ds-drawer-h,
html.os-live[data-theme="light"] .ds-drawer-f,
html.os-live[data-theme="light"] .ds-modal-h,
html.os-live[data-theme="light"] .ds-modal-f {
  background: var(--card2) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .dma-modal-h h3,
html.os-live[data-theme="light"] .ds-drawer-h h3,
html.os-live[data-theme="light"] .ds-modal-h h3 {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .dma-modal .dma-btn-ghost,
html.os-live[data-theme="light"] .dma-modal-f .dma-btn-ghost,
html.os-live[data-theme="light"] .ds-drawer-f .dma-btn-ghost,
html.os-live[data-theme="light"] .ds-modal-f .dma-btn-ghost {
  background: var(--card) !important;
  color: var(--teal-d, #0e7a68) !important;
  border: 1.5px solid var(--line2) !important;
}

html.os-live[data-theme="light"] .dma-modal .dma-field label,
html.os-live[data-theme="light"] .dma-modal-b,
html.os-live[data-theme="light"] .ds-drawer-b {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-h strong,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-sub {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-sub {
  color: var(--mut) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-tabs,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-tabs {
  background: var(--card2) !important;
  border-bottom: 1px solid var(--line) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-tabs button,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-tabs button {
  background: transparent !important;
  color: var(--ink2) !important;
  border-color: transparent !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-tabs button:hover,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-tabs button:hover,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-tabs button.active,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-tabs button.active {
  background: var(--card) !important;
  color: var(--teal-d, #0e7a68) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-kv dt,
html.os-live[data-theme="light"] .ds-drawer-panel .sa-info-list dt {
  color: var(--mut) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-kv dd,
html.os-live[data-theme="light"] .ds-drawer-panel .sa-info-list dd {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .dma-hint,
html.os-live[data-theme="light"] .ds-drawer-panel .dma-prose,
html.os-live[data-theme="light"] .ds-drawer-panel .dma-row-item .name {
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .dma-row-item .sub {
  color: var(--mut) !important;
}

html.os-live[data-theme="light"] .ds-drawer-h,
html.os-live.doc-static .ds-drawer-h,
html.os-live.doc-static .cos-drawer-h,
html.os-live[data-theme="light"] .dma-modal-h {
  padding: var(--ds-space-4, 16px) var(--ds-space-5, 20px);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .ds-drawer-b,
html.os-live.doc-static .ds-drawer-b,
html.os-live.doc-static .cos-drawer-b,
html.os-live[data-theme="light"] .dma-modal-b {
  padding: var(--ds-space-4, 16px) var(--ds-space-5, 20px);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .ds-drawer-f,
html.os-live.doc-static .ds-drawer-f,
html.os-live.doc-static .cos-drawer-f,
html.os-live[data-theme="light"] .dma-modal-f {
  padding: var(--ds-space-3, 12px) var(--ds-space-5, 20px) var(--ds-space-4, 16px);
  gap: var(--ds-space-3, 12px);
  box-sizing: border-box;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-tabs,
html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-tabs {
  padding: 0 var(--ds-space-5, 20px);
  box-sizing: border-box;
}

/* Patient preview drawer: docked rail on desktop, sheet + scrim on smaller viewports */
html.os-live.doc-static .ds-drawer.ds-drawer-dock,
html.os-live.doc-static .cos-drawer {
  position: fixed !important;
  z-index: 10150 !important;
  pointer-events: none;
}

html.os-live.doc-static .ds-drawer.ds-drawer-dock.open,
html.os-live.doc-static .cos-drawer.open {
  pointer-events: auto !important;
}

@media (max-width: 1023px) {
  html.os-live.doc-static .ds-drawer.ds-drawer-dock,
  html.os-live.doc-static .cos-drawer {
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: auto !important;
    height: auto !important;
  }

  html.os-live.doc-static .ds-drawer-bg,
  html.os-live.doc-static .cos-drawer-bg {
    display: block !important;
    opacity: 0;
    transition: opacity 180ms ease;
  }

  html.os-live.doc-static .ds-drawer.open .ds-drawer-bg,
  html.os-live.doc-static .cos-drawer.open .cos-drawer-bg {
    opacity: 1 !important;
  }

  html.os-live.doc-static .ds-drawer-panel,
  html.os-live.doc-static .cos-drawer-panel {
    position: absolute !important;
    top: auto !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: min(92vh, 720px) !important;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
    transform: translateY(100%) !important;
    border-radius: var(--r, 16px) var(--r, 16px) 0 0 !important;
    background: var(--card) !important;
    color: var(--ink) !important;
    border: 1px solid var(--line) !important;
    border-bottom: none !important;
    box-shadow: var(--sh2) !important;
    pointer-events: auto;
  }

  html.os-live.doc-static .ds-drawer.open .ds-drawer-panel,
  html.os-live.doc-static .cos-drawer.open .cos-drawer-panel {
    transform: translateY(0) !important;
  }
}

@media (min-width: 1024px) {
  html.os-live.doc-static {
    --os-drawer-rail-w: min(400px, 36vw);
    --os-drawer-gutter: 20px;
  }

  html.os-live.doc-static .ds-drawer.ds-drawer-dock,
  html.os-live.doc-static .cos-drawer {
    top: calc(var(--tb, var(--ds-h-header, 66px)) + 12px) !important;
    right: var(--os-drawer-gutter, 20px) !important;
    bottom: var(--os-drawer-gutter, 20px) !important;
    left: auto !important;
    width: var(--os-drawer-rail-w, min(400px, 36vw)) !important;
    min-width: 0 !important;
    max-width: 400px !important;
    height: auto !important;
  }

  html.os-live.doc-static .ds-drawer.ds-drawer-dock.open,
  html.os-live.doc-static .cos-drawer.open {
    pointer-events: none !important;
  }

  html.os-live.doc-static .ds-drawer-bg,
  html.os-live.doc-static .cos-drawer-bg {
    display: none !important;
  }

  html.os-live.doc-static .ds-drawer-panel,
  html.os-live.doc-static .cos-drawer-panel {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: 100% !important;
    transform: none !important;
    border-radius: var(--r, var(--ds-radius-lg, 16px)) !important;
    background: var(--card) !important;
    color: var(--ink) !important;
    border: 1px solid var(--line) !important;
    box-shadow: var(--sh2) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    pointer-events: auto;
  }

  html.os-live.doc-static .ds-drawer-b,
  html.os-live.doc-static .cos-drawer-b {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow: auto !important;
  }

  html.os-live.doc-static .ds-drawer-f,
  html.os-live.doc-static .cos-drawer-f {
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
  }
}

html.os-live.doc-static .ds-drawer-h,
html.os-live.doc-static .ds-drawer-b,
html.os-live.doc-static .ds-drawer-f,
html.os-live.doc-static .cos-drawer-h,
html.os-live.doc-static .cos-drawer-b,
html.os-live.doc-static .cos-drawer-f {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live.doc-static .ds-drawer-h,
html.os-live.doc-static .cos-drawer-h {
  background: var(--card2) !important;
}

html.os-live.doc-static .ds-drawer-f,
html.os-live.doc-static .cos-drawer-f {
  background: var(--card2) !important;
}

html.os-live.doc-static .ds-drawer-h strong,
html.os-live.doc-static .cos-drawer-h strong {
  color: var(--ink) !important;
}

/* v16: patients list full width; preview drawer overlays inset card (no page shrink) */
@media (min-width: 1024px) {
  html.os-live.doc-static body.ds-drawer-open .doc-main-wrap,
  html.os-live.doc-static body.ds-drawer-open .sa-main,
  html.os-live.doc-static body.ds-drawer-open .app > .main,
  html.os-live.doc-static body.ds-drawer-open .pg.os-live-mount,
  html.os-live.doc-static body.ds-drawer-open #doc-page.cos-pt-page,
  html.os-live.doc-static body.ds-drawer-open .sa-main.os-live-mount {
    padding-right: 0 !important;
  }
}

html.os-live.doc-static #pg.os-live-mount:has(#doc-page.cos-pt-page),
html.os-live.doc-static #doc-page.doc-main.cos-pt-page {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

html.os-live.doc-static #doc-page.cos-pt-page .cos-pt-workspace {
  width: 100%;
  min-width: 0;
}

html.os-live.doc-static #doc-page.cos-pt-page .cos-pt-workspace .dma-table-wrap {
  overflow-x: auto;
}

/* v17: patient preview drawer — 400px rail tab row + close control (light) */
html.os-live.doc-static .ds-drawer-panel > .ds-tabs.ds-drawer-tabs {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--line2, var(--ds-border-2)) transparent;
  gap: 4px;
  margin-bottom: 0;
  padding: 6px 12px 8px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--line, var(--ds-border));
}

html.os-live.doc-static .ds-drawer-panel > .ds-tabs.ds-drawer-tabs::-webkit-scrollbar {
  display: block;
  height: 4px;
}

html.os-live.doc-static .ds-drawer-panel > .ds-tabs.ds-drawer-tabs::-webkit-scrollbar-thumb {
  background: var(--line2, var(--ds-border-2));
  border-radius: 999px;
}

html.os-live.doc-static .ds-drawer-panel > .ds-tabs.ds-drawer-tabs button {
  flex: 0 0 auto;
  scroll-snap-align: start;
  min-height: 36px;
  height: 36px;
  padding: 0 10px;
  font-size: 0.8125rem;
  font-weight: 650;
  white-space: nowrap;
  border-radius: 8px;
  border: 1px solid transparent;
  box-shadow: none;
}

html.os-live[data-theme="light"] .ds-drawer-panel > .ds-tabs.ds-drawer-tabs {
  background: var(--card2) !important;
  border-bottom-color: var(--line) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel > .ds-tabs.ds-drawer-tabs button {
  background: transparent !important;
  color: var(--ink2) !important;
  border-color: transparent !important;
  -webkit-text-fill-color: var(--ink2) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel > .ds-tabs.ds-drawer-tabs button:hover {
  background: var(--card) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel > .ds-tabs.ds-drawer-tabs button.active {
  background: var(--teal-t, #eef8f5) !important;
  color: var(--teal-d, #0e7a68) !important;
  -webkit-text-fill-color: var(--teal-d, #0e7a68) !important;
  font-weight: 700;
  box-shadow: none;
  border-color: var(--teal-t2, #c6eae1) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-h .ds-btn[data-close],
html.os-live[data-theme="light"] .ds-drawer-h > .ds-btn.ds-btn-outline[data-close] {
  background: var(--card) !important;
  color: var(--ink2) !important;
  border: 1.5px solid var(--line2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-h .ds-btn[data-close]:hover:not(:disabled),
html.os-live[data-theme="light"] .ds-drawer-h > .ds-btn.ds-btn-outline[data-close]:hover:not(:disabled) {
  background: var(--teal-t, #eef8f5) !important;
  color: var(--teal-d, #0e7a68) !important;
  border-color: var(--teal, #14967f) !important;
  -webkit-text-fill-color: var(--teal-d, #0e7a68) !important;
}

html.os-live[data-theme="light"] .ds-drawer-panel .ds-drawer-h .ds-btn[data-close]:focus-visible,
html.os-live[data-theme="light"] .ds-drawer-h > .ds-btn.ds-btn-outline[data-close]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 150, 127, 0.28);
}

html.os-live.doc-static .cos-row-actions {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

html.os-live.doc-static .cos-row-menu-btn {
  min-width: 36px;
  padding: 0 8px;
  letter-spacing: 0.12em;
}

html.os-live.doc-static .cos-row-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 40;
  min-width: 168px;
  padding: 6px;
  background: var(--card, var(--ds-surface));
  border: 1px solid var(--line, var(--ds-border));
  border-radius: var(--r, 12px);
  box-shadow: var(--sh2, var(--ds-shadow-md));
}

html.os-live.doc-static .cos-row-menu[hidden] {
  display: none !important;
}

html.os-live.doc-static .cos-row-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  color: inherit;
}

html.os-live.doc-static .cos-row-menu button:hover {
  background: var(--card2, var(--ds-surface-2));
}

html.os-live.doc-static .cos-row-menu button.danger {
  color: var(--ds-danger, #b42318);
}

html.os-live.doc-static .cos-row-menu button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── os-live: force light teleported modals (beat doc-static dark leaks) ── */
html.os-live.doc-static .dma-modal,
html.os-live.doc-static .dma-modal--wizard,
html.os-live.doc-static .ds-modal,
html.os-live.doc-static[data-theme="dark"] .dma-modal,
html.os-live.doc-static[data-theme="dark"] .dma-modal--wizard,
html.os-live.doc-static[data-theme="dark"] .ds-modal {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live.doc-static .dma-modal-h,
html.os-live.doc-static .dma-modal-f,
html.os-live.doc-static .dma-modal-b,
html.os-live.doc-static[data-theme="dark"] .dma-modal-h,
html.os-live.doc-static[data-theme="dark"] .dma-modal-f,
html.os-live.doc-static[data-theme="dark"] .dma-modal-b {
  background: var(--card) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live.doc-static .dma-modal-f,
html.os-live.doc-static[data-theme="dark"] .dma-modal-f {
  background: var(--card2) !important;
}

html.os-live .cos-book .cos-stepper-meta,
html.os-live .cos-wizard.cos-book .cos-stepper-meta {
  color: var(--ink2) !important;
}

html.os-live .cos-book .cos-pick-item,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-item,
html.os-live.doc-static[data-theme="dark"] .cos-wizard .cos-pick-item {
  background: var(--card) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

html.os-live .cos-book .cos-pick-item:hover,
html.os-live .cos-book .cos-pick-item.on,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-item:hover,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-item.on {
  background: var(--teal-t, #eef8f5) !important;
  border-color: var(--teal-d, #0e7a68) !important;
}

html.os-live .cos-book .cos-pick-name,
html.os-live .cos-book .cos-pick-copy strong,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-name,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-copy strong {
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  opacity: 1 !important;
}

html.os-live .cos-book .cos-pick-sub,
html.os-live .cos-book .cos-pick-copy span,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-sub,
html.os-live.doc-static[data-theme="dark"] .cos-book .cos-pick-copy span {
  color: var(--mut) !important;
  -webkit-text-fill-color: var(--mut) !important;
  opacity: 1 !important;
}

html.os-live .cos-book-search-wrap {
  position: relative;
}

html.os-live .cos-book-search-wrap > svg.i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--mut);
  pointer-events: none;
}

html.os-live .cos-book-search-wrap .dma-search {
  width: 100%;
  padding-left: 40px !important;
  background: var(--card) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
}

html.os-live .mo .md,
html.os-live .mo .mbd {
  background: var(--card) !important;
  color: var(--ink) !important;
}

html.os-live .mo .iw .inp {
  padding-left: 38px !important;
}

html.os-live .mo .iw > svg.i {
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

html.os-live .mo .slot .b,
html.os-live .mo .slot .sm {
  color: var(--ink) !important;
}

html.os-live .mo .slot .xs.mut {
  color: var(--mut) !important;
}

/* Leads list + preview — full width empty state */
html.os-live .pg.os-live-mount .dma-inbox--leads {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  width: 100%;
  min-height: min(560px, calc(100vh - 220px));
}

html.os-live .pg.os-live-mount .dma-inbox--leads.is-empty {
  grid-template-columns: 1fr;
  min-height: auto;
}

html.os-live .pg.os-live-mount .dma-inbox--leads.is-empty .dma-thread {
  display: none !important;
}

html.os-live .pg.os-live-mount .dma-inbox--leads.is-empty .dma-inbox-list {
  border-right: none;
}

html.os-live .pg.os-live-mount .dma-inbox--leads.is-empty .cos-empty {
  max-width: 520px;
  margin: 0 auto;
}

html.os-live .pg.os-live-mount .dma-inbox--leads .dma-inbox-list,
html.os-live .pg.os-live-mount .dma-inbox--leads .dma-thread {
  min-width: 0;
}

/* Patients / messages list + preview rail inside live mount */
html.os-live .pg.os-live-mount .dma-inbox--patients,
html.os-live .pg.os-live-mount .dma-inbox--messages {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 16px;
  align-items: start;
  width: 100%;
  min-height: min(560px, calc(100vh - 220px));
}

html.os-live .pg.os-live-mount .dma-inbox--patients .dma-inbox-list,
html.os-live .pg.os-live-mount .dma-inbox--patients .dma-thread,
html.os-live .pg.os-live-mount .dma-inbox--patients .cos-preview,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-list,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread {
  min-width: 0;
}

html.os-live .pg.os-live-mount .dma-inbox--patients .cos-preview,
html.os-live .pg.os-live-mount .dma-inbox--patients .dma-thread,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow: auto;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r, 16px) !important;
  box-shadow: var(--sh);
  color: var(--ink) !important;
}

html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .cos-preview,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .dma-thread,
html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--messages .dma-thread {
  background: var(--card) !important;
  color: var(--ink) !important;
}

/* Inbox — 3-pane (list | thread | context rail), light OS live panels */
html.os-live .pg.os-live-mount .dma-inbox--messages {
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(220px, 280px);
  gap: 12px;
  align-items: stretch;
  min-height: min(560px, calc(100vh - 220px));
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-list,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx {
  background: var(--card) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r, 16px) !important;
  box-shadow: var(--sh);
  min-width: 0;
  min-height: 0;
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx {
  padding: 16px;
  align-self: stretch;
  overflow: auto;
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx .dma-hint,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx strong {
  color: var(--ink2) !important;
  -webkit-text-fill-color: var(--ink2) !important;
  font-size: 14px;
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-list {
  overflow: auto;
  max-height: calc(100vh - 200px);
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread-m {
  flex: 1;
  overflow: auto;
  padding: 12px 16px;
  font-size: 14px;
}

html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread-h,
html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread-c {
  background: var(--card2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}

html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-inbox--messages .dma-inbox-list,
html.os-live.doc-static[data-theme="dark"] .pg.os-live-mount .dma-inbox--messages .dma-thread {
  background: var(--card) !important;
  color: var(--ink) !important;
  -webkit-text-fill-color: var(--ink) !important;
  border-color: var(--line) !important;
}

@media (max-width: 1024px) {
  html.os-live .pg.os-live-mount .dma-inbox--patients,
  html.os-live .pg.os-live-mount .dma-inbox--messages {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  html.os-live .pg.os-live-mount .dma-inbox--messages .dma-inbox-ctx {
    display: none;
  }

  html.os-live .pg.os-live-mount .dma-inbox--messages.thread-open .dma-inbox-ctx {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10145;
    max-height: none;
    border-radius: 0 !important;
    transform: translateX(100%);
    transition: transform 0.22s ease;
  }

  html.os-live .pg.os-live-mount .dma-inbox--messages.ctx-open .dma-inbox-ctx {
    transform: translateX(0);
  }

  html.os-live .pg.os-live-mount .dma-inbox--patients .cos-preview,
  html.os-live .pg.os-live-mount .dma-inbox--patients .dma-thread,
  html.os-live .pg.os-live-mount .dma-inbox--messages .dma-thread {
    position: fixed;
    inset: 0;
    z-index: 10140;
    max-height: none;
    border-radius: 0 !important;
    transform: translateX(100%);
    transition: transform 0.22s ease;
  }

  html.os-live .pg.os-live-mount .dma-inbox--patients.preview-open .cos-preview,
  html.os-live .pg.os-live-mount .dma-inbox--patients.preview-open .dma-thread,
  html.os-live .pg.os-live-mount .dma-inbox--patients.thread-open .dma-thread,
  html.os-live .pg.os-live-mount .dma-inbox--messages.thread-open .dma-thread {
    transform: translateX(0);
  }
}

/* Settings working hours — 6-column row matches dma-doctor-pages markup */
html.os-live[data-theme="light"] .pg.os-live-mount .ds-hours-row,
html.os-live .pg.os-live-mount .ds-hours-row {
  display: grid;
  grid-template-columns: minmax(88px, 112px) minmax(48px, 64px) minmax(7.5rem, 1fr) auto minmax(7.5rem, 1fr) auto;
  gap: 8px 12px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r2, 10px);
}

html.os-live .pg.os-live-mount .ds-hours-row strong {
  grid-column: auto;
}

html.os-live .pg.os-live-mount .ds-hours-row .dma-hint {
  text-align: center;
  padding: 0 4px;
}

html.os-live .pg.os-live-mount .ds-hours-row input[type="time"] {
  min-width: 0;
  width: 100%;
  max-width: 9rem;
}

html.os-live .pg.os-live-mount .ds-hours-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--ink2);
}

/* Denser workspace tabs + filter pills */
html.os-live .pg.os-live-mount .ds-workspace-tabs,
html.os-live .pg.os-live-mount .wtabs {
  gap: 6px;
  margin-bottom: 12px;
}

html.os-live .pg.os-live-mount .ds-workspace-tabs a,
html.os-live .pg.os-live-mount .ds-workspace-tabs button,
html.os-live .pg.os-live-mount .wtabs a,
html.os-live .pg.os-live-mount .wtabs button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

html.os-live .pg.os-live-mount .dma-tabs {
  gap: 6px;
  margin-bottom: 12px;
}

html.os-live .pg.os-live-mount .dma-tabs button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12.5px;
}

html.os-live .pg.os-live-mount .cos-pt-toolbar {
  margin-bottom: 12px;
  padding: 10px 12px;
}

html.os-live .pg.os-live-mount .dma-kpi-grid,
html.os-live .pg.os-live-mount .cos-kpi-grid,
html.os-live .pg.os-live-mount .dma-grid-4 {
  gap: 10px;
}

@media (max-width: 900px) {
  html.os-live .pg.os-live-mount .dma-inbox--leads {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 180px);
  }

  html.os-live .pg.os-live-mount .ds-hours-row {
    grid-template-columns: 1fr 1fr;
  }

  html.os-live .pg.os-live-mount .ds-hours-row strong {
    grid-column: 1 / -1;
  }

  html.os-live .pg.os-live-mount .ds-hours-row .ds-hours-state {
    grid-column: 1 / -1;
  }

  html.os-live .pg.os-live-mount .ds-hours-row label {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .pg.os-live-mount {
    padding: 4px 12px 20px;
  }

  html.os-live .pg.os-live-mount .dma-head {
    margin-bottom: 12px;
  }

  html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-h,
  html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-h,
  html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel-h {
    padding: 12px 14px 10px;
  }

  html.os-live[data-theme="light"] .pg.os-live-mount .dma-section-b,
  html.os-live[data-theme="light"] .pg.os-live-mount .ds-section-b,
  html.os-live[data-theme="light"] .pg.os-live-mount .dma-panel-b {
    padding: 10px 14px 14px;
    gap: 12px;
  }

  html.os-live[data-theme="light"] .pg.os-live-mount .cos-profile-hero {
    padding: 14px 16px;
  }

  html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .cos-preview,
  html.os-live[data-theme="light"] .pg.os-live-mount .dma-inbox--patients .dma-thread {
    padding: 12px 14px;
  }

  html.os-live .pg.os-live-mount .ds-workspace-tabs a,
  html.os-live .pg.os-live-mount .ds-workspace-tabs button,
  html.os-live .pg.os-live-mount .wtabs a,
  html.os-live .pg.os-live-mount .wtabs button,
  html.os-live .pg.os-live-mount .dma-tabs button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  html.os-live .pg.os-live-mount .cos-empty {
    padding: 20px 16px;
  }

  html.os-live.doc-static .dma-modal--wizard {
    width: calc(100vw - 16px);
    max-height: 92vh;
  }

  html.os-live .cos-book .cos-pick-list {
    max-height: min(280px, 38vh);
  }
}

@media (min-width: 768px) {
  html.os-live .pg.os-live-mount .dma-kpi-grid,
  html.os-live .pg.os-live-mount .cos-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

/* ═══ v18: mobile density — overflow guard + scrollable tab rows ═══ */
html.os-live {
  overflow-x: clip;
  max-width: 100vw;
}

html.os-live .app,
html.os-live.doc-static .app,
html.os-live.sa-static .app {
  max-width: 100vw;
  overflow-x: clip;
}

html.os-live .app > .main,
html.os-live.doc-static .main,
html.os-live.sa-static .main,
html.os-live .pg,
html.os-live #pg,
html.os-live .pg.os-live-mount,
html.os-live .pg.os-live-mount .doc-main,
html.os-live .pg.os-live-mount #doc-page,
html.os-live .pg.os-live-mount .dma-clinic-canvas {
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

html.os-live .pg.os-live-mount .doc-main > *,
html.os-live .pg.os-live-mount #doc-page > * {
  min-width: 0;
  max-width: 100%;
}

html.os-live .pg.os-live-mount .cos-profile-hero,
html.os-live .pg.os-live-mount .cos-profile-hero .dma-head-actions {
  min-width: 0;
  max-width: 100%;
}

html.os-live .pg.os-live-mount .cos-profile-hero .dma-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html.os-live .pg.os-live-mount .cos-profile-hero .dma-head-actions .dma-btn {
  min-height: 36px;
  padding: 0 10px;
  font-size: 12px;
}

@media (max-width: 1023px) {
  html.os-live .pg.os-live-mount {
    padding: 4px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  html.os-live .pg.os-live-mount .dma-head {
    margin-bottom: 10px;
  }

  html.os-live .pg.os-live-mount .cos-profile-hero {
    padding: 12px 14px;
    margin-bottom: 10px;
    gap: 10px;
    border-radius: var(--r, 14px);
  }

  html.os-live .pg.os-live-mount .cos-profile-hero .dma-avatar {
    width: 52px;
    height: 52px;
    font-size: 1rem;
    flex-shrink: 0;
  }

  html.os-live .pg.os-live-mount .cos-profile-hero h1,
  html.os-live .pg.os-live-mount .cos-profile-hero h2 {
    font-size: 1.125rem !important;
    line-height: 1.25;
    margin: 4px 0 2px !important;
  }

  html.os-live .pg.os-live-mount .cos-profile-hero .dma-hint {
    font-size: 12px;
    line-height: 1.35;
  }

  html.os-live .pg.os-live-mount .dma-section-h,
  html.os-live .pg.os-live-mount .ds-section-h {
    padding: 10px 12px 8px;
  }

  html.os-live .pg.os-live-mount .dma-section-b,
  html.os-live .pg.os-live-mount .ds-section-b {
    padding: 8px 12px 12px;
    gap: 10px;
  }

  html.os-live .pg.os-live-mount .dma-section-b .dma-field label {
    font-size: 11px;
    margin-bottom: 4px;
  }

  html.os-live .pg.os-live-mount .dma-section-b .dma-field > div {
    font-size: 13px;
  }

  /* Horizontal scroll tab rows + right fade */
  html.os-live .pg.os-live-mount .cos-wtabs,
  html.os-live .pg.os-live-mount .ds-workspace-tabs,
  html.os-live .pg.os-live-mount .wtabs,
  html.os-live .pg.os-live-mount .cos-settings-nav,
  html.os-live .pg.os-live-mount .dma-tabs,
  html.os-live .pg.os-live-mount nav.dma-tabs {
    position: relative;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 6px;
    margin-bottom: 10px;
    padding: 2px 0 6px;
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 22px), transparent 100%);
    mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 22px), transparent 100%);
  }

  html.os-live .pg.os-live-mount .cos-wtabs::-webkit-scrollbar,
  html.os-live .pg.os-live-mount .ds-workspace-tabs::-webkit-scrollbar,
  html.os-live .pg.os-live-mount .wtabs::-webkit-scrollbar,
  html.os-live .pg.os-live-mount .cos-settings-nav::-webkit-scrollbar,
  html.os-live .pg.os-live-mount .dma-tabs::-webkit-scrollbar,
  html.os-live .pg.os-live-mount nav.dma-tabs::-webkit-scrollbar {
    display: none;
  }

  html.os-live .pg.os-live-mount .cos-wtabs a,
  html.os-live .pg.os-live-mount .cos-wtabs button,
  html.os-live .pg.os-live-mount .ds-workspace-tabs a,
  html.os-live .pg.os-live-mount .ds-workspace-tabs button,
  html.os-live .pg.os-live-mount .wtabs a,
  html.os-live .pg.os-live-mount .wtabs button,
  html.os-live .pg.os-live-mount .cos-settings-nav button,
  html.os-live .pg.os-live-mount .dma-tabs button,
  html.os-live .pg.os-live-mount .dma-tabs a.dma-tab,
  html.os-live .pg.os-live-mount nav.dma-tabs a.dma-tab {
    flex: 0 0 auto;
    white-space: nowrap;
    min-height: 32px;
    height: auto;
    padding: 8px 12px;
    font-size: 12.5px;
  }

  html.os-live .pg.os-live-mount .cos-pt-toolbar {
    min-width: 0;
    max-width: 100%;
  }

  html.os-live .pg.os-live-mount .cos-pt-toolbar .dma-tabs {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  html.os-live .pg.os-live-mount {
    padding: 2px 10px calc(12px + env(safe-area-inset-bottom, 0px));
  }

  html.os-live .pg.os-live-mount .cos-profile-hero {
    padding: 10px 12px;
    gap: 8px;
  }

  html.os-live .pg.os-live-mount .cos-profile-hero .dma-avatar {
    width: 44px;
    height: 44px;
    font-size: 0.875rem;
  }

  html.os-live .pg.os-live-mount .cos-profile-hero h1,
  html.os-live .pg.os-live-mount .cos-profile-hero h2 {
    font-size: 1.0625rem !important;
  }

  html.os-live .pg.os-live-mount .cos-wtabs,
  html.os-live .pg.os-live-mount .ds-workspace-tabs,
  html.os-live .pg.os-live-mount .wtabs,
  html.os-live .pg.os-live-mount .cos-settings-nav,
  html.os-live .pg.os-live-mount .dma-tabs,
  html.os-live .pg.os-live-mount nav.dma-tabs {
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 10px;
    gap: 4px;
    padding-bottom: 4px;
  }

  html.os-live .pg.os-live-mount .cos-wtabs a,
  html.os-live .pg.os-live-mount .cos-wtabs button,
  html.os-live .pg.os-live-mount .ds-workspace-tabs a,
  html.os-live .pg.os-live-mount .ds-workspace-tabs button,
  html.os-live .pg.os-live-mount .wtabs a,
  html.os-live .pg.os-live-mount .wtabs button,
  html.os-live .pg.os-live-mount .cos-settings-nav button,
  html.os-live .pg.os-live-mount .dma-tabs button,
  html.os-live .pg.os-live-mount .dma-tabs a.dma-tab,
  html.os-live .pg.os-live-mount nav.dma-tabs a.dma-tab {
    scroll-snap-align: start;
    min-height: 30px;
    padding: 8px;
    font-size: 12px;
    font-weight: 650;
  }
}
