:root {
  --font-main: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sidebar-width: 280px;
  --topbar-height: 88px;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --primary: var(--primary-color, #2563eb);
  --secondary: var(--accent-depth, #8b5cf6);
  --primary-soft: var(--primary-light, rgba(37, 99, 235, 0.14));

  --bg-main: var(--bg, #ffffff);
  --surface-main: var(--surface, #ffffff);
  --surface-soft: var(--surface-elevated, #ffffff);
  --text-main: var(--ink, #0f172a);
  --text-muted: var(--muted, #64748b);
  --border-main: var(--stroke, #e2e8f0);
  --shadow-soft-main: var(--shadow-soft, 0 18px 45px rgba(15, 23, 42, 0.08));
  --brand-primary: var(--primary, var(--primary-color, #2563eb));
  --brand-primary-soft: var(--primary-soft, var(--primary-light, #e8f0ff));
  --brand-secondary: var(--secondary, var(--accent-depth, #8b5cf6));
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  color: var(--text-main);
}

.shell,
.app-shell {
  min-height: 100vh;
}

.main {
  min-width: 0;
}

.topbar.app-topbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  flex-wrap: nowrap !important;
}

.app-topbar-copy {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 8px;
}

.app-topbar-tools {
  flex: 1 1 auto;
  min-width: 0;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
}

.app-topbar-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap;
}

.app-topbar .user-chip {
  display: inline-flex !important;
  align-items: center !important;
  min-width: auto !important;
  width: auto !important;
  padding: 8px 14px !important;
  gap: 10px !important;
}

.app-topbar .user-chip-actions {
  position: static !important;
  top: auto !important;
  right: auto !important;
  transform: none !important;
  margin: 0 6px 0 0 !important;
  flex-shrink: 0 !important;
}

.app-topbar .user-chip-profile-link {
  min-width: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  flex: 1 1 auto !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

.app-topbar .user-chip-inline-logout {
  flex-shrink: 0 !important;
  margin-left: 8px !important;
}

.app-topbar .user-name,
.app-topbar .logout-link {
  white-space: nowrap;
}

.app-topbar .user-chip-icon-btn {
  width: 36px !important;
  height: 36px !important;
}

.company-header-badge,
.workspace-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.company-page-title,
.workspace-page-title {
  margin-top: 4px;
  font-size: 20px !important;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.topbar.app-topbar.company-page-topbar,
.topbar.app-topbar.workspace-page-topbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  column-gap: 12px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 0 10px !important;
  min-height: 0 !important;
}

.topbar.app-topbar.company-page-topbar .app-topbar-copy,
.topbar.app-topbar.workspace-page-topbar .app-topbar-copy {
  min-width: 0;
  gap: 4px;
}

.topbar.app-topbar.company-page-topbar .subtitle,
.topbar.app-topbar.workspace-page-topbar .subtitle {
  margin-top: 0;
  font-size: 13px;
  line-height: 1.45;
  max-width: 620px;
}

.topbar.app-topbar.company-page-topbar .user-chip,
.topbar.app-topbar.workspace-page-topbar .user-chip {
  padding: 6px 10px !important;
  gap: 8px !important;
}

.topbar.app-topbar.company-page-topbar .user-chip-icon-btn,
.topbar.app-topbar.workspace-page-topbar .user-chip-icon-btn {
  width: 32px !important;
  height: 32px !important;
}

.topbar.app-topbar.company-page-topbar .user-avatar,
.topbar.app-topbar.workspace-page-topbar .user-avatar {
  width: 46px;
  height: 46px;
}

.topbar.app-topbar.company-page-topbar .user-name,
.topbar.app-topbar.workspace-page-topbar .user-name {
  font-size: 14px;
}

.topbar.app-topbar.company-page-topbar .logout-link,
.topbar.app-topbar.workspace-page-topbar .logout-link {
  font-size: 11px;
}

.company-topbar-tools,
.app-topbar-tools--search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-left: 0;
  margin-right: 0 !important;
  flex: none;
  width: min(100%, 460px);
  max-width: 460px;
  justify-content: stretch;
  justify-self: start;
}

.topbar.app-topbar.company-page-topbar .company-topbar-tools,
.topbar.app-topbar.workspace-page-topbar .app-topbar-tools--search {
  display: grid !important;
  justify-content: stretch !important;
  gap: 14px !important;
}

.company-topbar-search,
.app-topbar-search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  height: 44px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--border-main, #e2e8f0);
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  color: var(--text-muted, #64748b);
}

.company-topbar-search i,
.company-topbar-search svg,
.company-topbar-search-icon,
.app-topbar-search i,
.app-topbar-search svg,
.app-topbar-search-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: var(--text-muted, #64748b);
  display: block;
  align-self: center;
  justify-self: center;
}

.company-topbar-search input,
.company-topbar-search-input,
.app-topbar-search input,
.app-topbar-search-input {
  display: block;
  width: 100%;
  flex: 1;
  min-width: 0;
  min-height: 0 !important;
  height: auto;
  margin: 0;
  padding: 0 !important;
  border: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  color: var(--text-main, #0f172a);
  font-size: 14px;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
}

.company-topbar-search input::placeholder,
.company-topbar-search-input::placeholder,
.app-topbar-search input::placeholder,
.app-topbar-search-input::placeholder {
  color: var(--text-muted, #64748b);
  opacity: 0.88;
}

.company-topbar-search:focus-within,
.app-topbar-search:focus-within {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}

.company-topbar-actions,
.app-topbar-actions--leading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  justify-content: flex-start;
  flex-shrink: 0;
}

.topbar.app-topbar.company-page-topbar .company-topbar-actions,
.topbar.app-topbar.workspace-page-topbar .app-topbar-actions--leading {
  display: flex !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
}

.topbar.app-topbar.company-page-topbar .user-chip,
.topbar.app-topbar.workspace-page-topbar .user-chip {
  justify-self: end;
}

.company-topbar-button,
.app-topbar-button,
.company-toolbar-button,
.company-open-button,
.company-pagination-current,
.company-pagination-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border-main, #e2e8f0);
  background: transparent;
  color: var(--text-main, #0f172a);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.company-topbar-button:hover,
.app-topbar-button:hover,
.company-toolbar-button:hover,
.company-open-button:hover,
.company-pagination-current:hover,
.company-pagination-page:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft-main, 0 18px 45px rgba(15, 23, 42, 0.08));
}

.company-topbar-button--ai,
.app-topbar-button--ai {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(59, 130, 246, 0.12));
  color: #6d28d9;
}

.company-topbar-button--primary,
.app-topbar-button--primary {
  background: linear-gradient(135deg, var(--brand-primary, #2563eb), #1d4ed8);
  color: #fff;
  border-color: transparent;
}

.company-toolbar-icon {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid var(--border-main, #e2e8f0);
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-main, #0f172a);
  cursor: pointer;
}

.company-toolbar-icon--small {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.topbar {
  min-height: var(--topbar-height);
}

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

.search-input,
.search-box,
input,
select,
textarea,
button {
  font-family: var(--font-main);
}

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

.badge,
.chip,
.status-badge {
  border-radius: 999px;
}

/* ================================
   LEGACY GLASS UI OVERRIDES (OPT-IN ONLY)
   Legacy glass look - disabled unless body.lf-legacy-glass-theme is used
================================ */

:root {
  --app-bg-1: var(--bg, #ffffff);
  --app-bg-2: var(--bg-2, #ffffff);
  --app-bg-3: var(--bg-3, #ffffff);
  --glass-bg: var(--surface, rgba(255, 255, 255, 0.78));
  --glass-bg-strong: var(--surface-elevated, rgba(255, 255, 255, 0.92));
  --legacy-border: rgba(148, 163, 184, 0.22);
  --legacy-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
  --legacy-shadow-soft: 0 12px 35px rgba(15, 23, 42, 0.07);
  --blue: #2563eb;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --green: #22c55e;
  --orange: #f97316;
  --red: #ef4444;
  --radius-xl: 28px;
}

body {
  background: var(--bg, #ffffff);
  background-attachment: fixed;
}

body.lf-legacy-glass-theme .sidebar,
body.lf-legacy-glass-theme .app-sidebar,
body.lf-legacy-glass-theme aside.sidebar {
  background: var(--surface) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--legacy-border) !important;
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.06);
}

body.lf-legacy-glass-theme .topbar,
body.lf-legacy-glass-theme .page-header,
body.lf-legacy-glass-theme .header-card {
  background:
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.12), transparent 30%),
    var(--surface) !important;
  border: 1px solid var(--legacy-border) !important;
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--legacy-shadow-soft) !important;
}

body.lf-legacy-glass-theme .hero,
body.lf-legacy-glass-theme .module-hero,
body.lf-legacy-glass-theme .section-hero,
body.lf-legacy-glass-theme .page-hero-card,
body.lf-legacy-glass-theme .insurance-surface:first-child {
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at 90% 0%, rgba(139, 92, 246, 0.12), transparent 35%),
    var(--surface) !important;
  border: 1px solid var(--legacy-border) !important;
  border-radius: 30px !important;
  box-shadow: var(--legacy-shadow) !important;
}

body.lf-legacy-glass-theme .card,
body.lf-legacy-glass-theme .kpi-card,
body.lf-legacy-glass-theme .metric-card,
body.lf-legacy-glass-theme .pipeline-card,
body.lf-legacy-glass-theme .ai-panel,
body.lf-legacy-glass-theme .activity-card,
body.lf-legacy-glass-theme .table-card,
body.lf-legacy-glass-theme .widget-card,
body.lf-legacy-glass-theme .panel,
body.lf-legacy-glass-theme .settings-card,
body.lf-legacy-glass-theme .insurance-surface,
body.lf-legacy-glass-theme .proposal-card,
body.lf-legacy-glass-theme .proposal-metric-card,
body.lf-legacy-glass-theme .workspace-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-elevated)) !important;
  border: 1px solid var(--legacy-border) !important;
  border-radius: 26px !important;
  box-shadow: var(--legacy-shadow-soft) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

body.lf-legacy-glass-theme .card:hover,
body.lf-legacy-glass-theme .kpi-card:hover,
body.lf-legacy-glass-theme .metric-card:hover,
body.lf-legacy-glass-theme .pipeline-card:hover,
body.lf-legacy-glass-theme .widget-card:hover,
body.lf-legacy-glass-theme .proposal-card:hover,
body.lf-legacy-glass-theme .proposal-metric-card:hover,
body.lf-legacy-glass-theme .settings-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.13) !important;
  transition: all 0.25s ease;
}

body.lf-legacy-glass-theme .kpi-card,
body.lf-legacy-glass-theme .metric-card,
body.lf-legacy-glass-theme .proposal-metric-card {
  position: relative;
  overflow: hidden;
}

body.lf-legacy-glass-theme .kpi-card::before,
body.lf-legacy-glass-theme .metric-card::before,
body.lf-legacy-glass-theme .proposal-metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.10), transparent 35%);
  pointer-events: none;
}

body.lf-legacy-glass-theme .kpi-card:nth-child(1)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(1)::before { background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 38%); }
body.lf-legacy-glass-theme .kpi-card:nth-child(2)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(2)::before { background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 38%); }
body.lf-legacy-glass-theme .kpi-card:nth-child(3)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(3)::before { background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.18), transparent 38%); }
body.lf-legacy-glass-theme .kpi-card:nth-child(4)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(4)::before { background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 38%); }
body.lf-legacy-glass-theme .kpi-card:nth-child(5)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(5)::before { background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 38%); }
body.lf-legacy-glass-theme .kpi-card:nth-child(6)::before,
body.lf-legacy-glass-theme .proposal-metric-card:nth-child(6)::before { background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 38%); }

body.lf-legacy-glass-theme .kpi-icon,
body.lf-legacy-glass-theme .metric-icon {
  border-radius: 18px !important;
  background: linear-gradient(135deg, var(--blue), var(--purple)) !important;
  color: white !important;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

body.lf-legacy-glass-theme .pipeline-row {
  gap: 14px !important;
}

body.lf-legacy-glass-theme .pipeline-stage {
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,251,255,0.9)) !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 22px !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
  position: relative;
  overflow: hidden;
}

body.lf-legacy-glass-theme .pipeline-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--stage-glow, rgba(37,99,235,0.13)), transparent 45%);
  pointer-events: none;
}

