:where(.btn, .hero-action-button, .insurance-toolbar__button, .insurance-outline-button, .insurance-ai-card__button) {
  border-radius: 14px;
}

:where(.btn-secondary, .integration-quick-button, .hero-action-button, .company-action-btn, .control-action) {
  min-height: 40px;
  border-radius: var(--lf-radius-md);
  font-weight: 900;
}

:where(.btn-secondary, .integration-quick-button, .hero-action-button, .company-action-btn, .control-action, .landing-button, .billing-primary-button) {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lf-space-2);
  text-decoration: none;
}

body.dashboard-client-flat-theme > .shell :is(
  .btn-secondary,
  .dashboard-mini-button,
  .dashboard-task-footer,
  .dashboard-table-action,
  .integration-quick-button,
  .company-action-btn,
  .control-action,
  .billing-primary-button
) {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--lf-space-2) !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .dashboard-create-client-button,
  .dashboard-ai-task-button,
  .pipeline-add-button,
  .plans-create-button
) {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--lf-space-2) !important;
  border: 1px solid transparent !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .record-action-trigger,
  .client-action-icon,
  .dashboard-row-menu summary,
  .lead-pagination-arrow,
  .lead-pagination-page,
  .clients-pagination button,
  .clients-pagination a,
  .users-action-trigger
) {
  min-width: 36px !important;
  min-height: 36px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .record-action-trigger:hover,
  .client-action-icon:hover,
  .dashboard-row-menu summary:hover,
  .lead-pagination-arrow:hover,
  .lead-pagination-page:hover,
  .clients-pagination button:hover,
  .clients-pagination a:hover,
  .users-action-trigger:hover
) {
  border-color: var(--lf-color-border-strong) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-primary) !important;
}

body.dashboard-client-flat-theme > .shell :is(.lead-pagination-page.is-active, .clients-pagination .is-active) {
  border-color: var(--lf-color-primary) !important;
  background: var(--lf-color-primary) !important;
  color: #ffffff !important;
}

body.dashboard-client-flat-theme > .shell :is(.lead-pagination-arrow.is-disabled, .lead-pagination-page.is-disabled) {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .settings-tab,
  .settings-main .tab-button,
  .revenue-tab,
  .integration-tab-button,
  .detail-tab-btn,
  .journey-tab-btn,
  .plans-billing-toggle button
) {
  min-height: 38px !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-muted) !important;
  box-shadow: none !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .settings-tab.active,
  .settings-main .tab-button.active,
  .revenue-tab.active,
  .integration-tab-button.active,
  .detail-tab-btn.active,
  .journey-tab-btn.active,
  .plans-billing-toggle button.active
) {
  border-color: var(--lf-color-primary) !important;
  background: var(--lf-color-primary-soft) !important;
  color: var(--lf-color-primary) !important;
}

:where(.lf-button) {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--lf-space-2);
  padding: 0 var(--lf-space-4);
  border: 1px solid transparent;
  border-radius: var(--lf-radius-md);
  font-size: var(--lf-font-size-sm);
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform var(--lf-transition-fast),
    background var(--lf-transition-fast),
    border-color var(--lf-transition-fast),
    color var(--lf-transition-fast);
}

:where(.lf-button:hover) {
  transform: translateY(-1px);
}

:where(.lf-button:active) {
  transform: translateY(0);
}

:where(.lf-button--primary) {
  background: var(--lf-color-primary);
  color: #ffffff;
}

:where(.lf-button--primary:hover) {
  filter: brightness(0.96);
}

:where(.lf-button--secondary) {
  border-color: var(--lf-color-border);
  background: var(--lf-color-surface-muted);
  color: var(--lf-color-text);
}

:where(.lf-button--ghost) {
  background: transparent;
  color: var(--lf-color-primary);
}

:where(.lf-button--danger) {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.08);
  color: #b91c1c;
}

:where(.lf-icon-button) {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border-radius: var(--lf-radius-pill);
}

:where(.lf-icon-button svg) {
  width: 13px;
  height: 13px;
}

:where(.lf-icon-button:hover, .lf-icon-button.is-active) {
  border-color: color-mix(in srgb, var(--lf-color-primary) 28%, transparent);
  background: var(--lf-color-primary-soft);
  color: var(--lf-color-primary);
  transform: translateY(-1px);
}

:where(.lf-icon-button.is-disabled) {
  opacity: 0.38;
  pointer-events: none;
}

