:root {
  --cp-bg: #f4f7fb;
  --cp-surface: rgba(255, 255, 255, 0.92);
  --cp-surface-strong: #ffffff;
  --cp-border: #dbe4f0;
  --cp-text: #102033;
  --cp-muted: #64748b;
  --cp-primary: #0f6cbd;
  --cp-primary-dark: #0d5ca1;
  --cp-sidebar: #0d1b2a;
  --cp-sidebar-soft: #13263a;
  --cp-sidebar-width: 280px;
  --cp-sidebar-width-compact: 240px;
  --cp-sidebar-bg: #0d2238;
  --cp-shadow: 0 18px 48px rgba(16, 32, 51, 0.08);
}

/* FT CLINIC PRO - core visual tokens and hard visual containment */
.theme-light {
  --bg-main: #f5f5f7;
  --bg-surface: rgba(255, 255, 255, 0.78);
  --bg-surface-elevated: #ffffff;
  --border-card: rgba(0, 0, 0, 0.06);
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-system: #0071e3;
  --accent-success: #34c759;
  --backdrop-blur: blur(20px);
}

.theme-dark {
  --bg-main: #0d1117;
  --bg-surface: rgba(22, 27, 34, 0.85);
  --bg-surface-elevated: #21262d;
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-system: #0a84ff;
  --accent-success: #34c759;
  --backdrop-blur: blur(20px);
}

body.theme-dark,
body.theme-light {
  --cp-bg: var(--bg-main);
  --cp-surface: var(--bg-surface);
  --cp-surface-strong: var(--bg-surface-elevated);
  --cp-border: var(--border-card);
  --cp-text: var(--text-primary);
  --cp-muted: var(--text-secondary);
  --cp-primary: var(--accent-system);
  background: var(--bg-main) !important;
  color: var(--text-primary);
}

.theme-dark .cp-panel,
.theme-dark .cp-card,
.theme-dark .cp-stat-card,
.theme-dark .cp-modal-panel,
.theme-dark .cp-table-shell,
.theme-dark .cp-empty-state,
.theme-dark .cp-flow-empty,
.theme-dark .cp-search-empty,
.theme-light .cp-panel,
.theme-light .cp-card,
.theme-light .cp-stat-card,
.theme-light .cp-modal-panel,
.theme-light .cp-table-shell,
.theme-light .cp-empty-state,
.theme-light .cp-flow-empty,
.theme-light .cp-search-empty {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
  border-radius: 16px;
  backdrop-filter: var(--backdrop-blur);
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-dark .modal-content,
.theme-light .form-control,
.theme-light .form-select,
.theme-light .modal-content {
  background: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
  border-radius: 12px;
}

.theme-dark .table,
.theme-light .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-card);
  --bs-table-hover-bg: color-mix(in srgb, var(--accent-system) 12%, transparent);
  color: var(--text-primary) !important;
  margin-bottom: 0;
}

.theme-dark .table td,
.theme-dark .table th,
.theme-light .table td,
.theme-light .table th {
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
  background: transparent !important;
  vertical-align: middle;
}

.theme-dark .text-muted,
.theme-dark .form-text,
.theme-dark small,
.theme-light .text-muted,
.theme-light .form-text,
.theme-light small {
  color: var(--text-secondary) !important;
}

.cp-table-shell,
.table-responsive {
  overflow-x: auto;
  max-width: 100%;
  border-radius: 16px;
}

.cp-table-shell td,
.cp-table-shell th,
.table-responsive td,
.table-responsive th {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cp-log-table code,
.cp-table-shell code {
  color: color-mix(in srgb, var(--accent-system) 65%, var(--text-primary)) !important;
  background: color-mix(in srgb, var(--bg-surface-elevated) 72%, transparent) !important;
  border: 1px solid var(--border-card);
  border-radius: 8px;
  padding: 0.08rem 0.25rem;
  white-space: pre-wrap;
  word-break: break-all;
}

.cp-status-badge,
.badge {
  border-radius: 999px;
  border: 1px solid var(--border-card);
}

.cp-quota-line {
  font-size: 0.76rem;
  white-space: nowrap;
}

.cp-quota-line.is-over {
  color: #ff6b6b;
  font-weight: 700;
}

.cp-master-grid {
  font-size: 0.78rem;
}

.cp-master-grid th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.cp-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.cp-chart-box,
.cp-attachment-list {
  background: color-mix(in srgb, var(--bg-surface-elevated) 75%, transparent);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 1rem;
  min-width: 0;
}

.cp-analytics-filter {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr)) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
  padding: 0.9rem;
  background: color-mix(in srgb, var(--bg-surface-elevated) 78%, transparent);
  border: 1px solid var(--border-card);
  border-radius: 12px;
  backdrop-filter: var(--backdrop-blur);
}

.cp-telegram-alert-strip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 72%, transparent);
  backdrop-filter: var(--backdrop-blur);
}

.cp-analytics-filter label {
  display: grid;
  gap: 0.3rem;
  margin: 0;
  min-width: 0;
}

.cp-analytics-filter label span {
  color: var(--cp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cp-analytics-kpis {
  grid-template-columns: repeat(9, minmax(0, 1fr));
}

.cp-analytics-grid-main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.cp-chart-box {
  min-height: 290px;
}

.cp-chart-box canvas {
  width: 100% !important;
  height: 218px !important;
}

.cp-chart-box-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 410px;
}

.cp-chart-box-large canvas {
  height: 328px !important;
}

.cp-chart-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  margin-bottom: 0.75rem;
}

.cp-chart-heading h2 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
}

.cp-chart-heading p {
  margin: 0.15rem 0 0;
  color: var(--cp-muted);
  font-size: 0.78rem;
}

.cp-chart-heading i {
  color: var(--accent-system);
  font-size: 1.1rem;
}

.cp-analytics-table th {
  font-size: 0.68rem;
  text-transform: uppercase;
}

.cp-analytics-modules {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-module-pill {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 24px;
  padding: 0 0.45rem;
  border-radius: 8px;
  color: #fff;
  background: var(--accent-system);
  font-weight: 800;
  font-size: 0.76rem;
}

.cp-infra-panel {
  align-self: start;
}

.cp-infra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.cp-infra-grid div,
.cp-security-row {
  padding: 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 72%, transparent);
}

.cp-infra-grid span,
.cp-security-list h3 {
  display: block;
  color: var(--cp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cp-infra-grid strong {
  display: block;
  margin-top: 0.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-security-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.5rem;
}

.cp-security-list h3 {
  margin: 0;
}

.cp-security-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.cp-telegram-state {
  display: grid;
  gap: 0.15rem;
  padding: 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 72%, transparent);
}

.cp-telegram-state span {
  color: var(--cp-muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cp-telegram-state small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-ticket-board {
  display: grid;
  gap: 1rem;
}

.cp-ticket-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 78%, transparent);
  backdrop-filter: var(--backdrop-blur);
}

.cp-ticket-card-header,
.cp-ticket-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.cp-ticket-card-header h2 {
  margin: 0.45rem 0 0;
  font-size: 1rem;
  line-height: 1.25;
}

.cp-ticket-card-header p {
  margin: 0.2rem 0 0;
  color: var(--cp-muted);
  font-size: 0.78rem;
}

.cp-ticket-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.cp-ticket-meta div,
.cp-ticket-response {
  padding: 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 70%, transparent);
}

.cp-ticket-meta span,
.cp-ticket-response span {
  display: block;
  color: var(--cp-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.cp-ticket-meta strong {
  display: block;
  margin-top: 0.18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-ticket-details {
  color: var(--cp-text);
  font-size: 0.86rem;
}

.cp-ticket-details summary {
  cursor: pointer;
  color: var(--accent-system);
  font-weight: 700;
}

.cp-ticket-details p,
.cp-ticket-response p {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
}

.cp-ticket-response small {
  display: block;
  margin-top: 0.4rem;
}

.cp-ticket-actions {
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto;
  align-items: end;
}

.cp-ticket-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border-card);
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 72%, transparent);
}

.cp-support-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
  align-items: start;
}

.cp-support-form {
  display: grid;
  gap: 1rem;
}

