/* ==========================================================================
   KLIO.IM - PANEL EJECUTIVO Y CLÍNICO EN TIEMPO REAL (DASHBOARD INICIO)
   Layout elástico vertical anclado al viewport (Zero-Scroll / Zero-Reload)
   ========================================================================== */

.content.home-content,
.content:has(.klio-dashboard) {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 12px 24px 14px 24px !important;
  box-sizing: border-box !important;
}

.klio-dashboard {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  gap: 11px;
  overflow: hidden;
  box-sizing: border-box;
}

/* ==========================================================================
   Cabecera de Acciones Rápidas y Selector de Periodo en Topbar
   ========================================================================== */
.dash-head-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.dash-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tint-subtle, #f2f8f7);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  font-size: 11px;
  font-weight: 600;
  color: var(--primary-dark, var(--primary));
  white-space: nowrap;
}

.dash-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success, #10b981);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: dashLivePulse 2s infinite;
}

.dash-live-dot.is-syncing {
  background: var(--primary);
}

@keyframes dashLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.dash-period-group {
  display: inline-flex;
  align-items: center;
  background: var(--3d-recessed-bg, var(--bg, #f3f7f6));
  border: 1px solid var(--line);
  border-top-color: var(--line-strong);
  border-radius: var(--radius-md, 8px);
  padding: 2px;
  gap: 2px;
  box-shadow: var(--3d-track-shadow, inset 0 1.5px 3px rgba(18, 56, 53, 0.06));
}

.dash-period-btn {
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 5px 9px !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  cursor: pointer;
  line-height: 1.1;
  transition: all .14s ease;
}

.dash-period-btn:hover {
  color: var(--ink) !important;
}

.dash-period-btn.active {
  background: linear-gradient(180deg, #ffffff 0%, var(--tint-subtle, #f6fbfa) 100%) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line)) !important;
  box-shadow: var(--3d-pill-active-shadow, 0 1px 3px rgba(18, 56, 53, 0.1)) !important;
}

/* ==========================================================================
   Fila Superior: 6 KPIs Ejecutivos Interactivos
   ========================================================================== */
.dash-kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  flex-shrink: 0;
}

.dash-kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in srgb, var(--tint-subtle) 35%, #ffffff) 100%);
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: var(--radius-lg, 12px);
  padding: 10px 13px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  box-shadow: var(--3d-card-shadow, var(--shadow-sm));
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform .16s cubic-bezier(0.22, 1, 0.36, 1), border-color .16s ease, box-shadow .16s ease;
}

.dash-kpi-card:hover {
  transform: translateY(-1.5px);
  border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  box-shadow: var(--3d-card-hover-shadow, 0 5px 14px -4px rgba(18, 56, 53, 0.1));
}

.dash-kpi-card:active {
  transform: translateY(0.5px);
}

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-kpi-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 65%, #ffffff) 0%, var(--tint) 100%);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  box-shadow: var(--3d-icon-box-shadow, inset 0 1px 0 rgba(255,255,255,0.85), 0 1px 3px rgba(18,56,53,0.06));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-kpi-icon .icon {
  width: 15px;
  height: 15px;
}

.dash-kpi-icon.tone-blue {
  background: #eff6ff;
  color: #2563eb;
}

.dash-kpi-icon.tone-emerald {
  background: #ecfdf5;
  color: #059669;
}

.dash-kpi-icon.tone-violet {
  background: #f5f3ff;
  color: #7c3aed;
}

.dash-kpi-icon.tone-amber {
  background: #fffbeb;
  color: #d97706;
}

.dash-kpi-mid {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.dash-kpi-value {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.7px;
  color: var(--ink);
  line-height: 1.05;
}

.dash-kpi-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  background: var(--tint);
  color: var(--primary);
  white-space: nowrap;
}

.dash-kpi-pill.is-positive {
  background: #ecfdf5;
  color: #047857;
}

.dash-kpi-pill.is-warning {
  background: #fffbeb;
  color: #b45309;
}

.dash-kpi-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-kpi-bar {
  width: 100%;
  height: 3.5px;
  border-radius: 999px;
  background: var(--bg, #eef3f2);
  overflow: hidden;
  margin-top: 1px;
}

.dash-kpi-bar > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width .35s cubic-bezier(.16, 1, .3, 1);
}

/* ==========================================================================
   Grid Bento Principal Elástico (3 Columnas, Sin Scroll Externo)
   ========================================================================== */
