

.voice-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.voice-toggle-btn:hover {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}

.voice-toggle-btn.voice-active {
  border-color: #dc3545;
  background: rgba(220,53,69,.15);
  color: #dc3545;
  animation: voicePulse 1.5s ease infinite;
}

@keyframes voicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,53,69,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(220,53,69,0); }
}


.voice-indicator {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.voice-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px;
}

.voice-wave-bar {
  width: 3px;
  height: 8px;
  background: #dc3545;
  border-radius: 2px;
  transition: height .15s ease;
}

.voice-wave-bar.animating {
  animation: waveBar .6s ease infinite alternate;
}
.voice-wave-bar.animating:nth-child(1) { animation-delay: 0s; }
.voice-wave-bar.animating:nth-child(2) { animation-delay: .1s; }
.voice-wave-bar.animating:nth-child(3) { animation-delay: .2s; }
.voice-wave-bar.animating:nth-child(4) { animation-delay: .15s; }
.voice-wave-bar.animating:nth-child(5) { animation-delay: .05s; }
.voice-wave-bar.animating:nth-child(6) { animation-delay: .25s; }
.voice-wave-bar.animating:nth-child(7) { animation-delay: .12s; }
.voice-wave-bar.animating:nth-child(8) { animation-delay: .08s; }

@keyframes waveBar {
  0% { height: 4px; }
  100% { height: 22px; }
}

.voice-live-preview {
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-style: italic;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.voice-stop-btn {
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  background: #dc3545;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.voice-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #343a40;
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  z-index: 10000;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.voice-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


.survey-voice-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}

.survey-voice-trigger:hover {
  color: #dc3545;
  border-color: #dc3545;
  background: rgba(220,53,69,.05);
}

.survey-voice-trigger svg {
  width: 16px;
  height: 16px;
}


.cmd-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  animation: fadeIn .15s ease;
}

.cmd-palette {
  width: 90%;
  max-width: 640px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 0 1px rgba(0,0,0,.08);
  overflow: hidden;
  animation: slideDown .2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cmd-palette-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #e9ecef;
}

.cmd-palette-icon {
  color: #6c757d;
  display: flex;
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: var(--adm-font);
  color: #343a40;
  background: transparent;
}

.cmd-palette-input::placeholder {
  color: #adb5bd;
  font-size: 14px;
}

.cmd-palette-kbd {
  font-size: 10px;
  font-weight: 700;
  color: #adb5bd;
  background: #f8f9fa;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #e9ecef;
}

.cmd-palette-results {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px 0;
}

.cmd-palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .1s;
}

.cmd-palette-item:hover,
.cmd-palette-item.selected {
  background: #f0f4ff;
}

.cmd-item-label {
  font-size: 14px;
  font-weight: 600;
  color: #343a40;
}

.cmd-item-hint {
  font-size: 13px;
  color: #adb5bd;
}

.cmd-palette-empty {
  padding: 24px 18px;
  text-align: center;
  color: #adb5bd;
  font-size: 14px;
}

.cmd-palette-footer {
  display: flex;
  gap: 16px;
  padding: 8px 18px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  font-size: 11px;
  color: #adb5bd;
}

.cmd-palette-footer kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  margin-right: 3px;
  font-family: var(--adm-font);
}


.navbar-cmdk-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 6px;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  cursor: pointer;
  transition: all .2s;
  font-family: var(--adm-font);
}

.navbar-cmdk-hint:hover {
  background: rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
}

.navbar-cmdk-hint kbd {
  font-size: 10px;
  font-weight: 700;
  background: rgba(255,255,255,.15);
  padding: 1px 5px;
  border-radius: 3px;
  color: rgba(255,255,255,.6);
}


.pdf-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: var(--adm-font);
  transition: all .2s;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.pdf-export-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220,53,69,.3);
}

.pdf-export-btn svg {
  width: 16px;
  height: 16px;
}


.shap-legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
  font-size: 12px;
  color: #6c757d;
}

.shap-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.shap-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}


.tt-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 12px;
}

.tt-summary-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--adm-body-bg);
  font-weight: 700;
  color: var(--adm-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-bottom: 2px solid var(--adm-border);
}

.tt-summary-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--adm-border);
  color: var(--adm-dark);
}

.tt-summary-table tr:hover td {
  background: var(--adm-body-bg);
}


.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}


.ideas-panel { margin-bottom: 16px; }