.cp-priority-field {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.cp-priority-field legend {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--cp-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.cp-priority-option {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid var(--border-card);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 76%, transparent);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
}

.cp-priority-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cp-priority-option:has(input:checked) {
  border-color: var(--accent-system);
  color: #fff;
  background: var(--accent-system);
}

.cp-priority-option.priority-alta:has(input:checked) {
  background: #b45309;
  border-color: #b45309;
}

.cp-priority-option.priority-critica:has(input:checked) {
  background: #b91c1c;
  border-color: #b91c1c;
}

.cp-support-submit {
  display: flex;
  justify-content: flex-end;
}

.cp-support-history-row {
  align-items: flex-start;
}

.cp-attachment-list {
  display: grid;
  gap: 0.45rem;
  font-size: 0.8rem;
}

.cp-attachment-list div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.htmx-indicator {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

@media (max-width: 991.98px) {
  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1030;
    background: rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
  }

  .cp-sidebar {
    z-index: 1040;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  }
}

@media (max-width: 767.98px) {
  .cp-main,
  .cp-page-stage,
  .cp-panel,
  .cp-card {
    padding: 1rem !important;
  }

  .cp-stats-grid,
  .cp-content-grid,
  .cp-analytics-grid {
    grid-template-columns: 1fr !important;
  }

  .cp-analytics-filter,
  .cp-telegram-alert-strip,
  .cp-analytics-kpis,
  .cp-analytics-grid-main {
    grid-template-columns: 1fr !important;
  }

  .cp-stat-card,
  .cp-info-card,
  .cp-chart-box {
    width: 100%;
  }

  .cp-chart-box-large {
    grid-column: auto;
    grid-row: auto;
  }

  .cp-chart-box canvas,
  .cp-chart-box-large canvas {
    height: 240px !important;
  }

  .cp-ticket-card-header,
  .cp-ticket-actions,
  .cp-ticket-meta,
  .cp-support-layout,
  .cp-priority-field {
    grid-template-columns: 1fr !important;
  }
}

.cp-pacs-off-blink {
  animation: cp-pacs-alert 1s steps(2, start) infinite;
}

@keyframes cp-pacs-alert {
  50% {
    filter: brightness(1.28);
    border-color: #dc2626;
  }
}

.cp-brand-logo {
  max-height: 40px;
  max-width: 116px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.2rem;
}

.cp-unit-footer {
  margin: 1rem 0 0;
  padding: 0.75rem 0.25rem;
  color: var(--cp-muted);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cp-about-link {
  font-size: 0.75rem;
  color: var(--cp-muted);
  text-decoration: none;
}

.cp-glass-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.5);
  backdrop-filter: blur(14px);
}

.cp-card {
  padding: 1.25rem;
  border: 1px solid rgba(219, 228, 240, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  min-width: 0;
}

.cp-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.cp-section-header h1,
.cp-section-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.cp-eyebrow {
  display: block;
  color: var(--cp-muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.cp-list {
  display: grid;
  gap: 0.75rem;
}

.cp-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(219, 228, 240, 0.85);
}

.cp-toast-cockpit {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: grid;
  gap: 0.75rem;
  width: min(380px, calc(100vw - 2rem));
  z-index: 2000;
  pointer-events: none;
}

.cp-toast {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  color: #f8fafc;
  background: #182231;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

.cp-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.cp-toast-success {
  background: #064e3b;
}

.cp-toast-warning {
  background: #713f12;
}

.cp-toast-error {
  background: #7f1d1d;
}

.cp-status-badge.status-aguardando {
  background: #0b5ed7;
  color: #ffffff;
}

.cp-status-badge.status-em_atendimento,
.cp-status-badge.status-em_preparo,
.cp-status-badge.status-na_sala {
  background: #047857;
  color: #ffffff;
}

.cp-status-badge.status-finalizado {
  background: #374151;
  color: #ffffff;
}

.cp-status-badge.status-cancelado,
.cp-status-badge.status-faltou {
  background: #991b1b;
  color: #ffffff;
}

.cp-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: #e5edf7;
}

.cp-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: cp-skeleton-pulse 1.15s infinite;
}

.cp-skeleton-grid {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0;
}

.cp-skeleton-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 0.85rem;
}

.cp-skeleton-line {
  min-height: 18px;
}

.cp-skeleton-card {
  min-height: 92px;
}

.htmx-request .cp-submit-label {
  opacity: 0.85;
}

button[disabled],
.btn.disabled {
  cursor: not-allowed;
}

@keyframes cp-skeleton-pulse {
  100% {
    transform: translateX(100%);
  }
}

html {
  -webkit-text-size-adjust: 100%;
  width: 100%;
  min-height: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100%;
  background:
    radial-gradient(circle at top left, rgba(89, 163, 255, 0.18), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.12), transparent 26rem),
    var(--cp-bg);
  color: var(--cp-text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  overflow-x: hidden;
  line-height: 1.5;
}

.cp-shell {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}

.cp-shell-aura {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.45;
  pointer-events: none;
  animation: cpFloatAura 14s ease-in-out infinite alternate;
  z-index: 0;
}

.cp-shell-aura-left {
  left: -10rem;
  top: 8rem;
  background: radial-gradient(circle, rgba(54, 194, 207, 0.24), transparent 70%);
}

.cp-shell-aura-right {
  right: -12rem;
  bottom: 2rem;
  background: radial-gradient(circle, rgba(15, 108, 189, 0.20), transparent 70%);
}

.cp-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--cp-sidebar-width);
  max-width: var(--cp-sidebar-width);
  min-width: var(--cp-sidebar-width);
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  background: var(--cp-sidebar-bg);
  color: #e2e8f0;
  overflow: hidden;
  z-index: 1000;
}

.cp-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  height: 100%;
  min-height: 100%;
  padding: 1.5rem;
  background: transparent;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.26) transparent;
}

.cp-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: white;
  text-decoration: none;
}

.cp-brand-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #36c2cf, var(--cp-primary));
  box-shadow: 0 16px 28px rgba(15, 108, 189, 0.28);
}

.cp-brand strong,
.cp-topbar-title,
.cp-page-header h1,
.cp-panel h2 {
  font-weight: 800;
}

.cp-brand small,
.cp-user-role,
.cp-topbar-subtitle,
.cp-page-header p,
.cp-panel-header p {
  color: #9fb2c8;
}

.cp-unit-card,
.cp-sidebar-footer {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 1rem;
}

.cp-unit-card label,
.cp-nav-section,
.cp-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.cp-unit-card .form-select {
  margin-top: 0.5rem;
  background: rgba(13, 27, 42, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  color: white;
}

.cp-nav {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.cp-nav-section {
  color: #7f95ae;
  margin-top: 0.65rem;
}

.cp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  color: #e5edf7;
  text-decoration: none;
  border-radius: 16px;
  transition: 0.18s ease;
  min-width: 0;
}

.cp-nav-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.cp-nav-link:hover,
.cp-nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.cp-main {
  position: relative;
  margin-left: var(--cp-sidebar-width);
  width: auto;
  max-width: none;
  padding: clamp(1rem, 1.8vw, 2rem);
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  z-index: 1;
}

.cp-page-stage {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.cp-page-stage > * {
  min-width: 0;
}

.cp-topbar,
.cp-panel,
.cp-subpanel,
.cp-stat-card,
.cp-info-card {
  background: var(--cp-surface);
  border: 1px solid var(--cp-border);
  border-radius: 24px;
  box-shadow: var(--cp-shadow);
}

.cp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  animation: cpRiseIn 0.55s ease both;
  min-width: 0;
}

.cp-topbar > div:first-child {
  flex: 1 1 280px;
  min-width: 0;
}

.cp-sidebar-toggle {
  display: none;
  margin-bottom: 0.75rem;
}

.cp-sidebar-fab {
  display: none;
}

.cp-topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.9rem;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 420px;
}

.cp-global-search {
  position: relative;
  min-width: min(420px, 100%);
  flex: 1 1 320px;
  max-width: 100%;
}

.cp-global-search i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cp-muted);
}

.cp-global-search input {
  padding-left: 2.65rem;
  border-radius: 16px;
}

.cp-search-dropdown,
.cp-search-results {
  position: relative;
  z-index: 10;
}

.cp-search-card {
  margin-top: 0.55rem;
  background: var(--cp-surface-strong);
  border: 1px solid var(--cp-border);
  border-radius: 18px;
  box-shadow: var(--cp-shadow);
  overflow: hidden;
}

.cp-search-item,
.cp-timeline-item,
.cp-picker-card,
.cp-selected-patient,
.cp-mini-summary div,
.cp-info-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cp-search-item {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #edf2f7;
}

.cp-search-item:last-child {
  border-bottom: 0;
}

.cp-search-empty {
  padding: 1rem;
}

.cp-page-header,
.cp-panel-header,
.cp-inline-actions,
.cp-form-actions,
.cp-pagination,
.cp-date-toolbar,
.cp-quick-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  min-width: 0;
}

.cp-page-header > *,
.cp-panel-header > *,
.cp-topbar > *,
.cp-inline-actions > *,
.cp-form-actions > * {
  min-width: 0;
}

.cp-page-header {
  margin-bottom: 1.25rem;
  align-items: flex-start;
}

.cp-page-header > div:first-child,
.cp-panel-header > div:first-child {
  flex: 1 1 320px;
}

.cp-inline-actions {
  justify-content: flex-end;
}

.cp-page-header h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.04em;
}

.cp-kicker {
  color: var(--cp-primary);
}