body.lf-legacy-glass-theme .pipeline-stage:nth-child(1) { --stage-color: #2563eb; --stage-glow: rgba(37, 99, 235, 0.16); }
body.lf-legacy-glass-theme .pipeline-stage:nth-child(2) { --stage-color: #3b82f6; --stage-glow: rgba(59, 130, 246, 0.16); }
body.lf-legacy-glass-theme .pipeline-stage:nth-child(3) { --stage-color: #8b5cf6; --stage-glow: rgba(139, 92, 246, 0.18); }
body.lf-legacy-glass-theme .pipeline-stage:nth-child(4) { --stage-color: #f97316; --stage-glow: rgba(249, 115, 22, 0.18); }
body.lf-legacy-glass-theme .pipeline-stage:nth-child(5) { --stage-color: #f59e0b; --stage-glow: rgba(245, 158, 11, 0.18); }
body.lf-legacy-glass-theme .pipeline-stage:nth-child(6) { --stage-color: #16a34a; --stage-glow: rgba(22, 163, 74, 0.18); }

body.lf-legacy-glass-theme .pipeline-title,
body.lf-legacy-glass-theme .pipeline-number {
  color: var(--stage-color) !important;
}

body.lf-legacy-glass-theme .ai-panel,
body.lf-legacy-glass-theme .ai-assistant,
body.lf-legacy-glass-theme .assistant-card,
body.lf-legacy-glass-theme .proposal-assistant-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,243,255,0.92)),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.18), transparent 40%) !important;
}

body.lf-legacy-glass-theme .ai-panel h3,
body.lf-legacy-glass-theme .ai-assistant h3 {
  color: var(--ink);
}

body.lf-legacy-glass-theme .modern-table,
body.lf-legacy-glass-theme table {
  background: transparent !important;
}

body.lf-legacy-glass-theme .modern-table thead,
body.lf-legacy-glass-theme table thead {
  background: rgba(248, 250, 252, 0.75);
}

body.lf-legacy-glass-theme .modern-table th,
body.lf-legacy-glass-theme table th {
  color: #64748b !important;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.lf-legacy-glass-theme .modern-table tr,
body.lf-legacy-glass-theme table tr {
  transition: all 0.2s ease;
}

body.lf-legacy-glass-theme .modern-table tbody tr:hover,
body.lf-legacy-glass-theme table tbody tr:hover {
  background: rgba(37, 99, 235, 0.045) !important;
}

body.lf-legacy-glass-theme .btn,
body.lf-legacy-glass-theme button {
  border-radius: 16px !important;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

body.lf-legacy-glass-theme .btn-primary,
body.lf-legacy-glass-theme button.primary,
body.lf-legacy-glass-theme .primary-btn {
  background: linear-gradient(135deg, #2563eb, #4f46e5) !important;
  color: white !important;
  border: none !important;
}

body.lf-legacy-glass-theme .btn-ai,
body.lf-legacy-glass-theme .ai-button {
  background: linear-gradient(135deg, #8b5cf6, #c084fc) !important;
  color: white !important;
  border: none !important;
}

body.lf-legacy-glass-theme .search-box,
body.lf-legacy-glass-theme .search-input,
body.lf-legacy-glass-theme .premium-input,
body.lf-legacy-glass-theme .app-input,
body.lf-legacy-glass-theme .app-search-input,
body.lf-legacy-glass-theme .proposal-topbar-search input,
body.lf-legacy-glass-theme .company-topbar-search input {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid var(--legacy-border) !important;
  border-radius: 18px !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 8px 20px rgba(15,23,42,0.04);
}

body.lf-legacy-glass-theme .sidebar .active,
body.lf-legacy-glass-theme .app-sidebar .active,
body.lf-legacy-glass-theme .nav-active {
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(139,92,246,0.10)) !important;
  color: #2563eb !important;
  border-radius: 16px !important;
  font-weight: 800 !important;
}

body.lf-legacy-glass-theme .avatar,
body.lf-legacy-glass-theme .user-avatar {
  background: linear-gradient(135deg, #2563eb, #22c55e) !important;
  color: white !important;
  box-shadow: 0 12px 30px rgba(37,99,235,0.25);
}

.user-chip {
  flex-shrink: 0;
}

body.lf-legacy-glass-theme .badge,
body.lf-legacy-glass-theme .status-badge {
  border-radius: 999px !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255,255,255,0.7);
}

body.lf-legacy-glass-theme .main,
body.lf-legacy-glass-theme .content,
body.lf-legacy-glass-theme .page-content {
  padding: 28px !important;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.6);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 999px;
}

@media (max-width: 1100px) {
  .app-topbar,
  .topbar.app-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .app-topbar-tools {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1180px) {
  .topbar.app-topbar.company-page-topbar,
  .topbar.app-topbar.workspace-page-topbar {
    grid-template-columns: 1fr;
    row-gap: 14px;
  }

  .company-topbar-tools,
  .app-topbar-tools--search {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .company-content-grid {
    display: grid;
  }

  .company-topbar-search,
  .app-topbar-search {
    min-width: 0;
    width: 100%;
  }

  .topbar.app-topbar.company-page-topbar .user-chip,
  .topbar.app-topbar.workspace-page-topbar .user-chip {
    justify-self: start;
  }
}

/* LeadFlows global application layer.
   Consolidated final app styles loaded by global_css.html. */

/* Dashboard clientes: vista plana y consistente para todos los tenants. */
body.dashboard-client-flat-theme {
  background: #f7f9fc !important;
}

body.dashboard-client-flat-theme::before,
body.dashboard-client-flat-theme::after {
  display: none !important;
}

body.dashboard-client-flat-theme .main,
body.dashboard-client-flat-theme .content-grid,
body.dashboard-client-flat-theme .dashboard-page-grid,
body.dashboard-client-flat-theme .dashboard-workspace {
  background: transparent !important;
}

body.dashboard-client-flat-theme .dashboard-workspace:not(.dashboard-workspace--global) {
  row-gap: 0 !important;
  column-gap: 18px !important;
}

body.dashboard-client-flat-theme .dashboard-workspace:not(.dashboard-workspace--global) :is(
  .dashboard-task-panel,
  .dashboard-ai-brief-panel,
  .dashboard-pipeline-panel,
  .dashboard-agenda-card-panel
) {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

body.dashboard-client-flat-theme .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-pipeline-agenda-grid {
  margin-top: 0 !important;
}

body.dashboard-client-flat-theme .sidebar {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transition: width 0.85s cubic-bezier(0.22, 1, 0.36, 1), min-width 0.85s cubic-bezier(0.22, 1, 0.36, 1), padding 0.85s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.dashboard-client-flat-theme .sidebar-brand {
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link.has-image),
body[data-company-theme] > .shell .sidebar-brand:has(.logo-link.has-image) {
  align-items: center !important;
  flex-direction: column !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 8px 6px 12px !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link.has-image,
body[data-company-theme] > .shell .sidebar-brand .logo-link.has-image {
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link,
body.dashboard-client-flat-theme .sidebar-brand .logo-link.has-image,
body.dashboard-client-flat-theme .sidebar-brand .logo-link--company.has-image,
body[data-company-theme] > .shell .sidebar-brand .logo-link,
body[data-company-theme] > .shell .sidebar-brand .logo-link.has-image,
body[data-company-theme] > .shell .sidebar-brand .logo-link--company.has-image {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link::before,
body.dashboard-client-flat-theme .sidebar-brand .logo-link::after,
body[data-company-theme] > .shell .sidebar-brand .logo-link::before,
body[data-company-theme] > .shell .sidebar-brand .logo-link::after {
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link.has-image .logo-mark,
body[data-company-theme] > .shell .sidebar-brand .logo-link.has-image .logo-mark {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link.has-image) .sidebar-brand-copy,
body[data-company-theme] > .shell .sidebar-brand:has(.logo-link.has-image) .sidebar-brand-copy {
  justify-items: center !important;
  gap: 0 !important;
  width: 100% !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link.has-image) .sidebar-brand-copy strong,
body[data-company-theme] > .shell .sidebar-brand:has(.logo-link.has-image) .sidebar-brand-copy strong {
  font-size: 14px !important;
  line-height: 1.2 !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme .sidebar-company-logo-card,
body[data-company-theme] > .shell .sidebar-company-logo-card {
  width: 100% !important;
  min-height: 86px !important;
  display: grid !important;
  place-items: center !important;
  padding: 2px 10px 6px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-scope-card,
body[data-company-theme] > .shell .sidebar-scope-card {
  align-items: center !important;
  justify-items: center !important;
  gap: 4px !important;
  padding: 6px 8px 10px !important;
  border-color: transparent !important;
  background: transparent !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme .sidebar-scope-logo,
body[data-company-theme] > .shell .sidebar-scope-logo {
  width: 100% !important;
  max-width: 154px !important;
  height: 72px !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center top !important;
  border-radius: 10px !important;
  background: transparent !important;
}

body.dashboard-client-flat-theme .sidebar-scope-copy,
body[data-company-theme] > .shell .sidebar-scope-copy {
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

body.dashboard-client-flat-theme .sidebar-scope-copy span,
body[data-company-theme] > .shell .sidebar-scope-copy span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: normal !important;
  line-height: 1.25 !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link--app.has-image),
body.dashboard-client-flat-theme[data-company-theme] > .shell .sidebar-brand:has(.logo-link--app.has-image) {
  align-items: center !important;
  flex-direction: row !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 18px 18px 14px !important;
  text-align: left !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link--app.has-image,
body.dashboard-client-flat-theme[data-company-theme] > .shell .sidebar-brand .logo-link--app.has-image {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border-radius: 8px !important;
}

body.dashboard-client-flat-theme .sidebar-brand .logo-link--app.has-image .logo-mark,
body.dashboard-client-flat-theme[data-company-theme] > .shell .sidebar-brand .logo-link--app.has-image .logo-mark {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link--app.has-image) .sidebar-brand-copy,
body.dashboard-client-flat-theme[data-company-theme] > .shell .sidebar-brand:has(.logo-link--app.has-image) .sidebar-brand-copy {
  justify-items: start !important;
  width: auto !important;
}

body.dashboard-client-flat-theme .sidebar-brand:has(.logo-link--app.has-image) .sidebar-brand-copy strong,
body.dashboard-client-flat-theme[data-company-theme] > .shell .sidebar-brand:has(.logo-link--app.has-image) .sidebar-brand-copy strong {
  font-size: 20px !important;
  line-height: 1.05 !important;
  text-align: left !important;
}

body.dashboard-client-flat-theme .sidebar-menu-toggle,
body[data-company-theme] > .shell .sidebar-menu-toggle {
  position: static !important;
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: #64748b !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: color 0.45s ease, border-color 0.45s ease, background 0.45s ease, transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.dashboard-client-flat-theme .sidebar-menu-toggle svg,
body[data-company-theme] > .shell .sidebar-menu-toggle svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.dashboard-client-flat-theme .sidebar-menu-toggle:hover,
body[data-company-theme] > .shell .sidebar-menu-toggle:hover,
body.dashboard-client-flat-theme .sidebar-menu-toggle[aria-expanded="false"],
body[data-company-theme] > .shell .sidebar-menu-toggle[aria-expanded="false"] {
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.24) !important;
  background: rgba(37, 99, 235, 0.06) !important;
}

body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-menu-toggle svg,
body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-menu-toggle svg {
  transform: rotate(180deg) !important;
}

body.dashboard-client-flat-theme .sidebar-menu-panel,
body[data-company-theme] > .shell .sidebar-menu-panel {
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  gap: 10px !important;
  opacity: 1 !important;
  overflow: visible !important;
  transition: opacity 0.65s ease !important;
}

body.dashboard-client-flat-theme .sidebar-section-title--toggle,
body[data-company-theme] > .shell .sidebar-section-title--toggle {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

body.dashboard-client-flat-theme .sidebar-section-title--toggle > span,
body[data-company-theme] > .shell .sidebar-section-title--toggle > span,
body.dashboard-client-flat-theme .sidebar-brand-copy,
body[data-company-theme] > .shell .sidebar-brand-copy,
body.dashboard-client-flat-theme .nav-label,
body[data-company-theme] > .shell .nav-label,
body.dashboard-client-flat-theme .sidebar-industry,
body[data-company-theme] > .shell .sidebar-industry,
body.dashboard-client-flat-theme .sidebar-section-title:not(.sidebar-section-title--toggle),
body[data-company-theme] > .shell .sidebar-section-title:not(.sidebar-section-title--toggle),
body.dashboard-client-flat-theme .sidebar-footer-link > span:nth-child(2),
body[data-company-theme] > .shell .sidebar-footer-link > span:nth-child(2),
body.dashboard-client-flat-theme .sidebar-footer-link span:last-child,
body[data-company-theme] > .shell .sidebar-footer-link span:last-child {
  transition: opacity 0.45s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), width 0.7s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

@media (min-width: 901px) {
  body.dashboard-client-flat-theme > .shell,
  body[data-company-theme] > .shell:has(> .sidebar) {
    grid-template-columns: 280px minmax(0, 1fr) !important;
    transition: grid-template-columns 0.85s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  body.dashboard-client-flat-theme > .shell.is-sidebar-collapsed,
  body[data-company-theme] > .shell:has(> .sidebar).is-sidebar-collapsed {
    grid-template-columns: 86px minmax(0, 1fr) !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed {
    width: 86px !important;
    min-width: 86px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-brand,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-brand {
    padding: 6px 0 12px !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-brand .logo-link.has-image,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-brand .logo-link.has-image {
    width: 58px !important;
    height: 58px !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-brand-copy,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-brand-copy,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .nav-label,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .nav-label,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-industry,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-industry,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-section-title:not(.sidebar-section-title--toggle),
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-section-title:not(.sidebar-section-title--toggle),
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-section-title--toggle > span,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-section-title--toggle > span,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-footer-link > span:nth-child(2),
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-footer-link > span:nth-child(2),
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-footer-link span:last-child,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-footer-link span:last-child {
    width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
    transform: translateX(-10px) !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    pointer-events: none !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-section-title--toggle,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-section-title--toggle {
    justify-content: center !important;
    padding-inline: 0 !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .nav-dot,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .nav-dot,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-footer-link,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-footer-link {
    width: 56px !important;
    min-width: 56px !important;
    height: 50px !important;
    padding: 0 !important;
    justify-content: center !important;
    grid-template-columns: 1fr !important;
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .nav-icon,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .nav-icon,
  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-footer-icon,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-footer-icon {
    margin: 0 auto !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-footer-card,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-footer-card {
    padding: 4px 0 !important;
    border-color: transparent !important;
  }

  body.dashboard-client-flat-theme .sidebar.is-sidebar-collapsed .sidebar-help-menu,
  body[data-company-theme] > .shell .sidebar.is-sidebar-collapsed .sidebar-help-menu {
    display: none !important;
  }
}

body.dashboard-client-flat-theme .sidebar-footer-card,
body[data-company-theme] > .shell .sidebar-footer-card {
  position: relative !important;
  z-index: 12000 !important;
  display: grid !important;
  gap: 4px !important;
  padding: 6px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-footer-link {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-footer-link,
body[data-company-theme] > .shell .sidebar-footer-link {
  width: 100% !important;
  appearance: none !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 44px !important;
  padding: 5px 8px !important;
  border: 0 !important;
  border-radius: 12px !important;
  font: inherit !important;
  text-align: left !important;
  color: #475569 !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

body.dashboard-client-flat-theme .sidebar-footer-link:hover,
body.dashboard-client-flat-theme .nav-dot:hover:not(.active) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-help-chevron,
body[data-company-theme] > .shell .sidebar-help-chevron {
  width: 18px !important;
  height: 18px !important;
  color: #94a3b8 !important;
  transition: transform 0.45s ease, color 0.45s ease !important;
}

body.dashboard-client-flat-theme .sidebar-help-trigger[aria-expanded="true"] .sidebar-help-chevron,
body[data-company-theme] > .shell .sidebar-help-trigger[aria-expanded="true"] .sidebar-help-chevron {
  transform: rotate(-90deg) !important;
  color: var(--primary-color, #2563eb) !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu,
body[data-company-theme] > .shell .sidebar-help-menu {
  position: absolute !important;
  left: 6px !important;
  right: 6px !important;
  bottom: calc(100% + 8px) !important;
  z-index: 12050 !important;
  width: auto !important;
  display: grid !important;
  gap: 6px !important;
  padding: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 16px !important;
  background: rgba(248, 250, 252, 0.96) !important;
  backdrop-filter: blur(18px) saturate(1.2) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) scale(0.98) !important;
  transform-origin: center bottom !important;
  transition: opacity 0.36s ease, visibility 0.36s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu::before,
body[data-company-theme] > .shell .sidebar-help-menu::before {
  content: "" !important;
  position: absolute !important;
  left: 28px !important;
  bottom: -7px !important;
  width: 14px !important;
  height: 14px !important;
  border-right: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.32) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  transform: rotate(45deg) !important;
  box-shadow: 8px 8px 18px rgba(15, 23, 42, 0.06) !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu.is-open,
body[data-company-theme] > .shell .sidebar-help-menu.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translateY(0) scale(1) !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu a,
body[data-company-theme] > .shell .sidebar-help-menu a {
  position: relative !important;
  z-index: 1 !important;
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 38px !important;
  padding: 5px 10px 5px 12px !important;
  border-radius: 12px !important;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-decoration: none !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu a:hover,
body[data-company-theme] > .shell .sidebar-help-menu a:hover {
  color: var(--primary-color, #2563eb) !important;
  background: transparent !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu-icon,
body[data-company-theme] > .shell .sidebar-help-menu-icon {
  width: 24px !important;
  height: 24px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--primary-color, #2563eb) !important;
}

body.dashboard-client-flat-theme .sidebar-help-menu-icon svg,
body[data-company-theme] > .shell .sidebar-help-menu-icon svg {
  width: 20px !important;
  height: 20px !important;
}


body.dashboard-client-flat-theme .dashboard-topbar.app-topbar {
  position: relative !important;
  z-index: 8000 !important;
  min-height: auto !important;
  margin-bottom: 22px !important;
  padding: 4px 2px 20px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .dashboard-welcome-title {
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.04 !important;
}

body.dashboard-client-flat-theme .app-header-identity,
body[data-company-theme] > .shell .app-header-identity {
  display: flex !important;
  align-items: center !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme .app-header-text,
body[data-company-theme] > .shell .app-header-text {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .subtitle {
  max-width: 760px !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-chip,
body.dashboard-client-flat-theme .dashboard-search-field,
body.dashboard-client-flat-theme .search-field {
  background: transparent !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-chip {
  position: relative !important;
  z-index: 8100 !important;
  gap: 10px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .user-chip-actions {
  gap: 8px !important;
}

body.dashboard-client-flat-theme .user-chip-icon-btn {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  border-radius: 14px !important;
  background: transparent !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #0f172a !important;
}

body.dashboard-client-flat-theme .user-chip-icon-btn:hover {
  background: #eef4ff !important;
  border-color: rgba(37, 99, 235, 0.24) !important;
  color: #2563eb !important;
}

body.dashboard-client-flat-theme .user-avatar {
  width: 52px !important;
  height: 52px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 62%, #a855f7 100%) !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme .user-avatar::before,
body.dashboard-client-flat-theme .user-avatar::after {
  display: none !important;
}

body.dashboard-client-flat-theme .user-avatar img {
  border-radius: 999px !important;
}

body.dashboard-client-flat-theme .user-avatar .status-dot {
  display: none !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-name {
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 800 !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-chip-inline-logout {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  margin-left: 10px !important;
  border-radius: 14px !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-chip-inline-logout:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
}

body.dashboard-client-flat-theme .dashboard-topbar .user-chip-inline-logout svg {
  width: 23px !important;
  height: 23px !important;
}

body.dashboard-client-flat-theme .notification-menu {
  position: relative !important;
  z-index: 8200 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

body.dashboard-client-flat-theme .notification-bell-btn {
  position: relative !important;
}

body.dashboard-client-flat-theme .notification-badge {
  position: absolute !important;
  top: -6px !important;
  right: -6px !important;
  min-width: 18px !important;
  height: 18px !important;
  padding: 0 5px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.22) !important;
}

body.dashboard-client-flat-theme .notification-popover {
  position: absolute !important;
  top: calc(100% + 12px) !important;
  right: -10px !important;
  z-index: 9999 !important;
  width: min(360px, calc(100vw - 32px)) !important;
  padding: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 20px !important;
  background: rgba(248, 250, 252, 0.96) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14) !important;
  backdrop-filter: blur(18px) !important;
}

body.dashboard-client-flat-theme .notification-popover[hidden] {
  display: none !important;
}

body.dashboard-client-flat-theme .notification-popover::before {
  content: "" !important;
  position: absolute !important;
  top: -7px !important;
  right: 24px !important;
  width: 14px !important;
  height: 14px !important;
  transform: rotate(45deg) !important;
  background: rgba(248, 250, 252, 0.96) !important;
  border-left: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
}

body.dashboard-client-flat-theme .notification-popover-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 4px 4px 12px !important;
}

body.dashboard-client-flat-theme .notification-popover-head span {
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .notification-popover-head small {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.dashboard-client-flat-theme .notification-list-panel {
  display: grid !important;
  gap: 8px !important;
}

body.dashboard-client-flat-theme .notification-row {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px !important;
  color: #0f172a !important;
  text-decoration: none !important;
  background: transparent !important;
}

body.dashboard-client-flat-theme .notification-row:hover {
  border-color: rgba(37, 99, 235, 0.24) !important;
  background: rgba(239, 246, 255, 0.72) !important;
}

body.dashboard-client-flat-theme .notification-row.is-due {
  border-color: rgba(124, 58, 237, 0.28) !important;
  background: rgba(124, 58, 237, 0.06) !important;
}

body.dashboard-client-flat-theme .notification-row-icon {
  width: 36px !important;
  height: 36px !important;
  border-radius: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.1) !important;
}

body.dashboard-client-flat-theme .notification-row.is-due .notification-row-icon {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.12) !important;
}

body.dashboard-client-flat-theme .notification-row-icon svg {
  width: 18px !important;
  height: 18px !important;
}

body.dashboard-client-flat-theme .notification-row-copy {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme .notification-row-copy strong,
body.dashboard-client-flat-theme .notification-row-copy span {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .notification-row-copy strong {
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .notification-row-copy span,
body.dashboard-client-flat-theme .notification-row em {
  color: #64748b !important;
  font-size: 11px !important;
  font-style: normal !important;
  font-weight: 800 !important;
}

body.dashboard-client-flat-theme .notification-empty {
  display: grid !important;
  gap: 5px !important;
  padding: 18px 12px !important;
  text-align: center !important;
  color: #64748b !important;
}

body.dashboard-client-flat-theme .notification-empty[hidden],
body.dashboard-client-flat-theme .notification-row[hidden],
body.dashboard-client-flat-theme .notification-clear-button[hidden],
body.dashboard-client-flat-theme .notification-badge[hidden] {
  display: none !important;
}

body.dashboard-client-flat-theme .notification-empty strong {
  color: #0f172a !important;
  font-size: 13px !important;
}

body.dashboard-client-flat-theme .notification-empty span {
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.dashboard-client-flat-theme .notification-popover-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  margin-top: 10px !important;
}

body.dashboard-client-flat-theme .notification-popover-link,
body.dashboard-client-flat-theme .notification-clear-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 38px !important;
  border-radius: 13px !important;
  border: 0 !important;
  text-decoration: none !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .notification-popover-link {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
}

body.dashboard-client-flat-theme .notification-clear-button {
  padding: 0 12px !important;
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.08) !important;
  cursor: pointer !important;
}

body.dashboard-client-flat-theme .notification-popover-link:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
}

body.dashboard-client-flat-theme .notification-clear-button:hover {
  color: #ffffff !important;
  background: #7c3aed !important;
}

body.dashboard-client-flat-theme #sales-pipeline.pipeline-panel-clean,
body[data-company-theme] > .shell #sales-pipeline.pipeline-panel-clean {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme #sales-pipeline.pipeline-panel-clean::before,
body.dashboard-client-flat-theme #sales-pipeline.pipeline-panel-clean::after,
body[data-company-theme] > .shell #sales-pipeline.pipeline-panel-clean::before,
body[data-company-theme] > .shell #sales-pipeline.pipeline-panel-clean::after {
  display: none !important;
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-board,
body[data-company-theme] > .shell #sales-pipeline .pipeline-board {
  grid-template-columns: repeat(6, minmax(176px, 1fr)) !important;
  min-width: 1120px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-board-scroll,
body[data-company-theme] > .shell #sales-pipeline .pipeline-board-scroll {
  padding-bottom: 0 !important;
}

body.dashboard-client-flat-theme #sales-pipeline + .panel,
body[data-company-theme] > .shell #sales-pipeline + .panel {
  margin-top: 6px !important;
  padding-top: 14px !important;
}

body.dashboard-client-flat-theme .pipeline-data-strip,
body[data-company-theme] > .shell .pipeline-data-strip {
  display: grid !important;
  gap: 12px !important;
  margin: 0 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .app-topbar-pipeline .dashboard-welcome-title,
body[data-company-theme] > .shell .app-topbar-pipeline .dashboard-welcome-title {
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body.dashboard-client-flat-theme .app-header-title-icon,
body[data-company-theme] > .shell .app-header-title-icon {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12) !important;
}

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

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

body.dashboard-client-flat-theme .app-header-title-icon--whatsapp,
body[data-company-theme] > .shell .app-header-title-icon--whatsapp {
  color: #16a34a !important;
  background: rgba(34, 197, 94, 0.12) !important;
  box-shadow: 0 12px 24px rgba(22, 163, 74, 0.14) !important;
}

body.dashboard-client-flat-theme .app-header-title-icon--right,
body[data-company-theme] > .shell .app-header-title-icon--right {
  margin-left: 2px !important;
}

body.dashboard-client-flat-theme .app-header-title-icon--hand.app-header-title-icon--right,
body[data-company-theme] > .shell .app-header-title-icon--hand.app-header-title-icon--right {
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font-size: 0.9em !important;
  line-height: 1 !important;
  transform: translateY(-1px);
}

body.dashboard-client-flat-theme .pipeline-data-strip-head,
body[data-company-theme] > .shell .pipeline-data-strip-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 16px !important;
  flex-wrap: wrap !important;
}

body.dashboard-client-flat-theme .pipeline-title-block,
body[data-company-theme] > .shell .pipeline-title-block {
  display: flex !important;
  align-items: flex-start !important;
  flex: 1 1 520px !important;
  gap: 14px !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme .pipeline-title-icon,
body[data-company-theme] > .shell .pipeline-title-icon {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 16px !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.08) !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.12) !important;
}

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

body.dashboard-client-flat-theme .pipeline-data-strip-head h2,
body[data-company-theme] > .shell .pipeline-data-strip-head h2 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

body.dashboard-client-flat-theme .pipeline-data-strip-head p,
body[data-company-theme] > .shell .pipeline-data-strip-head p {
  margin: 6px 0 0 !important;
  color: #64748b !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}

body.dashboard-client-flat-theme .pipeline-title-actions,
body[data-company-theme] > .shell .pipeline-title-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 4px !important;
}

body.dashboard-client-flat-theme .pipeline-top-stage,
body[data-company-theme] > .shell .pipeline-top-stage {
  min-height: 42px !important;
  padding: 0 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 9px !important;
  border: 1px solid rgba(124, 58, 237, 0.2) !important;
  border-radius: 14px !important;
  color: #64748b !important;
  background: rgba(124, 58, 237, 0.04) !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .pipeline-top-stage svg,
body[data-company-theme] > .shell .pipeline-top-stage svg {
  width: 18px !important;
  height: 18px !important;
  color: #7c3aed !important;
}

body.dashboard-client-flat-theme .pipeline-top-stage strong,
body[data-company-theme] > .shell .pipeline-top-stage strong {
  color: #7c3aed !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .pipeline-add-button,
body[data-company-theme] > .shell .pipeline-add-button {
  min-height: 42px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #ffffff !important;
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

body.dashboard-client-flat-theme .pipeline-add-button span,
body[data-company-theme] > .shell .pipeline-add-button span {
  font-size: 18px !important;
  line-height: 1 !important;
}

body.dashboard-client-flat-theme .pipeline-data-card-grid,
body[data-company-theme] > .shell .pipeline-data-card-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.dashboard-client-flat-theme .pipeline-data-card,
body[data-company-theme] > .shell .pipeline-data-card {
  --pipeline-data-color: #2563eb;
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 112px !important;
  padding: 20px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 18px !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer !important;
  overflow: hidden !important;
  position: relative !important;
  text-align: left !important;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease !important;
}

body.dashboard-client-flat-theme .pipeline-data-card:hover,
body.dashboard-client-flat-theme .pipeline-data-card.is-active,
body[data-company-theme] > .shell .pipeline-data-card:hover,
body[data-company-theme] > .shell .pipeline-data-card.is-active {
  border-color: color-mix(in srgb, var(--pipeline-data-color) 35%, rgba(148, 163, 184, 0.2)) !important;
  background: color-mix(in srgb, var(--pipeline-data-color) 5%, transparent) !important;
  transform: translateY(-1px) !important;
}

body.dashboard-client-flat-theme .pipeline-data-card.is-purple,
body[data-company-theme] > .shell .pipeline-data-card.is-purple {
  --pipeline-data-color: #7c3aed;
}

body.dashboard-client-flat-theme .pipeline-data-card.is-orange,
body[data-company-theme] > .shell .pipeline-data-card.is-orange {
  --pipeline-data-color: #f97316;
}

body.dashboard-client-flat-theme .pipeline-data-card.is-green,
body[data-company-theme] > .shell .pipeline-data-card.is-green {
  --pipeline-data-color: #16a34a;
}

body.dashboard-client-flat-theme .pipeline-data-icon,
body[data-company-theme] > .shell .pipeline-data-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 17px !important;
  color: var(--pipeline-data-color) !important;
  background: color-mix(in srgb, var(--pipeline-data-color) 12%, transparent) !important;
}

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

body.dashboard-client-flat-theme .pipeline-data-copy,
body[data-company-theme] > .shell .pipeline-data-copy {
  display: grid !important;
  gap: 6px !important;
  min-width: 0 !important;
  padding-right: 72px !important;
}

body.dashboard-client-flat-theme .pipeline-data-card small,
body[data-company-theme] > .shell .pipeline-data-card small {
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .pipeline-data-card strong,
body[data-company-theme] > .shell .pipeline-data-card strong {
  color: #0f172a !important;
  font-size: 32px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .pipeline-data-card em,
body[data-company-theme] > .shell .pipeline-data-card em {
  overflow: hidden !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .pipeline-mini-chart,
body[data-company-theme] > .shell .pipeline-mini-chart {
  width: 76px !important;
  max-width: 100% !important;
  position: absolute !important;
  right: 18px !important;
  bottom: 20px !important;
  color: var(--pipeline-data-color) !important;
  opacity: 0.92 !important;
  overflow: visible !important;
}

body.dashboard-client-flat-theme .pipeline-mini-chart-path,
body[data-company-theme] > .shell .pipeline-mini-chart-path {
  stroke-dasharray: 160 !important;
  stroke-dashoffset: 0 !important;
  transition: stroke-dashoffset 0.28s ease, stroke-width 0.18s ease !important;
}

body.dashboard-client-flat-theme .pipeline-mini-chart circle,
body[data-company-theme] > .shell .pipeline-mini-chart circle {
  fill: #ffffff !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  opacity: 0 !important;
  transform-origin: center !important;
  transition: opacity 0.18s ease, r 0.18s ease !important;
}

body.dashboard-client-flat-theme .pipeline-data-card:hover .pipeline-mini-chart-path,
body.dashboard-client-flat-theme .pipeline-data-card.is-active .pipeline-mini-chart-path,
body[data-company-theme] > .shell .pipeline-data-card:hover .pipeline-mini-chart-path,
body[data-company-theme] > .shell .pipeline-data-card.is-active .pipeline-mini-chart-path {
  stroke-width: 4 !important;
}

body.dashboard-client-flat-theme .pipeline-data-card:hover .pipeline-mini-chart circle,
body.dashboard-client-flat-theme .pipeline-data-card.is-active .pipeline-mini-chart circle,
body[data-company-theme] > .shell .pipeline-data-card:hover .pipeline-mini-chart circle,
body[data-company-theme] > .shell .pipeline-data-card.is-active .pipeline-mini-chart circle {
  opacity: 1 !important;
}

body.dashboard-client-flat-theme .pipeline-chart-tooltip,
body[data-company-theme] > .shell .pipeline-chart-tooltip {
  position: absolute !important;
  right: 14px !important;
  top: 12px !important;
  max-width: 180px !important;
  padding: 6px 8px !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  background: var(--pipeline-data-color) !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--pipeline-data-color) 20%, transparent) !important;
  font-size: 10px !important;
  font-weight: 850 !important;
  line-height: 1.15 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  text-align: center !important;
  transform: translateY(-4px) !important;
  transition: opacity 0.18s ease, transform 0.18s ease !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .pipeline-data-card:hover .pipeline-chart-tooltip,
body.dashboard-client-flat-theme .pipeline-data-card.is-active .pipeline-chart-tooltip,
body[data-company-theme] > .shell .pipeline-data-card:hover .pipeline-chart-tooltip,
body[data-company-theme] > .shell .pipeline-data-card.is-active .pipeline-chart-tooltip {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane {
  --lane-color: #2563eb;
  border-radius: 16px !important;
  border-color: color-mix(in srgb, var(--lane-color) 22%, rgba(148, 163, 184, 0.2)) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane[data-lane="action_required"],
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane[data-lane="action_required"] {
  --lane-color: #7c3aed;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane[data-lane="hot"],
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane[data-lane="hot"] {
  --lane-color: #f97316;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane[data-lane="won"],
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane[data-lane="won"] {
  --lane-color: #16a34a;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane[data-lane="cold"],
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane[data-lane="cold"] {
  --lane-color: #0ea5e9;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane[data-lane="lost"],
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane[data-lane="lost"] {
  --lane-color: #64748b;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane::before,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane::before {
  background: var(--lane-color) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane.is-dimmed,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane.is-dimmed {
  opacity: 0.34 !important;
  filter: grayscale(0.45) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane.is-focused,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane.is-focused {
  border-color: color-mix(in srgb, var(--lane-color) 42%, rgba(148, 163, 184, 0.24)) !important;
  background: color-mix(in srgb, var(--lane-color) 5%, transparent) !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr.pipeline-filter-hidden,
body[data-company-theme] > .shell .lead-table tbody tr.pipeline-filter-hidden {
  display: none !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane-header strong,
body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane-header span,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane-header strong,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane-header span {
  color: var(--lane-color) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-lane-header span,
body[data-company-theme] > .shell #sales-pipeline .pipeline-lane-header span {
  background: color-mix(in srgb, var(--lane-color) 12%, transparent) !important;
  border-color: color-mix(in srgb, var(--lane-color) 18%, transparent) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket {
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100% !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-avatar,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-avatar {
  width: 38px !important;
  height: 38px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.12) !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket:nth-child(2n) .pipeline-ticket-avatar,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket:nth-child(2n) .pipeline-ticket-avatar {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.13) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket:nth-child(3n) .pipeline-ticket-avatar,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket:nth-child(3n) .pipeline-ticket-avatar {
  color: #0891b2 !important;
  background: rgba(8, 145, 178, 0.12) !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-line,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-line {
  display: grid !important;
  justify-content: initial !important;
  justify-items: start !important;
  align-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-title,
body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-meta,
body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-footer,
body.dashboard-client-flat-theme #sales-pipeline .pipeline-ticket-chip,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-title,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-meta,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-footer,
body[data-company-theme] > .shell #sales-pipeline .pipeline-ticket-chip {
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme .lead-table,
body[data-company-theme] > .shell .lead-table {
  border-spacing: 0 6px !important;
  font-size: 14px !important;
}

body.dashboard-client-flat-theme .lead-table .lead-item td,
body[data-company-theme] > .shell .lead-table .lead-item td {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

body.dashboard-client-flat-theme .lead-table .lead-item td:first-child,
body[data-company-theme] > .shell .lead-table .lead-item td:first-child {
  padding-left: 14px !important;
}

body.dashboard-client-flat-theme .lead-table .lead-item td:last-child,
body[data-company-theme] > .shell .lead-table .lead-item td:last-child {
  padding-right: 14px !important;
}

body.dashboard-client-flat-theme .lead-avatar,
body[data-company-theme] > .shell .lead-avatar {
  width: 42px !important;
  height: 42px !important;
  border-radius: 999px !important;
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.12) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme .lead-avatar .fallback,
body[data-company-theme] > .shell .lead-avatar .fallback {
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: inherit !important;
  color: #ffffff !important;
  opacity: 0.96 !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(2n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(2n) .lead-avatar {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.13) !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(3n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(3n) .lead-avatar {
  color: #0891b2 !important;
  background: rgba(8, 145, 178, 0.12) !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(4n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(4n) .lead-avatar {
  color: #16a34a !important;
  background: rgba(22, 163, 74, 0.12) !important;
}

body.dashboard-client-flat-theme .lead-contact-actions,
body[data-company-theme] > .shell .lead-contact-actions {
  gap: 6px !important;
}

body.dashboard-client-flat-theme .lead-contact-actions .icon-btn.mini,
body.dashboard-client-flat-theme .lead-contact-menu-trigger,
body[data-company-theme] > .shell .lead-contact-actions .icon-btn.mini,
body[data-company-theme] > .shell .lead-contact-menu-trigger {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 12px !important;
}

body.dashboard-client-flat-theme .lead-notifications .notification-list,
body[data-company-theme] > .shell .lead-notifications .notification-list {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  min-width: 0 !important;
  max-width: 260px !important;
}

body.dashboard-client-flat-theme .lead-notifications .notification-item,
body[data-company-theme] > .shell .lead-notifications .notification-item {
  margin: 0 !important;
}

body.dashboard-client-flat-theme .lead-notifications .status-badge,
body.dashboard-client-flat-theme .lead-table .status-badge,
body[data-company-theme] > .shell .lead-notifications .status-badge,
body[data-company-theme] > .shell .lead-table .status-badge {
  min-width: auto !important;
  padding: 3px 7px !important;
  font-size: 9px !important;
  letter-spacing: 0.035em !important;
}

body.dashboard-client-flat-theme .panel,
body.dashboard-client-flat-theme .metric-card,
body.dashboard-client-flat-theme .analytics-metric-card,
body.dashboard-client-flat-theme .dashboard-stat-card,
body.dashboard-client-flat-theme .table-modern,
body.dashboard-client-flat-theme .dashboard-global-table-wrap,
body.dashboard-client-flat-theme .dashboard-profile-panel {
  background: transparent !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}

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

body.dashboard-client-flat-theme .dashboard-stat-card {
  min-height: 142px !important;
  padding: 20px !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card .analytics-metric-icon {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  display: inline-grid !important;
  place-items: center !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card .analytics-metric-icon svg {
  width: 25px !important;
  height: 25px !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--appointments .analytics-metric-icon {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.12) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--patients .analytics-metric-icon {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.12) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--leads .analytics-metric-icon {
  color: #16a34a !important;
  background: rgba(22, 163, 74, 0.12) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--whatsapp_unanswered .analytics-metric-icon {
  color: #10b981 !important;
  background: rgba(16, 185, 129, 0.13) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--followup .analytics-metric-icon {
  color: #f97316 !important;
  background: rgba(249, 115, 22, 0.13) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--overview .analytics-metric-icon {
  color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.13) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--appointments .dashboard-trend {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.09) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--patients .dashboard-trend {
  color: #2563eb !important;
  background: rgba(37, 99, 235, 0.09) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--leads .dashboard-trend,
body.dashboard-client-flat-theme .dashboard-stat-card--whatsapp_unanswered .dashboard-trend {
  color: #16a34a !important;
  background: rgba(22, 163, 74, 0.09) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--followup .dashboard-trend {
  color: #f97316 !important;
  background: rgba(249, 115, 22, 0.1) !important;
}

body.dashboard-client-flat-theme .dashboard-stat-card--overview .dashboard-trend {
  color: #4f46e5 !important;
  background: rgba(79, 70, 229, 0.1) !important;
}

body.dashboard-client-flat-theme .dashboard-appointment-mix-panel .panel-header {
  margin-bottom: 14px !important;
}

body.dashboard-client-flat-theme .dashboard-appointment-mix-panel .dashboard-donut-wrap {
  height: 178px !important;
}

body.dashboard-client-flat-theme .dashboard-appointment-mix-panel .dashboard-donut-shell {
  gap: 12px !important;
}

body.dashboard-client-flat-theme .dashboard-appointment-mix-panel .dashboard-donut-legend {
  gap: 8px !important;
}

body.dashboard-client-flat-theme .dashboard-appointment-mix-panel .dashboard-legend-item {
  padding: 8px 10px !important;
  background: transparent !important;
}

body.dashboard-client-flat-theme .dashboard-inline-title-icon--violet {
  color: #7c3aed !important;
  background: rgba(124, 58, 237, 0.1) !important;
}

body.dashboard-client-flat-theme .panel-header {
  padding: 0 0 16px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: transparent !important;
}

body.dashboard-client-flat-theme .dashboard-chart-grid > .panel {
  display: grid !important;
  grid-template-rows: auto 1fr !important;
  align-content: start !important;
}

body.dashboard-client-flat-theme .dashboard-chart-grid > .panel > .panel-header {
  display: grid !important;
  align-items: start !important;
  min-height: 70px !important;
  margin-bottom: 16px !important;
}

body.dashboard-client-flat-theme .dashboard-chart-grid > .panel > .panel-header > div {
  display: grid !important;
  align-content: start !important;
  gap: 6px !important;
  min-height: 52px !important;
}

body.dashboard-client-flat-theme .dashboard-chart-grid .panel-header h3 {
  min-height: 18px !important;
  margin: 0 !important;
  font-size: 15px !important;
  line-height: 1.18 !important;
  letter-spacing: -0.01em !important;
}

body.dashboard-client-flat-theme .dashboard-chart-grid .panel-header p {
  max-width: 420px !important;
  min-height: 32px !important;
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

body.dashboard-client-flat-theme .analytics-chart-wrap,
body.dashboard-client-flat-theme .dashboard-donut-shell,
body.dashboard-client-flat-theme .table-wrap,
body.dashboard-client-flat-theme .dashboard-doctor-card,
body.dashboard-client-flat-theme .dashboard-doctor-metric,
body.dashboard-client-flat-theme .dashboard-patient-item,
body.dashboard-client-flat-theme .dashboard-commercial-summary-card,
body.dashboard-client-flat-theme .dashboard-commercial-list,
body.dashboard-client-flat-theme .dashboard-commercial-list-row,
body.dashboard-client-flat-theme .dashboard-commercial-discipline,
body.dashboard-client-flat-theme .dashboard-commercial-discipline-row,
body.dashboard-client-flat-theme .dashboard-commercial-brief-card,
body.dashboard-client-flat-theme .dashboard-commercial-brief-item,
body.dashboard-client-flat-theme .dashboard-commercial-connection-card,
body.dashboard-client-flat-theme .dashboard-empty-state,
body.dashboard-client-flat-theme .dashboard-global-summary-item,
body.dashboard-client-flat-theme .dashboard-global-plan-item {
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .analytics-chart-wrap,
body.dashboard-client-flat-theme .dashboard-donut-shell,
body.dashboard-client-flat-theme .dashboard-doctor-card,
body.dashboard-client-flat-theme .dashboard-commercial-summary-card,
body.dashboard-client-flat-theme .dashboard-commercial-list,
body.dashboard-client-flat-theme .dashboard-commercial-discipline,
body.dashboard-client-flat-theme .dashboard-commercial-brief-card,
body.dashboard-client-flat-theme .dashboard-commercial-connection-card {
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 16px !important;
}

body.dashboard-client-flat-theme .dashboard-doctor-metric,
body.dashboard-client-flat-theme .dashboard-patient-item,
body.dashboard-client-flat-theme .dashboard-commercial-list-row,
body.dashboard-client-flat-theme .dashboard-commercial-discipline-row,
body.dashboard-client-flat-theme .dashboard-commercial-brief-item,
body.dashboard-client-flat-theme .dashboard-global-summary-item,
body.dashboard-client-flat-theme .dashboard-global-plan-item {
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 14px !important;
}

body.dashboard-client-flat-theme .dashboard-doctor-metrics {
  gap: 8px !important;
}

body.dashboard-client-flat-theme .dashboard-doctor-metric {
  min-height: 76px !important;
  align-content: center !important;
  justify-items: center !important;
  gap: 5px !important;
  padding: 12px 8px !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme .dashboard-doctor-metric strong {
  order: 1 !important;
  font-size: clamp(18px, 2.1vw, 24px) !important;
  line-height: 1 !important;
  font-weight: 850 !important;
}

body.dashboard-client-flat-theme .dashboard-doctor-metric span {
  order: 2 !important;
  max-width: 100% !important;
  color: #64748b !important;
  font-size: 9px !important;
  line-height: 1.15 !important;
  letter-spacing: 0.035em !important;
  text-wrap: balance !important;
}

body.dashboard-client-flat-theme .data-table,
body.dashboard-client-flat-theme .dashboard-table {
  background: transparent !important;
}

body.dashboard-client-flat-theme .data-table thead th,
body.dashboard-client-flat-theme .dashboard-table thead th {
  background: transparent !important;
  color: #64748b !important;
}

body.dashboard-client-flat-theme .data-table tbody tr,
body.dashboard-client-flat-theme .dashboard-table tbody tr {
  background: transparent !important;
}

body.dashboard-client-flat-theme .data-table tbody tr:hover,
body.dashboard-client-flat-theme .dashboard-table tbody tr:hover {
  background: transparent !important;
}

body.dashboard-client-flat-theme .analytics-metric-icon,
body.dashboard-client-flat-theme .dashboard-doctor-avatar,
body.dashboard-client-flat-theme .company-cell-avatar {
  box-shadow: none !important;
}

body.dashboard-client-flat-theme :is(
  .panel,
  .metric-card,
  .analytics-metric-card,
  .dashboard-stat-card,
  .dashboard-stat-head,
  .dashboard-trend,
  .dashboard-global-panel,
  .dashboard-global-summary-item,
  .dashboard-global-plan-item,
  .dashboard-chart-wrap,
  .analytics-chart-wrap,
  .dashboard-donut-shell,
  .dashboard-donut-legend,
  .dashboard-donut-legend li,
  .dashboard-donut-legend-item,
  .dashboard-doctor-card,
  .dashboard-doctor-metric,
  .dashboard-profile-panel,
  .dashboard-patient-item,
  .dashboard-commercial-summary-card,
  .dashboard-commercial-list,
  .dashboard-commercial-list-row,
  .dashboard-commercial-discipline,
  .dashboard-commercial-discipline-row,
  .dashboard-commercial-brief-card,
  .dashboard-commercial-brief-item,
  .dashboard-commercial-connection-card,
  .dashboard-empty-state,
  .table-wrap,
  .table-modern,
  .data-table,
  .dashboard-table,
  .dashboard-table-date,
  .dashboard-table-actions
) {
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme :is(.metric-card, .analytics-metric-card, .dashboard-stat-card)::before,
body.dashboard-client-flat-theme :is(.metric-card, .analytics-metric-card, .dashboard-stat-card)::after,
body.dashboard-client-flat-theme :is(.panel, .table-wrap, .table-modern, .dashboard-chart-wrap, .analytics-chart-wrap)::before,
body.dashboard-client-flat-theme :is(.panel, .table-wrap, .table-modern, .dashboard-chart-wrap, .analytics-chart-wrap)::after {
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

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

body.dashboard-client-flat-theme :is(.data-table, .dashboard-table) :is(tr:hover, tr:hover th, tr:hover td) {
  background: transparent !important;
}

body.dashboard-client-flat-theme .dashboard-table-action,
body.dashboard-client-flat-theme .btn-secondary.dashboard-table-action {
  background: transparent !important;
  border-color: rgba(37, 99, 235, 0.28) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme .dashboard-table-action:hover,
body.dashboard-client-flat-theme .btn-secondary.dashboard-table-action:hover {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.4) !important;
}

/* Menu interno: estado activo hereda el tema del tenant. */
body[data-company-theme] > .shell .sidebar .nav-dot,
body[data-company-theme] > .shell .sidebar .nav-dot.active,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active,
body[data-company-theme] > .shell .sidebar .sidebar-footer-link {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .sidebar .nav-dot.active,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active {
  color: var(--primary-color, #2563eb) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .sidebar .nav-dot.active .nav-label,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active .nav-label,
body[data-company-theme] > .shell .sidebar .nav-dot.active .nav-icon,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active .nav-icon,
body[data-company-theme] > .shell .sidebar .nav-dot.active svg,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active svg {
  color: var(--primary-color, #2563eb) !important;
}

body[data-company-theme] > .shell .sidebar .nav-dot:hover:not(.active) {
  color: var(--primary-color, #2563eb) !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Menu interno: paleta por icono, compartida por todas las paginas. */
body[data-company-theme] > .shell .sidebar .nav-icon,
body[data-company-theme] > .shell .sidebar .sidebar-footer-icon {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key] .nav-icon,
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key] .nav-icon svg,
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key] .nav-icon i {
  color: var(--lf-nav-icon-color, #64748b) !important;
}

body[data-company-theme] > .shell .sidebar .nav-icon svg,
body[data-company-theme] > .shell .sidebar .nav-icon i,
body[data-company-theme] > .shell .sidebar .sidebar-footer-icon svg {
  width: 26px !important;
  height: 26px !important;
  stroke-width: 2.1 !important;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="analytics"] {
  --lf-nav-icon-color: #2563eb;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="leads"] {
  --lf-nav-icon-color: #7c3aed;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="clients"],
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="agents"],
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="team"],
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="operations-team"] {
  --lf-nav-icon-color: #0891b2;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="whatsapp"] {
  --lf-nav-icon-color: #16a34a;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="campaigns"] {
  --lf-nav-icon-color: #f97316;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="social"] {
  --lf-nav-icon-color: #db2777;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="commercial_ai_assistant"] {
  --lf-nav-icon-color: #7c3aed;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="billing"] {
  --lf-nav-icon-color: #4f46e5;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="modules-admin"] {
  --lf-nav-icon-color: #0d9488;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="help"] {
  --lf-nav-icon-color: #d97706;
}

body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key="settings"],
body[data-company-theme] > .shell .sidebar .nav-dot[data-nav-key^="settings-"] {
  --lf-nav-icon-color: #475569;
}

body[data-company-theme] > .shell .sidebar .nav-dot.active .nav-icon,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active .nav-icon,
body[data-company-theme] > .shell .sidebar .nav-dot.active .nav-icon svg,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active .nav-icon svg,
body[data-company-theme] > .shell .sidebar .nav-dot.active .nav-icon i,
body[data-company-theme] > .shell .sidebar .nav-dot.is-active .nav-icon i {
  color: var(--primary-color, var(--lf-nav-icon-color, #2563eb)) !important;
}

/* Cabecera interna unica: misma presencia visual que dashboard en todas las paginas. */
body[data-company-theme] > .shell .dashboard-topbar.app-topbar {
  min-height: auto !important;
  margin-bottom: 22px !important;
  padding: 4px 2px 20px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  flex-wrap: wrap !important;
  overflow: visible !important;
}

body[data-company-theme] > .shell .dashboard-welcome-title {
  font-size: clamp(28px, 3vw, 42px) !important;
  line-height: 1.04 !important;
}

body[data-company-theme] > .shell .dashboard-topbar .subtitle {
  max-width: 760px !important;
}

body[data-company-theme] > .shell .dashboard-topbar .app-topbar-copy {
  flex: 1 1 420px !important;
  min-width: 260px !important;
}

body[data-company-theme] > .shell .dashboard-topbar-actions.app-topbar-actions {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin-left: auto !important;
  justify-content: flex-end !important;
  gap: 12px !important;
}

body[data-company-theme] > .shell .lf-header-search {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  min-width: 44px !important;
  height: 44px !important;
  z-index: 4 !important;
}

body[data-company-theme] > .shell .lf-header-search-toggle {
  position: absolute !important;
  inset: 0 auto 0 0 !important;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid color-mix(in srgb, var(--primary-color, #2563eb) 24%, transparent) !important;
  border-radius: 999px !important;
  background: var(--primary-light, rgba(37, 99, 235, 0.08)) !important;
  color: var(--primary-color, #2563eb) !important;
  cursor: pointer !important;
  transition: transform 0.22s ease, opacity 0.18s ease, background 0.2s ease !important;
}

body[data-company-theme] > .shell .lf-header-search-toggle:hover {
  transform: scale(1.06) !important;
  background: color-mix(in srgb, var(--primary-color, #2563eb) 14%, transparent) !important;
}

body[data-company-theme] > .shell .lf-header-search svg {
  width: 19px !important;
  height: 19px !important;
  flex: 0 0 auto !important;
}

body[data-company-theme] > .shell .lf-header-search-field {
  width: 44px !important;
  height: 44px !important;
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  padding: 0 13px !important;
  border: 1px solid rgba(124, 58, 237, 0.22) !important;
  border-radius: 999px !important;
  background: rgba(248, 250, 252, 0.42) !important;
  color: #7c3aed !important;
  opacity: 0 !important;
  overflow: hidden !important;
  transform: scaleX(0.72) !important;
  transform-origin: right center !important;
  pointer-events: none !important;
  transition: width 0.28s ease, opacity 0.18s ease, transform 0.28s ease, background 0.2s ease !important;
}

body[data-company-theme] > .shell .lf-header-search.is-open .lf-header-search-toggle {
  opacity: 0 !important;
  transform: scale(0.86) !important;
  pointer-events: none !important;
}

body[data-company-theme] > .shell .lf-header-search.is-open .lf-header-search-field {
  width: min(320px, 42vw) !important;
  opacity: 1 !important;
  transform: scaleX(1) !important;
  pointer-events: auto !important;
  background: rgba(248, 250, 252, 0.78) !important;
}

body[data-company-theme] > .shell .lf-header-search-field input {
  width: 100% !important;
  min-width: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  font: inherit !important;
  font-size: 14px !important;
}

body[data-company-theme] > .shell .lf-header-search-status {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  min-width: 240px !important;
  max-width: 340px !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(148, 163, 184, 0.2) !important;
  border-radius: 12px !important;
  background: rgba(248, 250, 252, 0.92) !important;
  color: #64748b !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
  opacity: 0 !important;
  transform: translateY(-4px) !important;
  pointer-events: none !important;
  transition: opacity 0.18s ease, transform 0.18s ease !important;
}

body[data-company-theme] > .shell .lf-header-search.is-open .lf-header-search-status:not(:empty) {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

body[data-company-theme] > .shell .lf-header-search-status button {
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  color: #7c3aed !important;
  font: inherit !important;
  font-weight: 800 !important;
  cursor: pointer !important;
}

body[data-company-theme] > .shell .lf-search-hidden {
  display: none !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-chip {
  max-width: min(420px, calc(100vw - 320px)) !important;
  min-width: 0 !important;
  overflow: visible !important;
  flex-shrink: 1 !important;
  gap: 10px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-avatar {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 62%, #a855f7 100%) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-avatar::before,
body[data-company-theme] > .shell .dashboard-topbar .user-avatar::after,
body[data-company-theme] > .shell .dashboard-topbar .user-avatar .status-dot {
  display: none !important;
  content: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-avatar img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 999px !important;
  object-fit: cover !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-chip-profile-link,
body[data-company-theme] > .shell .dashboard-topbar .user-chip-profile-link > a,
body[data-company-theme] > .shell .dashboard-topbar .user-chip-profile-link > a > div:last-child {
  min-width: 0 !important;
  overflow: hidden !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-name {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-company-theme] > .shell .dashboard-topbar .user-chip-inline-logout {
  display: inline-flex !important;
  color: #2563eb !important;
  margin-left: 8px !important;
}

@media (max-width: 1180px) {
  body[data-company-theme] > .shell .dashboard-topbar .user-chip {
    max-width: 100% !important;
  }

  body[data-company-theme] > .shell .dashboard-topbar-actions.app-topbar-actions {
    width: 100% !important;
  }
}

/* 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;
}

/* Dashboard layout lock: keep Pipeline de leads attached to Tareas y prioridades. */
html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) {
  row-gap: 12px !important;
  column-gap: 18px !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-pipeline-agenda-grid {
  margin-top: 0 !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) :is(
  .dashboard-task-panel,
  .dashboard-ai-brief-panel,
  .dashboard-pipeline-panel,
  .dashboard-agenda-card-panel
) {
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

@media (min-width: 981px) {
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) :is(
    .dashboard-priority-brief-grid,
    .dashboard-pipeline-agenda-grid
  ) {
    display: contents !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-task-panel {
    grid-row: 2 !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-pipeline-panel {
    grid-row: 3 !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-ai-brief-panel {
    grid-row: 2 !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-agenda-card-panel {
    grid-row: 3 !important;
  }
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-legend {
  display: grid !important;
  gap: 8px !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-shell {
  grid-template-columns: 132px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-legend {
  align-content: center !important;
  min-width: 0 !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-wrap {
  position: relative !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-center {
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  z-index: 2 !important;
  width: 72px !important;
  display: grid !important;
  justify-items: center !important;
  gap: 2px !important;
  transform: translate(-50%, -50%) !important;
  text-align: center !important;
  pointer-events: none !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-center strong {
  color: #0f172a !important;
  font-size: 25px !important;
  font-weight: 950 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-center span {
  max-width: 72px !important;
  color: #64748b !important;
  font-size: 9px !important;
  font-weight: 850 !important;
  line-height: 1.1 !important;
  text-transform: uppercase !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-legend-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-legend-item strong {
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 950 !important;
}

@media (max-width: 980px) {
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-shell {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-legend {
    width: 100% !important;
  }
}

@media (min-width: 981px) and (max-width: 1440px) {
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-task-panel,
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-pipeline-panel {
    grid-column: 1 / 7 !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-ai-brief-panel,
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-agenda-card-panel {
    grid-column: 7 / -1 !important;
  }
}

@media (min-width: 1441px) {
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-task-panel,
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-pipeline-panel {
    grid-column: 1 / 5 !important;
  }

  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-ai-brief-panel,
  html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-workspace:not(.dashboard-workspace--global) .dashboard-agenda-card-panel {
    grid-column: 5 / 10 !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;
}

body.dashboard-client-flat-theme .lead-table tbody tr .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr .lead-avatar {
  background: rgba(37, 99, 235, 0.16) !important;
  color: #2563eb !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(2n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(2n) .lead-avatar {
  background: rgba(124, 58, 237, 0.16) !important;
  color: #7c3aed !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(3n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(3n) .lead-avatar {
  background: rgba(8, 145, 178, 0.15) !important;
  color: #0891b2 !important;
}

body.dashboard-client-flat-theme .lead-table tbody tr:nth-child(4n) .lead-avatar,
body[data-company-theme] > .shell .lead-table tbody tr:nth-child(4n) .lead-avatar {
  background: rgba(22, 163, 74, 0.15) !important;
  color: #16a34a !important;
}

/* 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;
}

/* 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;
  }
}

/* Sidebar final lock: no white panel behind the shared app menu. */
body.lf-clean-theme > .shell > aside.sidebar,
body.lf-clean-theme > .shell > .sidebar,
body.dashboard-client-flat-theme > .shell > aside.sidebar,
body[data-company-theme] > .shell > aside.sidebar {
  position: relative !important;
  z-index: 12000 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

body.lf-clean-theme > .shell > aside.sidebar::before,
body.lf-clean-theme > .shell > aside.sidebar::after,
body.dashboard-client-flat-theme > .shell > aside.sidebar::before,
body.dashboard-client-flat-theme > .shell > aside.sidebar::after,
body[data-company-theme] > .shell > aside.sidebar::before,
body[data-company-theme] > .shell > aside.sidebar::after {
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.lf-clean-theme > .shell > aside.sidebar :is(
  .sidebar-brand,
  .sidebar-nav-shell,
  .sidebar-menu-panel,
  .sidebar-footer-actions,
  .sidebar-footer-card,
  .nav-group,
  .nav-group-children
),
body.dashboard-client-flat-theme > .shell > aside.sidebar :is(
  .sidebar-brand,
  .sidebar-nav-shell,
  .sidebar-menu-panel,
  .sidebar-footer-actions,
  .sidebar-footer-card,
  .nav-group,
  .nav-group-children
) {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

/* Asistente IA: chat central para busqueda y gestion del negocio. */
body[data-company-theme] > .shell .ai-assistant-workspace {
  min-height: calc(100vh - 76px) !important;
  display: grid !important;
  align-content: center !important;
  gap: 18px !important;
  padding: 44px 18px 34px !important;
  background: transparent !important;
}

body[data-company-theme] > .shell .ai-assistant-center {
  width: min(100%, 820px) !important;
  justify-self: center !important;
  display: grid !important;
  justify-items: center !important;
  gap: 16px !important;
  text-align: center !important;
}

body[data-company-theme] > .shell .ai-chat-question {
  max-width: 560px !important;
  margin: 0 !important;
  color: #111827 !important;
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
}

body[data-company-theme] > .shell .ai-assistant-mark {
  width: 58px !important;
  height: 58px !important;
  display: inline-grid !important;
  place-items: center !important;
  color: #7c3aed !important;
  background: transparent !important;
}

body[data-company-theme] > .shell .ai-assistant-mark svg {
  width: 46px !important;
  height: 46px !important;
}

body[data-company-theme] > .shell .ai-assistant-center h1 {
  margin: 0 !important;
  color: #111827 !important;
  font-size: clamp(34px, 5vw, 58px) !important;
  font-weight: 850 !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

body[data-company-theme] > .shell .ai-assistant-center p:not(.ai-chat-question) {
  max-width: 680px !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

body[data-company-theme] > .shell .ai-chat-search {
  position: relative !important;
  isolation: isolate !important;
  width: min(100%, 760px) !important;
  min-height: 68px !important;
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 14px !important;
  margin-top: 0 !important;
  padding: 11px 13px 11px 23px !important;
  border: 2px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 22px !important;
  background: transparent !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.04) !important;
  overflow: visible !important;
}

body[data-company-theme] > .shell .ai-chat-search::before {
  content: "" !important;
  position: absolute !important;
  inset: -5px !important;
  z-index: -2 !important;
  padding: 4px !important;
  border-radius: 28px !important;
  background: conic-gradient(
    from var(--ai-glow-angle, 0deg),
    transparent 0deg,
    rgba(37, 99, 235, 0.18) 40deg,
    rgba(124, 58, 237, 0.9) 92deg,
    rgba(59, 130, 246, 0.72) 150deg,
    transparent 225deg,
    rgba(168, 85, 247, 0.58) 300deg,
    transparent 360deg
  ) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask-composite: exclude !important;
  animation: aiGlowOrbit 7s linear infinite !important;
  filter: drop-shadow(0 0 16px rgba(124, 58, 237, 0.18)) !important;
}

body[data-company-theme] > .shell .ai-chat-search::after {
  content: "" !important;
  position: absolute !important;
  inset: 2px !important;
  z-index: -1 !important;
  border-radius: 21px !important;
  background: rgba(248, 250, 252, 0.22) !important;
  backdrop-filter: blur(12px) saturate(1.1) !important;
}

@property --ai-glow-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes aiGlowOrbit {
  to {
    --ai-glow-angle: 360deg;
  }
}

body[data-company-theme] > .shell .ai-chat-search svg {
  width: 25px !important;
  height: 25px !important;
  color: #7c3aed !important;
}

body[data-company-theme] > .shell .ai-chat-search input {
  width: 100% !important;
  min-width: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  font-size: 17px !important;
  font-weight: 650 !important;
}

body[data-company-theme] > .shell .ai-chat-search input::placeholder {
  color: #94a3b8 !important;
}

body[data-company-theme] > .shell .ai-chat-search button,
body[data-company-theme] > .shell .ai-quick-prompts button {
  border: 0 !important;
  cursor: pointer !important;
  font-weight: 850 !important;
}

body[data-company-theme] > .shell .ai-chat-search button {
  width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: #7c3aed !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(124, 58, 237, 0.28) !important;
}

body[data-company-theme] > .shell .ai-chat-search button svg {
  width: 22px !important;
  height: 22px !important;
  color: currentColor !important;
}

body[data-company-theme] > .shell .ai-chat-search button:disabled,
body[data-company-theme] > .shell .ai-chat-search input:disabled {
  opacity: 0.58 !important;
  cursor: wait !important;
}

body[data-company-theme] > .shell .ai-quick-prompts {
  display: flex !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button {
  min-height: 36px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #475569 !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button:nth-child(1) {
  color: #2563eb !important;
  border-color: rgba(37, 99, 235, 0.42) !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08) !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button:nth-child(2) {
  color: #7c3aed !important;
  border-color: rgba(124, 58, 237, 0.44) !important;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08) !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button:nth-child(3) {
  color: #16a34a !important;
  border-color: rgba(22, 163, 74, 0.4) !important;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.08) !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button:nth-child(4) {
  color: #f97316 !important;
  border-color: rgba(249, 115, 22, 0.38) !important;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.08) !important;
}

body[data-company-theme] > .shell .ai-quick-prompts button:hover {
  transform: translateY(-1px) !important;
  filter: saturate(1.15) !important;
}

body[data-company-theme] > .shell .ai-chat-shell {
  width: min(100%, 820px) !important;
  justify-self: center !important;
}

body[data-company-theme] > .shell .ai-chat-messages {
  display: grid !important;
  gap: 12px !important;
}

body[data-company-theme] > .shell .ai-message {
  max-width: 78% !important;
  display: grid !important;
  gap: 6px !important;
  padding: 14px 16px !important;
  border-radius: 18px !important;
  background: transparent !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  color: #1f2937 !important;
}

body[data-company-theme] > .shell .ai-message--user {
  justify-self: end !important;
  border-color: rgba(124, 58, 237, 0.28) !important;
  color: #2e1065 !important;
}

body[data-company-theme] > .shell .ai-message[data-pending="true"] {
  color: #64748b !important;
  border-color: rgba(124, 58, 237, 0.24) !important;
  animation: aiMessagePulse 1.4s ease-in-out infinite !important;
}

@keyframes aiMessagePulse {
  0%, 100% {
    opacity: 0.68;
  }

  50% {
    opacity: 1;
  }
}


body[data-company-theme] > .shell .ai-message span {
  color: #7c3aed !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
}

body[data-company-theme] > .shell .ai-message p {
  margin: 0 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

body[data-company-theme] > .shell .ai-business-context {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body[data-company-theme] > .shell .ai-context-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-company-theme] > .shell .ai-context-grid article,
body[data-company-theme] > .shell .ai-context-list,
body[data-company-theme] > .shell .ai-context-list article {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-company-theme] > .shell .ai-context-grid article {
  display: grid !important;
  gap: 4px !important;
  padding: 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px !important;
}

body[data-company-theme] > .shell .ai-context-grid span,
body[data-company-theme] > .shell .ai-context-list h2 {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

body[data-company-theme] > .shell .ai-context-grid strong {
  color: #111827 !important;
  font-size: 24px !important;
}

body[data-company-theme] > .shell .ai-context-grid small,
body[data-company-theme] > .shell .ai-context-list small,
body[data-company-theme] > .shell .ai-context-list span {
  color: #64748b !important;
  font-size: 12px !important;
}

body[data-company-theme] > .shell .ai-context-list {
  display: grid !important;
  gap: 8px !important;
}

body[data-company-theme] > .shell .ai-context-list h2 {
  margin: 0 !important;
}

body[data-company-theme] > .shell .ai-context-list article {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 10px 0 !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
}

body[data-company-theme] > .shell .ai-context-list strong {
  color: #111827 !important;
  font-size: 13px !important;
}

@media (max-width: 900px) {
  body[data-company-theme] > .shell .ai-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body[data-company-theme] > .shell .ai-context-list article {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  body[data-company-theme] > .shell .ai-chat-search {
    grid-template-columns: 24px minmax(0, 1fr) !important;
  }

  body[data-company-theme] > .shell .ai-chat-search button {
    grid-column: 1 / -1 !important;
  }

  body[data-company-theme] > .shell .ai-message {
    max-width: 100% !important;
  }
}

/* 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;
}

/* Consolidated global Empresas styles. Keep this as the final dashboard layer. */
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-workspace--global > .dashboard-main-column--global > .panel,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-workspace--global > .dashboard-main-column > .panel:first-child {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  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-workspace--global {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px) !important;
  gap: 18px !important;
  overflow: visible !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global {
  grid-column: 1 !important;
  order: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: minmax(0, 1fr) !important;
  overflow: visible !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global {
  grid-column: 2 !important;
  order: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global > .panel,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global .dashboard-stat-grid,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global .dashboard-global-table-wrap {
  width: auto !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global .dashboard-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td {
  padding-left: 10px !important;
  padding-right: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(1),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(1) {
  width: 35% !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(2),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(2),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(3),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(3) {
  width: 12% !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(4),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(4),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(5),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(5) {
  width: 9.5% !important;
  text-align: center !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(6),
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) {
  width: 22% !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  text-align: left !important;
  vertical-align: middle !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(6) .dashboard-actions-heading {
  height: 48px !important;
  display: grid !important;
  grid-template-columns: 96px 96px !important;
  align-items: center !important;
  justify-content: end !important;
  justify-items: stretch !important;
  column-gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(6) .dashboard-actions-heading > span {
  display: inline-flex !important;
  justify-content: center !important;
  width: 100% !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(6) .dashboard-create-client-button {
  width: 96px !important;
  height: 28px !important;
  min-height: 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 7px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  transform: none !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap th:nth-child(6) .dashboard-create-client-button svg {
  width: 13px !important;
  height: 13px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-table-actions {
  display: grid !important;
  grid-template-columns: 96px 96px !important;
  align-items: center !important;
  justify-content: end !important;
  justify-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-table-action {
  height: 34px !important;
  min-height: 34px !important;
  width: 96px !important;
  min-width: 0 !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-table-action svg {
  width: 14px !important;
  height: 14px !important;
  flex: 0 0 auto !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-row-menu {
  justify-self: end !important;
  width: 34px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-row-menu summary {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  display: inline-grid !important;
  place-items: center !important;
  margin: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(6) .dashboard-row-menu-list {
  right: 0 !important;
  min-width: 136px !important;
  text-align: left !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(2) .dashboard-status-chip,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap td:nth-child(3) .dashboard-plan-chip {
  margin-left: auto !important;
  margin-right: auto !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global {
  gap: 14px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global .dashboard-global-panel {
  padding: 14px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global .panel-header {
  padding-bottom: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global .panel-header h3 {
  font-size: 17px !important;
  line-height: 1.15 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global .panel-header p {
  margin-top: 5px !important;
  font-size: 12px !important;
  line-height: 1.3 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-list {
  gap: 0 !important;
  margin-top: 8px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-item {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 10px !important;
  min-height: 52px !important;
  padding: 9px 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-panel--summary .dashboard-global-summary-item {
  grid-template-columns: 32px minmax(0, 1fr) !important;
  min-height: 44px !important;
  padding: 7px 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-panel--summary .dashboard-global-summary-item + .dashboard-global-summary-item {
  border-top-color: rgba(226, 232, 240, 0.7) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
}

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

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy span,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy small {
  font-size: 11px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy span {
  min-width: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy strong {
  margin-top: 0 !important;
  font-size: 19px !important;
  flex: 0 0 auto !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-summary-copy small {
  display: none !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-distribution {
  grid-template-columns: 60px minmax(0, 1fr) !important;
  gap: 10px !important;
  margin-top: 10px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-donut {
  width: 58px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-donut::after {
  inset: 14px !important;
}

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

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-item {
  min-height: 40px !important;
  padding: 7px 9px !important;
  gap: 8px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-copy {
  min-width: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-copy strong {
  gap: 6px !important;
  font-size: 12px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-plan-dot {
  width: 8px !important;
  height: 8px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-copy span {
  margin-top: 2px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-share {
  min-width: 44px !important;
  min-height: 24px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-plan-share strong {
  font-size: 11px !important;
}

/* Global create-client modal: single source of truth for the compact dialog. */
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal {
  padding: 18px !important;
  place-items: center !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-backdrop {
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-dialog--create {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  width: min(500px, calc(100vw - 32px)) !important;
  max-height: min(680px, calc(100vh - 32px)) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(248, 250, 252, 0.98) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-header {
  display: grid !important;
  min-height: 0 !important;
  align-items: center !important;
  grid-template-columns: 30px 1fr 28px !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(241, 245, 249, 0.72) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-header-icon {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  background: rgba(79, 70, 229, 0.11) !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-header-icon svg {
  width: 16px !important;
  height: 16px !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-kicker {
  display: none !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-header h3 {
  margin: 0 !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-header p {
  max-width: 340px !important;
  margin-top: 2px !important;
  color: #64748b !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-close {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.82) !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-form {
  display: grid !important;
  max-height: none !important;
  overflow: auto !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 14px 16px 16px !important;
}

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

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field--wide {
  grid-column: 1 / -1 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field input,
body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field select {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px 0 32px !important;
  border-color: rgba(148, 163, 184, 0.32) !important;
  background: rgba(248, 250, 252, 0.82) !important;
  color: #0f172a !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field-icon {
  position: absolute !important;
  top: 50% !important;
  left: 10px !important;
  width: 13px !important;
  height: 13px !important;
  display: inline-grid !important;
  place-items: center !important;
  transform: translateY(-50%) !important;
  color: #4f46e5 !important;
  opacity: 0.86 !important;
  pointer-events: none !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-field-icon svg {
  width: 13px !important;
  height: 13px !important;
  display: block !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-form-section {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  font-size: 10.5px !important;
  letter-spacing: 0.04em !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-actions {
  justify-content: flex-end !important;
  margin: 0 !important;
  padding-top: 0 !important;
}

body.dashboard-client-flat-theme[data-company-theme="global"] > .shell #superadmin-client-create-modal .dashboard-client-edit-actions button {
  min-width: 142px !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
}

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

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

  body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-main-column--global,
  body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-side-column--global {
    grid-column: 1 !important;
  }

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

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

  body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap {
    overflow-x: auto !important;
  }

  body.dashboard-client-flat-theme[data-company-theme="global"] > .shell .dashboard-global-table-wrap table {
    min-width: 760px !important;
  }
}

/* Create-client modal: compact layout independent from .shell placement. */
#superadmin-client-create-modal {
  padding: 18px !important;
  place-items: center !important;
}

#superadmin-client-create-modal .dashboard-client-edit-backdrop {
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
}

#superadmin-client-create-modal .dashboard-client-edit-dialog--create {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  width: min(500px, calc(100vw - 32px)) !important;
  max-height: min(680px, calc(100vh - 32px)) !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(248, 250, 252, 0.98) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24) !important;
}

#superadmin-client-create-modal .dashboard-client-edit-header {
  display: grid !important;
  min-height: 0 !important;
  align-items: center !important;
  grid-template-columns: 28px minmax(0, 1fr) 28px !important;
  gap: 10px !important;
  margin: 0 !important;
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(241, 245, 249, 0.72) !important;
}

#superadmin-client-create-modal .dashboard-client-edit-header-icon {
  position: static !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 9px !important;
  background: rgba(79, 70, 229, 0.11) !important;
  color: #4f46e5 !important;
  overflow: hidden !important;
}

#superadmin-client-create-modal .dashboard-client-edit-header h3 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-header p {
  max-width: 340px !important;
  margin: 2px 0 0 !important;
  color: #64748b !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-close {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.82) !important;
  color: #64748b !important;
  font-size: 18px !important;
  line-height: 1 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-form {
  display: grid !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 14px 16px 16px !important;
  gap: 10px !important;
  overflow: auto !important;
}

#superadmin-client-create-modal .dashboard-client-form-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#superadmin-client-create-modal .dashboard-client-field {
  position: relative !important;
  display: block !important;
  min-width: 0 !important;
  margin: 0 !important;
  color: inherit !important;
}

#superadmin-client-create-modal .dashboard-client-field--wide {
  grid-column: 1 / -1 !important;
}

#superadmin-client-create-modal .dashboard-client-field input,
#superadmin-client-create-modal .dashboard-client-field select {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px 0 34px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 10px !important;
  background: rgba(248, 250, 252, 0.82) !important;
  color: #0f172a !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-header-icon svg,
#superadmin-client-create-modal .dashboard-client-field-icon svg {
  display: block !important;
  flex: 0 0 auto !important;
  max-width: 14px !important;
  max-height: 14px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
}

#superadmin-client-create-modal .dashboard-client-field-icon {
  position: absolute !important;
  top: 50% !important;
  left: 11px !important;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  transform: translateY(-50%) !important;
  color: #64748b !important;
  opacity: 0.9 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

#superadmin-client-create-modal .dashboard-client-edit-kicker {
  display: none !important;
}

#superadmin-client-create-modal .dashboard-client-form-section {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-actions {
  justify-content: flex-end !important;
  margin: 0 !important;
  padding-top: 0 !important;
}

#superadmin-client-create-modal .dashboard-client-edit-actions button {
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 10px !important;
}

@media (max-width: 640px) {
  #superadmin-client-create-modal .dashboard-client-form-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Plans admin: catalog only, no company-assignment table. */
body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] td {
  vertical-align: middle !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] td:first-child {
  min-width: 170px !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] td:first-child small {
  margin-top: 4px !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  text-transform: uppercase !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] .plans-admin-price-input {
  width: min(180px, 100%) !important;
  background: rgba(248, 250, 252, 0.78) !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] .plans-admin-name-input {
  width: min(280px, 100%) !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] .plans-admin-computed-price {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 36px !important;
  min-width: 120px !important;
  padding: 0 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 12px !important;
  background: rgba(248, 250, 252, 0.58) !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-table tr[data-plan-catalog-row] .plans-save-state {
  display: inline-flex !important;
  min-width: 88px !important;
  justify-content: center !important;
  padding: 7px 10px !important;
  border-radius: 999px !important;
  background: rgba(37, 99, 235, 0.08) !important;
  color: #2563eb !important;
}

body.dashboard-client-flat-theme > .shell .plans-admin-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
}

body.dashboard-client-flat-theme > .shell .plans-create-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(37, 99, 235, 0.24) !important;
  border-radius: 12px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme > .shell .plans-create-button svg {
  width: 16px !important;
  height: 16px !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-panel {
  display: grid !important;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) !important;
  gap: 16px !important;
  margin: 14px 0 18px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-head {
  display: grid !important;
  align-items: stretch !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-head > div {
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-height: 112px !important;
  padding: 16px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px !important;
  background: rgba(248, 250, 252, 0.62) !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-head span {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-head strong {
  color: #0f172a !important;
  font-size: 34px !important;
  line-height: 1 !important;
  font-weight: 950 !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-head small {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 750 !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-list {
  display: grid !important;
  gap: 10px !important;
  min-width: 0 !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-row {
  display: grid !important;
  gap: 8px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  border-radius: 14px !important;
  background: rgba(248, 250, 252, 0.62) !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-row-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-row-head strong {
  min-width: 0 !important;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-row-head span {
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-track {
  width: 100% !important;
  height: 9px !important;
  overflow: hidden !important;
  border-radius: 999px !important;
  background: rgba(148, 163, 184, 0.16) !important;
}

body.dashboard-client-flat-theme > .shell .plans-usage-track span {
  display: block !important;
  height: 100% !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, #2563eb, #7c3aed) !important;
}

@media (max-width: 860px) {
  body.dashboard-client-flat-theme > .shell .plans-usage-panel {
    grid-template-columns: 1fr !important;
  }
}

.plans-create-modal[hidden] {
  display: none !important;
}

.plans-create-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 1300 !important;
  display: grid !important;
  place-items: center !important;
  padding: 18px !important;
}

.plans-create-backdrop {
  position: absolute !important;
  inset: 0 !important;
  border: 0 !important;
  background: rgba(15, 23, 42, 0.42) !important;
  backdrop-filter: blur(14px) saturate(1.05) !important;
  cursor: pointer !important;
}

.plans-create-dialog {
  position: relative !important;
  display: grid !important;
  width: min(460px, calc(100vw - 32px)) !important;
  overflow: hidden !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 16px !important;
  background: rgba(248, 250, 252, 0.98) !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24) !important;
}

.plans-create-header {
  display: grid !important;
  align-items: center !important;
  grid-template-columns: 28px minmax(0, 1fr) 28px !important;
  gap: 10px !important;
  padding: 14px 16px 12px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18) !important;
  background: rgba(241, 245, 249, 0.72) !important;
}

.plans-create-icon {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 9px !important;
  background: rgba(79, 70, 229, 0.11) !important;
  color: #4f46e5 !important;
}

.plans-create-icon svg,
.plans-create-field-icon svg {
  width: 14px !important;
  height: 14px !important;
  display: block !important;
}

.plans-create-header h3 {
  margin: 0 !important;
  color: #0f172a !important;
  font-size: 18px !important;
  line-height: 1.15 !important;
}

.plans-create-header p {
  margin: 2px 0 0 !important;
  color: #64748b !important;
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

.plans-create-close {
  width: 28px !important;
  height: 28px !important;
  display: inline-grid !important;
  place-items: center !important;
  padding: 0 !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  border-radius: 8px !important;
  background: rgba(248, 250, 252, 0.82) !important;
  color: #64748b !important;
  font-size: 18px !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.plans-create-form {
  display: grid !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 14px 16px 16px !important;
}

.plans-create-form label {
  position: relative !important;
  display: block !important;
  margin: 0 !important;
}

.plans-create-field-icon {
  position: absolute !important;
  top: 50% !important;
  left: 11px !important;
  width: 14px !important;
  height: 14px !important;
  display: inline-grid !important;
  place-items: center !important;
  transform: translateY(-50%) !important;
  color: #64748b !important;
  pointer-events: none !important;
}

.plans-create-form input {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 12px 0 34px !important;
  border: 1px solid rgba(148, 163, 184, 0.32) !important;
  border-radius: 10px !important;
  background: rgba(248, 250, 252, 0.82) !important;
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.plans-create-status {
  min-height: 14px !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

.plans-create-form button[type="submit"] {
  width: 100% !important;
  height: 40px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

/* Clientes: fondo claro y superficies transparentes como el resto del tema. */
body.clients-clear-page,
body.clients-clear-page > .shell,
body.clients-clear-page > .shell .main.lf-page {
  background: #ffffff !important;
}

body.clients-clear-page > .shell .clients-panel.clients-page-surface,
body.clients-clear-page > .shell .clients-panel.clients-page-surface.lf-surface,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-table-scroll,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .team-grid {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.clients-clear-page > .shell .clients-panel.clients-page-surface::before,
body.clients-clear-page > .shell .clients-panel.clients-page-surface::after,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-table-scroll::before,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-table-scroll::after {
  display: none !important;
  content: none !important;
}

body.clients-clear-page > .shell .clients-kpi-card {
  background: transparent !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-search-field,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-filter-button,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .clients-pagination button,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .client-action-icon,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .record-action-trigger {
  background: transparent !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
  box-shadow: none !important;
}

body.clients-clear-page > .shell .clients-panel.clients-page-surface .team-header {
  background: transparent !important;
}

body.clients-clear-page > .shell .clients-panel.clients-page-surface .team-card,
body.clients-clear-page > .shell .clients-panel.clients-page-surface .team-card:hover {
  background: transparent !important;
  box-shadow: none !important;
}

/* Dashboard: centrar el texto del donut con la misma caja del canvas. */
html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-wrap {
  width: 132px !important;
  height: 132px !important;
  min-height: 132px !important;
  display: grid !important;
  place-items: center !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-wrap canvas {
  width: 132px !important;
  height: 132px !important;
  max-width: 132px !important;
  max-height: 132px !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-center {
  inset: 0 !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: grid !important;
  place-content: center !important;
  justify-items: center !important;
  transform: none !important;
}

html body.dashboard-client-flat-theme[data-company-theme] > .shell .dashboard-appointment-mix-panel .dashboard-donut-center strong {
  line-height: 0.95 !important;
  text-align: center !important;
}

/* Detalle medico: sin tarjetas blancas anidadas y con IA integrada al rail. */
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .whatsapp-main,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .whatsapp-layout {
  background: transparent !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell :is(
  .detail-panel,
  .lead-detail-progress-panel,
  .chat-panel
) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell :is(
  .detail-quick-actions.patient-card,
  .lead-detail-progress-panel .progress-card--actionable,
  .lead-detail-progress-panel .journey-card-panel,
  .chat-panel .chat-header,
  .chat-panel .chat-stack,
  .medical-ai-card
) {
  background: transparent !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell :is(
  .detail-tabs,
  .detail-tab-panel,
  .lead-detail-progress-panel .journey-tab-btn,
  .lead-detail-progress-panel .journey-mini-stat,
  .lead-detail-progress-panel .journey-item,
  .chat-panel .chat-messages,
  .chat-panel .chat-bar
) {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .lead-detail-progress-panel .journey-card-panel {
  color: #0f172a !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .lead-detail-progress-panel :is(
  .journey-heading-row h4,
  .journey-mini-stat strong,
  .journey-title,
  .journey-tab-title,
  #medical-diagnosis-summary,
  #medical-treatment-summary
) {
  color: #0f172a !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .lead-detail-progress-panel :is(
  .journey-card-copy p,
  .journey-note
) {
  color: #475569 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .lead-detail-progress-panel :is(
  .journey-kicker,
  .journey-tab-step,
  .journey-mini-stat-label
) {
  color: #475569 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .lead-detail-progress-panel .journey-tab-btn.active {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: rgba(37, 99, 235, 0.24) !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card {
  display: grid !important;
  gap: 0 !important;
  margin-top: 14px !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__header {
  width: 100% !important;
  min-height: 64px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 14px 16px !important;
  border: 0 !important;
  background: transparent !important;
  color: #0f172a !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__header h3,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__header p {
  margin: 0 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__header h3 {
  font-size: 15px !important;
  font-weight: 900 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__header p {
  margin-top: 3px !important;
  color: #64748b !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__toggle-icon {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  color: var(--primary-color, #2563eb) !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__toggle-icon svg {
  width: 18px !important;
  height: 18px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__panel {
  display: grid !important;
  grid-template-rows: 0fr !important;
  transition: grid-template-rows 0.2s ease !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card:not(.is-collapsed) .insurance-ai-card__panel {
  grid-template-rows: 1fr !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__panel-inner {
  min-height: 0 !important;
  overflow: hidden !important;
  display: grid !important;
  gap: 12px !important;
  padding: 0 16px 16px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__panel-inner,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-prompt {
  background: transparent !important;
  box-shadow: none !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__actions {
  display: grid !important;
  gap: 8px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 58px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 13px !important;
  color: #0f172a !important;
  text-align: left !important;
  cursor: pointer !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action > svg,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action > i {
  width: 18px !important;
  height: 18px !important;
  color: var(--primary-color, #2563eb) !important;
  justify-self: center !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action__copy {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action strong {
  color: #0f172a !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-action span {
  color: #64748b !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-prompt {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 8px !important;
  padding-top: 2px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-prompt textarea {
  width: 100% !important;
  min-height: 42px !important;
  max-height: 120px !important;
  resize: vertical !important;
  padding: 11px 12px !important;
  border: 1px solid rgba(148, 163, 184, 0.28) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #0f172a !important;
  font: inherit !important;
  font-size: 12px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-prompt button,
body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__button {
  min-height: 42px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: #2563eb !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  cursor: pointer !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme > .shell .medical-ai-card .insurance-ai-card__button {
  width: 100% !important;
  background: transparent !important;
  color: var(--primary-color, #2563eb) !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal[hidden] {
  display: none !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 12000 !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal__backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(15, 23, 42, 0.38) !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal__dialog {
  position: relative !important;
  width: min(560px, calc(100vw - 32px)) !important;
  margin: 9vh auto 0 !important;
  padding: 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.18) !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal__dialog header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body[data-detail-mode="medical"].dashboard-client-flat-theme .insurance-ai-actions-modal__grid button {
  display: grid !important;
  gap: 6px !important;
  min-height: 104px !important;
  padding: 14px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #0f172a !important;
  text-align: left !important;
}

/* 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;
}

