:where(.panel, .card) {
  border-radius: var(--radius-lg);
}

:where(.panel, .settings-card, .metric-card, .analytics-metric-card, .stat-card, .team-card, .billing-card) {
  border-color: var(--lf-color-border);
  border-radius: var(--lf-radius-lg);
  color: var(--lf-color-text);
}

:where(.panel, .settings-card, .metric-card, .analytics-metric-card, .stat-card, .team-card, .billing-card):focus-within {
  border-color: var(--lf-color-border-strong);
}

:where(.lf-panel, .lf-card) {
  border: 1px solid var(--lf-color-border);
  border-radius: var(--lf-radius-lg);
  background: var(--lf-color-surface);
  color: var(--lf-color-text);
  box-shadow: none;
  transition:
    border-color var(--lf-transition-fast),
    box-shadow var(--lf-transition-fast),
    transform var(--lf-transition-fast);
}

:where(.lf-panel) {
  padding: var(--lf-space-5);
}

:where(.lf-card) {
  padding: var(--lf-space-4);
}

:where(.lf-card:hover) {
  border-color: var(--lf-color-border-strong);
  box-shadow: var(--lf-shadow-card-hover);
  transform: translateY(-1px);
}

body.dashboard-client-flat-theme > .shell :is(
  .panel,
  .settings-card,
  .metric-card,
  .analytics-metric-card,
  .stat-card,
  .team-card,
  .billing-card,
  .campaign-card,
  .dashboard-commercial-summary-card,
  .dashboard-task-row,
  .dashboard-brief-insight,
  .dashboard-pipeline-lane
) {
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-lg) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell :is(.panel, .lf-panel) {
  padding: var(--lf-space-5) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .metric-card,
  .analytics-metric-card,
  .stat-card,
  .dashboard-commercial-summary-card
) {
  min-height: 118px !important;
  padding: var(--lf-space-4) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .panel-header,
  .lf-panel-header,
  .dashboard-panel-header-with-action
) {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: var(--lf-space-4) !important;
  margin-bottom: var(--lf-space-4) !important;
  padding: 0 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .panel-header h1,
  .panel-header h2,
  .panel-header h3,
  .dashboard-welcome-title,
  .settings-card h3,
  .settings-card h4
) {
  color: var(--lf-color-text) !important;
  letter-spacing: 0 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .panel-header p,
  .subtitle,
  .muted,
  .analytics-metric-sub,
  .settings-card p
) {
  color: var(--lf-color-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .integration-panel-shell,
  .integration-panel-card,
  .integration-health-card,
  .integration-sidebar-card,
  .integration-status-card,
  .company-detail-panel,
  .company-profile-status-card,
  .billing-overview-panel,
  .billing-info-summary,
  .billing-plan-summary,
  .billing-includes-summary,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .plans-usage-panel,
  .plans-comparison-panel,
  .detail-panel,
  .progress-panel,
  .journey-card,
  .insurance-ai-card,
  .notification-card
) {
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-lg) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .integration-panel-shell,
  .integration-panel-card,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .detail-panel,
  .progress-panel
) {
  padding: var(--lf-space-5) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .settings-row,
  .integration-activity-item,
  .integration-status-metric,
  .system-status-metric,
  .system-status-item,
  .billing-usage-row,
  .billing-invoice-line,
  .billing-feature-detail-list li,
  .billing-feature-list li,
  .journey-timeline-item,
  .detail-info-row
) {
  min-width: 0 !important;
  border-color: var(--lf-color-border) !important;
  color: var(--lf-color-text) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .settings-row:hover,
  .integration-activity-item:hover,
  .system-status-item:hover,
  .billing-usage-row:hover
) {
  background: var(--lf-color-surface-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .integration-service-card,
  .integration-quick-button,
  .integration-connect-actions,
  .is-command-bar,
  .users-toolbar,
  .clients-toolbar,
  .plans-admin-header
) {
  border-color: var(--lf-color-border) !important;
  border-radius: var(--lf-radius-lg) !important;
  background: var(--lf-color-surface) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell .integration-service-card.active {
  border-color: color-mix(in srgb, var(--lf-color-primary) 28%, transparent) !important;
  background: var(--lf-color-primary-soft) !important;
}

:where(.lf-panel-header) {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--lf-space-4);
  margin-bottom: var(--lf-space-4);
}

:where(.lf-kpi-card) {
  min-height: 124px;
  display: grid;
  align-content: start;
  gap: var(--lf-space-3);
  padding: var(--lf-space-4);
}

:where(.lf-empty-state) {
  display: grid;
  gap: var(--lf-space-2);
  padding: var(--lf-space-5);
  border: 1px dashed var(--lf-color-border-strong);
  border-radius: var(--lf-radius-md);
  color: var(--lf-color-muted);
  text-align: left;
}

:where(.empty-state, .dashboard-empty-state, .lead-empty-state) {
  border: 1px dashed var(--lf-color-border-strong);
  border-radius: var(--lf-radius-md);
  color: var(--lf-color-muted);
}

body.dashboard-client-flat-theme > .shell :is(.empty-state, .dashboard-empty-state, .lead-empty-state, .module-empty-state) {
  display: grid !important;
  gap: var(--lf-space-2) !important;
  padding: var(--lf-space-5) !important;
  border: 1px dashed var(--lf-color-border-strong) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-muted) !important;
  box-shadow: none !important;
}