.cp-page-hero {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  padding: 1.4rem 1.5rem;
  margin-bottom: 1.25rem;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(247, 251, 255, 0.92)),
    linear-gradient(120deg, rgba(15, 108, 189, 0.10), rgba(54, 194, 207, 0.08));
  border: 1px solid rgba(219, 228, 240, 0.95);
  box-shadow: 0 22px 56px rgba(16, 32, 51, 0.08);
}

.cp-page-hero .cp-page-header {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
}

.cp-page-hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(15, 108, 189, 0.12), transparent 20rem),
    radial-gradient(circle at 85% 15%, rgba(54, 194, 207, 0.12), transparent 18rem);
  pointer-events: none;
}

.cp-stats-grid,
.cp-quick-grid {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.cp-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  margin-bottom: 1.5rem;
}

.cp-stat-card {
  padding: 1.2rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.cp-stat-card:hover,
.cp-panel:hover,
.cp-subpanel:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 56px rgba(16, 32, 51, 0.11);
}

.cp-stat-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 252, 255, 0.92));
}

.cp-stat-card span,
.cp-info-card span {
  display: block;
  color: var(--cp-muted);
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.cp-stat-card strong,
.cp-info-card strong {
  font-size: 1.9rem;
  line-height: 1;
}

.cp-stat-highlight {
  background: linear-gradient(135deg, rgba(15, 108, 189, 0.12), rgba(54, 194, 207, 0.14));
}

.cp-stat-highlight small {
  display: block;
  margin-top: 0.45rem;
  color: var(--cp-muted);
}

.cp-panel,
.cp-subpanel {
  padding: 1.25rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  min-width: 0;
  max-width: 100%;
}

.cp-panel > .row,
.cp-panel > form.row {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.row > * {
  min-width: 0;
}

.cp-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: clamp(1rem, 1.6vw, 1.5rem);
  width: 100%;
  min-width: 0;
  margin-top: 0.25rem;
}

.cp-content-grid > * {
  min-width: 0;
}

.cp-panel-spotlight {
  position: relative;
  overflow: clip;
}

.cp-panel-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 108, 189, 0.05), transparent 32%, rgba(54, 194, 207, 0.04));
  pointer-events: none;
}

.cp-panel h2,
.cp-subpanel h2 {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.cp-quick-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cp-quick-link {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  padding: 1rem;
  border-radius: 18px;
  background: #f7fbff;
  border: 1px solid #d8e7f7;
  color: var(--cp-text);
  text-decoration: none;
}

.cp-mini-summary {
  display: grid;
  gap: 0.75rem;
}

.cp-mini-summary div {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #f8fafc;
}

.cp-mini-summary strong {
  font-size: 1.1rem;
}

.cp-date-chip,
.cp-status-badge {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.cp-date-toolbar-float {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(248, 251, 255, 0.92), rgba(255, 255, 255, 0.88));
  border: 1px solid rgba(219, 228, 240, 0.85);
}

.status-agendado {
  background: #e0ecff;
  color: #245ea8;
}

.status-confirmado {
  background: #d7f5e7;
  color: #13795b;
}

.status-aguardando {
  background: #fff3cd;
  color: #9a6700;
}

.status-em_atendimento {
  background: #ece2ff;
  color: #6f42c1;
}

.status-finalizado {
  background: #ddf7df;
  color: #2b8a3e;
}

.status-faltou,
.status-cancelado {
  background: #fde2e2;
  color: #b42318;
}

.cp-empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
}

.cp-empty-state i {
  font-size: 2.5rem;
  color: #9db0c5;
  margin-bottom: 0.75rem;
}

.cp-empty-state h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.cp-empty-state-large {
  min-height: 360px;
  display: grid;
  place-content: center;
}

.cp-table-shell {
  border-radius: 20px;
  overflow-x: auto;
  overflow-y: visible;
  max-width: 100%;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.cp-table-shell > .table,
.table-responsive > .table {
  width: 100%;
  min-width: 860px;
}

.cp-calendar-grid {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.cp-calendar-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  min-width: 0;
}

.cp-calendar-hour {
  position: sticky;
  top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: 0.9rem 0.75rem;
  border-radius: 18px;
  background: #0f6cbd;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  z-index: 2;
}

.cp-calendar-slot {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.cp-calendar-empty {
  padding: 1rem 1.1rem;
  border: 1px dashed #d7e3f0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--cp-muted);
}

.cp-appointment-card {
  padding: 1rem 1.05rem;
  border: 1px solid var(--cp-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.06);
  min-width: 0;
}

.cp-appointment-card-top,
.cp-appointment-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.cp-appointment-time {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cp-primary);
}

.cp-appointment-patient {
  display: inline-block;
  margin-top: 0.15rem;
  color: var(--cp-text);
  font-weight: 700;
  text-decoration: none;
}

.cp-appointment-meta,
.cp-appointment-line span,
.cp-appointment-notes {
  color: var(--cp-muted);
  font-size: 0.92rem;
}

.cp-appointment-body {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.cp-appointment-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.cp-appointment-line strong {
  text-align: right;
}

.cp-appointment-notes {
  margin: 0.25rem 0 0;
}

.cp-appointment-actions {
  margin-top: 0.9rem;
}

.cp-avatar {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #36c2cf, var(--cp-primary));
  color: white;
  font-weight: 700;
}

.cp-details-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.7rem 1rem;
  margin: 0;
}

.cp-details-list dt {
  color: var(--cp-muted);
}

.cp-details-list dd {
  margin: 0;
  font-weight: 600;
}

.cp-timeline {
  display: grid;
  gap: 0.85rem;
}

.cp-timeline-item {
  padding: 1rem;
  border: 1px solid #e5edf4;
  border-radius: 18px;
  background: #fbfdff;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.cp-timeline-item:hover {
  transform: translateY(-1px);
  border-color: #cfe0f3;
  box-shadow: 0 16px 36px rgba(16, 32, 51, 0.08);
}

.cp-timeline-link {
  color: inherit;
  text-decoration: none;
}

.cp-timeline-time {
  min-width: 124px;
  color: var(--cp-muted);
  font-size: 0.9rem;
}

.cp-picker-card {
  align-items: stretch;
  flex-direction: column;
}

.cp-selected-patient {
  padding: 1rem;
  border-radius: 18px;
  background: #eff8ff;
  border: 1px solid #d3e6fa;
}

.cp-quick-patient {
  width: 100%;
  padding: 1rem;
  border: 1px solid #e5edf4;
  border-radius: 18px;
  background: #fbfdff;
}

.cp-quick-patient h3 {
  font-size: 1rem;
  font-weight: 800;
}

.cp-form-actions {
  margin-top: 1.5rem;
  justify-content: flex-start;
}

.cp-flow-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1rem;
  overflow-x: visible;
  overflow-y: visible;
  max-width: 100%;
  padding-bottom: 0.5rem;
}

.cp-flow-column {
  min-width: 0;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--cp-border);
  border-radius: 18px;
  padding: 0.85rem;
}

.cp-flow-column-head,
.cp-flow-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cp-flow-column-head {
  margin-bottom: 0.75rem;
}

.cp-flow-column-head span {
  min-width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f2ff;
  color: var(--cp-primary);
  font-weight: 800;
}

.cp-flow-list {
  display: grid;
  gap: 0.75rem;
}

.cp-flow-card,
.cp-flow-empty {
  border: 1px solid #e5edf4;
  border-radius: 16px;
  background: #fff;
  padding: 0.85rem;
}

.cp-flow-time {
  color: var(--cp-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.cp-flow-patient {
  display: block;
  margin: 0.25rem 0;
  color: var(--cp-text);
  font-weight: 800;
  text-decoration: none;
}

.cp-flow-actions {
  justify-content: flex-start;
  margin-top: 0.75rem;
}

.cp-public-page {
  min-height: 100vh;
  width: min(980px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0;
}

.cp-public-hero,
.cp-public-success {
  margin-bottom: 1rem;
  text-align: center;
}

.cp-public-hero h1,
.cp-public-success h1 {
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
}

.cp-public-form {
  padding: 1.4rem;
}

.cp-pagination {
  margin-top: 1rem;
}

.table > :not(caption) > * > * {
  padding: 0.95rem 1rem;
}

.btn,
.form-control,
.form-select {
  border-radius: 14px;
}

.btn-primary {
  background: var(--cp-primary);
  border-color: var(--cp-primary);
}

.btn-primary:hover {
  background: var(--cp-primary-dark);
  border-color: var(--cp-primary-dark);
}

.cp-auth-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  overflow: hidden;
}

.cp-auth-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(15, 108, 189, 0.20), transparent 24rem),
    radial-gradient(circle at 85% 20%, rgba(54, 194, 207, 0.16), transparent 22rem),
    radial-gradient(circle at 50% 100%, rgba(13, 27, 42, 0.10), transparent 24rem);
  pointer-events: none;
}

.cp-auth-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px);
  gap: 1.5rem;
  align-items: stretch;
}

.cp-auth-hero,
.cp-auth-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 24px 72px rgba(16, 32, 51, 0.12);
  backdrop-filter: blur(18px);
}