.trials-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius);
  overflow: hidden;
}
.trials-table thead th {
  background: var(--adm-body-bg);
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--adm-dark);
  border-bottom: 2px solid var(--adm-border);
  white-space: nowrap;
}
.trials-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--adm-border);
  vertical-align: middle;
}
.trials-table tbody tr:hover { background: var(--adm-body-bg); }
.trials-table tbody tr:last-child td { border-bottom: none; }
.nct-id { font-family: var(--adm-font-mono); font-weight: 600; color: var(--adm-primary); font-size: 12px; white-space: nowrap; }
.criteria-cell { font-size: 12px; color: var(--adm-muted); max-width: 220px; }
.trial-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--adm-radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.status-recruiting { background: #e8f5e9; color: #2e7d32; }
.status-active { background: #fff3e0; color: #e65100; }
.match-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}
.match-bar span { font-size: 12px; font-weight: 600; min-width: 32px; }
.match-fill {
  height: 8px;
  border-radius: var(--adm-radius-sm);
  transition: width 0.6s ease;
}
.match-high { background: linear-gradient(90deg, #43a047, #66bb6a); }
.match-mid  { background: linear-gradient(90deg, #ffa726, #ffcc02); }
.match-low  { background: linear-gradient(90deg, #ef5350, #ff7043); }
.match-none { background: #ccc; }


.ideas-detail-panel { margin-top: 16px; }
.drug-detail-card {
  background: #fffde7;
  border-left: 4px solid #ffa726;
  border-radius: var(--adm-radius);
  padding: 14px 18px;
}
.drug-detail-card h4 { margin: 0 0 6px; color: #e65100; }
.drug-detail-card p { margin: 4px 0; font-size: 13px; }
.drug-detail-rec { color: var(--adm-muted); font-style: italic; }


.biomarker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.biomarker-card {
  background: var(--adm-white);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius-lg);
  padding: 14px 16px;
  transition: box-shadow var(--adm-transition);
}
.biomarker-card:hover { box-shadow: var(--adm-card-hover-shadow); }
.biomarker-alert { border-color: #ef5350; background: #fff5f5; }
.biomarker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.biomarker-name { font-weight: 600; font-size: 13px; color: var(--adm-dark); }
.biomarker-trend {
  font-size: 1.2rem;
  font-weight: 700;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.trend-good { color: #2e7d32; background: #e8f5e9; }
.trend-bad  { color: #c62828; background: #ffebee; }
.trend-flat { color: #f57f17; background: #fff8e1; }
.biomarker-value { font-size: 22px; font-weight: 700; color: var(--adm-dark); }
.biomarker-value small { font-size: 11px; color: #888; font-weight: 400; }
.biomarker-ref { font-size: 11px; color: #999; margin: 2px 0 8px; }
.biomarker-sparkline { margin-top: 4px; }
.sparkline-svg { display: block; width: 100%; }
.biomarker-months {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #bbb;
  margin-top: 2px;
}


[data-theme="dark"] {
  --adm-body-bg: #0f1117;
  --adm-dark: #e0e0e0;
  --adm-white: #1a1b23;
  --adm-light: #23242d;
  --adm-border: #2d2e3a;
  --adm-muted: #a0a0b0;
  --adm-card-shadow: 0 1px 3px rgba(0,0,0,.3), 0 0 0 1px rgba(255,255,255,.04);
  --adm-card-hover-shadow: 0 4px 16px rgba(0,0,0,.4);
  --adm-modal-shadow: 0 16px 48px rgba(0,0,0,.5);
}

[data-theme="dark"] body {
  color: #e0e0e0;
  background: #0f1117;
}

[data-theme="dark"] .adm-content-header h1,
[data-theme="dark"] .welcome-title,
[data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4 {
  color: #f0f0f0;
}

[data-theme="dark"] .adm-info-box,
[data-theme="dark"] .quick-action-card,
[data-theme="dark"] .tab-card,
[data-theme="dark"] .adm-card {
  background: #1a1b23;
  border-color: #2d2e3a;
}

[data-theme="dark"] .quick-action-card:hover,
[data-theme="dark"] .tab-card:hover {
  background: #22232e;
}

[data-theme="dark"] .welcome-hero {
  background: linear-gradient(135deg, #0d1b3e 0%, #162040 50%, #1a1040 100%);
}

[data-theme="dark"] .twin-layer {
  background: #1a1b23;
  border-color: #2d2e3a;
}

[data-theme="dark"] .twin-layer summary {
  background: #20212b;
}

[data-theme="dark"] .twin-layer summary:hover {
  background: #272835;
}

[data-theme="dark"] .twin-toc {
  background: #1a1b23;
  border-color: #2d2e3a;
}

[data-theme="dark"] .twin-layer-body {
  border-color: #2d2e3a;
}

[data-theme="dark"] .survey-overlay {
  background: #0f1117;
}

[data-theme="dark"] .survey-container {
  background: #1a1b23;
  border-color: #2d2e3a;
}

[data-theme="dark"] .clinical-disclaimer {
  background: #1c1a10;
  border-color: #3a3520;
  color: #d4c87a;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #23242d;
  color: #e0e0e0;
  border-color: #3a3b48;
}

[data-theme="dark"] .adm-tab-nav button {
  color: #a0a0b0;
}

[data-theme="dark"] .adm-tab-nav button.active {
  color: #fff;
  border-bottom-color: var(--adm-primary);
}

[data-theme="dark"] .adm-tab-panel {
  background: #12131a;
}

[data-theme="dark"] ::selection {
  background: rgba(13,110,253,.3);
  color: #fff;
}

[data-theme="dark"] .qa-results-body th {
  background: #1a1b23;
  color: #a0a0b0;
}

[data-theme="dark"] .qa-results-body td {
  color: #e0e0e0;
  border-color: #2d2e3a;
}

[data-theme="dark"] .qa-results-body tr:hover td {
  background: #22232e;
}

[data-theme="dark"] .adm-breadcrumb a { color: #6da3ff; }

[data-theme="dark"] .tab-filter-btn {
  background: #23242d;
  color: #a0a0b0;
  border-color: #2d2e3a;
}

[data-theme="dark"] .tab-filter-btn.active {
  background: var(--adm-primary);
  color: #fff;
}


[data-theme="dark"] .adm-table th {
  background: #1a1b23; color: #a0a0b0; border-bottom-color: #2d2e3a;
}
[data-theme="dark"] .adm-table td {
  color: #e0e0e0; border-bottom-color: #2d2e3a;
}
[data-theme="dark"] .adm-table tr:hover td { background: #22232e; }


[data-theme="dark"] .chart-container {
  background: #1a1b23; border-color: #2d2e3a;
}
[data-theme="dark"] .chart-container:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
[data-theme="dark"] .chart-section { color: #e0e0e0; }
[data-theme="dark"] .chart-section-header { color: #e0e0e0; }
[data-theme="dark"] .chart-section-number { color: #a0a0b0; }
[data-theme="dark"] .chart-section-title-text { color: #f0f0f0; }
[data-theme="dark"] .chart-section-desc { color: #a0a0b0; }


[data-theme="dark"] .tab-back-btn {
  background: #23242d; color: #a0a0b0; border-color: #2d2e3a;
}
[data-theme="dark"] .tab-back-btn:hover {
  color: #6da3ff; border-color: #6da3ff;
}


[data-theme="dark"] .btn {
  color: #e0e0e0;
}


[data-theme="dark"] .survey-step { color: #e0e0e0; }
[data-theme="dark"] .survey-step-title { color: #f0f0f0; }
[data-theme="dark"] .survey-step-desc { color: #a0a0b0; }
[data-theme="dark"] .survey-field label { color: #c0c0c0; }
[data-theme="dark"] .survey-nav .btn {
  background: #23242d; color: #a0a0b0; border: 1px solid #2d2e3a;
}
[data-theme="dark"] .survey-nav .btn:hover { background: #2d2e3a; }
[data-theme="dark"] .survey-nav .btn-primary { background: var(--adm-primary); color: #fff; border: none; }
[data-theme="dark"] .tab-survey-step-title { color: #f0f0f0; }
[data-theme="dark"] .tab-survey-subtitle { color: #a0a0b0; }
[data-theme="dark"] .tab-survey-check { color: #c0c0c0; }
[data-theme="dark"] .tab-survey-group-title { color: #e0e0e0; }


[data-theme="dark"] .navbar-link { color: #a0a0b0; }
[data-theme="dark"] .navbar-link:hover,
[data-theme="dark"] .navbar-link.active { color: #fff; }


[data-theme="dark"] p { color: #c0c0c0; }
[data-theme="dark"] label { color: #c0c0c0; }
[data-theme="dark"] .text-muted { color: #a0a0b0 !important; }


[data-theme="dark"] .status-pill { border-color: #2d2e3a; }


[data-theme="dark"] hr { border-color: #2d2e3a; }


[data-theme="dark"] ::-webkit-scrollbar { background: #0f1117; }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #3a3b48; border-radius: 4px; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #4a4b58; }


[data-theme="dark"] .twin-section-title { color: #f0f0f0; }
[data-theme="dark"] .twin-section-desc { color: #a0a0b0; }
[data-theme="dark"] .twin-layer-subtitle { color: #a0a0b0; }
[data-theme="dark"] .twin-anatomy-card { background: #1a1b23; border-color: #2d2e3a; }
[data-theme="dark"] .anatomy-legend { color: #c0c0c0; }


[data-theme="dark"] .pop-results-summary { background: #1a1b23; color: #e0e0e0; border-color: #2d2e3a; }


[data-theme="dark"] .tab-content-wrap { color: #e0e0e0; }
[data-theme="dark"] .tab-intake-wrap { color: #e0e0e0; }


[data-theme="dark"] .bg-light { background: #1a1b23 !important; }


[data-theme="dark"] .risk-label { color: #e0e0e0; }
[data-theme="dark"] .risk-desc { color: #a0a0b0; }


[data-theme="dark"] .welcome-desc { color: #a0a0b0; }
[data-theme="dark"] .ws-label { color: #a0a0b0; }
[data-theme="dark"] .ws-value { color: #e0e0e0; }
[data-theme="dark"] .ws-bar { background: #2d2e3a; }


[data-theme="dark"] #omni-pedigree-svg text { fill: #e0e0e0; }
[data-theme="dark"] #omni-risk-arc + text,
[data-theme="dark"] .omni-risk-dial text { fill: #e0e0e0; }


[data-theme="dark"] .dropdown-menu { background: #1a1b23; border-color: #2d2e3a; }
[data-theme="dark"] .dropdown-item { color: #e0e0e0; }
[data-theme="dark"] .dropdown-item:hover { background: #22232e; }


[data-theme="dark"] .progress { background: #2d2e3a; }


[data-theme="dark"] .kg-node-detail,
[data-theme="dark"] .epi-tooltip { background: #1a1b23; color: #e0e0e0; border-color: #2d2e3a; }


[data-theme="dark"] .lit-card,
[data-theme="dark"] .evidence-card { background: #1a1b23; color: #e0e0e0; border-color: #2d2e3a; }


[data-theme="dark"] input[readonly] { background: #23242d !important; color: #e0e0e0 !important; }


[data-theme="dark"] svg text { fill: #e0e0e0; }
[data-theme="dark"] svg line { stroke: #3a3b48; }
[data-theme="dark"] svg circle[fill="none"] { stroke: #a0a0b0; }


.survey-back-btn {
  background: #e9ecef; color: #495057;
}
.survey-back-btn:hover { background: #dee2e6; }
[data-theme="dark"] .survey-back-btn {
  background: #23242d; color: #a0a0b0; border: 1px solid #2d2e3a;
}
[data-theme="dark"] .survey-back-btn:hover { background: #2d2e3a; color: #e0e0e0; }
.survey-step-indicator {
  font-size: 11px; color: #6c757d;
}
[data-theme="dark"] .survey-step-indicator { color: #a0a0b0; }


.dark-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.2);
  background: transparent;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.dark-mode-btn:hover {
  border-color: rgba(255,255,255,.5);
  color: #fff;
}


.shortcut-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn .15s ease;
}

.shortcut-help-modal {
  background: var(--adm-white, #fff);
  border-radius: var(--adm-radius-lg, 12px);
  box-shadow: var(--adm-modal-shadow);
  width: 400px;
  max-width: 92vw;
  overflow: hidden;
}

.shortcut-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--adm-border, #dee2e6);
}

.shortcut-help-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.shortcut-help-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--adm-muted, #6c757d);
  line-height: 1;
  padding: 0 4px;
}

.shortcut-help-body {
  padding: 16px 20px 20px;
}

.shortcut-group {
  margin-bottom: 16px;
}

.shortcut-group:last-child { margin-bottom: 0; }

.shortcut-group h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--adm-muted, #6c757d);
  margin: 0 0 8px;
  font-weight: 700;
}

.shortcut-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
}

.shortcut-row kbd {
  display: inline-block;
  padding: 2px 7px;
  font-size: 11px;
  font-family: var(--adm-font-mono, monospace);
  background: var(--adm-light, #f8f9fa);
  border: 1px solid var(--adm-border, #dee2e6);
  border-radius: 4px;
  min-width: 22px;
  text-align: center;
}

.shortcut-row span {
  color: var(--adm-muted, #6c757d);
}


.export-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--adm-border, #dee2e6);
  border-radius: var(--adm-radius-sm, 6px);
  background: var(--adm-white, #fff);
  color: var(--adm-dark, #212529);
  cursor: pointer;
  transition: all var(--adm-transition, .2s ease);
}

.export-btn:hover {
  border-color: var(--adm-primary);
  color: var(--adm-primary);
  background: rgba(13,110,253,.04);
}


.ux-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--adm-dark, #212529);
  color: #fff;
  padding: 10px 24px;
  border-radius: var(--adm-radius-pill, 100px);
  font-size: 13px;
  font-weight: 600;
  z-index: 10001;
  opacity: 0;
  transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.ux-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


@media print {
  .adm-navbar,
  .voice-indicator,
  .clinical-disclaimer,
  .adm-content-header,
  .adm-info-boxes,
  .adm-tab-nav,
  .twin-toc,
  .twin-layer-controls,
  .survey-overlay,
  .adm-footer,
  .cmd-palette-overlay,
  .shortcut-help-overlay,
  .tour-overlay,
  .ux-toast,
  .dark-mode-btn,
  .voice-toggle-btn,
  .export-btn-group,
  .tab-filter-controls,
  .navbar-cmdk-hint,
  .skip-link,
  #welcome-dashboard,
  button {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .adm-card, .twin-layer, .adm-tab-panel {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }

  .twin-layer {
    break-inside: avoid;
  }

  .twin-layer[open] .twin-layer-body {
    display: block !important;
  }

  .adm-tab-panel {
    display: block !important;
    background: #fff !important;
  }

  .js-plotly-plot {
    page-break-inside: avoid;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}


.tour-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 10002;
  animation: fadeIn .2s ease;
}

.tour-highlight {
  position: fixed;
  border: 3px solid var(--adm-primary, #0d6efd);
  border-radius: var(--adm-radius, 8px);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.5);
  z-index: 10003;
  pointer-events: none;
  transition: all .3s ease;
}

.tour-tooltip {
  position: fixed;
  background: var(--adm-white, #fff);
  border-radius: var(--adm-radius-lg, 12px);
  box-shadow: var(--adm-modal-shadow);
  width: 340px;
  max-width: 90vw;
  z-index: 10004;
  padding: 0;
  overflow: hidden;
}

.tour-tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 0;
}

.tour-step-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-primary, #0d6efd);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.tour-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--adm-muted, #6c757d);
  line-height: 1;
  padding: 0;
}

.tour-tooltip-title {
  margin: 8px 16px 4px;
  font-size: 15px;
  font-weight: 700;
}

.tour-tooltip-text {
  margin: 0 16px 16px;
  font-size: 13px;
  color: var(--adm-muted, #6c757d);
  line-height: 1.5;
}

.tour-tooltip-actions {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--adm-border, #dee2e6);
  background: var(--adm-light, #f8f9fa);
}

.tour-btn {
  padding: 6px 16px;
  border-radius: var(--adm-radius-sm, 6px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--adm-border, #dee2e6);
  background: var(--adm-white, #fff);
  color: var(--adm-dark, #212529);
  transition: all .15s;
}

.tour-btn:hover { border-color: var(--adm-primary); color: var(--adm-primary); }

.tour-btn-next {
  background: var(--adm-primary, #0d6efd);
  color: #fff;
  border-color: var(--adm-primary, #0d6efd);
}

.tour-btn-next:hover {
  background: var(--adm-primary-dark, #0b5ed7);
  color: #fff;
}


.recent-patients-section {
  margin-top: 8px;
}

.recent-patients-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-muted, #6c757d);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.recent-patients-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.recent-patient-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--adm-white, #fff);
  border: 1px solid var(--adm-border, #dee2e6);
  border-radius: var(--adm-radius-pill, 100px);
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}

.recent-patient-chip:hover {
  border-color: var(--adm-primary);
  color: var(--adm-primary);
  background: rgba(13,110,253,.04);
}

.rp-id { font-weight: 600; }
.rp-time { font-size: 11px; color: var(--adm-muted, #6c757d); }
.recent-empty { font-size: 13px; color: var(--adm-muted, #6c757d); font-style: italic; }


.twin-toc-sentinel { height: 0; overflow: hidden; }

.twin-toc-sticky {
  position: sticky;
  top: 48px;
  z-index: 50;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}


.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--adm-primary, #0d6efd);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--adm-radius-sm, 6px);
  font-size: 13px;
  font-weight: 600;
  z-index: 99999;
  text-decoration: none;
  transition: top .15s;
}

.skip-link:focus {
  top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}


.skeleton-container {
  padding: 16px;
}

.skeleton-bar {
  border-radius: var(--adm-radius-sm, 6px);
  background: var(--adm-border, #dee2e6);
}

.skeleton-shimmer {
  background: linear-gradient(90deg,
    var(--adm-border, #dee2e6) 25%,
    rgba(255,255,255,.5) 50%,
    var(--adm-border, #dee2e6) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

[data-theme="dark"] .skeleton-bar { background: #2d2e3a; }
[data-theme="dark"] .skeleton-shimmer {
  background: linear-gradient(90deg, #2d2e3a 25%, #3a3b48 50%, #2d2e3a 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .shortcut-help-modal,
[data-theme="dark"] .tour-tooltip {
  background: #1a1b23;
  color: #e0e0e0;
}

[data-theme="dark"] .shortcut-help-header,
[data-theme="dark"] .tour-tooltip-actions {
  border-color: #2d2e3a;
}

[data-theme="dark"] .tour-tooltip-actions {
  background: #20212b;
}

[data-theme="dark"] .shortcut-row kbd {
  background: #23242d;
  border-color: #3a3b48;
  color: #e0e0e0;
}

[data-theme="dark"] .recent-patient-chip {
  background: #1a1b23;
  border-color: #2d2e3a;
  color: #e0e0e0;
}

[data-theme="dark"] .export-btn {
  background: #1a1b23;
  border-color: #2d2e3a;
  color: #e0e0e0;
}

[data-theme="dark"] .ux-toast {
  background: #e0e0e0;
  color: #1a1b23;
}


.error-banner {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #856404;
  animation: slideDown .3s ease;
}
.error-banner::before { content: '⚠️'; font-size: 18px; }
.error-banner button {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #856404;
  padding: 0 4px;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-theme="dark"] .error-banner {
  background: #332b00;
  border-color: #665500;
  color: #ffc107;
}


.inline-detail {
  margin-top: 8px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 13px;
}
.inline-detail summary {
  cursor: pointer;
  padding: 6px 10px;
  color: #6c757d;
  font-size: 12px;
  user-select: none;
}
.inline-detail summary:hover { color: var(--adm-primary, #0d6efd); }
.inline-detail p,
.inline-detail div {
  padding: 6px 10px 10px;
  margin: 0;
  color: #555;
  line-height: 1.5;
}
[data-theme="dark"] .inline-detail {
  background: #1a1b23;
  border-color: #2d2e3a;
}
[data-theme="dark"] .inline-detail summary { color: #888; }
[data-theme="dark"] .inline-detail p,
[data-theme="dark"] .inline-detail div { color: #aaa; }


.report-panel {
  margin-top: 16px;
  padding: 18px 20px;
  border-top: 2px solid var(--adm-primary, #4361ee);
  background: #fafbfc;
  border-radius: 0 0 10px 10px;
}
.report-panel h4 {
  margin: 16px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #333;
}
.report-panel h4:first-child { margin-top: 0; }
.report-panel .twin-detail-table td {
  font-size: 12.5px;
  line-height: 1.45;
}
[data-theme="dark"] .report-panel {
  background: #13141c;
  border-top-color: var(--adm-primary, #4361ee);
}
[data-theme="dark"] .report-panel h4 { color: #ccc; }


.pdf-report-btn {
  position: relative;
  border: 2px solid transparent;
  background-image: linear-gradient(#fff, #fff), linear-gradient(135deg, #e74c3c, #8e44ad);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.pdf-report-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.25);
}
.pdf-report-btn .qa-label { font-weight: 800; }
[data-theme="dark"] .pdf-report-btn {
  background-image: linear-gradient(#1a1b23, #1a1b23), linear-gradient(135deg, #e74c3c, #8e44ad);
}