:where(.lf-work-list) {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: var(--lf-space-2);
  overflow: auto;
}

:where(.lf-work-item) {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 0;
  border-radius: var(--lf-radius-md);
  padding: 10px;
  background: transparent;
  color: var(--lf-color-text-soft);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

:where(.lf-work-item:hover, .lf-work-item.is-active) {
  background: var(--lf-color-primary-soft);
}

:where(.lf-avatar) {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: var(--lf-radius-pill);
  background: var(--lf-color-primary-soft);
  color: var(--lf-color-primary);
  font-size: 13px;
  font-weight: 800;
}

:where(.lf-avatar--large) {
  width: 52px;
  height: 52px;
  font-size: 16px;
}

:where(.lf-item-copy) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

:where(.lf-item-title) {
  min-width: 0;
  overflow: hidden;
  color: var(--lf-color-text);
  font-size: var(--lf-font-size-md);
  font-weight: 800;
  line-height: var(--lf-line-tight);
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.lf-item-meta) {
  min-width: 0;
  overflow: hidden;
  color: var(--lf-color-muted);
  font-size: var(--lf-font-size-sm);
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

:where(.lf-item-side) {
  display: grid;
  justify-items: end;
  gap: var(--lf-space-2);
  color: var(--lf-color-muted);
  font-size: var(--lf-font-size-sm);
  font-weight: 600;
}

:where(.lf-detail-card) {
  display: grid;
  gap: 13px;
  border: 1px solid var(--lf-color-border);
  border-radius: var(--lf-radius-lg);
  padding: 15px;
  background: color-mix(in srgb, var(--lf-color-surface) 52%, transparent);
  box-shadow: none;
}

:where(.lf-detail-card h3) {
  margin: 0;
  color: var(--lf-color-text);
  font-size: var(--lf-font-size-md);
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 720px) {
  :where(.lf-panel) {
    padding: var(--lf-space-4);
  }

  :where(.lf-panel-header) {
    align-items: stretch;
    flex-direction: column;
  }
}

/* App interna: neutraliza fondos heredados para que las nuevas pantallas compartan
   una base plana y editable desde esta capa final. */
body[data-company-theme] > .shell :is(
  .panel,
  .card,
  .kpi-card,
  .metric-card,
  .analytics-metric-card,
  .dashboard-stat-card,
  .table-card,
  .table-wrap,
  .table-modern,
  .data-table,
  .dashboard-table,
  .widget-card,
  .workspace-card,
  .activity-card,
  .settings-card,
  .page-hero-card,
  .workspace-surface-main,
  .workspace-surface-side,
  .workspace-surface-stat-card,
  .workspace-surface-action-card,
  .workspace-connection-card,
  .workspace-surface-checklist,
  .hero-stat-chip,
  .pipeline-lane,
  .pipeline-ticket,
  .pipeline-ticket-empty,
  .lead-contact-menu-panel,
  .crm-panel,
  .company-metric-card,
  .campaign-metric-card,
  .campaign-network-panel,
  .campaign-side-panel,
  .proposal-card,
  .proposal-metric-card,
  .proposal-toolbar-card,
  .proposal-stage-card,
  .proposal-table-shell,
  .company-card,
  .company-stage-card,
  .company-table-shell,
  .ai-panel,
  .insurance-surface,
  .clinical-panel,
  .clients-page-surface,
  .clients-kpi-card,
  .team-card,
  .plan-card,
  .plans-admin-panel,
  .plans-admin-table-wrap,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .billing-card,
  .billing-usage-card,
  .billing-upgrade-card,
  .billing-invoice-card,
  .module-summary-card,
  .module-section-card,
  .module-card,
  .appearance-preview-card,
  .integration-section-card,
  .integration-saas-card,
  .integration-sidebar-card,
  .workspace-subcard,
  .workspace-subcard-highlight,
  .clinical-tabs-card,
  .clinical-calendar-card,
  .patient-status-card,
  .journey-card,
  .patient-appointment-card,
  .progress-card,
  .progress-card-inline,
  .progress-card--actionable,
  .journey-process-card,
  .journey-card-panel,
  .agenda-card-panel,
  .treatment-card-panel,
  .summary-card-panel,
  .detail-tab-panel,
  .lead-popup-card,
  .client-form-card,
  .automation-card,
  .reminder-stat-card,
  .reminder-next-card,
  .calendar-card,
  .conversation-panel,
  .chat-panel,
  .detail-panel,
  .progress-panel,
  .notification-subpanel,
  .section-info-panel,
  .tab-panel,
  .pipeline-card,
  .dashboard-global-panel,
  .dashboard-profile-panel,
  .dashboard-doctor-card,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-connection-card,
  .dashboard-agenda-date-card,
  .dashboard-agenda-card-body,
  .dashboard-donut-wrap,
  .analytics-chart-wrap
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-admin-trigger[data-client-create-open] {
  border-color: rgba(79, 70, 229, 0.24) !important;
  background: linear-gradient(135deg, #315df6, #6d3ff2) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.24) !important;
}

/* Empresas global: superficies limpias y transparentes. */
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-topbar--global,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-workspace--global > .dashboard-main-column > .panel,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-workspace--global .dashboard-global-panel,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-workspace--global .dashboard-global-stat,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-item,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-item,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-donut::after {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap tbody tr:hover td {
  background: transparent !important;
  background-color: transparent !important;
}

/* Global companies dashboard fusion */
body.dashboard-client-flat-theme[data-company-theme] > .shell {
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-topbar--global {
  min-height: 76px !important;
  padding: 0 30px !important;
  border-bottom: 1px solid #e7edf5 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-topbar-title {
  max-width: 620px !important;
  color: #415574 !important;
  font-size: 14px !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global {
  gap: 18px !important;
  align-items: start !important;
  padding: 0 30px 30px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global > .dashboard-main-column > .panel,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-global-panel {
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 20px !important;
  padding: 0 0 18px !important;
  border: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header h3,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-panel .panel-header h3 {
  margin: 0 !important;
  color: #111827 !important;
  font-size: 22px !important;
  line-height: 1.15 !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header p,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-panel .panel-header p {
  max-width: 560px !important;
  margin: 8px 0 0 !important;
  color: #60718d !important;
  font-size: 15px !important;
  line-height: 1.42 !important;
  font-weight: 600 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header-actions {
  flex: 0 0 auto !important;
  display: flex !important;
  justify-content: flex-end !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header--actions-only {
  justify-content: flex-end !important;
  padding-bottom: 16px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-admin-trigger {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 44px !important;
  padding: 0 16px !important;
  border: 1px solid rgba(109, 63, 242, 0.36) !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #4f2bd8 !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-admin-trigger svg,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-table-action svg,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-filter-button svg,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu svg,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-pagination svg {
  width: 17px !important;
  height: 17px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-toolbar {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 4px 0 22px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-search-field--global {
  width: min(360px, 100%) !important;
  min-width: min(300px, 100%) !important;
  max-width: 360px !important;
  height: 44px !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-filter-button {
  width: 44px !important;
  height: 44px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #0f172a !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-stat-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 14px !important;
  margin-bottom: 18px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-global-stat {
  min-height: 130px !important;
  display: grid !important;
  grid-template-columns: 56px 1fr !important;
  grid-template-rows: auto auto auto !important;
  align-items: center !important;
  gap: 2px 14px !important;
  padding: 18px !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat-icon {
  grid-row: 1 / span 3 !important;
  width: 52px !important;
  height: 52px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 14px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat-icon svg {
  width: 28px !important;
  height: 28px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat--companies .dashboard-global-stat-icon {
  background: #eee7ff !important;
  color: #6d3ff2 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat--active .dashboard-global-stat-icon {
  background: #dcfce7 !important;
  color: #16a34a !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat--users .dashboard-global-stat-icon {
  background: #dbeafe !important;
  color: #2563eb !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat--clients .dashboard-global-stat-icon {
  background: #fef3c7 !important;
  color: #d97706 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat .analytics-metric-label {
  color: #526481 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat .analytics-metric-value {
  color: #0f172a !important;
  font-size: 31px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-stat .analytics-metric-sub {
  color: #60718d !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 650 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap {
  overflow: visible !important;
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap th {
  height: 48px !important;
  padding: 0 18px !important;
  color: #5d6d87 !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid #e7edf5 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap td {
  height: 68px !important;
  padding: 12px 18px !important;
  color: #111827 !important;
  font-size: 13px !important;
  border-bottom: 1px solid #eef2f7 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap tbody tr:last-child td {
  border-bottom: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-wrap tbody tr:hover td {
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .company-cell {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .company-cell-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  border: 1px solid #e7edf5 !important;
  border-radius: 10px !important;
  background: transparent !important;
  background-color: transparent !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .company-cell-avatar.is-fallback {
  background: linear-gradient(135deg, #2f80ed, #7c3aed) !important;
  color: #ffffff !important;
  font-weight: 850 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .company-cell-name {
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-status-chip,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-plan-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-status-chip.is-active {
  background: #dcfce7 !important;
  color: #15803d !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-status-chip.is-neutral {
  background: #f1f5f9 !important;
  color: #475569 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-status-chip span {
  width: 6px !important;
  height: 6px !important;
  border-radius: 999px !important;
  background: currentColor !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-plan-chip {
  background: transparent !important;
  color: #0f172a !important;
  padding: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-table-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  overflow: visible !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-table-action {
  min-height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 12px !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #0f172a !important;
  border: 1px solid #dbe4f0 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-table-action:first-child {
  border-color: rgba(109, 63, 242, 0.42) !important;
  color: #4f2bd8 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu {
  position: relative !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu summary {
  width: 34px !important;
  height: 38px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #0f172a !important;
  list-style: none !important;
  cursor: pointer !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu summary::-webkit-details-marker {
  display: none !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  right: 0 !important;
  z-index: 30 !important;
  min-width: 128px !important;
  padding: 6px !important;
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.94) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: blur(14px) !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list button {
  width: 100% !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  text-align: left !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list button:hover {
  background: rgba(79, 70, 229, 0.08) !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list .superadmin-delete-client {
  color: #b91c1c !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list .dashboard-protected-client {
  color: #64748b !important;
  cursor: help !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list .dashboard-protected-client:hover {
  background: #f1f5f9 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-row-menu-list button:disabled {
  color: #94a3b8 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-footer {
  display: grid !important;
  grid-template-columns: 1fr auto 140px !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 16px !important;
  color: #526481 !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-pagination {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-pagination button,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-page-size {
  min-width: 38px !important;
  height: 38px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid #dbe4f0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-pagination button.is-active {
  border-color: rgba(109, 63, 242, 0.58) !important;
  color: #4f2bd8 !important;
  box-shadow: 0 0 0 3px rgba(109, 63, 242, 0.08) !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-pagination button:disabled {
  color: #94a3b8 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-page-size {
  width: 140px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-panel .panel-header {
  padding: 0 0 18px !important;
  border-bottom: 1px solid #e7edf5 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-list {
  display: grid !important;
  gap: 12px !important;
  margin-top: 16px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-item {
  display: grid !important;
  grid-template-columns: 48px 1fr !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 88px !important;
  padding: 14px 16px !important;
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-icon {
  width: 44px !important;
  height: 44px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 12px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-icon svg {
  width: 24px !important;
  height: 24px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-item--companies .dashboard-global-summary-icon {
  background: #eee7ff !important;
  color: #6d3ff2 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-item--payments .dashboard-global-summary-icon {
  background: #dcfce7 !important;
  color: #16a34a !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-item--records .dashboard-global-summary-icon {
  background: #dbeafe !important;
  color: #2563eb !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-copy span,
body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-copy small {
  display: block !important;
  color: #526481 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-summary-copy strong {
  display: inline-block !important;
  margin-top: 6px !important;
  color: #0f172a !important;
  font-size: 25px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-distribution {
  display: grid !important;
  grid-template-columns: 118px 1fr !important;
  gap: 18px !important;
  align-items: center !important;
  margin-top: 18px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-donut {
  width: 112px !important;
  aspect-ratio: 1 !important;
  border-radius: 50% !important;
  background: conic-gradient(#6d3ff2 0 57%, #2f80ed 57% 86%, #22c55e 86% 100%) !important;
  position: relative !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-donut::after {
  content: "" !important;
  position: absolute !important;
  inset: 25px !important;
  border-radius: 50% !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: inset 0 0 0 1px #eef2f7 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-list {
  display: grid !important;
  gap: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-item {
  display: grid !important;
  grid-template-columns: 1fr auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 62px !important;
  padding: 12px !important;
  border: 1px solid #e4ebf4 !important;
  border-radius: 8px !important;
  background: transparent !important;
  background-color: transparent !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-copy strong {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: #111827 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-plan-dot {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: var(--plan-color, #6d3ff2) !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-copy span {
  display: block !important;
  margin-top: 5px !important;
  color: #60718d !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-share {
  min-width: 58px !important;
  min-height: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #eaf0ff !important;
}

body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-share strong {
  color: #2563eb !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

@media (max-width: 1260px) {
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-side-column--global {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    display: grid !important;
  }
}

@media (max-width: 900px) {
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global {
    padding: 0 14px 24px !important;
  }

  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-stat-grid,
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace--global .dashboard-side-column--global,
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-plan-distribution,
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-table-footer {
    grid-template-columns: 1fr !important;
  }

  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-header,
  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-global-toolbar {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-search-field--global {
    width: 100% !important;
    max-width: none !important;
  }
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .detail-panel .progress-card.progress-card-inline,
html body.dashboard-client-flat-theme[data-company-theme] > .shell .whatsapp-layout .progress-card.progress-card-inline,
html body.dashboard-client-flat-theme[data-company-theme] > .shell .lead-detail-progress-panel .progress-card.progress-card-inline {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell :is(
  .panel,
  .card,
  .metric-card,
  .analytics-metric-card,
  .table-wrap,
  .table-modern,
  .widget-card,
  .workspace-card,
  .activity-card,
  .settings-card,
  .page-hero-card,
  .workspace-surface-main,
  .workspace-surface-side,
  .workspace-surface-stat-card,
  .workspace-surface-action-card,
  .workspace-connection-card,
  .workspace-surface-checklist,
  .hero-stat-chip,
  .pipeline-lane,
  .pipeline-ticket,
  .pipeline-ticket-empty,
  .lead-contact-menu-panel,
  .campaign-metric-card,
  .campaign-network-panel,
  .proposal-card,
  .proposal-metric-card,
  .proposal-toolbar-card,
  .proposal-stage-card,
  .proposal-table-shell,
  .company-card,
  .company-stage-card,
  .company-table-shell,
  .clients-page-surface,
  .clients-kpi-card,
  .team-card,
  .plan-card,
  .plans-admin-panel,
  .plans-admin-table-wrap,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .billing-card,
  .billing-usage-card,
  .billing-upgrade-card,
  .billing-invoice-card,
  .module-summary-card,
  .module-section-card,
  .module-card,
  .appearance-preview-card,
  .integration-section-card,
  .integration-saas-card,
  .integration-sidebar-card,
  .workspace-subcard,
  .workspace-subcard-highlight,
  .clinical-tabs-card,
  .clinical-calendar-card,
  .patient-status-card,
  .journey-card,
  .patient-appointment-card,
  .progress-card,
  .progress-card-inline,
  .progress-card--actionable,
  .journey-process-card,
  .journey-card-panel,
  .agenda-card-panel,
  .treatment-card-panel,
  .summary-card-panel,
  .detail-tab-panel,
  .lead-popup-card,
  .client-form-card,
  .automation-card,
  .reminder-stat-card,
  .reminder-next-card,
  .calendar-card,
  .conversation-panel,
  .chat-panel,
  .detail-panel,
  .progress-panel,
  .notification-subpanel,
  .section-info-panel,
  .tab-panel,
  .pipeline-card,
  .dashboard-global-panel,
  .dashboard-profile-panel,
  .dashboard-doctor-card,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-connection-card,
  .dashboard-agenda-date-card,
  .dashboard-agenda-card-body,
  .dashboard-donut-wrap,
  .analytics-chart-wrap
) {
  border-color: rgba(148, 163, 184, 0.2) !important;
}

body[data-company-theme] > .shell :is(
  .panel,
  .card,
  .kpi-card,
  .metric-card,
  .analytics-metric-card,
  .dashboard-stat-card,
  .table-card,
  .table-wrap,
  .table-modern,
  .widget-card,
  .workspace-card,
  .activity-card,
  .settings-card,
  .page-hero-card,
  .workspace-surface-main,
  .workspace-surface-side,
  .workspace-surface-stat-card,
  .workspace-surface-action-card,
  .workspace-connection-card,
  .workspace-surface-checklist,
  .hero-stat-chip,
  .pipeline-lane,
  .pipeline-ticket,
  .pipeline-ticket-empty,
  .lead-contact-menu-panel,
  .crm-panel,
  .company-metric-card,
  .campaign-metric-card,
  .campaign-network-panel,
  .campaign-side-panel,
  .proposal-card,
  .proposal-metric-card,
  .proposal-toolbar-card,
  .proposal-stage-card,
  .proposal-table-shell,
  .company-card,
  .company-stage-card,
  .company-table-shell,
  .ai-panel,
  .insurance-surface,
  .clinical-panel,
  .clients-page-surface,
  .clients-kpi-card,
  .team-card,
  .plan-card,
  .plans-admin-panel,
  .plans-admin-table-wrap,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .billing-card,
  .billing-usage-card,
  .billing-upgrade-card,
  .billing-invoice-card,
  .module-summary-card,
  .module-section-card,
  .module-card,
  .appearance-preview-card,
  .integration-section-card,
  .integration-saas-card,
  .integration-sidebar-card,
  .workspace-subcard,
  .workspace-subcard-highlight,
  .clinical-tabs-card,
  .clinical-calendar-card,
  .patient-status-card,
  .journey-card,
  .patient-appointment-card,
  .progress-card,
  .progress-card-inline,
  .progress-card--actionable,
  .journey-process-card,
  .journey-card-panel,
  .agenda-card-panel,
  .treatment-card-panel,
  .summary-card-panel,
  .detail-tab-panel,
  .lead-popup-card,
  .client-form-card,
  .automation-card,
  .reminder-stat-card,
  .reminder-next-card,
  .calendar-card,
  .conversation-panel,
  .chat-panel,
  .detail-panel,
  .progress-panel,
  .notification-subpanel,
  .section-info-panel,
  .tab-panel,
  .pipeline-card,
  .dashboard-global-panel,
  .dashboard-profile-panel,
  .dashboard-doctor-card,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-connection-card,
  .dashboard-agenda-date-card,
  .dashboard-agenda-card-body,
  .dashboard-donut-wrap,
  .analytics-chart-wrap
)::before,
body[data-company-theme] > .shell :is(
  .panel,
  .card,
  .kpi-card,
  .metric-card,
  .analytics-metric-card,
  .dashboard-stat-card,
  .table-card,
  .table-wrap,
  .table-modern,
  .widget-card,
  .workspace-card,
  .activity-card,
  .settings-card,
  .page-hero-card,
  .workspace-surface-main,
  .workspace-surface-side,
  .workspace-surface-stat-card,
  .workspace-surface-action-card,
  .workspace-connection-card,
  .workspace-surface-checklist,
  .hero-stat-chip,
  .pipeline-lane,
  .pipeline-ticket,
  .pipeline-ticket-empty,
  .lead-contact-menu-panel,
  .crm-panel,
  .company-metric-card,
  .campaign-metric-card,
  .campaign-network-panel,
  .campaign-side-panel,
  .proposal-card,
  .proposal-metric-card,
  .proposal-toolbar-card,
  .proposal-stage-card,
  .proposal-table-shell,
  .company-card,
  .company-stage-card,
  .company-table-shell,
  .ai-panel,
  .insurance-surface,
  .clinical-panel,
  .clients-page-surface,
  .clients-kpi-card,
  .team-card,
  .plan-card,
  .plans-admin-panel,
  .plans-admin-table-wrap,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .billing-card,
  .billing-usage-card,
  .billing-upgrade-card,
  .billing-invoice-card,
  .module-summary-card,
  .module-section-card,
  .module-card,
  .appearance-preview-card,
  .integration-section-card,
  .integration-saas-card,
  .integration-sidebar-card,
  .workspace-subcard,
  .workspace-subcard-highlight,
  .clinical-tabs-card,
  .clinical-calendar-card,
  .patient-status-card,
  .journey-card,
  .patient-appointment-card,
  .progress-card,
  .progress-card-inline,
  .progress-card--actionable,
  .journey-process-card,
  .journey-card-panel,
  .agenda-card-panel,
  .treatment-card-panel,
  .summary-card-panel,
  .detail-tab-panel,
  .lead-popup-card,
  .client-form-card,
  .automation-card,
  .reminder-stat-card,
  .reminder-next-card,
  .calendar-card,
  .conversation-panel,
  .chat-panel,
  .detail-panel,
  .progress-panel,
  .notification-subpanel,
  .section-info-panel,
  .tab-panel,
  .pipeline-card,
  .dashboard-global-panel,
  .dashboard-profile-panel,
  .dashboard-doctor-card,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-connection-card,
  .dashboard-agenda-date-card,
  .dashboard-agenda-card-body,
  .dashboard-donut-wrap,
  .analytics-chart-wrap
)::after {
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell :is(.data-table, .dashboard-table) :is(thead, tbody, tfoot, tr, th, td) {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell :is(
  .clients-page-surface .team-card:hover,
  .lead-contact-menu-panel,
  .plans-toggle button.active,
  .plans-admin-table select,
  .proposal-table-search,
  .company-table-search
) {
  background: rgba(248, 250, 252, 0.22) !important;
  background-color: rgba(248, 250, 252, 0.22) !important;
  box-shadow: none !important;
}

/* Migrated from global-design-system.css: public transparent cards. */
/* Paginas publicas: tarjetas sin relleno blanco para mantener el look limpio. */
:is(.landing-shell, .plans-public-wrap) :is(
  .privacy-section,
  .service-card,
  .workflow-card,
  .landing-plan-card,
  .mock-card,
  .crm-stage,
  .plans-public-card,
  .plans-pricing-card,
  .plans-comparison-panel
) {
  background: transparent !important;
  box-shadow: none !important;
}

:is(.landing-shell, .plans-public-wrap) :is(
  .privacy-section,
  .service-card,
  .workflow-card,
  .landing-plan-card,
  .mock-card,
  .crm-stage,
  .plans-public-card,
  .plans-pricing-card,
  .plans-comparison-panel
)::before,
:is(.landing-shell, .plans-public-wrap) :is(
  .privacy-section,
  .service-card,
  .workflow-card,
  .landing-plan-card,
  .mock-card,
  .crm-stage,
  .plans-public-card,
  .plans-pricing-card,
  .plans-comparison-panel
)::after {
  background: transparent !important;
  box-shadow: none !important;
}

:is(.landing-shell, .plans-public-wrap) .plans-pricing-card.is-featured,
:is(.landing-shell, .plans-public-wrap) .landing-plan-card.is-featured {
  background: rgba(124, 58, 237, 0.07) !important;
  box-shadow: none !important;
}

/* Migrated from global-design-system.css: final authenticated card transparency lock. */
/* Final card transparency lock: this stays last so local page rules cannot bring
   white card fills back into authenticated app surfaces. */
body[data-company-theme] > .shell :is(
  .panel,
  .card,
  .kpi-card,
  .metric-card,
  .analytics-metric-card,
  .dashboard-stat-card,
  .table-card,
  .table-wrap,
  .table-modern,
  .widget-card,
  .workspace-card,
  .workspace-subcard,
  .workspace-subcard-highlight,
  .activity-card,
  .settings-card,
  .page-hero-card,
  .crm-panel,
  .company-card,
  .company-metric-card,
  .company-stage-card,
  .campaign-metric-card,
  .campaign-network-panel,
  .campaign-side-panel,
  .proposal-card,
  .proposal-metric-card,
  .proposal-toolbar-card,
  .proposal-stage-card,
  .ai-panel,
  .insurance-surface,
  .clinical-panel,
  .clients-page-surface,
  .clients-kpi-card,
  .team-card,
  .plan-card,
  .plans-admin-panel,
  .billing-overview-panel,
  .billing-feature-detail-panel,
  .billing-usage-panel,
  .billing-card,
  .billing-usage-card,
  .billing-upgrade-card,
  .billing-invoice-card,
  .module-summary-card,
  .module-section-card,
  .module-card,
  .appearance-preview-card,
  .integration-section-card,
  .integration-saas-card,
  .integration-sidebar-card,
  .clinical-tabs-card,
  .clinical-calendar-card,
  .patient-status-card,
  .journey-card,
  .patient-appointment-card,
  .progress-card,
  .progress-card-inline,
  .progress-card--actionable,
  .journey-process-card,
  .journey-card-panel,
  .agenda-card-panel,
  .treatment-card-panel,
  .summary-card-panel,
  .detail-tab-panel,
  .lead-popup-card,
  .client-form-card,
  .automation-card,
  .reminder-stat-card,
  .reminder-next-card,
  .calendar-card,
  .conversation-panel,
  .chat-panel,
  .detail-panel,
  .progress-panel,
  .notification-subpanel,
  .section-info-panel,
  .tab-panel,
  .pipeline-card,
  .dashboard-global-panel,
  .dashboard-profile-panel,
  .dashboard-doctor-card,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-connection-card,
  .dashboard-agenda-date-card,
  .dashboard-agenda-card-body,
  .dashboard-donut-wrap,
  .analytics-chart-wrap
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell #lead-popup .lead-popup-card,
body.dashboard-client-flat-theme > .shell #lead-popup .lead-popup-card {
  background: #ffffff !important;
  background-color: #ffffff !important;
  background-image: none !important;
  border: 1px solid rgba(203, 213, 225, 0.82) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact {
  width: min(560px, calc(100vw - 32px)) !important;
  max-height: min(760px, calc(100vh - 48px)) !important;
  padding: 18px !important;
  border-radius: 18px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact .panel-header {
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact .lead-popup-form {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact .lead-popup-form :is(input, select) {
  min-height: 40px !important;
  padding: 9px 11px !important;
  font-size: 13px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact .lead-popup-form :is(input[name="client_name"], input[name="email"], input[name="notes"], button[type="submit"]) {
  grid-column: 1 / -1 !important;
}

@media (max-width: 640px) {
  body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #lead-popup .lead-popup-card--compact .lead-popup-form {
    grid-template-columns: 1fr !important;
  }
}