.cp-auth-hero {
  position: relative;
  overflow: hidden;
  padding: 2.25rem;
  background:
    linear-gradient(145deg, rgba(13, 27, 42, 0.94), rgba(16, 52, 89, 0.90)),
    linear-gradient(135deg, rgba(54, 194, 207, 0.18), transparent);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 680px;
}

.cp-auth-tenant .cp-auth-hero {
  background:
    linear-gradient(145deg, rgba(12, 51, 43, 0.94), rgba(18, 72, 92, 0.90)),
    linear-gradient(135deg, rgba(45, 212, 191, 0.18), transparent);
}

.cp-auth-master .cp-auth-hero {
  background:
    linear-gradient(145deg, rgba(18, 24, 38, 0.96), rgba(23, 54, 89, 0.92)),
    linear-gradient(135deg, rgba(96, 165, 250, 0.16), transparent);
}

.cp-auth-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(54, 194, 207, 0.34), transparent 70%);
}

.cp-auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.cp-auth-brand-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #36c2cf, #1d7ed6);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
  font-size: 1.4rem;
}

.cp-auth-brand strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: 0;
}

.cp-auth-brand small {
  color: rgba(255, 255, 255, 0.72);
}

.cp-auth-copy h1 {
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.cp-auth-copy p {
  max-width: 560px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.82);
}

.cp-auth-highlights {
  display: grid;
  gap: 0.85rem;
  max-width: 420px;
}

.cp-auth-highlight {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.cp-auth-highlight i {
  color: #7ff0c3;
  font-size: 1rem;
}

.cp-auth-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.84);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.cp-auth-logo,
.cp-auth-card-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  padding: 0.45rem;
}

.cp-auth-card-logo {
  width: 76px;
  height: 76px;
  display: block;
  margin-bottom: 1rem;
  border-color: var(--cp-border);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.cp-auth-card-top h2 {
  margin: 0.55rem 0 0.45rem;
  font-size: 2rem;
  letter-spacing: 0;
}

.cp-auth-card-top p {
  margin: 0 0 1.5rem;
  color: var(--cp-muted);
}

.cp-auth-form {
  display: grid;
  gap: 1rem;
}

.cp-auth-field {
  display: grid;
  gap: 0.45rem;
}

.cp-auth-input {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--cp-border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cp-auth-input:focus-within {
  border-color: rgba(15, 108, 189, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 108, 189, 0.10);
  transform: translateY(-1px);
}

.cp-auth-input-icon {
  display: grid;
  place-items: center;
  color: var(--cp-primary);
  background: linear-gradient(180deg, #f7fbff, #eef5fb);
  height: 100%;
  border-right: 1px solid var(--cp-border);
}

.cp-auth-input .form-control {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-left: 1rem;
}

.cp-auth-submit {
  margin-top: 0.25rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  font-weight: 700;
  box-shadow: 0 18px 36px rgba(15, 108, 189, 0.20);
}

.cp-auth-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: var(--cp-muted);
  font-size: 0.92rem;
  text-align: center;
}

.cp-auth-footer a {
  color: var(--cp-primary);
  font-weight: 700;
  text-decoration: none;
}

.cp-error-shell {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  padding: 2.4rem;
  text-align: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.56);
  box-shadow: 0 28px 70px rgba(16, 32, 51, 0.12);
  backdrop-filter: blur(18px);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive > .table {
  margin-bottom: 0;
}

.table {
  min-width: 100%;
}

.cp-error-shell h1 {
  margin: 0.6rem 0 0.8rem;
  font-size: clamp(2.1rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}

.cp-error-shell p {
  max-width: 560px;
  margin: 0 auto 1.4rem;
  color: var(--cp-muted);
}

.cp-error-icon {
  font-size: 3.6rem;
  color: var(--cp-primary);
  margin-bottom: 0.6rem;
}

.cp-animate-rise {
  animation: cpRiseIn 0.55s ease both;
}

.cp-animate-stagger > * {
  animation: cpRiseIn 0.55s ease both;
}

.cp-animate-stagger > *:nth-child(2) { animation-delay: 0.05s; }
.cp-animate-stagger > *:nth-child(3) { animation-delay: 0.10s; }
.cp-animate-stagger > *:nth-child(4) { animation-delay: 0.15s; }
.cp-animate-stagger > *:nth-child(5) { animation-delay: 0.20s; }
.cp-animate-stagger > *:nth-child(6) { animation-delay: 0.25s; }
.cp-animate-stagger > *:nth-child(7) { animation-delay: 0.30s; }
.cp-animate-stagger > *:nth-child(8) { animation-delay: 0.35s; }

@keyframes cpRiseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cpFloatAura {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(0, -18px, 0);
  }
}

@media (max-width: 1399.98px) {
  .cp-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  }

  .cp-sidebar {
    width: var(--cp-sidebar-width-compact);
    min-width: var(--cp-sidebar-width-compact);
    max-width: var(--cp-sidebar-width-compact);
  }

  .cp-sidebar-inner {
    padding: 1.2rem;
  }

  .cp-main {
    margin-left: var(--cp-sidebar-width-compact);
    width: auto;
    max-width: none;
    padding: clamp(0.9rem, 1.5vw, 1.4rem);
  }

  .cp-nav-link {
    padding: 0.78rem 0.8rem;
    gap: 0.65rem;
  }
}

@media (max-width: 1199.98px) {
  .cp-content-grid {
    grid-template-columns: 1fr;
  }

  .cp-page-header,
  .cp-panel-header,
  .cp-date-toolbar {
    align-items: stretch;
  }

  .cp-inline-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .cp-topbar-actions {
    justify-content: flex-start;
  }

  .cp-table-shell > .table,
  .table-responsive > .table {
    min-width: 780px;
  }
}

@media (max-width: 991.98px) {
  .cp-shell {
    display: block;
    min-height: 100vh;
    overflow-x: hidden;
  }

  .cp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(var(--cp-sidebar-width), 85vw);
    max-width: 85vw;
    min-width: 0;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.sidebar-open .cp-sidebar {
    transform: translateX(0);
  }

  .cp-sidebar-inner {
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .cp-topbar,
  .cp-page-header,
  .cp-panel-header,
  .cp-inline-actions,
  .cp-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .cp-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .cp-topbar-actions,
  .cp-global-search {
    width: 100%;
    min-width: 0;
  }

  .cp-topbar > div:first-child,
  .cp-topbar-actions {
    flex: 0 1 auto !important;
  }

  .cp-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 1rem;
  }

  .cp-quick-grid,
  .cp-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cp-auth-layout {
    grid-template-columns: 1fr;
  }

  .cp-auth-hero {
    min-height: auto;
  }

}

@media (max-width: 575.98px) {
  .cp-quick-grid,
  .cp-stats-grid,
  .cp-flow-board {
    grid-template-columns: 1fr;
  }

  .cp-table-shell > .table,
  .table-responsive > .table {
    min-width: 680px;
  }
}

@media (max-width: 640px) {
  .cp-shell-aura {
    display: none;
  }

  .cp-auth-shell {
    padding: 1rem;
  }

  .cp-auth-hero,
  .cp-auth-card {
    border-radius: 24px;
    padding: 1.35rem;
  }

  .cp-auth-copy h1 {
    font-size: 2.1rem;
  }

  .cp-sidebar-inner {
    padding: 1rem;
    gap: 0.85rem;
  }

  .cp-nav-link {
    border-radius: 14px;
  }

  .cp-brand-icon {
    width: 42px;
    height: 42px;
  }

  .cp-topbar {
    padding: 1rem;
    border-radius: 20px;
  }

  .cp-page-hero,
  .cp-panel,
  .cp-subpanel,
  .cp-stat-card,
  .cp-info-card,
  .cp-search-card {
    border-radius: 20px;
  }

  .cp-page-header h1 {
    font-size: 1.65rem;
  }

  .cp-page-hero {
    padding: 1.1rem;
  }

  .cp-panel,
  .cp-subpanel,
  .cp-stat-card {
    padding: 1rem;
  }

  .cp-stat-card strong,
  .cp-info-card strong {
    font-size: 1.55rem;
  }

  .cp-form-actions .btn,
  .cp-topbar-actions .btn {
    width: 100%;
  }

  .cp-global-search input {
    min-width: 0;
  }

  .cp-calendar-row {
    grid-template-columns: 1fr;
  }

  .cp-calendar-hour {
    position: static;
    justify-content: flex-start;
  }

  .cp-appointment-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .cp-appointment-line strong {
    text-align: left;
  }
}

/* FT CLINIC PRO - two-theme system */
.theme-dark {
  --bg-main: #0d1117;
  --bg-surface: rgba(22, 27, 34, 0.85);
  --bg-surface-elevated: #21262d;
  --border-card: rgba(255, 255, 255, 0.08);
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --accent-system: #0a84ff;
  --accent-success: #30d158;
  --backdrop-blur: blur(20px);
  --cp-bg: var(--bg-main);
  --cp-surface: var(--bg-surface);
  --cp-surface-strong: var(--bg-surface-elevated);
  --cp-border: var(--border-card);
  --cp-text: var(--text-primary);
  --cp-muted: var(--text-secondary);
  --cp-primary: var(--accent-system);
  --cp-primary-dark: #0066cc;
  --cp-sidebar-bg: rgba(13, 17, 23, 0.92);
}

.theme-light {
  --bg-main: #f5f5f7;
  --bg-surface: rgba(255, 255, 255, 0.75);
  --bg-surface-elevated: #ffffff;
  --border-card: rgba(0, 0, 0, 0.05);
  --text-primary: #1d1d1f;
  --text-secondary: #86868b;
  --accent-system: #0071e3;
  --accent-success: #34c759;
  --backdrop-blur: blur(20px);
  --cp-bg: var(--bg-main);
  --cp-surface: var(--bg-surface);
  --cp-surface-strong: var(--bg-surface-elevated);
  --cp-border: var(--border-card);
  --cp-text: var(--text-primary);
  --cp-muted: var(--text-secondary);
  --cp-primary: var(--accent-system);
  --cp-primary-dark: #005bb5;
  --cp-sidebar-bg: rgba(245, 245, 247, 0.82);
}

body.theme-dark,
body.theme-light {
  background:
    radial-gradient(circle at 20% -10%, color-mix(in srgb, var(--accent-system) 20%, transparent), transparent 34rem),
    radial-gradient(circle at 95% 95%, color-mix(in srgb, var(--accent-success) 14%, transparent), transparent 30rem),
    var(--bg-main);
  color: var(--text-primary);
}

.theme-dark .cp-shell-aura,
.theme-light .cp-shell-aura {
  display: none;
}

.theme-dark .cp-sidebar,
.theme-light .cp-sidebar,
.theme-dark .cp-topbar,
.theme-light .cp-topbar,
.theme-dark .cp-card,
.theme-light .cp-card,
.theme-dark .cp-panel,
.theme-light .cp-panel,
.theme-dark .cp-subpanel,
.theme-light .cp-subpanel,
.theme-dark .cp-stat-card,
.theme-light .cp-stat-card,
.theme-dark .cp-info-card,
.theme-light .cp-info-card,
.theme-dark .cp-auth-card,
.theme-light .cp-auth-card,
.theme-dark .cp-modal-panel,
.theme-light .cp-modal-panel,
.theme-dark .cp-table-shell,
.theme-light .cp-table-shell {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 58px rgba(0, 0, 0, 0.18);
  backdrop-filter: var(--backdrop-blur);
}

.theme-dark .cp-sidebar {
  border-right-color: var(--border-card) !important;
}

.theme-light .cp-sidebar {
  color: var(--text-primary);
  box-shadow: 18px 0 45px rgba(0, 0, 0, 0.06);
}

.theme-light .cp-sidebar .cp-nav-link,
.theme-light .cp-sidebar .cp-brand,
.theme-light .cp-sidebar .cp-sidebar-footer,
.theme-light .cp-sidebar .cp-user-role,
.theme-light .cp-sidebar .cp-brand small {
  color: var(--text-primary);
}

.theme-dark .cp-page-hero,
.theme-light .cp-page-hero,
.theme-dark .cp-stat-glass,
.theme-light .cp-stat-glass,
.theme-dark .cp-stat-highlight,
.theme-light .cp-stat-highlight,
.theme-dark .cp-auth-input,
.theme-light .cp-auth-input,
.theme-dark .cp-auth-input-icon,
.theme-light .cp-auth-input-icon,
.theme-dark .cp-quick-link,
.theme-light .cp-quick-link,
.theme-dark .cp-mini-summary div,
.theme-light .cp-mini-summary div,
.theme-dark .cp-timeline-item,
.theme-light .cp-timeline-item,
.theme-dark .cp-flow-column,
.theme-light .cp-flow-column,
.theme-dark .cp-flow-card,
.theme-light .cp-flow-card,
.theme-dark .cp-flow-empty,
.theme-light .cp-flow-empty,
.theme-dark .cp-selected-patient,
.theme-light .cp-selected-patient,
.theme-dark .cp-quick-patient,
.theme-light .cp-quick-patient,
.theme-dark .cp-appointment-card,
.theme-light .cp-appointment-card,
.theme-dark .cp-calendar-empty,
.theme-light .cp-calendar-empty,
.theme-dark .cp-date-toolbar-float,
.theme-light .cp-date-toolbar-float {
  background: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
}

.theme-dark .table,
.theme-light .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text-primary);
  --bs-table-border-color: var(--border-card);
  --bs-table-striped-bg: color-mix(in srgb, var(--bg-surface-elevated) 70%, transparent);
  --bs-table-hover-bg: color-mix(in srgb, var(--accent-system) 12%, transparent);
  color: var(--text-primary) !important;
  background: transparent !important;
}