:where(.icon-btn, .user-chip-icon-btn) {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: var(--lf-radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:where(.icon-btn i, .icon-btn svg, .user-chip-icon-btn i, .user-chip-icon-btn svg) {
  width: 14px;
  height: 14px;
  display: inline-flex;
  flex: 0 0 auto;
}

:where(.lf-action-menu[hidden]) {
  display: none;
}

:where(.lf-action-menu) {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12;
  width: 190px;
  display: grid;
  gap: var(--lf-space-1);
  padding: var(--lf-space-2);
  border: 1px solid var(--lf-color-border);
  border-radius: var(--lf-radius-lg);
  background: color-mix(in srgb, var(--lf-color-surface) 96%, transparent);
  box-shadow: var(--lf-shadow-lift);
}

:where(.lf-action-menu button) {
  width: 100%;
  min-height: 36px;
  justify-content: flex-start;
  border: 0;
  border-radius: var(--lf-radius-md);
  padding: 0 10px;
  background: transparent;
  color: var(--lf-color-text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

:where(.lf-action-menu button:hover) {
  background: var(--lf-color-primary-soft);
  color: var(--lf-color-primary);
}

body.dashboard-client-flat-theme > .shell :is(.record-action-dropdown, .dashboard-row-menu-list, .lead-contact-menu-panel) {
  overflow: hidden !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface) !important;
  box-shadow: var(--lf-shadow-soft) !important;
}

body.dashboard-client-flat-theme > .shell :is(.record-action-item, .dashboard-row-menu-list button, .lead-contact-menu-panel a, .lead-contact-menu-panel button) {
  width: 100% !important;
  min-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  gap: var(--lf-space-2) !important;
  padding: 0 var(--lf-space-3) !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--lf-color-text) !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 800 !important;
  text-align: left !important;
}

body.dashboard-client-flat-theme > .shell :is(.record-action-item:hover, .dashboard-row-menu-list button:hover, .lead-contact-menu-panel a:hover, .lead-contact-menu-panel button:hover) {
  background: var(--lf-color-surface-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(.record-action-item.danger, .dashboard-row-menu-list button.danger) {
  color: #b42318 !important;
}

@media (max-width: 560px) {
  :where(.lf-button:not(.lf-icon-button)) {
    width: 100%;
  }
}

/* Migrated from global-design-system.css: lead/contact floating action menus. */
/* Prospectos: acciones de tres puntos como panel flotante, no recortado por la tabla. */
.lead-contact-menu {
  position: relative !important;
  display: inline-flex !important;
}

.lead-contact-menu-trigger {
  appearance: none !important;
}

.lead-contact-menu-trigger[aria-expanded="true"] {
  color: #7c3aed !important;
  border-color: rgba(124, 58, 237, 0.35) !important;
  background: rgba(124, 58, 237, 0.08) !important;
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.12) !important;
}

.lead-contact-menu-panel {
  position: fixed !important;
  z-index: 10050 !important;
  min-width: 156px !important;
  padding: 6px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 14px !important;
  background: rgba(248, 250, 252, 0.96) !important;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18) !important;
  backdrop-filter: blur(12px) !important;
}

.lead-contact-menu-panel[hidden] {
  display: none !important;
}

.lead-contact-menu-panel.is-open {
  display: block !important;
}

.lead-pagination-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 16px 6px 0 !important;
  color: #64748b !important;
  font-size: 13px !important;
  font-weight: 750 !important;
}

.lead-pagination {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.lead-pagination-arrow,
.lead-pagination-page {
  min-width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 10px !important;
  background: rgba(248, 250, 252, 0.72) !important;
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  text-decoration: none !important;
  transition: 0.18s ease !important;
}

.lead-pagination-arrow svg,
.lead-pagination-arrow i {
  width: 17px !important;
  height: 17px !important;
}

.lead-pagination-arrow:hover,
.lead-pagination-page:hover,
.lead-pagination-page.is-active {
  border-color: rgba(124, 58, 237, 0.5) !important;
  background: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 12px 26px rgba(124, 58, 237, 0.16) !important;
}

.lead-pagination-arrow.is-disabled {
  opacity: 0.42 !important;
  pointer-events: none !important;
}

.lead-pagination-ellipsis {
  min-width: 22px !important;
  color: #94a3b8 !important;
  text-align: center !important;
  font-weight: 850 !important;
}

@media (max-width: 760px) {
  body.dashboard-client-flat-theme .dashboard-topbar.app-topbar {
    padding-bottom: 16px !important;
  }

  body.dashboard-client-flat-theme .panel {
    padding: 18px !important;
  }

  .lead-pagination-footer {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
}

/* Migrated from global-design-system.css: viewport action menu positioning. */
/* Production fix: action menus moved to body need viewport positioning. */
body > .record-action-dropdown[data-floating-menu] {
  position: fixed !important;
  z-index: 100000 !important;
  width: 220px !important;
  max-width: calc(100vw - 24px) !important;
  overflow: hidden !important;
  border: 1px solid var(--lf-color-border, #e2e8f0) !important;
  border-radius: var(--lf-radius-md, 16px) !important;
  background: var(--lf-color-surface, #ffffff) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18) !important;
}

body > .record-action-dropdown[data-floating-menu][hidden] {
  display: none !important;
}

body > .record-action-dropdown[data-floating-menu] .record-action-item {
  width: 100% !important;
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 14px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--lf-color-text, #0f172a) !important;
  font-size: var(--lf-font-size-sm, 14px) !important;
  font-weight: 800 !important;
  text-align: left !important;
  cursor: pointer !important;
}

body > .record-action-dropdown[data-floating-menu] .record-action-item:hover {
  background: var(--lf-color-surface-muted, #f1f5f9) !important;
}

body > .record-action-dropdown[data-floating-menu] .record-action-item.danger {
  color: #b42318 !important;
}

body > .record-action-dropdown[data-floating-menu] .record-action-item svg {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 auto !important;
}