.dash-bento-grid {
  display: grid;
  grid-template-columns: 1.26fr 1.16fr 0.96fr;
  gap: 11px;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.dash-col {
  display: flex;
  flex-direction: column;
  gap: 11px;
  min-height: 0;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.dash-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  box-shadow: var(--3d-card-shadow, var(--shadow-sm));
}

.dash-panel.flex-top {
  flex: 1.08 1 0%;
}

.dash-panel.flex-bottom {
  flex: 0.92 1 0%;
}

.dash-panel-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, var(--tint-subtle, #f8fbfb) 100%);
  box-shadow: inset 0 1px 0 #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.dash-panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dash-panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-panel-subtitle {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.dash-mini-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--3d-recessed-bg, var(--bg, #f2f6f5));
  border: 1px solid var(--line);
  border-top-color: var(--line-strong);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
  box-shadow: var(--3d-track-shadow, inset 0 1px 2px rgba(18, 56, 53, 0.05));
}

.dash-mini-tab {
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 3.5px 8px !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  cursor: pointer;
  line-height: 1.15;
  transition: all .14s ease;
}

.dash-mini-tab:hover {
  color: var(--ink) !important;
}

.dash-mini-tab.active {
  background: linear-gradient(180deg, #ffffff 0%, var(--tint-subtle) 100%) !important;
  color: var(--primary) !important;
  font-weight: 700 !important;
  border-color: color-mix(in srgb, var(--primary) 24%, var(--line)) !important;
  box-shadow: var(--3d-pill-active-shadow, 0 1px 2px rgba(0, 0, 0, 0.06)) !important;
}

.dash-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dash-panel-body.is-scrollable {
  overflow-y: auto;
  padding: 8px 12px;
}

/* ==========================================================================
   Gráficas SVG Interactivas (Columna 1)
   ========================================================================== */
.dash-chart-container {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.dash-svg-wrap {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.dash-svg-chart {
  width: 100%;
  height: 100%;
  max-height: 175px;
  overflow: visible;
}

.dash-chart-bar {
  transition: opacity .15s ease, filter .15s ease;
  cursor: pointer;
}

.dash-chart-bar:hover {
  filter: brightness(1.08);
  opacity: 0.92;
}

.dash-chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px dashed var(--line);
  font-size: 10.5px;
  color: var(--muted);
  flex-shrink: 0;
}

.dash-legend-items {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  color: var(--ink);
}

.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 2.5px;
  display: inline-block;
}

/* Gráfica de Dona + Barras Horizontales */
.dash-donut-layout {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
}

.dash-donut-box {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.dash-donut-svg {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.dash-donut-segment {
  transition: stroke-dasharray .35s ease, stroke-width .15s ease;
  cursor: pointer;
}

.dash-donut-segment:hover {
  stroke-width: 15;
}

.dash-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.dash-donut-center strong {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.dash-donut-center small {
  font-size: 9.5px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
  text-transform: uppercase;
}

.dash-dist-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  overflow-y: auto;
  max-height: 100%;
  padding-right: 2px;
}

.dash-dist-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dash-dist-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  gap: 6px;
}

.dash-dist-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-dist-val {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.dash-dist-track {
  width: 100%;
  height: 5px;
  background: var(--bg, #eef3f2);
  border-radius: 999px;
  overflow: hidden;
}

.dash-dist-fill {
  height: 100%;
  border-radius: 999px;
  transition: width .35s ease;
}

/* ==========================================================================
   Agenda Operativa en Vivo y Expedientes (Columna 2)
   ========================================================================== */
.dash-apt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-apt-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
  transition: border-color .15s ease, background .15s ease;
}

.dash-apt-item:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--line));
  background: var(--tint-subtle, #f9fcfb);
}

.dash-apt-time {
  min-width: 48px;
  padding: 4px 6px;
  border-radius: 7px;
  background: var(--tint);
  color: var(--primary-dark, var(--primary));
  font-size: 11.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
}

.dash-apt-time small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  opacity: 0.8;
}

.dash-apt-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.dash-apt-patient {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dash-apt-patient:hover {
  color: var(--primary);
}

.dash-apt-sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dash-apt-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.dash-status-select {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  padding: 3px 7px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line) !important;
  background: var(--bg) !important;
  color: var(--ink) !important;
  cursor: pointer;
  height: 25px;
}

.dash-status-select.st-Atendida {
  background: #ecfdf5 !important;
  color: #047857 !important;
  border-color: #a7f3d0 !important;
}

.dash-status-select.st-Confirmada {
  background: var(--tint) !important;
  color: var(--primary) !important;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line)) !important;
}