.theme-dark thead,
.theme-light thead {
  color: var(--text-secondary);
}

.theme-dark .form-control,
.theme-dark .form-select,
.theme-light .form-control,
.theme-light .form-select {
  background: var(--bg-surface-elevated) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-card) !important;
  border-radius: 12px !important;
}

.theme-dark .form-control::placeholder,
.theme-light .form-control::placeholder {
  color: var(--text-secondary);
}

.theme-dark .text-muted,
.theme-dark .form-text,
.theme-dark small,
.theme-light .text-muted,
.theme-light .form-text,
.theme-light small,
.theme-dark .cp-topbar-subtitle,
.theme-light .cp-topbar-subtitle,
.theme-dark .cp-page-header p,
.theme-light .cp-page-header p {
  color: var(--text-secondary) !important;
}

.theme-dark .btn-primary,
.theme-light .btn-primary {
  background: var(--accent-system) !important;
  border-color: var(--accent-system) !important;
  color: #fff !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent-system) 28%, transparent);
}

.theme-dark .btn-outline-secondary,
.theme-light .btn-outline-secondary {
  color: var(--text-primary);
  border-color: var(--border-card);
  background: color-mix(in srgb, var(--bg-surface-elevated) 78%, transparent);
  border-radius: 12px;
}

.cp-theme-segment {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-card);
  background: var(--bg-surface-elevated);
}

.cp-theme-segment button {
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  color: var(--text-secondary);
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
}

.cp-theme-segment button.active {
  background: var(--accent-system);
  color: #fff;
}

.cp-modal-backdrop {
  background: rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(20px);
}

.cp-modal-panel {
  overflow: hidden;
}

.cp-tabs {
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
}

.cp-tabs .nav-link {
  border-radius: 11px;
  color: var(--text-secondary);
  font-weight: 800;
}

.cp-tabs .nav-link.active {
  background: var(--accent-system);
  color: #fff;
}

.cp-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 0.75rem;
}

.cp-switch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
}

.cp-switch-row span {
  display: grid;
  gap: 0.15rem;
}

.cp-switch-row input {
  position: absolute;
  opacity: 0;
}

.cp-switch-row i {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-secondary) 45%, transparent);
  transition: background 0.18s ease;
}

.cp-switch-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.24);
}

.cp-switch-row input:checked + i {
  background: var(--accent-success);
}

.cp-switch-row input:checked + i::after {
  transform: translateX(20px);
}

.cp-logo-preview {
  display: grid;
  gap: 0.5rem;
  place-items: center;
  padding: 1.25rem;
  min-height: 160px;
  border-radius: 16px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
  text-align: center;
}

.cp-logo-preview img {
  max-height: 74px;
  max-width: 100%;
  object-fit: contain;
}

.cp-log-table code,
.cp-table-shell code {
  color: #f4b8c4;
  white-space: pre-wrap;
  word-break: break-all;
}

.cp-log-line-head {
  width: 90px;
}

.theme-dark .modal-header,
.theme-dark .modal-footer,
.theme-light .modal-header,
.theme-light .modal-footer {
  border-color: var(--border-card) !important;
}

.theme-dark .modal-body,
.theme-light .modal-body {
  color: var(--text-primary);
}

.cp-about-card {
  max-width: 720px;
  width: min(720px, 100%);
  text-align: left;
}

.cp-about-hero {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.cp-about-hero h2 {
  margin: 0.35rem 0;
}

.cp-about-hero p {
  margin: 0;
  color: var(--text-secondary);
}

.cp-about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.cp-about-grid article {
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 0.9rem;
  background: var(--bg-surface-elevated);
}

.cp-about-grid strong,
.cp-about-grid span {
  display: block;
}

.cp-about-grid span {
  margin-top: 0.25rem;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

.cp-about-license {
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-card);
}

.cp-about-license span,
.cp-about-license p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.cp-vendor-credit,
.ft-medvision-footer {
  color: var(--text-secondary);
  font-size: 0.76rem;
}

.cp-vendor-credit a,
.ft-medvision-footer a {
  color: inherit;
  font-weight: 800;
  text-decoration: none;
}

.cp-vendor-credit a:hover,
.ft-medvision-footer a:hover {
  color: var(--accent);
}

.ft-medvision-footer {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 1rem;
  text-align: center;
}

.ft-medvision-footer-portal {
  position: relative;
  z-index: 1;
}

@media (max-width: 575.98px) {
  .cp-about-hero,
  .cp-about-grid {
    grid-template-columns: 1fr;
  }
}

.cp-prewrap {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cp-soft-badge {
  background: color-mix(in srgb, var(--bg-surface-elevated) 88%, transparent) !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border-card);
}

.theme-light .cp-log-table code,
.theme-light .cp-table-shell code {
  color: #9f1239;
}

.cp-table-shell,
.table-responsive {
  overflow-x: auto !important;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.cp-table-shell th,
.cp-table-shell td,
.table-responsive th,
.table-responsive td {
  word-break: break-word;
}

.cp-ghost-warning {
  background: #3a160d !important;
  color: #fff3e8 !important;
  border-color: #b45309 !important;
}

.cp-portal-card {
  max-width: 760px;
}

.cp-about-link {
  margin-left: auto;
}

@media (max-width: 991.98px) {
  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    z-index: 990;
  }

  .cp-sidebar {
    z-index: 1000;
    box-shadow: 24px 0 58px rgba(0, 0, 0, 0.28);
  }
}

@media (max-width: 767.98px) {
  .cp-content-grid > div:last-child {
    display: block !important;
  }

  .cp-topbar {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    margin: 0 0 0.75rem !important;
  }

  .cp-topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .cp-main {
    padding: 0.75rem !important;
  }

  .cp-topbar,
  .cp-card,
  .cp-panel,
  .cp-subpanel,
  .cp-stat-card,
  .cp-info-card,
  .cp-page-hero {
    padding: 0.9rem !important;
    border-radius: 16px !important;
  }

  .cp-content-grid,
  .cp-stats-grid,
  .cp-quick-grid,
  .cp-flow-board {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .cp-page-header h1 {
    font-size: 1.45rem !important;
  }

  .cp-topbar-actions {
    gap: 0.55rem;
  }

  .cp-theme-segment,
  .cp-topbar-actions .btn,
  .cp-global-search {
    width: 100%;
  }

  .cp-table-shell > .table {
    min-width: 620px;
  }

  .cp-log-table > .table {
    min-width: 760px;
  }

  .modal-dialog {
    margin: 0.5rem;
  }

  .modal-body {
    padding: 0.9rem;
  }
}

/* FT CLINIC PRO final cascade guard */
body.theme-dark,
body.theme-light {
  background: var(--bg-main) !important;
  color: var(--text-primary) !important;
}

.theme-dark .cp-panel,
.theme-dark .cp-card,
.theme-dark .cp-stat-card,
.theme-dark .cp-modal-panel,
.theme-dark .cp-table-shell,
.theme-dark .cp-empty-state,
.theme-dark .cp-flow-empty,
.theme-light .cp-panel,
.theme-light .cp-card,
.theme-light .cp-stat-card,
.theme-light .cp-modal-panel,
.theme-light .cp-table-shell,
.theme-light .cp-empty-state,
.theme-light .cp-flow-empty {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
  border-radius: 16px !important;
  backdrop-filter: var(--backdrop-blur);
}

.theme-dark .table,
.theme-light .table,
.theme-dark .table td,
.theme-dark .table th,
.theme-light .table td,
.theme-light .table th {
  background: transparent !important;
  color: var(--text-primary) !important;
  border-color: var(--border-card) !important;
}

.cp-table-shell,
.table-responsive {
  overflow-x: auto !important;
  max-width: 100%;
}

.cp-table-shell code,
.cp-log-table code {
  white-space: pre-wrap !important;
  word-break: break-all !important;
}

.cp-table-link {
  color: var(--text-primary) !important;
  text-decoration: none;
}

.cp-table-link:hover {
  color: var(--accent-system) !important;
}

.cp-upcoming-shell {
  overflow-x: auto !important;
}

.cp-upcoming-table {
  min-width: 980px !important;
  table-layout: fixed;
}

.cp-upcoming-table th,
.cp-upcoming-table td {
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none;
}

.cp-upcoming-table th {
  white-space: nowrap;
}

.cp-upcoming-table .cp-col-time {
  width: 76px;
}

.cp-upcoming-table .cp-col-patient {
  width: 150px;
}

.cp-upcoming-table .cp-col-contact {
  width: 130px;
}

.cp-upcoming-table .cp-col-professional {
  width: 170px;
}

.cp-upcoming-table .cp-col-unit {
  width: 130px;
}

.cp-upcoming-table .cp-col-status {
  width: 128px;
}

.cp-upcoming-table .cp-col-summary {
  width: 210px;
}

.cp-upcoming-table .cp-col-actions {
  width: 96px;
}

.cp-upcoming-table .cp-status-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  white-space: nowrap;
}

.cp-summary-preview {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: help;
}

.cp-summary-preview:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent-system) 55%, transparent);
  outline-offset: 2px;
  border-radius: 6px;
}

.cp-upcoming-table .cp-summary-main {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
  line-height: 1.22;
}

.cp-summary-meta {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  max-width: 100%;
  margin-top: 0.28rem;
  overflow: hidden;
}

.cp-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  min-width: 0;
  max-width: 100%;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-surface-elevated) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--border-card) 82%, transparent);
  color: var(--text-secondary);
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-summary-chip i {
  flex: 0 0 auto;
  color: var(--accent-system);
}

.cp-summary-tooltip .tooltip-inner {
  max-width: min(420px, calc(100vw - 2rem));
  padding: 0.65rem 0.75rem;
  text-align: left;
  line-height: 1.35;
  border-radius: 10px;
}