.dash-status-select.st-En-consulta {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border-color: #bfdbfe !important;
}

.dash-status-select.st-No-asistió,
.dash-status-select.st-Cancelada {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}

/* Buscador rápido de pacientes en tarjeta */
.dash-patient-search-input {
  width: 145px !important;
  height: 26px !important;
  padding: 3px 9px !important;
  font-size: 11px !important;
  border-radius: 7px !important;
  border: 1px solid var(--line) !important;
  background: #ffffff !important;
}

.dash-patient-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.dash-patient-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .14s ease;
}

.dash-patient-row:hover {
  background: var(--tint-subtle);
  border-color: var(--line);
}

.dash-patient-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  border: 1.5px solid transparent;
  overflow: hidden;
}

.dash-patient-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-patient-meta {
  flex: 1;
  min-width: 0;
}

.dash-patient-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dash-patient-sub {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.dash-patient-go {
  padding: 4px 8px !important;
  font-size: 10.5px !important;
  border-radius: 6px !important;
  flex-shrink: 0;
}

/* ==========================================================================
   Ecosistema & Seguimiento en Vivo (Columna 3)
   ========================================================================== */
.dash-eco-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  flex: 1 1 auto;
  align-content: start;
}

.dash-eco-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 10px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  transition: all .15s ease;
  min-width: 0;
}

.dash-eco-item:hover {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
  background: var(--tint-subtle);
  transform: translateY(-1px);
}

.dash-eco-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--tint);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-eco-icon .icon {
  width: 15px;
  height: 15px;
}

.dash-eco-meta {
  flex: 1;
  min-width: 0;
}

.dash-eco-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.dash-eco-status {
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  margin-top: 1px;
}

.dash-dot-on {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--success, #10b981);
  flex-shrink: 0;
}

.dash-dot-off {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

/* Tarjetas de seguimiento y pulso */
.dash-followup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.dash-mini-metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  background: var(--bg, #f6f9f9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease;
}

.dash-mini-metric:hover {
  background: #ffffff;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.dash-mini-metric span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.2;
}

.dash-mini-metric strong {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.dash-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.dash-act-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 10.5px;
}

.dash-act-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.dash-act-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  font-weight: 500;
}

.dash-act-time {
  font-size: 9.5px;
  color: var(--muted);
  flex-shrink: 0;
}

.dash-empty-compact {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
  color: var(--muted);
  gap: 6px;
}

.dash-empty-compact p {
  margin: 0;
  font-size: 11.5px;
}

/* ==========================================================================
   Adaptación Responsiva (Tablets y Móviles)
   ========================================================================== */
@media (max-width: 1280px) {
  .dash-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dash-bento-grid {
    grid-template-columns: 1.15fr 1.1fr 0.9fr;
  }
}

@media (max-width: 1020px) {
  .content.home-content,
  .content:has(.klio-dashboard) {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important;
  }
  .klio-dashboard {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .dash-bento-grid {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .dash-panel {
    min-height: 260px;
  }
}

@media (max-width: 680px) {
  .content.home-content,
  .content:has(.klio-dashboard) {
    padding: 14px !important;
    overflow-y: visible !important;
    overflow-x: hidden !important;
  }
  .dash-head-controls {
    flex-wrap: wrap !important;
    gap: 6px !important;
    width: 100% !important;
  }
  .dash-period-group {
    max-width: 100%;
    overflow-x: auto;
  }
  .dash-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .dash-kpi-mid {
    flex-wrap: wrap;
    gap: 4px;
  }
  .dash-kpi-value {
    font-size: 19px;
  }
  .dash-donut-layout {
    grid-template-columns: 1fr;
  }
  .dash-panel-head {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  .dash-panel-title-wrap {
    white-space: normal !important;
    min-width: 0 !important;
  }
  .dash-patient-search-input {
    width: 100% !important;
    min-width: 120px !important;
    flex: 1 1 140px !important;
  }
  .dash-apt-item {
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }
  .dash-apt-info {
    flex: 1 1 150px !important;
    min-width: 0 !important;
  }
  .dash-apt-actions {
    width: 100% !important;
    justify-content: flex-end !important;
    flex-wrap: wrap !important;
  }
}

@media (max-width: 460px) {
  .dash-eco-grid,
  .dash-followup-grid {
    grid-template-columns: 1fr !important;
  }
}