@media (max-width: 767.98px) {
  .cp-main,
  .cp-page-stage,
  .cp-panel,
  .cp-card {
    padding: 1rem !important;
  }

  .cp-analytics-grid {
    grid-template-columns: 1fr !important;
  }

  .cp-upcoming-shell {
    overflow-x: visible !important;
  }

  .cp-upcoming-table {
    min-width: 0 !important;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.85rem;
  }

  .cp-upcoming-table thead {
    display: none;
  }

  .cp-upcoming-table tbody,
  .cp-upcoming-table tr,
  .cp-upcoming-table td {
    display: block;
    width: 100% !important;
  }

  .cp-upcoming-table tr {
    padding: 0.85rem;
    border: 1px solid var(--border-card);
    border-radius: 16px;
    background: color-mix(in srgb, var(--bg-surface-elevated) 68%, transparent);
  }

  .cp-upcoming-table td {
    border: 0 !important;
    padding: 0.45rem 0 !important;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    align-items: start;
    gap: 0.75rem;
    text-align: left !important;
  }

  .cp-upcoming-table td::before {
    content: attr(data-label);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .cp-upcoming-table .cp-col-actions {
    display: flex;
    justify-content: flex-end;
  }

  .cp-upcoming-table .cp-col-actions::before {
    display: none;
  }

  .cp-upcoming-table .cp-col-summary {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .cp-upcoming-table .cp-col-summary::before {
    margin-bottom: 0.15rem;
  }

  .cp-upcoming-table .cp-col-status .cp-status-badge {
    justify-self: start;
    width: auto;
    max-width: 100%;
    padding-inline: 0.8rem;
  }
}

@media (max-width: 767.98px) {
  body.cp-dashboard-page .cp-topbar {
    gap: 0.55rem !important;
    margin-bottom: 0.65rem !important;
    padding: 0.62rem !important;
  }

  body.cp-dashboard-page .cp-topbar > div:first-child {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 0.65rem;
    align-items: center;
  }

  body.cp-dashboard-page .cp-sidebar-toggle {
    margin: 0 !important;
  }

  body.cp-dashboard-page .cp-topbar-title {
    font-size: 1rem;
    line-height: 1.15;
  }

  body.cp-dashboard-page .cp-topbar-subtitle {
    display: none;
  }

  body.cp-dashboard-page .cp-topbar-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem !important;
  }

  body.cp-dashboard-page .cp-theme-segment,
  body.cp-dashboard-page .cp-global-search {
    display: none;
  }

  body.cp-dashboard-page .cp-theme-segment button {
    padding: 0.22rem 0.5rem !important;
    font-size: 0.78rem;
  }

  body.cp-dashboard-page .cp-global-search input {
    min-height: 32px;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 0.88rem;
  }

  body.cp-dashboard-page .cp-topbar-actions > .btn {
    min-height: 32px;
    padding: 0.34rem 0.65rem;
    font-size: 0.88rem;
  }

  body.cp-dashboard-page .cp-main > .alert {
    margin-bottom: 0.5rem !important;
    padding: 0.38rem 0.7rem !important;
    font-size: 0.86rem;
  }

  body.cp-dashboard-page .cp-main > .alert-success {
    display: none;
  }

  body.cp-dashboard-page .cp-page-header > div:first-child,
  body.cp-dashboard-page .cp-panel-header > div:first-child {
    flex: 0 1 auto !important;
  }

  body.cp-dashboard-page .cp-page-hero {
    display: none;
  }

  body.cp-dashboard-page .cp-panel {
    padding: 0.72rem !important;
  }

  body.cp-dashboard-page .cp-panel-header {
    margin-bottom: 0.45rem !important;
  }

  body.cp-dashboard-page .cp-panel-header .btn {
    display: none;
  }

  body.cp-dashboard-page .cp-upcoming-table {
    border-spacing: 0 0.45rem;
  }

  body.cp-dashboard-page .cp-upcoming-table tr {
    padding: 0.62rem;
    border-radius: 14px;
  }

  body.cp-dashboard-page .cp-upcoming-table td {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 0.55rem;
    padding: 0.28rem 0 !important;
    font-size: 0.9rem;
  }

  body.cp-dashboard-page .cp-upcoming-table td::before {
    font-size: 0.66rem;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-col-summary {
    gap: 0.18rem;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-summary-main,
  body.cp-dashboard-page .cp-upcoming-table .small {
    font-size: 0.86rem;
    line-height: 1.25;
  }

  body.cp-dashboard-page .cp-summary-meta {
    margin-top: 0.22rem;
  }

  body.cp-dashboard-page .cp-summary-chip {
    max-width: 48%;
    font-size: 0.7rem;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-status-badge {
    padding: 0.28rem 0.58rem;
    font-size: 0.75rem;
  }

  .cp-dashboard-compact .cp-topbar,
  .cp-page-hero {
    margin-bottom: 0.65rem !important;
  }

  .cp-page-hero {
    padding: 0.75rem !important;
  }

  .cp-page-hero-mesh {
    display: none;
  }

  .cp-page-header {
    gap: 0.65rem !important;
    margin-bottom: 0 !important;
  }

  .cp-page-header h1 {
    margin: 0.12rem 0 !important;
    font-size: 1.25rem !important;
    line-height: 1.15;
  }

  .cp-page-header p,
  .cp-panel-header p {
    margin-bottom: 0 !important;
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .cp-kicker {
    font-size: 0.62rem !important;
    letter-spacing: 0.08em !important;
  }

  .cp-inline-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.45rem !important;
    width: 100%;
  }

  .cp-inline-actions .btn,
  .cp-panel-header .btn {
    min-height: 34px;
    padding: 0.42rem 0.65rem;
    font-size: 0.86rem;
  }

  .cp-content-grid {
    gap: 0.65rem !important;
    margin-top: 0 !important;
  }

  .cp-content-grid > div:last-child {
    display: none;
  }

  .cp-panel-header {
    gap: 0.55rem !important;
    margin-bottom: 0.65rem !important;
  }

  .cp-panel h2,
  .cp-panel-header h2 {
    font-size: 1.05rem !important;
    line-height: 1.2;
    margin-bottom: 0.15rem !important;
  }

  .cp-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0 !important;
  }

  .cp-stat-card {
    padding: 0.65rem !important;
    min-height: 0 !important;
  }

  .cp-stat-card span {
    margin-bottom: 0.2rem !important;
    font-size: 0.72rem !important;
    line-height: 1.15;
  }

  .cp-stat-card strong {
    font-size: 1.22rem !important;
  }

  .cp-stat-card small {
    font-size: 0.72rem;
    line-height: 1.15;
  }
}

@media (max-width: 767.98px) {
  body.cp-dashboard-page .cp-upcoming-table tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 0.85rem;
    row-gap: 0.12rem;
    padding: 0.58rem !important;
  }

  body.cp-dashboard-page .cp-upcoming-table td {
    display: block !important;
    padding: 0.2rem 0 !important;
    min-width: 0;
    font-size: 0.86rem;
    line-height: 1.22;
  }

  body.cp-dashboard-page .cp-upcoming-table td::before {
    display: block;
    margin-bottom: 0.08rem;
    font-size: 0.63rem;
    line-height: 1;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-col-patient,
  body.cp-dashboard-page .cp-upcoming-table .cp-col-professional,
  body.cp-dashboard-page .cp-upcoming-table .cp-col-summary,
  body.cp-dashboard-page .cp-upcoming-table .cp-col-actions {
    grid-column: 1 / -1;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-col-summary {
    display: block !important;
    padding-top: 0.25rem !important;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-col-summary::before {
    margin-bottom: 0.14rem;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-summary-main,
  body.cp-dashboard-page .cp-upcoming-table .small {
    font-size: 0.8rem;
    line-height: 1.18;
  }

  body.cp-dashboard-page .cp-upcoming-table .cp-summary-main {
    white-space: nowrap;
  }

body.cp-dashboard-page .cp-upcoming-table .cp-col-actions {
    justify-content: flex-end;
    padding-top: 0.18rem !important;
  }
}

/* Premium compact pass: keep polish without hiding work on mobile. */
@media (max-width: 767.98px) {
  .cp-main {
    padding-top: 0.6rem !important;
  }

  .cp-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem !important;
    padding: 0.62rem 0.72rem !important;
    margin: -0.45rem -0.45rem 0.65rem !important;
    border-radius: 0 !important;
    backdrop-filter: blur(18px);
  }

  .cp-topbar > div:first-child {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 0.55rem;
    align-items: center;
  }

  .cp-sidebar-toggle {
    width: 38px;
    height: 38px;
    padding: 0 !important;
  }

  .cp-topbar-title {
    font-size: 0.98rem !important;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cp-topbar-subtitle {
    display: none !important;
  }

  .cp-topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr auto;
    gap: 0.45rem !important;
    width: 100%;
  }

  .cp-theme-segment {
    display: none !important;
  }

  .cp-global-search {
    min-width: 0 !important;
    width: 100% !important;
  }

  .cp-topbar-actions > .btn {
    min-height: 38px;
    padding: 0.45rem 0.62rem;
    font-size: 0.84rem;
    white-space: nowrap;
  }

  .cp-page-hero,
  .cp-page-header {
    margin-bottom: 0.68rem !important;
  }

  .cp-page-hero h1,
  .cp-page-header h1 {
    font-size: 1.28rem !important;
    line-height: 1.14;
  }

  .cp-panel,
  .cp-card,
  .cp-stat-card,
  .cp-table-shell {
    border-radius: 14px !important;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1) !important;
  }

  .cp-auth-layout {
    min-height: 100dvh;
    align-items: start !important;
    padding: 0.9rem !important;
  }

  .cp-auth-card {
    order: -1;
    margin-top: 0 !important;
  }

  .cp-auth-hero {
    min-height: 0 !important;
    padding: 0 !important;
  }

  .cp-auth-copy,
  .cp-auth-highlights {
    display: none !important;
  }

  .cp-auth-brand {
    transform: scale(0.92);
    transform-origin: left center;
    margin-top: 0.55rem;
  }
}

/* FT CLINIC PRO responsive hardening
   Mantem telas longas utilizaveis em notebook pequeno, zoom alto e mobile. */
html {
  min-width: 0;
  overflow-x: hidden;
}

body.theme-dark,
body.theme-light {
  min-width: 0;
  overflow-x: hidden;
}

.cp-shell,
.cp-main,
.cp-page-stage,
.cp-topbar,
.cp-panel,
.cp-subpanel,
.cp-card,
.cp-page-hero,
.cp-page-header,
.cp-panel-header,
.row,
.tab-content,
.tab-pane {
  min-width: 0 !important;
  max-width: 100%;
}

.cp-main {
  overflow-x: clip !important;
}

.cp-page-stage {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.cp-panel,
.cp-subpanel,
.cp-card,
.cp-info-card,
.cp-stat-card {
  overflow-wrap: anywhere;
}

.form-control,
.form-select,
.btn,
.dropdown-menu,
.cp-status-badge,
.badge {
  max-width: 100%;
}

textarea.form-control {
  min-height: 7rem;
  resize: vertical;
}

.cp-form-actions,
.cp-inline-actions,
.cp-topbar-actions,
.modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cp-form-actions .btn,
.cp-inline-actions .btn,
.modal-footer .btn {
  min-width: max-content;
}

.cp-table-shell,
.table-responsive {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.cp-table-shell > .table,
.table-responsive > .table {
  width: max-content;
  min-width: 100%;
}

.cp-scrollable,
.cp-sidebar-inner,
.cp-modal-backdrop,
.cp-modal-backdrop .modal-body,
.table-responsive,
.cp-tabs,
.cp-page-stage {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cp-scrollable::-webkit-scrollbar,
.cp-sidebar-inner::-webkit-scrollbar,
.cp-modal-backdrop::-webkit-scrollbar,
.cp-modal-backdrop .modal-body::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.cp-tabs::-webkit-scrollbar,
.cp-page-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.cp-scrollable:hover,
.cp-scrollable:focus-within,
.cp-scrollable.is-scrolling,
.cp-sidebar-inner:hover,
.cp-sidebar-inner:focus-within,
.cp-sidebar-inner.is-scrolling,
.cp-modal-backdrop:hover,
.cp-modal-backdrop:focus-within,
.cp-modal-backdrop.is-scrolling,
.cp-modal-backdrop .modal-body:hover,
.cp-modal-backdrop .modal-body:focus-within,
.cp-modal-backdrop .modal-body.is-scrolling,
.table-responsive:hover,
.table-responsive:focus-within,
.table-responsive.is-scrolling,
.cp-tabs:hover,
.cp-tabs:focus-within,
.cp-tabs.is-scrolling,
.cp-page-stage:hover,
.cp-page-stage:focus-within,
.cp-page-stage.is-scrolling {
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.58) transparent;
}

.cp-scrollable:hover::-webkit-scrollbar,
.cp-scrollable:focus-within::-webkit-scrollbar,
.cp-scrollable.is-scrolling::-webkit-scrollbar,
.cp-sidebar-inner:hover::-webkit-scrollbar,
.cp-sidebar-inner:focus-within::-webkit-scrollbar,
.cp-sidebar-inner.is-scrolling::-webkit-scrollbar,
.cp-modal-backdrop:hover::-webkit-scrollbar,
.cp-modal-backdrop:focus-within::-webkit-scrollbar,
.cp-modal-backdrop.is-scrolling::-webkit-scrollbar,
.cp-modal-backdrop .modal-body:hover::-webkit-scrollbar,
.cp-modal-backdrop .modal-body:focus-within::-webkit-scrollbar,
.cp-modal-backdrop .modal-body.is-scrolling::-webkit-scrollbar,
.table-responsive:hover::-webkit-scrollbar,
.table-responsive:focus-within::-webkit-scrollbar,
.table-responsive.is-scrolling::-webkit-scrollbar,
.cp-tabs:hover::-webkit-scrollbar,
.cp-tabs:focus-within::-webkit-scrollbar,
.cp-tabs.is-scrolling::-webkit-scrollbar,
.cp-page-stage:hover::-webkit-scrollbar,
.cp-page-stage:focus-within::-webkit-scrollbar,
.cp-page-stage.is-scrolling::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.cp-scrollable:hover::-webkit-scrollbar-thumb,
.cp-scrollable:focus-within::-webkit-scrollbar-thumb,
.cp-scrollable.is-scrolling::-webkit-scrollbar-thumb,
.cp-sidebar-inner:hover::-webkit-scrollbar-thumb,
.cp-sidebar-inner:focus-within::-webkit-scrollbar-thumb,
.cp-sidebar-inner.is-scrolling::-webkit-scrollbar-thumb,
.cp-modal-backdrop:hover::-webkit-scrollbar-thumb,
.cp-modal-backdrop:focus-within::-webkit-scrollbar-thumb,
.cp-modal-backdrop.is-scrolling::-webkit-scrollbar-thumb,
.cp-modal-backdrop .modal-body:hover::-webkit-scrollbar-thumb,
.cp-modal-backdrop .modal-body:focus-within::-webkit-scrollbar-thumb,
.cp-modal-backdrop .modal-body.is-scrolling::-webkit-scrollbar-thumb,
.table-responsive:hover::-webkit-scrollbar-thumb,
.table-responsive:focus-within::-webkit-scrollbar-thumb,
.table-responsive.is-scrolling::-webkit-scrollbar-thumb,
.cp-tabs:hover::-webkit-scrollbar-thumb,
.cp-tabs:focus-within::-webkit-scrollbar-thumb,
.cp-tabs.is-scrolling::-webkit-scrollbar-thumb,
.cp-page-stage:hover::-webkit-scrollbar-thumb,
.cp-page-stage:focus-within::-webkit-scrollbar-thumb,
.cp-page-stage.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.58);
  border: 2px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.cp-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1080;
  display: block !important;
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(0.5rem, 2vw, 1.5rem);
}

.cp-modal-backdrop .modal-dialog {
  width: min(1120px, 100%);
  max-width: 100%;
  min-height: 0;
  margin: 0 auto;
}

.cp-modal-backdrop .modal-dialog-centered {
  min-height: calc(100dvh - clamp(1rem, 4vw, 3rem));
  align-items: flex-start;
}

.cp-modal-backdrop .modal-content,
.cp-modal-panel {
  max-height: calc(100dvh - clamp(1rem, 4vw, 3rem));
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.cp-modal-backdrop .modal-content > form,
.cp-modal-panel > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
}

.cp-modal-backdrop .modal-header,
.cp-modal-backdrop .modal-footer {
  flex: 0 0 auto;
}

.cp-modal-backdrop .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.cp-modal-backdrop .tab-content {
  min-height: 0;
}

#unit-tab-modules {
  padding-bottom: 1rem;
}

.cp-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.cp-tabs .nav-item,
.cp-tabs .nav-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cp-switch-row {
  min-width: 0;
}

.cp-switch-row span,
.cp-switch-row strong,
.cp-switch-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
  body.sidebar-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1030;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(12px);
  }

  .cp-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(var(--cp-sidebar-width), 88vw) !important;
    max-width: 88vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    z-index: 1040;
    box-shadow: 24px 0 58px rgba(0, 0, 0, 0.32);
  }

  body.sidebar-open .cp-sidebar {
    transform: translateX(0);
  }

  .cp-sidebar-inner {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .cp-sidebar-toggle {
    display: none !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
  }

  .cp-sidebar-fab {
    position: fixed;
    top: max(0.85rem, env(safe-area-inset-top));
    left: max(0.85rem, env(safe-area-inset-left));
    z-index: 1035;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.30);
    transition: opacity 0.16s ease, transform 0.16s ease;
  }

  body.sidebar-open .cp-sidebar-fab {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-0.5rem);
  }

  .cp-main {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .cp-topbar {
    align-items: stretch;
    padding-left: calc(1.25rem + 44px);
  }

  .cp-topbar > div:first-child,
  .cp-topbar-actions {
    flex: 1 1 100% !important;
  }
}

@media (max-width: 767.98px) {
  .cp-main {
    padding: 0.75rem !important;
  }

  .cp-sidebar-fab {
    top: max(0.65rem, env(safe-area-inset-top));
    left: max(0.65rem, env(safe-area-inset-left));
    width: 40px;
    height: 40px;
    border-radius: 13px;
  }

  .cp-page-stage,
  .cp-panel,
  .cp-subpanel,
  .cp-card {
    padding: 0.85rem !important;
  }

  .cp-page-header,
  .cp-panel-header,
  .cp-inline-actions,
  .cp-form-actions,
  .cp-topbar,
  .cp-topbar-actions {
    flex-direction: column;
    align-items: stretch !important;
  }

  .cp-form-actions .btn,
  .cp-inline-actions .btn,
  .cp-topbar-actions .btn,
  .modal-footer .btn {
    width: 100%;
    min-width: 0;
  }

  .cp-modal-backdrop {
    padding: 0.35rem;
  }

  .cp-modal-backdrop .modal-content,
  .cp-modal-panel {
    max-height: calc(100dvh - 0.7rem);
    border-radius: 16px !important;
  }

  .cp-modal-backdrop .modal-content > form,
  .cp-modal-panel > form {
    max-height: calc(100dvh - 0.7rem);
  }

  .cp-modal-backdrop .modal-body {
    padding: 0.85rem;
  }

  .cp-tabs .nav-link {
    padding: 0.55rem 0.75rem;
    font-size: 0.84rem;
  }

  .cp-switch-row {
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .cp-table-shell > .table,
  .table-responsive > .table {
    min-width: 640px;
  }
}

@media (max-width: 420px) {
  .cp-main {
    padding: 0.55rem !important;
  }

  .cp-topbar-title,
  .cp-page-header h1 {
    word-break: break-word;
  }

  .cp-tabs .nav-link {
    font-size: 0.78rem;
  }

  .cp-table-shell > .table,
  .table-responsive > .table {
    min-width: 560px;
  }
}

/* Last responsive guard: nenhuma regra compacta pode esconder campos/acoes. */
@media (max-width: 767.98px) {
  .cp-content-grid > div:last-child {
    display: block !important;
  }

  .cp-topbar {
    position: relative !important;
    top: auto !important;
    z-index: auto !important;
    margin: 0 0 0.75rem !important;
  }

  .cp-topbar-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .cp-topbar-actions > .btn {
    width: 100% !important;
    white-space: normal !important;
  }
}

.cp-dictation-panel {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.34);
  padding: 0.7rem 0.85rem;
}

.theme-light .cp-dictation-panel {
  background: rgba(248, 250, 252, 0.92);
}

#dictation-preview {
  min-height: 1.2rem;
  color: var(--cp-text-muted);
  overflow-wrap: anywhere;
}
